Uploads a video to YouTube, using the properties from video and the file data written to the resulting
UploadStream.
If video has already been inserted, a gdata_service_error_entry_already_inserted error
will be returned. If no user is authenticated with the service, gdata_service_error_authentication_required
will be returned.
The stream returned by this function should be written to using the standard
OutputStream methods, asynchronously or synchronously. Once the
stream is closed (using close),
finish_video_upload should be called on it to parse and return
the updated YouTubeVideo for the uploaded video. This must be done, as video
isn't updated in-place.
In order to cancel the upload, a Cancellable passed in to cancellable
must be cancelled using cancel. Cancelling the individual
OutputStream operations on the
UploadStream will not cancel the entire upload; merely the write or close operation in
question. See the cancellable for more details.
Any upload errors will be thrown by the stream methods, and may come from the ServiceError domain.
| this | |
| video |
a YouTubeVideo to insert |
| slug |
the filename to give to the uploaded file |
| content_type |
the content type of the uploaded data |
| cancellable |
a Cancellable for the entire upload stream, or null |
|
a UploadStream to write the video data to, or null ; unref with unref |