Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: videoplayhwdevice.h
Link against: devvideo.lib

This item is not part of the S60 3rd Edition SDK for Symbian OS, Feature Pack 2.

Class CMMFVideoDecodeHwDevice

class CMMFVideoDecodeHwDevice : public CMMFVideoPlayHwDevice;

Description

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

Derivation

Members

Defined in CMMFVideoDecodeHwDevice:
CMMFVideoDecodeHwDevice(), ConfigureDecoderL(), DecodingPosition(), GetBitstreamCounters(), GetBufferL(), GetBufferOptions(), GetHeaderInformationL(), NewL(), NewPuAdapterL(), NumFreeBuffers(), PreDecoderBufferBytes(), ReturnHeader(), SetBufferOptionsL(), SetHrdVbvSpec(), SetInputFormatL(), SetOutputDevice(), SetProxy(), SynchronizeDecoding(), VideoDecoderInfoLC(), WriteCodedDataL(), ~CMMFVideoDecodeHwDevice()

Inherited from CBase:
Delete(), Extension_(), operator new()

Inherited from CMMFVideoHwDevice:
CustomInterface()

Inherited from CMMFVideoPlayHwDevice:
AbortDirectScreenAccess(), CancelTimedSnapshot(), CommitL(), FreezePicture(), GetComplexityLevelInfo(), GetOutputFormatListL(), GetPictureCounters(), GetSnapshotL(), GetSupportedSnapshotFormatsL(), GetTimedSnapshotL(), Initialize(), InputEnd(), IsPlaying(), NumComplexityLevels(), Pause(), PictureBufferBytes(), PlaybackPosition(), PostProcessorInfoLC(), Redraw(), ReleaseFreeze(), Resume(), ReturnPicture(), Revert(), SetClockSource(), SetComplexityLevel(), SetInputCropOptionsL(), SetOutputCropOptionsL(), SetOutputFormatL(), SetPauseOnClipFail(), SetPosition(), SetPostProcSpecificOptionsL(), SetPostProcessTypesL(), SetRotateOptionsL(), SetScaleOptionsL(), SetScreenClipRegion(), SetVideoDestScreenL(), SetYuvToRgbOptionsL(), Start(), StartDirectScreenAccessL(), Stop()


Construction and destruction


NewL()

static IMPORT_C CMMFVideoDecodeHwDevice *NewL(TUid aUid, MMMFDevVideoPlayProxy &aProxy);

Description

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

Parameters

TUid aUid

"Decoder implementation UID."

MMMFDevVideoPlayProxy &aProxy

"The proxy implementation to use."

Return value

CMMFVideoDecodeHwDevice *

"A new CMMFVideoDecodeHwDevice object."

Leave codes

"This

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


~CMMFVideoDecodeHwDevice()

virtual IMPORT_C ~CMMFVideoDecodeHwDevice();

Description

Destructor.


CMMFVideoDecodeHwDevice()

protected: IMPORT_C CMMFVideoDecodeHwDevice();

Description

Constructor.

[Top]


Member functions


NewPuAdapterL()

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

Description

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

Parameters

const CImplementationInformation &aImplInfo

"The registration data relating to the Interface Implementation of the Processing Unit."

MMMFDevVideoPlayProxy &aProxy

"The proxy implementation to use."

Return value

CMMFVideoDecodeHwDevice *

"A new CMMFVideoDecodeHwDevice object."

Leave codes

"This

method will leave if an error occurs."


VideoDecoderInfoLC()

virtual CVideoDecoderInfo *VideoDecoderInfoLC()=0;

Description

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.

Return value

CVideoDecoderInfo *

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

Leave codes

"This

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

See also:


GetHeaderInformationL()

virtual TVideoPictureHeader *GetHeaderInformationL(TVideoDataUnitType aDataUnitType, TVideoDataUnitEncapsulation aEncapsulation, TVideoInputBuffer *aDataUnit)=0;

Description

Reads header information from a coded data unit.

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

