#include <sbGStreamerTranscodeAudioConfigurator.h>
Classes | |
struct | EncoderProfileData |
Public Member Functions | |
NS_IMETHOD | GetInputUri (nsIURI **aUri) |
NS_IMETHOD | SetInputUri (nsIURI *aUri) |
NS_IMETHOD | GetInputFormat (sbIMediaFormat **aInputFormat) |
NS_IMETHOD | SetInputFormat (sbIMediaFormat *aInputFormat) |
NS_IMETHOD | GetLastError (sbITranscodeError **aLastError) |
NS_IMETHOD | GetMuxer (nsAString &aMuxer) |
NS_IMETHOD | GetUseMuxer (PRBool *aUseMuxer) |
NS_IMETHOD | GetFileExtension (nsACString &aFileExtension) |
NS_IMETHOD | GetVideoEncoder (nsAString &aVideoEncoder) |
NS_IMETHOD | GetUseVideoEncoder (PRBool *aUseVideoEncoder) |
NS_IMETHOD | GetVideoFormat (sbIMediaFormatVideo **aVideoFormat) |
NS_IMETHOD | GetAudioEncoder (nsAString &aAudioEncoder) |
NS_IMETHOD | GetUseAudioEncoder (PRBool *aUseAudioEncoder) |
NS_IMETHOD | GetAudioFormat (sbIMediaFormatAudio **aAudioFormat) |
NS_IMETHOD | GetVideoEncoderProperties (nsIPropertyBag **aVideoEncoderProperties) |
NS_IMETHOD | GetAudioEncoderProperties (nsIPropertyBag **aAudioEncoderProperties) |
NS_IMETHOD | DetermineOutputType () |
NS_IMETHOD | Configurate () |
NS_IMETHOD | GetAvailableProfiles (nsIArray **aProfiles) |
sbGStreamerTranscodeAudioConfigurator () | |
Public Member Functions inherited from sbTranscodingConfigurator | |
NS_DECL_ISUPPORTS NS_DECL_SBITRANSCODINGCONFIGURATOR | sbTranscodingConfigurator () |
Public Member Functions inherited from sbITranscodingConfigurator | |
void | determineOutputType () |
Determine the trancode destination format to use, based on the target device and desired output quality settings. The device must be set before calling this function. This will only determine the file format settings, not the details such as dimensions or bitrates. The muxer and encoder attributes below may be read after calling this method, but not the format details or properties. More... | |
void | configurate () |
Determine the transcode settings to use based on the input given. Both the device and the input format must be set before calling this function. Once this is called, the functions below may be called (they will throw an error if called before this function is called). More... | |
Protected Member Functions | |
virtual | ~sbGStreamerTranscodeAudioConfigurator () |
nsresult | EnsureProfileAvailable (sbITranscodeProfile *aProfile) |
nsresult | CheckProfileSupportedByDevice (sbITranscodeProfile *aProfile, sbIAudioFormatType **aFormat) |
nsresult | SelectProfile () |
nsresult | SelectOutputAudioFormat () |
nsresult | SetAudioProperties () |
nsresult | CopyPropertiesIntoBag (nsIArray *aSrcProps, nsIWritablePropertyBag *aDstBag, PRBool aIsVideo) |
nsresult | ApplyPreferencesToPropertyArray (sbIDevice *aDevice, nsIArray *aPropertyArray, nsString aPrefNameBase) |
Protected Member Functions inherited from sbTranscodingConfigurator | |
virtual | ~sbTranscodingConfigurator () |
Protected Attributes | |
nsDataHashtable < nsISupportsHashKey, EncoderProfileData > | mElementNames |
nsCOMPtr< sbIDevice > | mDevice |
nsCOMPtr< nsIArray > | mAvailableProfiles |
nsCOMPtr< sbITranscodeProfile > | mSelectedProfile |
nsCOMPtr< sbIAudioFormatType > | mSelectedFormat |
PRBool | mProfileFromPrefs |
PRBool | mProfileFromGlobalPrefs |
Protected Attributes inherited from sbTranscodingConfigurator | |
CONFIGURATE_STATE | mConfigurateState |
nsCOMPtr< nsIURI > | mInputUri |
nsCOMPtr< sbITranscodeError > | mLastError |
nsCOMPtr< sbIMediaFormat > | mInputFormat |
PRBool | mUseMuxer |
nsString | mMuxer |
PRBool | mUseVideoEncoder |
nsString | mVideoEncoder |
PRBool | mUseAudioEncoder |
nsString | mAudioEncoder |
nsCString | mFileExtension |
nsCOMPtr< sbIMediaFormatVideo > | mVideoFormat |
nsCOMPtr< sbIMediaFormatAudio > | mAudioFormat |
nsCOMPtr< nsIWritablePropertyBag2 > | mVideoEncoderProperties |
nsCOMPtr< nsIWritablePropertyBag2 > | mAudioEncoderProperties |
Additional Inherited Members | |
Public Attributes inherited from sbITranscodingConfigurator | |
readonly attribute nsIArray | availableProfiles |
attribute nsIURI | inputUri |
attribute sbIMediaFormat | inputFormat |
The input format to use when configuring the transcode profile. More... | |
readonly attribute sbITranscodeError | lastError |
readonly attribute AString | muxer |
The muxer to use. The name is specific to the transcoder (for example, this may be a gstreamer element name for a gstreamer-based transcoder). More... | |
readonly attribute boolean | useMuxer |
Whether a muxer is in use. e.g. for a bare FLAC audio file it won't be. More... | |
readonly attribute ACString | fileExtension |
The file extension to use for transcoded files. This may depend on the muxer or the used codecs. It may also depend on nothing at all; it's all up to the configurator. More... | |
readonly attribute AString | videoEncoder |
The video encoder to use. The name is specific to the transcoder (for example, this may be a gstreamer element name for a gstreamer-based transcoder). More... | |
readonly attribute boolean | useVideoEncoder |
Whether a video encoder is in use. If this is true, the videoEncoder attribute must be non-empty. More... | |
readonly attribute AString | audioEncoder |
The audio encoder to use. The name is specific to the transcoder (for example, this may be a gstreamer element name for a gstreamer-based transcoder). This may be a void string if raw audio is desired. More... | |
readonly attribute boolean | useAudioEncoder |
Whether a audio encoder is in use. If this is true, the audioEncoder attribute may be empty; indicating that raw audio is desired. More... | |
readonly attribute sbIMediaFormatVideo | videoFormat |
The basic video format for data that is not specific to a particular codec. More... | |
readonly attribute sbIMediaFormatAudio | audioFormat |
The basic audio format for data that is not specific to a particular codec. More... | |
readonly attribute nsIPropertyBag | videoEncoderProperties |
With the input given, return the properties to set on the encoder to encode this format. This is used to e.g. select a bitrate for the video encoder. More... | |
readonly attribute nsIPropertyBag | audioEncoderProperties |
With the input given, return the properties to set on the encoder to encode this format. This is used to e.g. select a bitrate for the audio encoder. More... | |
Public Attributes inherited from sbIDeviceTranscodingConfigurator | |
attribute sbIDevice | device |
Set the device that we get the capabilities from, using the capabilities of the device this function will set inputFormat for the configurate function to use so we can limit the transcoding to only what this device supports. More... | |
Protected Types inherited from sbTranscodingConfigurator | |
enum | CONFIGURATE_STATE { CONFIGURATE_NOT_STARTED, CONFIGURATE_OUTPUT_SET, CONFIGURATE_FINISHED } |
Definition at line 55 of file sbGStreamerTranscodeAudioConfigurator.h.
sbGStreamerTranscodeAudioConfigurator::sbGStreamerTranscodeAudioConfigurator | ( | ) |
Definition at line 170 of file sbGStreamerTranscodeAudioConfigurator.cpp.
|
protectedvirtual |
Definition at line 184 of file sbGStreamerTranscodeAudioConfigurator.cpp.
|
protected |
Definition at line 752 of file sbGStreamerTranscodeAudioConfigurator.cpp.
|
protected |
Definition at line 366 of file sbGStreamerTranscodeAudioConfigurator.cpp.
NS_IMETHODIMP sbGStreamerTranscodeAudioConfigurator::Configurate | ( | ) |
Definition at line 1002 of file sbGStreamerTranscodeAudioConfigurator.cpp.
|
protected |
Copy properties, either audio or video.
aSrcProps | the properties to copy from |
aDstBag | the property bag to output |
aIsVideo | true if this is for video, false for audio |
Definition at line 818 of file sbGStreamerTranscodeAudioConfigurator.cpp.
NS_IMETHODIMP sbGStreamerTranscodeAudioConfigurator::DetermineOutputType | ( | ) |
Definition at line 965 of file sbGStreamerTranscodeAudioConfigurator.cpp.
|
protected |
Make sure the given transcode profile does not use any gstreamer elements that we do not have access to.
aProfile | the profile to test |
NS_ERROR_NOT_AVAILABLE | if the profile uses elements that are not found |
Check that we have an audio encoder available
Definition at line 281 of file sbGStreamerTranscodeAudioConfigurator.cpp.
|
inline |
Definition at line 78 of file sbGStreamerTranscodeAudioConfigurator.h.
|
inline |
Definition at line 82 of file sbGStreamerTranscodeAudioConfigurator.h.
|
inline |
Definition at line 80 of file sbGStreamerTranscodeAudioConfigurator.h.
NS_IMETHODIMP sbGStreamerTranscodeAudioConfigurator::GetAvailableProfiles | ( | nsIArray ** | aProfiles | ) |
Definition at line 862 of file sbGStreamerTranscodeAudioConfigurator.cpp.
|
inline |
Definition at line 74 of file sbGStreamerTranscodeAudioConfigurator.h.
|
inline |
Definition at line 69 of file sbGStreamerTranscodeAudioConfigurator.h.
|
inline |
Definition at line 67 of file sbGStreamerTranscodeAudioConfigurator.h.
|
inline |
Definition at line 71 of file sbGStreamerTranscodeAudioConfigurator.h.
|
inline |
Definition at line 72 of file sbGStreamerTranscodeAudioConfigurator.h.
|
inline |
Definition at line 79 of file sbGStreamerTranscodeAudioConfigurator.h.
|
inline |
Definition at line 73 of file sbGStreamerTranscodeAudioConfigurator.h.
|
inline |
Definition at line 76 of file sbGStreamerTranscodeAudioConfigurator.h.
|
inline |
Definition at line 75 of file sbGStreamerTranscodeAudioConfigurator.h.
|
inline |
Definition at line 81 of file sbGStreamerTranscodeAudioConfigurator.h.
|
inline |
Definition at line 77 of file sbGStreamerTranscodeAudioConfigurator.h.
|
protected |
Select and set the output format (sample rate/channels/etc)
Definition at line 612 of file sbGStreamerTranscodeAudioConfigurator.cpp.
|
protected |
Select the encoding profile to use
the device has been set the quality has been set mSelectedProfile is the encoder profile to use mSelectedFormat is ths device format matching the profile mMuxer, mVideoEncoder, mAudioEncoder are the required element names
Select the encoding profile to use
the device has been set mSelectedProfile is the encoder profile to use mSelectedFormat is the device format matching the profile (or NULL if no specific format is in use)
Definition at line 461 of file sbGStreamerTranscodeAudioConfigurator.cpp.
|
protected |
Set audio-related properties
a profile has been selected mAudioEncoderProperties contains the audio properties desired
Definition at line 706 of file sbGStreamerTranscodeAudioConfigurator.cpp.
|
inline |
Definition at line 70 of file sbGStreamerTranscodeAudioConfigurator.h.
|
inline |
Definition at line 68 of file sbGStreamerTranscodeAudioConfigurator.h.
|
protected |
A cache of the encoder profiles available (should only be used via GetAvailableProfiles)
Definition at line 173 of file sbGStreamerTranscodeAudioConfigurator.h.
|
protected |
The device to transcode to
Definition at line 168 of file sbGStreamerTranscodeAudioConfigurator.h.
|
protected |
Definition at line 163 of file sbGStreamerTranscodeAudioConfigurator.h.
|
protected |
As above, but for whether we chose the profile from a global preference (not per-device).
Definition at line 193 of file sbGStreamerTranscodeAudioConfigurator.h.
|
protected |
True if we selected our profile based on something set in the device preferences; in such a case we should also look for property values from preferences.
Definition at line 188 of file sbGStreamerTranscodeAudioConfigurator.h.
|
protected |
The device audio format that corresponds with mSelectedProfile; set by SelectProfile()
Definition at line 182 of file sbGStreamerTranscodeAudioConfigurator.h.
|
protected |
The encoder profile selected; set by SelectProfile()
Definition at line 177 of file sbGStreamerTranscodeAudioConfigurator.h.