CMMFVideoDecodeHwDevice Class Reference

class CMMFVideoDecodeHwDevice : public CMMFVideoPlayHwDevice

CMMFVideoDecodeHwDevice is the MSL video decoder hardware device interface. All video decoders must implement this interface.

Inherits from

Public Member Functions
~CMMFVideoDecodeHwDevice()
voidConfigureDecoderL(const TVideoPictureHeader &)
TTimeIntervalMicroSeconds DecodingPosition()
voidGetBitstreamCounters(CMMFDevVideoPlay::TBitstreamCounters &)
TVideoInputBuffer *GetBufferL(TUint)
voidGetBufferOptions(CMMFDevVideoPlay::TBufferOptions &)
TVideoPictureHeader *GetHeaderInformationL(TVideoDataUnitType, TVideoDataUnitEncapsulation, TVideoInputBuffer *)
IMPORT_C CMMFVideoDecodeHwDevice *NewL(TUid, MMMFDevVideoPlayProxy &)
IMPORT_C CMMFVideoDecodeHwDevice *NewPuAdapterL(const CImplementationInformation &, MMMFDevVideoPlayProxy &)
TUint NumFreeBuffers()
TUint PreDecoderBufferBytes()
voidReturnHeader(TVideoPictureHeader *)
voidSetBufferOptionsL(const CMMFDevVideoPlay::TBufferOptions &)
voidSetHrdVbvSpec(THrdVbvSpecification, const TDesC8 &)
voidSetInputFormatL(const CCompressedVideoFormat &, TVideoDataUnitType, TVideoDataUnitEncapsulation, TBool)
voidSetOutputDevice(CMMFVideoPostProcHwDevice *)
voidSynchronizeDecoding(TBool)
CVideoDecoderInfo *VideoDecoderInfoLC()
voidWriteCodedDataL(TVideoInputBuffer *)
Protected Member Functions
CMMFVideoDecodeHwDevice()
voidSetProxy(MMMFDevVideoPlayProxy &)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CMMFVideoHwDevice::CustomInterface(TUid)
CMMFVideoPlayHwDevice::AbortDirectScreenAccess()
CMMFVideoPlayHwDevice::CancelTimedSnapshot()
CMMFVideoPlayHwDevice::CommitL()
CMMFVideoPlayHwDevice::FreezePicture(const TTimeIntervalMicroSeconds &)
CMMFVideoPlayHwDevice::GetComplexityLevelInfo(TUint,CMMFDevVideoPlay::TComplexityLevelInfo &)
CMMFVideoPlayHwDevice::GetOutputFormatListL(RArray< TUncompressedVideoFormat > &)
CMMFVideoPlayHwDevice::GetPictureCounters(CMMFDevVideoPlay::TPictureCounters &)
CMMFVideoPlayHwDevice::GetSnapshotL(TPictureData &,const TUncompressedVideoFormat &)
CMMFVideoPlayHwDevice::GetSupportedSnapshotFormatsL(RArray< TUncompressedVideoFormat > &)
CMMFVideoPlayHwDevice::GetTimedSnapshotL(TPictureData *,const TUncompressedVideoFormat &,const TPictureId &)
CMMFVideoPlayHwDevice::GetTimedSnapshotL(TPictureData *,const TUncompressedVideoFormat &,const TTimeIntervalMicroSeconds &)
CMMFVideoPlayHwDevice::Initialize()
CMMFVideoPlayHwDevice::InputEnd()
CMMFVideoPlayHwDevice::IsPlaying()
CMMFVideoPlayHwDevice::NumComplexityLevels()
CMMFVideoPlayHwDevice::Pause()
CMMFVideoPlayHwDevice::PictureBufferBytes()
CMMFVideoPlayHwDevice::PlaybackPosition()
CMMFVideoPlayHwDevice::PostProcessorInfoLC()
CMMFVideoPlayHwDevice::Redraw()
CMMFVideoPlayHwDevice::ReleaseFreeze(const TTimeIntervalMicroSeconds &)
CMMFVideoPlayHwDevice::Resume()
CMMFVideoPlayHwDevice::ReturnPicture(TVideoPicture *)
CMMFVideoPlayHwDevice::Revert()
CMMFVideoPlayHwDevice::SetClockSource(MMMFClockSource *)
CMMFVideoPlayHwDevice::SetComplexityLevel(TUint)
CMMFVideoPlayHwDevice::SetInputCropOptionsL(const TRect &)
CMMFVideoPlayHwDevice::SetOutputCropOptionsL(const TRect &)
CMMFVideoPlayHwDevice::SetOutputFormatL(const TUncompressedVideoFormat &)
CMMFVideoPlayHwDevice::SetPauseOnClipFail(TBool)
CMMFVideoPlayHwDevice::SetPosition(const TTimeIntervalMicroSeconds &)
CMMFVideoPlayHwDevice::SetPostProcSpecificOptionsL(const TDesC8 &)
CMMFVideoPlayHwDevice::SetPostProcessTypesL(TUint32)
CMMFVideoPlayHwDevice::SetRotateOptionsL(TRotationType)
CMMFVideoPlayHwDevice::SetScaleOptionsL(const TSize &,TBool)
CMMFVideoPlayHwDevice::SetScreenClipRegion(const TRegion &)
CMMFVideoPlayHwDevice::SetVideoDestScreenL(TBool)
CMMFVideoPlayHwDevice::SetYuvToRgbOptionsL(const TYuvToRgbOptions &)
CMMFVideoPlayHwDevice::SetYuvToRgbOptionsL(const TYuvToRgbOptions &,const TYuvFormat &,TRgbFormat)
CMMFVideoPlayHwDevice::Start()
CMMFVideoPlayHwDevice::StartDirectScreenAccessL(const TRect &,CFbsScreenDevice &,const TRegion &)
CMMFVideoPlayHwDevice::Stop()
Private Attributes
TUid iDtor_ID_Key

