sbDeviceTranscoding Class Reference

#include <sbDeviceTranscoding.h>

Public Types

typedef sbBaseDevice::Batch Batch
 
typedef
sbBaseDevice::TransferRequest 
TransferRequest
 
typedef
sbBaseDevice::TransferRequest::CompatibilityType 
CompatibilityType
 

Public Member Functions

virtual nsresult GetSupportedTranscodeProfiles (PRUint32 aType, nsIArray **aSupportedProfiles)
 
nsresult FindTranscodeProfile (sbIMediaItem *aMediaItem, sbITranscodeProfile **aProfile, CompatibilityType *aDeviceCompatibility)
 
nsresult SelectTranscodeProfile (PRUint32 aTranscodeType, sbITranscodeProfile **aProfile)
 Select a transcode profile to use when transcoding to this device. More...
 
nsresult PrepareBatchForTranscoding (Batch &aBatch)
 aBatch The batch to process More...
 
nsresult GetMediaFormat (PRUint32 aTranscodeType, sbIMediaItem *aMediaItem, sbIMediaFormat **aMediaFormat)
 
nsresult GetAudioFormatFromMediaItem (sbIMediaItem *aMediaItem, sbIMediaFormat **aMediaFormat)
 
nsresult GetMediaInspector (sbIMediaInspector **_retval)
 
nsresult TranscodeMediaItem (sbIMediaItem *aItem, sbDeviceStatusHelper *aDeviceStatusHelper, nsIURI *aDestinationURI, nsIURI **aTranscodedDestinationURI=nsnull)
 

Static Public Member Functions

static PRUint32 GetTranscodeType (sbIMediaItem *aMediaItem)
 

Friends

class sbBaseDevice
 

Detailed Description

Definition at line 47 of file sbDeviceTranscoding.h.

Member Typedef Documentation

Types brought in from sbBaseDevice

Definition at line 55 of file sbDeviceTranscoding.h.

Member Function Documentation

nsresult sbDeviceTranscoding::FindTranscodeProfile ( sbIMediaItem aMediaItem,
sbITranscodeProfile **  aProfile,
CompatibilityType aDeviceCompatibility 
)

Returns the profile for the given media item

Parameters
aMediaItemThe media item to find the profile for
aProfilethe profile found or may be null if no transcoding is needed.
aDeviceCompatibilityWhether this item is supported directly by the device, or if transcoding is needed. Will be set even if no profile is found.
Note
NS_ERROR_NOT_AVAILABLE is returned if no suitable profile is found but transcoding is needed

Definition at line 376 of file sbDeviceTranscoding.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult sbDeviceTranscoding::GetAudioFormatFromMediaItem ( sbIMediaItem aMediaItem,
sbIMediaFormat **  aMediaFormat 
)

Returns a media format for an audio media item based on the file extension and properties on the item (not based on file content!)

Definition at line 469 of file sbDeviceTranscoding.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult sbDeviceTranscoding::GetMediaFormat ( PRUint32  aTranscodeType,
sbIMediaItem aMediaItem,
sbIMediaFormat **  aMediaFormat 
)

Returns the media format for a media item appropriate for a particular type of transcoding.

Definition at line 545 of file sbDeviceTranscoding.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult sbDeviceTranscoding::GetMediaInspector ( sbIMediaInspector **  _retval)

Get a media inspector

Definition at line 574 of file sbDeviceTranscoding.cpp.

Here is the caller graph for this function:

nsresult sbDeviceTranscoding::GetSupportedTranscodeProfiles ( PRUint32  aType,
nsIArray **  aSupportedProfiles 
)
virtual

Definition at line 85 of file sbDeviceTranscoding.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

PRUint32 sbDeviceTranscoding::GetTranscodeType ( sbIMediaItem aMediaItem)
static

Returns the transcode type for the item

Definition at line 316 of file sbDeviceTranscoding.cpp.

Here is the caller graph for this function:

nsresult sbDeviceTranscoding::PrepareBatchForTranscoding ( Batch aBatch)

aBatch The batch to process

Prepare a batch for transcoding. This processes items in the batch and determines which of them require transcoding and/or album-art transcoding.

Process a batch in preparation for transcoding, figuring out which items need transcoding.

Definition at line 232 of file sbDeviceTranscoding.cpp.

Here is the call graph for this function:

nsresult sbDeviceTranscoding::SelectTranscodeProfile ( PRUint32  aTranscodeType,
sbITranscodeProfile **  aProfile 
)

Select a transcode profile to use when transcoding to this device.

Parameters
aTranscodeTypeThe type of transcoding profile to look for.
aProfileThe profile found or may be null if no transcoding is needed.
Note
This selects the best available transcoding profile for this device for arbitrary input - even if the thing to be transcoded is directly supported by the device.
NS_ERROR_NOT_AVAILABLE is returned if no suitable profile is found

Definition at line 103 of file sbDeviceTranscoding.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult sbDeviceTranscoding::TranscodeMediaItem ( sbIMediaItem aItem,
sbDeviceStatusHelper aDeviceStatusHelper,
nsIURI *  aDestinationURI,
nsIURI **  aTranscodedDestinationURI = nsnull 
)

Transcode a media item to the destination specified by aDestinationURI. If aTranscodedDestinationURI is not null, return the final destination URI with transcoded file extension in aTranscodedDestinationURI.

Definition at line 586 of file sbDeviceTranscoding.cpp.

Here is the call graph for this function:

Friends And Related Function Documentation

friend class sbBaseDevice
friend

Definition at line 50 of file sbDeviceTranscoding.h.


The documentation for this class was generated from the following files: