CMMFDevVideoPlay Class Reference

class CMMFDevVideoPlay : public CBase

CMMFDevVideoPlay is the main client API for DevVideoPlay.

Inherits from

Public Member Functions
~CMMFDevVideoPlay()
IMPORT_C voidAbortDirectScreenAccess()
IMPORT_C voidCancelTimedSnapshot()
IMPORT_C voidCommitL()
IMPORT_C voidConfigureDecoderL(const TVideoPictureHeader &)
IMPORT_C TAny *CustomInterface(THwDeviceId, TUid)
IMPORT_C TTimeIntervalMicroSecondsDecodingPosition()
IMPORT_C TBoolFindCommonFormat(const TArray< TUncompressedVideoFormat > &, const TArray< TUncompressedVideoFormat > &, TUncompressedVideoFormat &)
IMPORT_C voidFindDecodersL(const TDesC8 &, TUint32, RArray< TUid > &, TBool)
IMPORT_C voidFindPostProcessorsL(TUint32, RArray< TUid > &)
IMPORT_C voidFreezePicture(const TTimeIntervalMicroSeconds &)
IMPORT_C voidGetBitstreamCounters(TBitstreamCounters &)
IMPORT_C TVideoInputBuffer *GetBufferL(TUint)
IMPORT_C voidGetBufferOptions(TBufferOptions &)
IMPORT_C voidGetComplexityLevelInfo(THwDeviceId, TUint, TComplexityLevelInfo &)
IMPORT_C voidGetDecoderListL(RArray< TUid > &)
IMPORT_C TVideoPictureHeader *GetHeaderInformationL(TVideoDataUnitType, TVideoDataUnitEncapsulation, TVideoInputBuffer *)
IMPORT_C voidGetNewPictureInfo(TUint &, TTimeIntervalMicroSeconds &, TTimeIntervalMicroSeconds &)
IMPORT_C voidGetOutputFormatListL(THwDeviceId, RArray< TUncompressedVideoFormat > &)
IMPORT_C voidGetPictureCounters(TPictureCounters &)
IMPORT_C voidGetPostProcessorListL(RArray< TUid > &)
IMPORT_C TBoolGetSnapshotL(TPictureData &, const TUncompressedVideoFormat &)
IMPORT_C voidGetSupportedSnapshotFormatsL(RArray< TUncompressedVideoFormat > &)
IMPORT_C voidGetTimedSnapshotL(TPictureData *, const TUncompressedVideoFormat &, const TTimeIntervalMicroSeconds &)
IMPORT_C voidGetTimedSnapshotL(TPictureData *, const TUncompressedVideoFormat &, const TPictureId &)
IMPORT_C voidInitialize()
IMPORT_C voidInputEnd()
IMPORT_C TBoolIsPlaying()
IMPORT_C CMMFDevVideoPlay *NewL(MMMFDevVideoPlayObserver &)
IMPORT_C TVideoPicture *NextPictureL()
IMPORT_C TUintNumComplexityLevels(THwDeviceId)
IMPORT_C TUintNumFreeBuffers()
IMPORT_C voidPause()
IMPORT_C TUintPictureBufferBytes()
IMPORT_C TTimeIntervalMicroSecondsPlaybackPosition()
IMPORT_C CPostProcessorInfo *PostProcessorInfoLC(TUid)
IMPORT_C TUintPreDecoderBufferBytes()
IMPORT_C voidRedraw()
IMPORT_C voidReleaseFreeze(const TTimeIntervalMicroSeconds &)
IMPORT_C voidResume()
IMPORT_C voidReturnHeader(TVideoPictureHeader *)
IMPORT_C voidReturnPicture(TVideoPicture *)
IMPORT_C voidRevert()
IMPORT_C THwDeviceIdSelectDecoderL(TUid)
IMPORT_C THwDeviceIdSelectPostProcessorL(TUid)
IMPORT_C voidSetBufferOptionsL(const TBufferOptions &)
IMPORT_C voidSetClockSource(MMMFClockSource *)
IMPORT_C voidSetComplexityLevel(THwDeviceId, TUint)
IMPORT_C voidSetHrdVbvSpec(THrdVbvSpecification, const TDesC8 &)
IMPORT_C voidSetInputCropOptionsL(THwDeviceId, const TRect &)
IMPORT_C voidSetInputFormatL(THwDeviceId, const TUncompressedVideoFormat &)
IMPORT_C voidSetInputFormatL(THwDeviceId, const CCompressedVideoFormat &, TVideoDataUnitType, TVideoDataUnitEncapsulation, TBool)
IMPORT_C voidSetOutputCropOptionsL(THwDeviceId, const TRect &)
IMPORT_C voidSetOutputFormatL(THwDeviceId, const TUncompressedVideoFormat &)
IMPORT_C voidSetPauseOnClipFail(TBool)
IMPORT_C voidSetPosition(const TTimeIntervalMicroSeconds &)
IMPORT_C voidSetPostProcSpecificOptionsL(THwDeviceId, const TDesC8 &)
IMPORT_C voidSetPostProcessTypesL(THwDeviceId, TUint32)
IMPORT_C voidSetRotateOptionsL(THwDeviceId, TRotationType)
IMPORT_C voidSetScaleOptionsL(THwDeviceId, const TSize &, TBool)
IMPORT_C voidSetScreenClipRegion(const TRegion &)
IMPORT_C voidSetVideoDestScreenL(TBool)
IMPORT_C voidSetYuvToRgbOptionsL(THwDeviceId, const TYuvToRgbOptions &, const TYuvFormat &, TRgbFormat)
IMPORT_C voidSetYuvToRgbOptionsL(THwDeviceId, const TYuvToRgbOptions &)
IMPORT_C voidStart()
IMPORT_C voidStartDirectScreenAccessL(const TRect &, CFbsScreenDevice &, const TRegion &)
IMPORT_C voidStop()
IMPORT_C voidSynchronizeDecoding(TBool)
IMPORT_C CVideoDecoderInfo *VideoDecoderInfoLC(TUid)
IMPORT_C voidWriteCodedDataL(TVideoInputBuffer *)
IMPORT_C voidWritePictureL(TVideoPicture *)
Private Member Functions
CMMFDevVideoPlay(MMMFDevVideoPlayObserver &)
voidCheckInitializationState(TUint)
voidConnectPlugins()
CMMFVideoDecodeHwDevice *CreateDecoderL(TUid)
voidHandleDecodeInitializeComplete(TInt)
voidHandlePostProcInitializeComplete(TInt)
voidMdvppFatalError(CMMFVideoHwDevice *, TInt)
voidMdvppInitializeComplete(CMMFVideoHwDevice *, TInt)
voidMdvppNewBuffers()
voidMdvppNewPicture(TVideoPicture *)
voidMdvppPictureLoss()
voidMdvppPictureLoss(const TArray< TPictureId > &)
voidMdvppReferencePictureSelection(const TDesC8 &)
voidMdvppReturnPicture(TVideoPicture *)
voidMdvppSliceLoss(TUint, TUint, const TPictureId &)
voidMdvppStreamEnd()
voidMdvppSupplementalInformation(const TDesC8 &, const TTimeIntervalMicroSeconds &, const TPictureId &)
voidMdvppTimedSnapshotComplete(TInt, TPictureData *, const TTimeIntervalMicroSeconds &, const TPictureId &)
CMMFVideoPlayHwDevice &RenderingHwDevice()
CMMFVideoDecodeHwDevice &VideoDecodeHwDevice(THwDeviceId)
CMMFVideoDecodeHwDevice &VideoDecodeHwDevice()
CMMFVideoHwDevice &VideoHwDevice(THwDeviceId)
CMMFVideoPlayHwDevice &VideoPlayHwDevice(THwDeviceId)
CMMFVideoPostProcHwDevice &VideoPostProcHwDevice(THwDeviceId)
CMMFVideoPostProcHwDevice &VideoPostProcHwDevice()
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()
Private Member Enumerations
enumTInitializationState { ENotInitialized = 0x01, EInitializing = 0x02, EInitialized = 0x04, EInitializationFailed = 0x08 }
Private Attributes
TUint iInitializationState
TBool iIsDecodeComplete
TUint iNumberOfMdvppStreamEndCallbacks
TUint iNumberOfVideoPictures
MMMFDevVideoPlayObserver &iObserver
TInt iReserved
CMMFVideoDecodeHwDevice *iVideoDecodeHwDevice
TDblQue< TVideoPicture >iVideoPictureQue
TDblQueIter< TVideoPicture >iVideoPictureQueIter
CMMFVideoPostProcHwDevice *iVideoPostProcHwDevice