Constructor & Destructor Documentation

CMMFVideoDecodeHwDevice()

IMPORT_CCMMFVideoDecodeHwDevice()[protected]

Constructor.

~CMMFVideoDecodeHwDevice()

IMPORT_C~CMMFVideoDecodeHwDevice()[virtual]

Destructor.

Member Functions Documentation

ConfigureDecoderL(const TVideoPictureHeader &)

voidConfigureDecoderL(const TVideoPictureHeader &aVideoPictureHeader)[inline, virtual]
Configures the Decoder using header information known by the client.
leave
"The method will leave if an error occurs. Running out of data is not considered an error, as described above.
Pre-condition
"This method can only be called before the hwdevice has been initialized with Initialize()."

Parameters

const TVideoPictureHeader & aVideoPictureHeader"Header information to configure the decoder with"

DecodingPosition()

TTimeIntervalMicroSeconds DecodingPosition()[pure virtual]

Returns the current decoding position, i.e. the timestamp for the most recently decoded picture.

Pre-condition
"This method can only be called after the hwdevice has been initialized with Initialize()."

GetBitstreamCounters(CMMFDevVideoPlay::TBitstreamCounters &)

voidGetBitstreamCounters(CMMFDevVideoPlay::TBitstreamCounters &aCounters)[pure virtual]

Reads various counters related to the received input bitstream and coded data units. The counters are reset when Initialize() or this method is called, and thus they only include data processed since the last call.

Pre-condition
"This method can only be called after the hwdevice has been initialized with Initialize()."

Parameters

CMMFDevVideoPlay::TBitstreamCounters & aCounters"The counter structure to fill."

GetBufferL(TUint)

TVideoInputBuffer *GetBufferL(TUintaBufferSize)[pure virtual]

Retrieves an empty video input buffer from the decoder. After input data has been written to the buffer, it can be written to the decoder using WriteCodedDataL(). The number of buffers the decoder must be able to provide before expecting any back, and the maximum size for each buffer, are specified in the buffer options.

The decoder maintains ownership of the buffers even while they have been retrieved by the client, and will take care of deallocating them.

leave
"The method will leave if an error occurs. Lack of free buffers is not considered an error."

Parameters

TUint aBufferSize"Required buffer size, in bytes. The resulting buffer can be larger than this, but not smaller."

GetBufferOptions(CMMFDevVideoPlay::TBufferOptions &)

voidGetBufferOptions(CMMFDevVideoPlay::TBufferOptions &aOptions)[pure virtual]

