An object capable of transcoding a source URI to a destination file. More...
import"sbITranscodeJob.idl";
Public Member Functions | |
PRInt32 | vote (in sbIMediaItem aMediaItem, in sbITranscodeProfile aProfile) |
Vote to be the handler returned for the given url. More... | |
PRInt64 | estimateOutputSize (in PRInt32 inputDuration) |
Conservatively estimate the output size in bytes, given an input duration in milliseconds, and the currently-set profile. More... | |
void | transcode () |
Start the transcoding operation. More... | |
Public Attributes | |
attribute sbIPropertyArray | metadata |
An array of metadata properties. More... | |
attribute nsIInputStream | metadataImage |
An input stream for the encoded image. More... | |
attribute AString | sourceURI |
The source URI to transcode from. More... | |
attribute AString | destURI |
The destination URI to transcode to. More... | |
attribute sbITranscodeProfile | profile |
The encoding profile to use. More... | |
readonly attribute nsIArray | availableProfiles |
Get an array of all sbITranscodeProfiles that can be used with this job. More... | |
An object capable of transcoding a source URI to a destination file.
User code should request an instance using sbITranscodeManager::getTranscoder()
Implementations should also implement sbIJobProgress, and usually sbIJobCancelable.
Definition at line 53 of file sbITranscodeJob.idl.
PRInt64 sbITranscodeJob::estimateOutputSize | ( | in PRInt32 | inputDuration | ) |
Conservatively estimate the output size in bytes, given an input duration in milliseconds, and the currently-set profile.
void sbITranscodeJob::transcode | ( | ) |
Start the transcoding operation.
Caller should monitor progress via sbIJobProgress
PRInt32 sbITranscodeJob::vote | ( | in sbIMediaItem | aMediaItem, |
in sbITranscodeProfile | aProfile | ||
) |
Vote to be the handler returned for the given url.
The sbITranscodeManager will instantiate one of every sbITranscodeJob subclass and ask it to vote on whether it can support transcoding a given media item with a given transcoding profile. The highest vote will be used as the handler for the media item.
Values less than zero cause that handler to be ignored.
At the moment, our handlers return -1, 0, or 1 (for "no," "maybe," and "yes").
aMediaItem | The media item on which to vote |
aProfile | The transcoding profile to be used |
readonly attribute nsIArray sbITranscodeJob::availableProfiles |
Get an array of all sbITranscodeProfiles that can be used with this job.
Definition at line 101 of file sbITranscodeJob.idl.
attribute AString sbITranscodeJob::destURI |
The destination URI to transcode to.
Note that, in general, only file URIs will be supported for destination URI.
Definition at line 87 of file sbITranscodeJob.idl.
attribute sbIPropertyArray sbITranscodeJob::metadata |
An array of metadata properties.
Metadata properties to be written into the destination file. Metadata items in this property array should be used to replace those in the source file (where present), and add them otherwise. Metadata items present in the source stream but not in this array should be preserved where possible.
Definition at line 64 of file sbITranscodeJob.idl.
attribute nsIInputStream sbITranscodeJob::metadataImage |
An input stream for the encoded image.
If an image is desired in the encoded file (e.g. album art cover), set this to an input stream that the encoded image can be read from.
Definition at line 72 of file sbITranscodeJob.idl.
attribute sbITranscodeProfile sbITranscodeJob::profile |
The encoding profile to use.
A profile description for the transcode.
Definition at line 95 of file sbITranscodeJob.idl.
attribute AString sbITranscodeJob::sourceURI |
The source URI to transcode from.
Definition at line 79 of file sbITranscodeJob.idl.