Constructor & Destructor Documentation

CMMFDevVideoPlay(MMMFDevVideoPlayObserver &)

CMMFDevVideoPlay(MMMFDevVideoPlayObserver &aObserver)[private]

Parameters

MMMFDevVideoPlayObserver & aObserver

~CMMFDevVideoPlay()

IMPORT_C~CMMFDevVideoPlay()

Destructor.

Member Functions Documentation

AbortDirectScreenAccess()

IMPORT_C voidAbortDirectScreenAccess()
Aborts Direct Screen Access completely, to be called from MAbortDirectScreenAccess::AbortNow() and similar methods. DSA can be resumed by calling StartDirectScreenAccessL().
Pre-condition
"This method can only be called after the API has been initialized with Initialize()."

CancelTimedSnapshot()

IMPORT_C voidCancelTimedSnapshot()
Cancels a timed snapshot request.
Pre-condition
"This method can only be called after the API has been initialized with Initialize()."

CheckInitializationState(TUint)

voidCheckInitializationState(TUintaExpected)[private]

Parameters

TUint aExpected

CommitL()

IMPORT_C voidCommitL()

Commit all configuration changes since the last CommitL(), Revert() or Initialize(). This only applies to methods that can be called both before AND after DevVideoPlay has been initialized. See the following methods for details.

SetPostProcessTypesL SetInputCropOptionsL SetYuvToRgbOptionsL SetRotateOptionsL SetScaleOptionsL SetOutputCropOptionsL SetPostProcSpecificOptionsL
leave
"The method will leave if an error occurs."
Pre-condition
"This method can only be called after the API has been initialized with Initialize()."

ConfigureDecoderL(const TVideoPictureHeader &)

IMPORT_C voidConfigureDecoderL(const TVideoPictureHeader &aVideoPictureHeader)
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 API has been initialized with Initialize()."

Parameters

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

ConnectPlugins()

voidConnectPlugins()[private]

CreateDecoderL(TUid)

CMMFVideoDecodeHwDevice *CreateDecoderL(TUidaVideoDecoder)[private]

Parameters

TUid aVideoDecoder

CustomInterface(THwDeviceId, TUid)

IMPORT_C TAny *CustomInterface(THwDeviceIdaHwDevice,
TUidaInterface
)

Retrieves a custom interface to the specified hardware device.

Parameters

THwDeviceId aHwDevice"The hardware device from which the custom interface shall be requested. The value is returned from SelectDecoderL() or SelectPostProcessorL() when the device is selected." @param "aInterface" "Interface UID, defined with the custom interface." @return "Pointer to the interface implementation, or NULL if the device does not implement the interface requested. The return value must be cast to the correct type by the user."
TUid aInterface

DecodingPosition()

IMPORT_C TTimeIntervalMicroSecondsDecodingPosition()
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 API has been initialized with Initialize()."

FindCommonFormat(const TArray< TUncompressedVideoFormat > &, const TArray< TUncompressedVideoFormat > &, TUncompressedVideoFormat &)

IMPORT_C TBoolFindCommonFormat(const TArray< TUncompressedVideoFormat > &aFormats1,
const TArray< TUncompressedVideoFormat > &aFormats2,
TUncompressedVideoFormat &aCommonFormat
)[static]

Finds a common format from two lists of uncompressed video formats. Used typically to find a suitable intermediate format between a video decoder and a post-processor. If multiple common formats are available, the lowest-cost format is selected, assuming that the cost of each format is equal to its position in the input array.

Parameters

const TArray< TUncompressedVideoFormat > & aFormats1"The first format list."
const TArray< TUncompressedVideoFormat > & aFormats2"The second format list."
TUncompressedVideoFormat & aCommonFormat"The target variable where the common format found (if any) is stored."

FindDecodersL(const TDesC8 &, TUint32, RArray< TUid > &, TBool)

IMPORT_C voidFindDecodersL(const TDesC8 &aMimeType,
TUint32aPostProcType,
RArray< TUid > &aDecoders,
TBoolaExactMatch = ETrue
)

Finds all available decoders for a given video type with support for certain post-processing operations. The video type is specified using its MIME type, which may include parameters specifying the supported level, version, and other information. Decoder HW devices can use wildcards when listing the supported video types in the ECom registration information, so it is possible that all the decoders returned do not support the specified submode, e.g. profile and level, unless aExactMatch is set. The decoder capabilities can be checked with VideoCodecInfoLC().

leave
"This method may leave with one of the system-wide error codes. Typical error codes used: KErrNotFound: No decoders were found matching the search parameters."

Parameters

const TDesC8 & aMimeType"The video type that will be decoded."
TUint32 aPostProcType"The post-processing types that the decoder has to support, a binary OR of TPrePostProcessType values. If no post-processing support is needed, set this value to zero." @param "aDecoders" "An array for the result decoder UIDs. The array must be created and destroyed by the caller." @param "aExactMatch" "True if exact matching should be used. In this only decoders that support exactly the MIME-type given will be returned. Since verifying this may require loading the decoders into memory, this can be a fairly expensive operation, and if the user needs to verify their capabilities further in any case this parameter should be set to EFalse."
RArray< TUid > & aDecoders
TBool aExactMatch = ETrue

FindPostProcessorsL(TUint32, RArray< TUid > &)

IMPORT_C voidFindPostProcessorsL(TUint32aPostProcType,
RArray< TUid > &aPostProcessors
)
Finds all available post-processors for a given set of post-processing operations.
leave
"This method may leave with one of the system-wide error codes. Typical error codes used: KErrNotFound: No post-processors were found matching the search parameters."

Parameters

TUint32 aPostProcType"The post-processing types that the hardware device has to support, a binary OR of TPrePostProcessType values."
RArray< TUid > & aPostProcessors"An array for the result post-processor UIDs. The array must be created and destroyed by the caller."