Gets the video decoder buffer options actually in use. This can be used before calling SetBufferOptions() to determine the default options, or afterwards to check the values actually in use (if some default values were used).

Pre-condition
"This method can only be called before the hwdevice has been initialized with Initialize()."

Parameters

CMMFDevVideoPlay::TBufferOptions & aOptions"Buffering options structure to fill."

GetHeaderInformationL(TVideoDataUnitType, TVideoDataUnitEncapsulation, TVideoInputBuffer *)

TVideoPictureHeader *GetHeaderInformationL(TVideoDataUnitTypeaDataUnitType,
TVideoDataUnitEncapsulationaEncapsulation,
TVideoInputBuffer *aDataUnit
)[pure virtual]
Reads header information from a coded data unit.
leave
"The method will leave if an error occurs. Running out of data is not considered an error, as described above. Typical error codes used: KErrNotSupported - The data is not in a supported format. KErrCorrupt - The data appears to be in a supported format, but is corrupted."

Parameters

TVideoDataUnitType aDataUnitType"The type of the coded data unit that is contained in aDataUnit. If the data is a simple piece of bitstream, use EDuArbitraryStreamSection."
TVideoDataUnitEncapsulation aEncapsulation"The encapsulation type used for the coded data. If the data is a simple piece of bitstream, use EDuElementaryStream."
TVideoInputBuffer * aDataUnit"The coded data unit, contained in a TVideoInputBuffer."

NewL(TUid, MMMFDevVideoPlayProxy &)

IMPORT_C CMMFVideoDecodeHwDevice *NewL(TUidaUid,
MMMFDevVideoPlayProxy &aProxy
)[static]

Creates a new video decoder hardware device object, based on the implementation UID.

leave
"This method may leave with one of the system-wide error codes.

Parameters

TUid aUid"Decoder implementation UID."
MMMFDevVideoPlayProxy & aProxy"The proxy implementation to use."

NewPuAdapterL(const CImplementationInformation &, MMMFDevVideoPlayProxy &)

IMPORT_C CMMFVideoDecodeHwDevice *NewPuAdapterL(const CImplementationInformation &aImplInfo,
MMMFDevVideoPlayProxy &aProxy
)[static]

Creates a new video decoder hardware device adapter object, based on the Implementation Information of a Processing Unit.

leave
"This method will leave if an error occurs."

Parameters

const CImplementationInformation & aImplInfo"The registration data relating to the Interface Implementation of the Processing Unit."
MMMFDevVideoPlayProxy & aProxy"The proxy implementation to use."

NumFreeBuffers()

TUint NumFreeBuffers()[pure virtual]

Retrieves the number of free input buffers the decoder has available.

Pre-condition
"This method can only be called after the hwdevice has been initialized with Initialize()."

PreDecoderBufferBytes()

TUint PreDecoderBufferBytes()[pure virtual]

Returns the current pre-decoder buffer size.

Pre-condition
"This method can only be called after the hwdevice has been initialized with Initialize()."

ReturnHeader(TVideoPictureHeader *)

voidReturnHeader(TVideoPictureHeader *aHeader)[pure virtual]

Returns a header from GetHeaderInformationL() back to the decoder so that the memory can be freed.

Pre-condition
"This method can only be called before the hwdevice has been initialized with Initialize()."

Parameters

TVideoPictureHeader * aHeader"The header to return."

SetBufferOptionsL(const CMMFDevVideoPlay::TBufferOptions &)

voidSetBufferOptionsL(const CMMFDevVideoPlay::TBufferOptions &aOptions)[pure virtual]

Sets decoder buffering options. See [3] for a description of the options available.

leave
"The method will leave if an error occurs. Typical error codes used: KErrNotSupported - The specified buffering options are not supported. If the client receives this error code, it can call GetBufferOptions() to determine the options the decoder is able to support."
Pre-condition
"This method can only be called before the hwdevice has been initialized with Initialize()."

Parameters

const CMMFDevVideoPlay::TBufferOptions & aOptions"Buffering options."

SetHrdVbvSpec(THrdVbvSpecification, const TDesC8 &)

voidSetHrdVbvSpec(THrdVbvSpecificationaHrdVbvSpec,
const TDesC8 &aHrdVbvParams
)[pure virtual]

