Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <videoplayhwdevice.h>
Link against: devvideo.lib
This item is not part of the S60 5th Edition SDK

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:

Inherited from CBase:

Inherited from CMMFVideoHwDevice:

Inherited from CMMFVideoPlayHwDevice:


Construction and destruction


NewL(TUid,MMMFDevVideoPlayProxy &)

IMPORT_C static 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()

IMPORT_C virtual ~CMMFVideoDecodeHwDevice();

Description

Destructor.


CMMFVideoDecodeHwDevice()

protected: IMPORT_C CMMFVideoDecodeHwDevice();

Description

Constructor.

[Top]


Member functions


NewPuAdapterL(const CImplementationInformation &,MMMFDevVideoPlayProxy &)

IMPORT_C static 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(TVideoDataUnitType,TVideoDataUnitEncapsulation,TVideoInputBuffer *)

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 CMMFVideoDecodeHwDevice::ReturnHeader(TVideoPictureHeader *) before CMMFVideoPlayHwDevice::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(TVideoPictureHeader *)

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 CMMFVideoDecodeHwDevice::GetHeaderInformationL(TVideoDataUnitType,TVideoDataUnitEncapsulation,TVideoInputBuffer *) back to the decoder so that the memory can be freed.

Parameters

TVideoPictureHeader *aHeader

"The header to return."


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

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(TBool)

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(const CMMFDevVideoPlay::TBufferOptions &)

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(CMMFDevVideoPlay::TBufferOptions &)

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(THrdVbvSpecification,const TDesC8 &)

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(CMMFVideoPostProcHwDevice *)

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(CMMFDevVideoPlay::TBitstreamCounters &)

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 CMMFVideoPlayHwDevice::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(TUint)

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 CMMFVideoDecodeHwDevice::WriteCodedDataL(TVideoInputBuffer *). 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(TVideoInputBuffer *)

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 CMMFVideoDecodeHwDevice::GetBufferL(TUint).

Parameters

TVideoInputBuffer *aBuffer

"The coded data unit to write."

Leave codes

"This

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


ConfigureDecoderL(const TVideoPictureHeader &)

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(MMMFDevVideoPlayProxy &)

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