CMMFVideoDecodeHwDevice Class Reference

#include "videoplayhwdevice.h"

Link against: devvideo.lib

class CMMFVideoDecodeHwDevice : public CMMFVideoPlayHwDevice

Inherits from

Public Member Functions
virtual ~CMMFVideoDecodeHwDevice()
virtual voidConfigureDecoderL(const TVideoPictureHeader &)
pure virtual TTimeIntervalMicroSeconds DecodingPosition()
pure virtual voidGetBitstreamCounters(CMMFDevVideoPlay::TBitstreamCounters &)
pure virtual TVideoInputBuffer *GetBufferL(TUint)
pure virtual voidGetBufferOptions(CMMFDevVideoPlay::TBufferOptions &)
pure virtual TVideoPictureHeader *GetHeaderInformationL(TVideoDataUnitType, TVideoDataUnitEncapsulation, TVideoInputBuffer *)
IMPORT_C CMMFVideoDecodeHwDevice *NewL(TUid, MMMFDevVideoPlayProxy &)
IMPORT_C CMMFVideoDecodeHwDevice *NewPuAdapterL(const CImplementationInformation &, MMMFDevVideoPlayProxy &)
pure virtual TUint NumFreeBuffers()
pure virtual TUint PreDecoderBufferBytes()
pure virtual voidReturnHeader(TVideoPictureHeader *)
pure virtual voidSetBufferOptionsL(const CMMFDevVideoPlay::TBufferOptions &)
pure virtual voidSetHrdVbvSpec(THrdVbvSpecification, const TDesC8 &)
pure virtual voidSetInputFormatL(const CCompressedVideoFormat &, TVideoDataUnitType, TVideoDataUnitEncapsulation, TBool)
pure virtual voidSetOutputDevice(CMMFVideoPostProcHwDevice *)
pure virtual voidSynchronizeDecoding(TBool)
pure virtual CVideoDecoderInfo *VideoDecoderInfoLC()
pure virtual voidWriteCodedDataL(TVideoInputBuffer *)
Protected Member Functions
CMMFVideoDecodeHwDevice()
pure virtual 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()

Detailed Description

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

Constructor & Destructor Documentation

CMMFVideoDecodeHwDevice ( )

IMPORT_CCMMFVideoDecodeHwDevice()[protected]

Constructor.

~CMMFVideoDecodeHwDevice ( )

IMPORT_C~CMMFVideoDecodeHwDevice()[virtual]

Destructor.

Member Function 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()."
ParameterDescription
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()."

Returns: "Current decoding position."

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()."
ParameterDescription
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."
ParameterDescription
aBufferSize"Required buffer size, in bytes. The resulting buffer can be larger than this, but not smaller."

Returns: "A new input data buffer. The buffer is at least as large as requested, but it may be larger. If no free buffers are available, the return value is NULL."

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()."
ParameterDescription
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."
ParameterDescription
aDataUnitType"The type of the coded data unit that is contained in aDataUnit. If the data is a simple piece of bitstream, use EDuArbitraryStreamSection."
aEncapsulation"The encapsulation type used for the coded data. If the data is a simple piece of bitstream, use EDuElementaryStream."
aDataUnit"The coded data unit, contained in a TVideoInputBuffer."

Returns: "Header information for the data unit, or NULL if the coded data unit did not contain enough data to parse the header. The header data must be returned to the device using ReturnHeader() before Initialize() is called or the decoder is destroyed. The data remains valid until it is returned."

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.
ParameterDescription
aUid"Decoder implementation UID."
aProxy"The proxy implementation to use."

Returns: "A new CMMFVideoDecodeHwDevice object."

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."
ParameterDescription
aImplInfo"The registration data relating to the Interface Implementation of the Processing Unit."
aProxy"The proxy implementation to use."

Returns: "A new CMMFVideoDecodeHwDevice object."

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()."

Returns: "Number of free input buffers the decoder has available."

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()."

Returns: "The number of bytes of data in the pre-decoder buffer."

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()."
ParameterDescription
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()."
ParameterDescription
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.

See also: THrdVbvSpecification

Pre-condition
"This method can only be called before the hwdevice has been initialized with Initialize()."
ParameterDescription
aHrdVbvSpec"The HRD/VBV specification fulfilled."
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()."
ParameterDescription
aFormat"The input format to use."
aDataUnitType"The data unit type for input data."
aEncapsulation"The encapsulation type used for the coded data."
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()."
ParameterDescription
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.

ParameterDescription
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()."
ParameterDescription
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."

See also: CVideoDecoderInfo

Returns: "Decoder information as a CVideoDecoderInfo object. The object is pushed to the cleanup stack, and must be deallocated by the caller."

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()."
ParameterDescription
aBuffer"The coded data unit to write."