FreezePicture(const TTimeIntervalMicroSeconds &)

IMPORT_C voidFreezePicture(const TTimeIntervalMicroSeconds &aPlaybackPosition)

Freezes a picture on the screen. After the picture has been frozen, no picture is displayed until the freeze is released with ReleaseFreeze(). If the video output is being written to memory buffers, not the screen, decoded pictures will not be delivered to the client when a freeze is active, but are simply discarded.

Parameters

const TTimeIntervalMicroSeconds & aPlaybackPosition"The presentation timestamp of the picture to freeze. The frozen picture will be the first picture with a timestamp greater than or equal to this parameter." @pre "This method can only be called after the API has been initialized with Initialize()."

GetBitstreamCounters(TBitstreamCounters &)

IMPORT_C voidGetBitstreamCounters(TBitstreamCounters &aCounters)
Reads various counters related to the received input bitstream and coded data units. See the definition of TBitstreamCounters for a description about the counters. 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 API has been initialized with Initialize()."

Parameters

TBitstreamCounters & aCounters"The counter structure to fill."

GetBufferL(TUint)

IMPORT_C TVideoInputBuffer *GetBufferL(TUintaBufferSize)

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 maximum number of buffers the client can retrieve before returning any to the decoder is determined by the TBufferOptions.iMinNumInputBuffers value set with SetBufferOptionsL().

If a buffer is not immediately available, the client can wait for a MdvpoNewBuffers() callback before trying again, or poll for new buffer availability after a delay. Note that video decoding may be performed in the same thread, in a separate active object, so the client must not block the active scheduler while waiting for buffers to become available, otherwise the system can deadlock. Assuming that the client does not keep too many buffers retrieved and playback is in progress, new buffers will be available after some time.

The decoder maintains ownership of the buffers even while they have been retrieved by the client, and will take care of deallocating them. The client must not destroy the buffer objects, even if it has retrieved buffers and it is being shut down. The buffers will be destroyed by the decoder, and will not be valid after the decoder has been shut down.

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

IMPORT_C voidGetBufferOptions(TBufferOptions &aOptions)
Gets the video decoder buffer options actually in use. This can be used before calling SetBufferOptionsL() 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 API has been initialized with Initialize()."

Parameters

TBufferOptions & aOptions"Buffering options structure to fill."

GetComplexityLevelInfo(THwDeviceId, TUint, TComplexityLevelInfo &)

IMPORT_C voidGetComplexityLevelInfo(THwDeviceIdaHwDevice,
TUintaLevel,
TComplexityLevelInfo &aInfo
)
Gets information about a computational complexity level. This method can be called after NumComplexityLevels() has returned a non-zero value - at that point the information is guaranteed to be available. Some hardware device implementations may not be able to provide all values, in that case the values will be approximated.
Pre-condition
"This method can only be called after the API has been initialized with Initialize()."

Parameters

THwDeviceId aHwDevice"The hw device to query. The value is returned from SelectDecoderL()or SelectPostProcessorL() when the device is selected."
TUint aLevel"The computational complexity level to query. The level numbers range from zero (the most complex) to NumComplexityLevels()-1."
TComplexityLevelInfo & aInfo"The information structure to fill."

GetDecoderListL(RArray< TUid > &)

IMPORT_C voidGetDecoderListL(RArray< TUid > &aDecoders)
Retrieves a list of available video decoders in the system.
leave
"This method may leave with one of the system-wide error codes. Not finding any decoders is not treated as an error condition: in this situation, aDecoders will be empty."

Parameters

RArray< TUid > & aDecoders"An array for the result decoder UIDs. The array must be created and destroyed by the caller."

GetHeaderInformationL(TVideoDataUnitType, TVideoDataUnitEncapsulation, TVideoInputBuffer *)