Return value

TVideoPictureHeader *

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

Leave codes

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


ReturnHeader()

virtual void ReturnHeader(TVideoPictureHeader *aHeader)=0;

Pre-Condition

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

Description

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

Parameters

TVideoPictureHeader *aHeader

"The header to return."


SetInputFormatL()

virtual void SetInputFormatL(const CCompressedVideoFormat &aFormat, TVideoDataUnitType aDataUnitType, TVideoDataUnitEncapsulation aEncapsulation, TBool aDataInOrder)=0;

Pre-Condition

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

Description

Sets the device input format to a compressed video format.

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

Leave codes

"The

method will leave if an error occurs. Typical error codes used: KErrNotSupported - The source format is not supported."


SynchronizeDecoding()

virtual void SynchronizeDecoding(TBool aSynchronize)=0;

Pre-Condition

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

Description

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.

Parameters

TBool aSynchronize

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


SetBufferOptionsL()

virtual void SetBufferOptionsL(const CMMFDevVideoPlay::TBufferOptions &aOptions)=0;

Pre-Condition

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

Description

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

Parameters

const CMMFDevVideoPlay::TBufferOptions &aOptions

"Buffering options."

Leave codes

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


GetBufferOptions()

virtual void GetBufferOptions(CMMFDevVideoPlay::TBufferOptions &aOptions)=0;

Pre-Condition

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

Description

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

Parameters

CMMFDevVideoPlay::TBufferOptions &aOptions

"Buffering options structure to fill."


SetHrdVbvSpec()

virtual void SetHrdVbvSpec(THrdVbvSpecification aHrdVbvSpec, const TDesC8 &aHrdVbvParams)=0;

Pre-Condition

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

Description

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

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

See also:


SetOutputDevice()

virtual void SetOutputDevice(CMMFVideoPostProcHwDevice *aDevice)=0;

Pre-Condition

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

Description

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.

Parameters

CMMFVideoPostProcHwDevice *aDevice

"The output post-processor device to use."


DecodingPosition()

virtual TTimeIntervalMicroSeconds DecodingPosition()=0;

Pre-Condition

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

Description

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

Return value

TTimeIntervalMicroSeconds

"Current decoding position."


PreDecoderBufferBytes()

virtual TUint PreDecoderBufferBytes()=0;

Pre-Condition

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

Description

Returns the current pre-decoder buffer size.

Return value

TUint

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


GetBitstreamCounters()

virtual void GetBitstreamCounters(CMMFDevVideoPlay::TBitstreamCounters &aCounters)=0;

Pre-Condition

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

Description

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.

Parameters

CMMFDevVideoPlay::TBitstreamCounters &aCounters

"The counter structure to fill."


NumFreeBuffers()

virtual TUint NumFreeBuffers()=0;

Pre-Condition

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

Description

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

Return value

TUint

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


GetBufferL()

virtual TVideoInputBuffer *GetBufferL(TUint aBufferSize)=0;

Description

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.

Parameters

TUint aBufferSize

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

Return value

TVideoInputBuffer *

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

Leave codes

"The

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


WriteCodedDataL()

virtual void WriteCodedDataL(TVideoInputBuffer *aBuffer)=0;

Pre-Condition

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

Description

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

Parameters

TVideoInputBuffer *aBuffer

"The coded data unit to write."

Leave codes

"This

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


ConfigureDecoderL()

inline virtual void ConfigureDecoderL(const TVideoPictureHeader &aVideoPictureHeader);

Pre-Condition

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

Description

Configures the Decoder using header information known by the client.

Parameters

const TVideoPictureHeader &aVideoPictureHeader

"Header information to configure the decoder with"

Leave codes

"The

method will leave if an error occurs. Running out of data is not considered an error, as described above.


SetProxy()

protected: virtual void SetProxy(MMMFDevVideoPlayProxy &aProxy)=0;

Description

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

Parameters

MMMFDevVideoPlayProxy &aProxy

"The proxy to use."