Indicates which HRD/VBV specification is fulfilled in the input stream and any related parameters.

THrdVbvSpecification
Pre-condition
"This method can only be called before the hwdevice has been initialized with Initialize()."

Parameters

THrdVbvSpecification aHrdVbvSpec"The HRD/VBV specification fulfilled."
const TDesC8 & aHrdVbvParams"HRD/VBV parameters. The data format depends on the parameters chosen. For 3GPP TS 26.234 parameters (aHrdVbvSpec=EHrdVbv3GPP), the data in the descriptor is a package of type TPckC<T3gppHrdVbvParams> (see T3gppHrdVbvParams). If no HRD/VBV parameters are used, the descriptor is zero length."

SetInputFormatL(const CCompressedVideoFormat &, TVideoDataUnitType, TVideoDataUnitEncapsulation, TBool)

voidSetInputFormatL(const CCompressedVideoFormat &aFormat,
TVideoDataUnitTypeaDataUnitType,
TVideoDataUnitEncapsulationaEncapsulation,
TBoolaDataInOrder
)[pure virtual]

Sets the device input format to a compressed video format.

leave
"The method will leave if an error occurs. Typical error codes used: KErrNotSupported - The source format is not supported."
Pre-condition
"This method can only be called before the hwdevice has been initialized with Initialize()."

Parameters

const CCompressedVideoFormat & aFormat"The input format to use."
TVideoDataUnitType aDataUnitType"The data unit type for input data."
TVideoDataUnitEncapsulation aEncapsulation"The encapsulation type used for the coded data."
TBool aDataInOrder"ETrue if the input data is written in correct decoding order, EFalse if will be written in arbitrary order."

SetOutputDevice(CMMFVideoPostProcHwDevice *)

voidSetOutputDevice(CMMFVideoPostProcHwDevice *aDevice)[pure virtual]

Sets the output post-processor device to use. If an output device is set, all decoded pictures are delivered to that device, and not drawn on screen or returned to the client. Pictures are written using CMMDVideoPostProcDevice::WritePictureL() or a custom interface after they have been decoded. The post-processor must then synchronize rendering to the clock source if necessary.

Pre-condition
"This method can only be called before the hwdevice has been initialized with Initialize()."

Parameters

CMMFVideoPostProcHwDevice * aDevice"The output post-processor device to use."

SetProxy(MMMFDevVideoPlayProxy &)

voidSetProxy(MMMFDevVideoPlayProxy &aProxy)[protected, pure virtual]

Set the proxy implementation to be used. Called just after the object is constructed.

Parameters

MMMFDevVideoPlayProxy & aProxy"The proxy to use."

SynchronizeDecoding(TBool)

voidSynchronizeDecoding(TBoolaSynchronize)[pure virtual]

Sets whether decoding should be synchronized to the current clock source, if any, or if pictures should instead be decoded as soon as possible. If decoding is synchronized, decoding timestamps are used if available, presentation timestamps are used if not. When decoding is not synchronized, pictures are decoded as soon as source data is available for them, and the decoder has a free output buffer. If a clock source is not available, decoding will not be synchronized.

Pre-condition
"This method can only be called before the hwdevice has been initialized with Initialize()."

Parameters

TBool aSynchronize"True if decoding should be synchronized to a clock source."

VideoDecoderInfoLC()

CVideoDecoderInfo *VideoDecoderInfoLC()[pure virtual]

Retrieves decoder information about this hardware device. The device creates a CVideoDecoderInfo structure, fills it with correct data, pushes it to the cleanup stack and returns it. The client will delete the object when it is no longer needed.

leave
"This method may leave with one of the system-wide error codes."
CVideoDecoderInfo

WriteCodedDataL(TVideoInputBuffer *)

voidWriteCodedDataL(TVideoInputBuffer *aBuffer)[pure virtual]

Writes a piece of coded video data to the decoder. The data buffer must be retrieved from the decoder with GetBufferL().

leave
"This method may leave with one of the system-wide error codes."
Pre-condition
"This method can only be called after the hwdevice has been initialized with Initialize()."

Parameters

TVideoInputBuffer * aBuffer"The coded data unit to write."

Member Data Documentation

TUid iDtor_ID_Key

TUid iDtor_ID_Key[private]