IMPORT_C TVideoPictureHeader *GetHeaderInformationL(TVideoDataUnitTypeaDataUnitType,
TVideoDataUnitEncapsulationaDataUnitEncapsulation,
TVideoInputBuffer *aDataUnit
)
Reads header information from a coded data unit. [1 #59] This method can be called only after SelectDecoderL().
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 coded data unit that is contained in aDataUnit. If the data is a simple piece of bitstream, use EDuArbitraryStreamSection." @param "aDataUnitEncapsulation" "The encapsulation type used for the coded data. If the data is a simple piece of bitstream, use EDuElementaryStream." @param "aDataUnit" "The coded data unit, contained in a TVideoInputBuffer." @return "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 API using ReturnHeader() before the API is shut down or the decoder is changed. The data remains valid until it is returned."
TVideoDataUnitEncapsulation aDataUnitEncapsulation
TVideoInputBuffer * aDataUnit

GetNewPictureInfo(TUint &, TTimeIntervalMicroSeconds &, TTimeIntervalMicroSeconds &)

IMPORT_C voidGetNewPictureInfo(TUint &aNumPictures,
TTimeIntervalMicroSeconds &aEarliestTimestamp,
TTimeIntervalMicroSeconds &aLatestTimestamp
)

Gets information about new decoded pictures. "New decoded pictures" are pictures that have not been returned to the caller using NextPicture(). This method can only be called if video destination is memory buffers, i.e. Direct Screen Access is not used.

Parameters

TUint & aNumPictures"Target for the number of new decoded pictures. If no pictures are available, the value written is zero, and the timestamps are not valid." @param "aEarliestTimestamp" "Timestamp for the earliest available new decoded picture. If the number of new decoded pictures (aNumPictures) is zero, the timestamp is not valid." @param "aLatestTimestamp" "Timestamp for the latest available new decoded picture. If the number of new decoded pictures (aNumPictures) is zero, the timestamp is not valid." @pre "This method can only be called after the API has been initialized with Initialize()."
TTimeIntervalMicroSeconds & aEarliestTimestamp
TTimeIntervalMicroSeconds & aLatestTimestamp

GetOutputFormatListL(THwDeviceId, RArray< TUncompressedVideoFormat > &)

IMPORT_C voidGetOutputFormatListL(THwDeviceIdaHwDevice,
RArray< TUncompressedVideoFormat > &aFormats
)
Retrieves the list of the output formats a hardware device supports. The list is ordered in preference order, with the preferred formats at the beginning of the list. The list can depend on the device source format, and therefore SetSourceFormatL() must be called for the device before calling this method.
leave
"This method may leave with one of the system-wide error codes."
Pre-condition
"This method can only be called before the API has been initialized with Initialize()."

Parameters

THwDeviceId aHwDevice"The hardware device to configure. The value is returned from SelectDecoderL() or SelectPostProcessorL() when the device is selected."
RArray< TUncompressedVideoFormat > & aFormats"An array for the result format list. The array must be created and destroyed by the caller."

GetPictureCounters(TPictureCounters &)

IMPORT_C voidGetPictureCounters(TPictureCounters &aCounters)
Reads various counters related to decoded pictures. See the definition of TPictureCounters for a description of the counters. The counters are reset when Initialize() or this method is called, and thus they only include pictures processed since the last call.
Pre-condition
"This method can only be called after the API has been initialized with Initialize()."

Parameters

TPictureCounters & aCounters"The counter structure to fill."

GetPostProcessorListL(RArray< TUid > &)

IMPORT_C voidGetPostProcessorListL(RArray< TUid > &aPostProcessors)

Retrieves a list of available video post-processors in the system.

leave
This method may leave with one of the system-wide error codes. Not finding any post-processors is not treated as an error condition: in this situation, aDecoders will be empty.

Parameters

RArray< TUid > & aPostProcessorsAn array for the result post-processor UIDs. The array must be created and destroyed by the caller.

GetSnapshotL(TPictureData &, const TUncompressedVideoFormat &)

IMPORT_C TBoolGetSnapshotL(TPictureData &aPictureData,
const TUncompressedVideoFormat &aFormat
)
Gets a copy of the latest picture displayed.
leave
"The method will leave if an error occurs. Typical error codes used: KErrNotSupported - The requested data format or picture size is not supported."
Pre-condition
"This method can only be called after the API has been initialized with Initialize()."

Parameters

TPictureData & aPictureData"Target picture. The memory for the picture must be allocated by the caller, and initialized properly. The data formats must match the snapshot format requested." @param "aFormat" "The picture format to use for the snapshot." @return "ETrue if the snapshot was taken, EFalse if a picture is not available. The picture may not be available if decoding has not progressed far enough yet."
const TUncompressedVideoFormat & aFormat

GetSupportedSnapshotFormatsL(RArray< TUncompressedVideoFormat > &)

IMPORT_C voidGetSupportedSnapshotFormatsL(RArray< TUncompressedVideoFormat > &aFormats)
Gets a list of the supported snapshot picture formats.
leave
"The method will leave if an error occurs."
Pre-condition
"This method can only be called after the API has been initialized with Initialize()."

Parameters

RArray< TUncompressedVideoFormat > & aFormats"An array for the result format list. The array must be created and destroyed by the caller."

GetTimedSnapshotL(TPictureData *, const TUncompressedVideoFormat &, const TTimeIntervalMicroSeconds &)

IMPORT_C voidGetTimedSnapshotL(TPictureData *aPictureData,
const TUncompressedVideoFormat &aFormat,
const TTimeIntervalMicroSeconds &aPresentationTimestamp
)

Gets a copy of a specified picture. Timed snapshots are required for implementing the video telephony use-case. Simply using the latest picture may not work, since the latest picture is typically not the one whose supplemental information is being processed.

The picture is specified using its presentation timestamp. The timestamp must match the timestamp in the picture exactly, otherwise no snapshot will be taken. The timestamp must refer to the currently displayed picture or a future picture. Typically the timestamp is received with supplemental information (with the MdvpoSupplementalInformation() callback) indicating a snapshot picture.

When the snapshot is available, it will be returned to the client using the MdvpoTimedSnapshotComplete() callback. To cancel a timed snapshot request, use CancelTimedSnapshot(). Only one timed snapshot request can be active at a time.

leave
"The method will leave if an error occurs. Typical error codes used: KErrNotSupported - The requested data format or picture size is not supported."
Pre-condition
"This method can only be called after the API has been initialized with Initialize()."

Parameters

TPictureData * aPictureData"Target picture. The memory for the picture must be allocated by the caller, and initialized properly. The data formats must match the snapshot format requested. The picture must remain valid until the snapshot has been taken or until the request has been cancelled with CancelTimedSnapshot()." @param "aFormat" "The picture format to use for the snapshot." @param "aPresentationTimestamp" "Presentation timestamp for the picture to copy. The timestamp must match the timestamp in the picture exactly"
const TUncompressedVideoFormat & aFormat
const TTimeIntervalMicroSeconds & aPresentationTimestamp

GetTimedSnapshotL(TPictureData *, const TUncompressedVideoFormat &, const TPictureId &)

IMPORT_C voidGetTimedSnapshotL(TPictureData *aPictureData,
const TUncompressedVideoFormat &aFormat,
const TPictureId &aPictureId
)

Gets a copy of a specified picture. Timed snapshots are required for implementing the video telephony use-case. Simply using the latest picture may not work, since the latest picture is typically not the one whose supplemental information is being processed.

The picture is specified using either its picture identifier. The id must refer to the currently displayed picture or a future picture. Typically the picture ID is received with supplemental information (with the MdvpoSupplementalInformation() callback) indicating a snapshot picture.

When the snapshot is available, it will be returned to the client using the MdvpoTimedSnapshotComplete() callback. To cancel a timed snapshot request, use CancelTimedSnapshot(). Only one timed snapshot request can be active at a time.

leave
"The method will leave if an error occurs. Typical error codes used: KErrNotSupported - The requested data format or picture size is not supported."
Pre-condition
"This method can only be called after the API has been initialized with Initialize()."

Parameters

TPictureData * aPictureData"Target picture. The memory for the picture must be allocated by the caller, and initialized properly. The data formats must match the snapshot format requested. The picture must remain valid until the snapshot has been taken or until the request has been cancelled with CancelTimedSnapshot()." @param "aFormat" "The picture format to use for the snapshot." @param "aPictureId" "Picture identifier for the picture to copy."
const TUncompressedVideoFormat & aFormat
const TPictureId & aPictureId

HandleDecodeInitializeComplete(TInt)

voidHandleDecodeInitializeComplete(TIntaError)[private]

Parameters

TInt aError

HandlePostProcInitializeComplete(TInt)

voidHandlePostProcInitializeComplete(TIntaError)[private]

Parameters

TInt aError

Initialize()

IMPORT_C voidInitialize()

Initializes the video device. This method is asynchronous, DevVideoPlay will call MMMFDevVideoPlayObserver::MdvpoInitializeComplete() after initialization has completed. No DevVideoPlay method may be called while initialization is in progress, the initialization process can only be cancelled by destroying the DevVideoPlay object. After this initialization has been successfully completed, further configuration changes are not possible except where separately noted.

If initialization fails for any reason, the DevVideoPlay object must be destroyed and set up from scratch.

InputEnd()

IMPORT_C voidInputEnd()

Notifies the system that the end of input data has been reached.

The decoder and post-processor can use this signal to ensure that the remaining data gets processed, without waiting for new data. For example when the data type is not EDuCodedPicture, calling this method is necessary otherwise a decoder implementation might be waiting for the start code for the next picture to ensure it has a complete picture before starting to decode the previous one.

After the remaining data has been processed (and displayed, if applicable), the client gets notified with the MdvpoStreamEnd() callback. The client must then call Stop() on the interface.

DevVideo clients are encouraged to call this method, but its use is not mandatory for synchronized processing. For synchronized playback, all video pictures are processed or discarded according to their timestamps, and so the client can easily infer when processing is complete. However, it should be noted that the last picture might not be displayed if this method is not called and the input data type is not EDuCodedPicture.

For non-synchronized playback (e.g. file conversion), a client must call this method otherwise it will never find out when the hardware device has finished processing the data.

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

IsPlaying()

IMPORT_C TBoolIsPlaying()
Indicates whether playback is proceeding. This method can be used to check whether playback was paused or not in response to a new clipping region or DSA abort.
Pre-condition
"This method can only be called after the API has been initialized with Initialize()."

MdvppFatalError(CMMFVideoHwDevice *, TInt)

voidMdvppFatalError(CMMFVideoHwDevice *aDevice,
TIntaError
)[private, virtual]

Parameters

CMMFVideoHwDevice * aDevice
TInt aError

MdvppInitializeComplete(CMMFVideoHwDevice *, TInt)

voidMdvppInitializeComplete(CMMFVideoHwDevice *aDevice,
TIntaError
)[private, virtual]

Parameters

CMMFVideoHwDevice * aDevice
TInt aError

MdvppNewBuffers()

voidMdvppNewBuffers()[private, virtual]

MdvppNewPicture(TVideoPicture *)

voidMdvppNewPicture(TVideoPicture *aPicture)[private, virtual]

Parameters

TVideoPicture * aPicture

MdvppPictureLoss()

voidMdvppPictureLoss()[private, virtual]

MdvppPictureLoss(const TArray< TPictureId > &)

voidMdvppPictureLoss(const TArray< TPictureId > &aPictures)[private, virtual]

Parameters

const TArray< TPictureId > & aPictures

MdvppReferencePictureSelection(const TDesC8 &)

voidMdvppReferencePictureSelection(const TDesC8 &aSelectionData)[private, virtual]

Parameters

const TDesC8 & aSelectionData

MdvppReturnPicture(TVideoPicture *)

voidMdvppReturnPicture(TVideoPicture *aPicture)[private, virtual]

Parameters

TVideoPicture * aPicture

MdvppSliceLoss(TUint, TUint, const TPictureId &)

voidMdvppSliceLoss(TUintaFirstMacroblock,
TUintaNumMacroblocks,
const TPictureId &aPicture
)[private, virtual]

Parameters

TUint aFirstMacroblock
TUint aNumMacroblocks
const TPictureId & aPicture

MdvppStreamEnd()

voidMdvppStreamEnd()[private, virtual]

MdvppSupplementalInformation(const TDesC8 &, const TTimeIntervalMicroSeconds &, const TPictureId &)

voidMdvppSupplementalInformation(const TDesC8 &aData,
const TTimeIntervalMicroSeconds &aTimestamp,
const TPictureId &aPictureId
)[private, virtual]

Parameters

const TDesC8 & aData
const TTimeIntervalMicroSeconds & aTimestamp
const TPictureId & aPictureId

MdvppTimedSnapshotComplete(TInt, TPictureData *, const TTimeIntervalMicroSeconds &, const TPictureId &)

voidMdvppTimedSnapshotComplete(TIntaError,
TPictureData *aPictureData,
const TTimeIntervalMicroSeconds &aPresentationTimestamp,
const TPictureId &aPictureId
)[private, virtual]

Parameters

TInt aError
TPictureData * aPictureData
const TTimeIntervalMicroSeconds & aPresentationTimestamp
const TPictureId & aPictureId

NewL(MMMFDevVideoPlayObserver &)

IMPORT_C CMMFDevVideoPlay *NewL(MMMFDevVideoPlayObserver &aObserver)[static]

Constructs a new MSL video client instance. Each client instance supports a single video bitstream.

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

Parameters

MMMFDevVideoPlayObserver & aObserverThe observer object to use.

NextPictureL()

IMPORT_C TVideoPicture *NextPictureL()
Gets the next (in displaying order) new decoded picture. Only one picture can be retrieved at a time, the current picture must be returned with ReturnPicture() before a new one can be read.
leave
"The method will leave if an error occurs."
Pre-condition
"This method can only be called after the API has been initialized with Initialize()."

NumComplexityLevels(THwDeviceId)

IMPORT_C TUintNumComplexityLevels(THwDeviceIdaHwDevice)

Gets the number of complexity levels available.

Parameters

THwDeviceId aHwDevice"The plug-in to query. The value is returned from SelectDecoderL()or SelectPostProcessorL() when the device is selected."

NumFreeBuffers()

IMPORT_C TUintNumFreeBuffers()
Retrieves the number of free input buffers the decoder has available. If only a post-processor is used, the return value is undefined.
Pre-condition
"This method can only be called after the API has been initialized with Initialize()."

Pause()

IMPORT_C voidPause()
Pauses video playback, including decoding, post-processing, and rendering. No pictures will be decoded, post-processed, or rendered until playback has been resumed. The client is responsible for pausing the clock source (typically by pausing audio output) if necessary.
Pre-condition
"This method can only be called after the API has been initialized with Initialize()."

PictureBufferBytes()

IMPORT_C TUintPictureBufferBytes()
Returns the total amount of memory allocated for uncompressed pictures.
Pre-condition
"This method can only be called after the API has been initialized with Initialize()."

PlaybackPosition()

IMPORT_C TTimeIntervalMicroSecondsPlaybackPosition()
Returns the current playback position, i.e. the timestamp for the most recently displayed or virtually displayed picture.
Pre-condition
"This method can only be called after the API has been initialized with Initialize()."

PostProcessorInfoLC(TUid)

IMPORT_C CPostProcessorInfo *PostProcessorInfoLC(TUidaPostProcessor)
Retrieves information about the post-processing capabilities of an installed post-processor or decoder hardware device. Note that this method will need to load the device into memory, and can thus be relatively expensive.
leave
"This method may leave with one of the system-wide error codes."

Parameters

TUid aPostProcessor"The post-processor to query."

PreDecoderBufferBytes()

IMPORT_C TUintPreDecoderBufferBytes()
Returns the current pre-decoder buffer size.
Pre-condition
"This method can only be called after the API has been initialized with Initialize()."

Redraw()

IMPORT_C voidRedraw()
Re-draws the latest video picture. Only available when DSA is being used. If DSA is aborted or a non-supported clipping region has been set, the request may be ignored.
Pre-condition
"This method can only be called after the API has been initialized with Initialize()."

ReleaseFreeze(const TTimeIntervalMicroSeconds &)

IMPORT_C voidReleaseFreeze(const TTimeIntervalMicroSeconds &aPlaybackPosition)

Releases a picture frozen with FreezePicture().

Parameters

const TTimeIntervalMicroSeconds & aPlaybackPosition"The presentation timestamp of the picture to release. The first picture displayed after the release will be the first picture with a timestamp greater than or equal to this parameter. To release the freeze immediately, set the timestamp to zero." @pre "This method can only be called after the API has been initialized with Initialize()."

RenderingHwDevice()

CMMFVideoPlayHwDevice &RenderingHwDevice()const [private]

Resume()

IMPORT_C voidResume()
Resumes video playback after a pause. The client is responsible for restarting the clock source if necessary.
Pre-condition
"This method can only be called after the API has been initialized with Initialize()."

ReturnHeader(TVideoPictureHeader *)

IMPORT_C voidReturnHeader(TVideoPictureHeader *aHeader)
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 API has been initialized with Initialize()."

Parameters

TVideoPictureHeader * aHeader"The header to return."

ReturnPicture(TVideoPicture *)

IMPORT_C voidReturnPicture(TVideoPicture *aPicture)
Returns a picture from NextPicture() back to the device. The picture data cannot be used afterwards.
Pre-condition
"This method can only be called after the API has been initialized with Initialize()."

Parameters

TVideoPicture * aPicture"The picture to return. After this method returns, the pointer is no longer valid and the picture data cannot be used."

Revert()

IMPORT_C voidRevert()

Revert any configuration changes that have not yet been committed using CommitL(). This only applies to methods that can be called both before AND after DevVideoPlay has been initialized. See the following methods for details.

SetPostProcessTypesL SetInputCropOptionsL SetYuvToRgbOptionsL SetRotateOptionsL SetScaleOptionsL SetOutputCropOptionsL SetPostProcSpecificOptionsL
Pre-condition
"This method can only be called after the API has been initialized with Initialize()."

SelectDecoderL(TUid)

IMPORT_C THwDeviceIdSelectDecoderL(TUidaDecoder)

Selects the video decoder to be used. This method must be called before any other video decoder related methods are used. The decoder to use can be changed by calling this method again before the API has been initialized with Initialize(). All video decoder settings are reset to their default values, which are up to the implementation to decide if not specified in any of the MSL specifications. By default no post-processing is performed.

leave
"The method will leave if an error occurs. Typical error codes used: KErrNotFound - No decoder was found with the given UID"
Pre-condition
"This method can only be called before the API has been initialized with Initialize()."

Parameters

TUid aDecoder"The video decoder to use."

SelectPostProcessorL(TUid)

IMPORT_C THwDeviceIdSelectPostProcessorL(TUidaPostProcessor)

Selects the video post-processor to be used. This method must be called before any other post-processor related methods are used. The post-processor to use can be changed by calling this method again before the API has been initialized with Initialize(). All post-processor settings are reset to their default values, which are up to the implementation to decide if not specified in any of the MSL specifications.

leave
"The method will leave if an error occurs. Typical error codes used: KErrNotFound - No post-processor was found with the given UID"
Pre-condition
"This method can only be called before the API has been initialized with Initialize()."

Parameters

TUid aPostProcessor"The post-processor to use."

SetBufferOptionsL(const TBufferOptions &)

IMPORT_C voidSetBufferOptionsL(const TBufferOptions &aOptions)
Sets video decoder buffering options.
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 "This method can only be called before the API has been initialized with Initialize()."

Parameters

const TBufferOptions & aOptions"Buffering options."

SetClockSource(MMMFClockSource *)

IMPORT_C voidSetClockSource(MMMFClockSource *aClock)

Sets the clock source to use for video timing. When video playback is synchronized with audio, the clock source is implemented by the audio playback subsystem, otherwise the clock source should get the time from the system clock. If no clock source is set, video playback will not be synchronized, but will proceed as fast as possible, depending on input data and output buffer availability. This method can be called after all hardware devices have been selected, but before calling Initialize().

All decoders must support synchronization with an external clock source, as well as unsynchronized non-realtime operation. When a clock source is set, the decoder can skip pictures to maintain synchronization. When non-realtime operation is used and no clock source has been set, pictures may not be skipped unless a lower complexity level is used that requires this.

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

Parameters

MMMFClockSource * aClock"The clock source to use"

SetComplexityLevel(THwDeviceId, TUint)

IMPORT_C voidSetComplexityLevel(THwDeviceIdaHwDevice,
TUintaLevel
)

Sets the computational complexity level to use. The level can be set separately for each hardware device in use. If separate complexity levels are not available, the method call is ignored. If the level specified is not available, the results are undefined. Typically the device will either ignore the request or use the nearest suitable level.

The complexity level can be changed at any point during playback.

Parameters

THwDeviceId aHwDevice"The plug-in to control. The value is returned from SelectDecoderL()or SelectPostProcessorL() when the device is selected."
TUint aLevel"The computational complexity level to use. Level zero (0) is the most complex one, with the highest quality. Higher level numbers require less processing and may have lower quality." @pre "This method can only be called after the API has been initialized with Initialize()."

SetHrdVbvSpec(THrdVbvSpecification, const TDesC8 &)

IMPORT_C voidSetHrdVbvSpec(THrdVbvSpecificationaHrdVbvSpec,
const TDesC8 &aHrdVbvParams
)

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

Parameters

THrdVbvSpecification aHrdVbvSpec"The HRD/VBV specification fulfilled, see the definition of THrdVbvSpecification for details."
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 empty." @pre "This method can only be called before the API has been initialized with Initialize()."

SetInputCropOptionsL(THwDeviceId, const TRect &)

IMPORT_C voidSetInputCropOptionsL(THwDeviceIdaHwDevice,
const TRect &aRect
)
Sets post-processing options for input (pan-scan) cropping. SetPostProcessTypesL() must be called before this method is used.
leave
"The method will leave if an error occurs. Typical error codes used: KErrNotSupported - Pan-scan cropping is not supported"
Pre-condition
"This method can be called either before or after the API has been initialized with Initialize(). If called after initialization, the change will only be committed once CommitL() is called."

Parameters

THwDeviceId aHwDevice"The hardware device to configure. The value is returned from SelectDecoderL() or SelectPostProcessorL() when the device is selected."
const TRect & aRect"The cropping rectangle to use."

SetInputFormatL(THwDeviceId, const TUncompressedVideoFormat &)

IMPORT_C voidSetInputFormatL(THwDeviceIdaHwDevice,
const TUncompressedVideoFormat &aFormat
)
Sets a hardware device input format to an uncompressed video format. Only post-processors support uncompressed video input.
leave
"The method will leave if an error occurs. Typical error codes used: KErrNotSupported - The input format is not supported."
Pre-condition
"This method can only be called before the API has been initialized with Initialize()."

Parameters

THwDeviceId aHwDevice"The hardware device to configure. The value is returned from SelectPostProcessorL() when the device is selected."
const TUncompressedVideoFormat & aFormat"The input format to use."

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

IMPORT_C voidSetInputFormatL(THwDeviceIdaHwDevice,
const CCompressedVideoFormat &aFormat,
TVideoDataUnitTypeaDataUnitType,
TVideoDataUnitEncapsulationaEncapsulation,
TBoolaDataInOrder
)
Sets a hardware device Input format to a compressed video format. Only decoders support compressed video input.
leave
"The method will leave if an error occurs. Typical error codes used: KErrNotSupported - The input format is not supported."
Pre-condition
"This method can only be called before the API has been initialized with Initialize()."

Parameters

THwDeviceId aHwDevice"The hardware device to configure. The value is returned from SelectDecoderL() when the device is selected."
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"True if the input data is written in correct decoding order, false if the input data may be written in arbitrary order."

SetOutputCropOptionsL(THwDeviceId, const TRect &)

IMPORT_C voidSetOutputCropOptionsL(THwDeviceIdaHwDevice,
const TRect &aRect
)
Sets post-processing options for output cropping. SetPostProcessTypesL() must be called before this method is used.
leave
"The method will leave if an error occurs. Typical error codes used: KErrNotSupported - Output cropping is not supported."
Pre-condition
"This method can be called either before or after the API has been initialized with Initialize(). If called after initialization, the change will only be committed once CommitL() is called."

Parameters

THwDeviceId aHwDevice"The hardware device to configure. The value is returned from SelectDecoderL() # SelectPostProcessorL() when the device is selected."
const TRect & aRect"Output cropping area."

SetOutputFormatL(THwDeviceId, const TUncompressedVideoFormat &)

IMPORT_C voidSetOutputFormatL(THwDeviceIdaHwDevice,
const TUncompressedVideoFormat &aFormat
)

Sets the output format for a hardware device. If a decoder and a post-processor are used, the decoder output format must match the post-processor source format.

If direct screen access is being used, then it is not necessary to call this method on the hwdevice performing the direct screen access.

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

Parameters

THwDeviceId aHwDevice"The hardware device to configure. The value is returned from SelectDecoderL() or SelectPostProcessorL() when the device is selected."
const TUncompressedVideoFormat & aFormat"The format to use."

SetPauseOnClipFail(TBool)

IMPORT_C voidSetPauseOnClipFail(TBoolaPause)
Sets whether the system should pause playback when it gets a clipping region it cannot handle, or Direct Screen Access is aborted completely. If not, decoding will proceed normally, but no video will be drawn. By default, playback is paused.
Pre-condition
"This method can only be called after the API has been initialized with Initialize()."

Parameters

TBool aPause"True if playback should be paused when clipping fails, false if not. If playback is not paused, it will be continued without video display."

SetPosition(const TTimeIntervalMicroSeconds &)

IMPORT_C voidSetPosition(const TTimeIntervalMicroSeconds &aPlaybackPosition)
Changes to a new decoding and playback position, used for randomly accessing (seeking) the input stream. The position change flushes all input and output buffers. Pre-decoder and post-decoder buffering are handled as if a new bitstream was started. If the MSL video subsystem still has buffered pictures that precede the new playback position, they will be discarded. If playback is synchronized to a clock source, the client is responsible for setting the clock source to the new position.
Pre-condition
"This method can only be called after the API has been initialized with Initialize()."

Parameters

const TTimeIntervalMicroSeconds & aPlaybackPosition"The new playback position in the video stream."

SetPostProcSpecificOptionsL(THwDeviceId, const TDesC8 &)

IMPORT_C voidSetPostProcSpecificOptionsL(THwDeviceIdaHwDevice,
const TDesC8 &aOptions
)
Sets post-processing hardware device specific options. SetPostProcessTypesL() must be called before this method is used.
leave
"The method will leave if an error occurs. Typical error codes used: KErrNotSupported - The options are not supported."
Pre-condition
"This method can be called either before or after the API has been initialized with Initialize(). If called after initialization, the change will only be committed once CommitL() is called."

Parameters

THwDeviceId aHwDevice"The hardware device to configure. The value is returned from SelectDecoderL() or SelectPostProcessorL() when the device is selected."
const TDesC8 & aOptions"The options. The format is plug-in specific."

SetPostProcessTypesL(THwDeviceId, TUint32)

IMPORT_C voidSetPostProcessTypesL(THwDeviceIdaHwDevice,
TUint32aPostProcCombination
)

Sets the post-processing types to be used. This method, like all post-processing configuration methods, must be called before Initialize().

Post-processing operations are carried out in the following order: 1. Input cropping 2. Mirroring 3. Rotating 4. Scaling 5. Output cropping Color space conversion can be performed at any point in the post-processing flow.

leave
"The method will leave if an error occurs. Typical error codes used: KErrNotSupported - The post-processing combination is not supported"
Pre-condition
"This method can be called either before or after the API has been initialized with Initialize(). If called after initialization, the change will only be committed once CommitL() is called."

Parameters

THwDeviceId aHwDevice"The hardware device to configure. The value is returned from SelectDecoderL() or SelectPostProcessorL() when the device is selected." @param "aPostProcCombination" "The post-processing steps to perform, a bitwise OR of values from TPrePostProcessType."
TUint32 aPostProcCombination

SetRotateOptionsL(THwDeviceId, TRotationType)

IMPORT_C voidSetRotateOptionsL(THwDeviceIdaHwDevice,
TRotationTypeaRotationType
)
Sets post-processing options for rotation. SetPostProcessTypesL() must be called before this method is used.
leave
"The method will leave if an error occurs. Typical error codes used: KErrNotSupported - The rotation options are not supported."
Pre-condition
"This method can be called either before or after the API has been initialized with Initialize(). If called after initialization, the change will only be committed once CommitL() is called."

Parameters

THwDeviceId aHwDevice"The hardware device to configure. The value is returned from SelectDecoderL() or SelectPostProcessorL() when the device is selected."
TRotationType aRotationType"The rotation to perform."

SetScaleOptionsL(THwDeviceId, const TSize &, TBool)

IMPORT_C voidSetScaleOptionsL(THwDeviceIdaHwDevice,
const TSize &aTargetSize,
TBoolaAntiAliasFiltering
)
Sets post-processing options for scaling. SetPostProcessTypesL() must be called before this method is used.
leave
"The method will leave if an error occurs. Typical error codes used: KErrNotSupported - The scale options are not supported."
Pre-condition
"This method can be called either before or after the API has been initialized with Initialize(). If called after initialization, the change will only be committed once CommitL() is called."

Parameters

THwDeviceId aHwDevice"The hardware device to configure. The value is returned from SelectDecoderL() or SelectPostProcessorL() when the device is selected." @param "aTargetSize" "Scaling target size. If a fixed scale factor size is used, the new dimensions must be set to width=floor(factor*width), height=floor(factor*height). For example, scaling a QCIF (176x144) picture up by a factor of 4/3 yields a size of 234x192." @param "aAntiAliasFiltering" "True if anti-aliasing filtering should be used. If the post-processor does not support anti-aliased scaling, or supports anti-aliased scaling only, this argument is ignored."
const TSize & aTargetSize
TBool aAntiAliasFiltering

SetScreenClipRegion(const TRegion &)

IMPORT_C voidSetScreenClipRegion(const TRegion &aRegion)

Sets a new clipping region for Direct Screen Access. After the method returns, no video will be drawn outside of the region. (Note that in Symbian OS clipping regions are "positive" - that is, they define the legal area inside which an application may draw.)

If clipping is not supported, or the clipping region is too complex, either playback will pause or will resume without video display, depending on the current setting of SetPauseOnClipFail(), and the result can be verified with IsPlaying(). Clipping can be disabled by setting a new clipping region that includes the whole video window.

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

Parameters

const TRegion & aRegion"The new clipping region. After the method returns, no video will be drawn outside the region."

SetVideoDestScreenL(TBool)

IMPORT_C voidSetVideoDestScreenL(TBoolaScreen)
Sets the video output destination. The destination can be the screen (using direct screen access) or memory buffers. By default memory buffers are used. This method must be called after the decoder and post-processor have been selected and their options set, since support for direct screen access can vary between hardware devices.
leave
"The method will leave if an error occurs. Typical error codes used: KErrNotSupported - The selected video destination is not supported with the current codec and post-processor settings." @pre "This method can only be called before the API has been initialized with Initialize()."

Parameters

TBool aScreen"True if video output destination is the screen, false if memory buffers."

SetYuvToRgbOptionsL(THwDeviceId, const TYuvToRgbOptions &, const TYuvFormat &, TRgbFormat)

IMPORT_C voidSetYuvToRgbOptionsL(THwDeviceIdaHwDevice,
const TYuvToRgbOptions &aOptions,
const TYuvFormat &aYuvFormat,
TRgbFormataRgbFormat
)
Sets post-processing options for YUV to RGB color space conversion. Specifies the input YUV and output RGB formats to use explicitly. SetSourceFormatL() and SetOutputFormatL(), and SetPostProcessTypesL() must be called before this method is used.
leave
"The method will leave if an error occurs. Typical error codes used: KErrNotSupported - The conversion options are not supported."
Pre-condition
"This method can be called either before or after the API has been initialized with Initialize(). If called after initialization, the change will only be committed once CommitL() is called."

Parameters

THwDeviceId aHwDevice"The hardware device to configure. The value is returned from SelectDecoderL() or SelectPostProcessorL() when the device is selected."
const TYuvToRgbOptions & aOptions"The conversion options to use."
const TYuvFormat & aYuvFormat"Conversion source YUV format."
TRgbFormat aRgbFormat"Conversion target RGB format."

SetYuvToRgbOptionsL(THwDeviceId, const TYuvToRgbOptions &)

IMPORT_C voidSetYuvToRgbOptionsL(THwDeviceIdaHwDevice,
const TYuvToRgbOptions &aOptions
)
Sets post-processing options for YUV to RGB color space conversion. Uses the device input and output formats. For decoders the default YUV format used is the format specified in the input bitstream. SetSourceFormatL() and SetOutputFormatL(), and SetPostProcessTypesL() must be called before this method is used.
leave
"The method will leave if an error occurs. Typical error codes used: KErrNotSupported - The conversion options are not supported."
Pre-condition
"This method can be called either before or after the API has been initialized with Initialize(). If called after initialization, the change will only be committed once CommitL() is called."

Parameters

THwDeviceId aHwDevice"The hardware device to configure. The value is returned from SelectDecoderL() or SelectPostProcessorL() when the device is selected."
const TYuvToRgbOptions & aOptions"The conversion options to use."

Start()

IMPORT_C voidStart()
Starts video playback, including decoding, post-processing, and rendering. Playback will proceed until it has been stopped or paused, or the end of the bitstream is reached.
Pre-condition
"This method can only be called after the API has been initialized with Initialize()."

StartDirectScreenAccessL(const TRect &, CFbsScreenDevice &, const TRegion &)

IMPORT_C voidStartDirectScreenAccessL(const TRect &aVideoRect,
CFbsScreenDevice &aScreenDevice,
const TRegion &aClipRegion
)
Starts video decoding directly to the display frame buffer using Direct Screen Access. Playback to the display can start immediately.
leave
"The method will leave if an error occurs. Typical error codes used: KErrNotSupported - Direct Screen Access is not supported"
Pre-condition
"This method can only be called after the API has been initialized with Initialize()."

Parameters

const TRect & aVideoRect"The video output rectangle on screen. The rectangle size should be the same as the output video size, otherwise results are undefined. Some decoders may set limitations to the position and alignment of the rectangle. The rectangle must be aligned to a 32-bit boundary on screen (even X-coordinate on 12-bpp and 16-bpp displays) and must fit completely on the screen." @param "aScreenDevice" "The screen device to use. The screen device will supply frame buffer information, and is used to update the frame buffer to screen. The screen device object must be valid in the current thread." @param "aClipRegion" "Initial clipping region to use."
CFbsScreenDevice & aScreenDevice
const TRegion & aClipRegion

Stop()

IMPORT_C voidStop()
Stops video playback. No new pictures will be decoded, post-processed, or rendered.
Pre-condition
"This method can only be called after the API has been initialized with Initialize()."

SynchronizeDecoding(TBool)

IMPORT_C voidSynchronizeDecoding(TBoolaSynchronize)

Sets whether the decoder should synchronize decoding to the current clock source, if any, or should decode all pictures 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 API has been initialized with Initialize()."

Parameters

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

VideoDecodeHwDevice(THwDeviceId)

CMMFVideoDecodeHwDevice &VideoDecodeHwDevice(THwDeviceIdaHwDevice)const [private]

Parameters

THwDeviceId aHwDevice

VideoDecodeHwDevice()

CMMFVideoDecodeHwDevice &VideoDecodeHwDevice()const [private]

VideoDecoderInfoLC(TUid)

IMPORT_C CVideoDecoderInfo *VideoDecoderInfoLC(TUidaVideoDecoder)
Retrieves information about an installed video decoder. Note that this method will need to load the codec hardware device into memory, and can thus be relatively expensive.
leave
"This method may leave with one of the system-wide error codes."

Parameters

TUid aVideoDecoder"The video decoder to query."

VideoHwDevice(THwDeviceId)

CMMFVideoHwDevice &VideoHwDevice(THwDeviceIdaHwDevice)const [private]

Parameters

THwDeviceId aHwDevice

VideoPlayHwDevice(THwDeviceId)

CMMFVideoPlayHwDevice &VideoPlayHwDevice(THwDeviceIdaHwDevice)const [private]

Parameters

THwDeviceId aHwDevice

VideoPostProcHwDevice(THwDeviceId)

CMMFVideoPostProcHwDevice &VideoPostProcHwDevice(THwDeviceIdaHwDevice)const [private]

Parameters

THwDeviceId aHwDevice

VideoPostProcHwDevice()

CMMFVideoPostProcHwDevice &VideoPostProcHwDevice()const [private]

WriteCodedDataL(TVideoInputBuffer *)

IMPORT_C voidWriteCodedDataL(TVideoInputBuffer *aBuffer)
Writes a piece of coded video data. The data will be passed to the video decoder and post-processor to be used in video playback. The data buffer must be retrieved from the decoder with GetBufferL().
leave
"The method will leave if an error occurs."
Pre-condition
"This method can only be called after the API has been initialized with Initialize()."

Parameters

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

WritePictureL(TVideoPicture *)

IMPORT_C voidWritePictureL(TVideoPicture *aPicture)
Writes an uncompressed video picture. The picture must remain valid and unmodified until it is returned with the MdvpoReturnPicture() callback.
leave
"The method will leave if an error occurs."
Pre-condition
"This method can only be called after the API has been initialized with Initialize()."

Parameters

TVideoPicture * aPicture"The picture to write."

Member Enumerations Documentation

Enum TInitializationState

Enumerators

ENotInitialized = 0x01
EInitializing = 0x02
EInitialized = 0x04
EInitializationFailed = 0x08

Member Data Documentation

TUint iInitializationState

TUint iInitializationState[private]

TBool iIsDecodeComplete

TBool iIsDecodeComplete[private]

TUint iNumberOfMdvppStreamEndCallbacks

TUint iNumberOfMdvppStreamEndCallbacks[private]

TUint iNumberOfVideoPictures

TUint iNumberOfVideoPictures[private]

MMMFDevVideoPlayObserver & iObserver

MMMFDevVideoPlayObserver &iObserver[private]

TInt iReserved

TInt iReserved[private]

CMMFVideoDecodeHwDevice * iVideoDecodeHwDevice

CMMFVideoDecodeHwDevice *iVideoDecodeHwDevice[private]

TDblQue< TVideoPicture > iVideoPictureQue

TDblQue< TVideoPicture >iVideoPictureQue[private]

TDblQueIter< TVideoPicture > iVideoPictureQueIter

TDblQueIter< TVideoPicture >iVideoPictureQueIter[private]

CMMFVideoPostProcHwDevice * iVideoPostProcHwDevice

CMMFVideoPostProcHwDevice *iVideoPostProcHwDevice[private]