Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

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

Class CMMFDevVideoPlay

class CMMFDevVideoPlay : public CBase, private MMMFDevVideoPlayProxy;

Description

CMMFDevVideoPlay is the main client API for DevVideoPlay.

Derivation

Members

Defined in CMMFDevVideoPlay:

Inherited from CBase:


Construction and destruction


NewL(MMMFDevVideoPlayObserver &)

IMPORT_C static CMMFDevVideoPlay* NewL(MMMFDevVideoPlayObserver &aObserver);

Description

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

Parameters

MMMFDevVideoPlayObserver &aObserver

The observer object to use.

Return value

CMMFDevVideoPlay *

A pointer to a new CMMFDevVideoPlay object.

Leave codes

This

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


~CMMFDevVideoPlay()

IMPORT_C ~CMMFDevVideoPlay();

Description

Destructor.

[Top]


Member functions


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

IMPORT_C static TBool FindCommonFormat(const TArray< TUncompressedVideoFormat > &aFormats1, const TArray< TUncompressedVideoFormat > &aFormats2, TUncompressedVideoFormat &aCommonFormat);

Description

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

Return value

TBool

"True if a common format was found, false if not. If no common format was found, aCommonFormat is not modified."


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

IMPORT_C void FindDecodersL(const TDesC8 &aMimeType, TUint32 aPostProcType, RArray< TUid > &aDecoders, TBool aExactMatch=ETrue);

Description

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

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

RArray< TUid > &aDecoders

"An array for the result decoder UIDs. The array must be created and destroyed by the caller."

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

Leave codes

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


FindPostProcessorsL(TUint32,RArray< TUid > &)

IMPORT_C void FindPostProcessorsL(TUint32 aPostProcType, RArray< TUid > &aPostProcessors);

Description

Finds all available post-processors for a given set of post-processing operations.

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

Leave codes

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


GetDecoderListL(RArray< TUid > &)

IMPORT_C void GetDecoderListL(RArray< TUid > &aDecoders);

Description

Retrieves a list of available video decoders in the system.

Parameters

RArray< TUid > &aDecoders

"An array for the result decoder UIDs. The array must be created and destroyed by the caller."

Leave codes

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


GetPostProcessorListL(RArray< TUid > &)

IMPORT_C void GetPostProcessorListL(RArray< TUid > &aPostProcessors);

Description

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

Parameters

RArray< TUid > &aPostProcessors

An array for the result post-processor UIDs. The array must be created and destroyed by the caller.

Leave codes

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.


VideoDecoderInfoLC(TUid)

IMPORT_C CVideoDecoderInfo* VideoDecoderInfoLC(TUid aVideoDecoder);

Description

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.

Parameters

TUid aVideoDecoder

"The video decoder to query."

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


PostProcessorInfoLC(TUid)

IMPORT_C CPostProcessorInfo* PostProcessorInfoLC(TUid aPostProcessor);

Description

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.

Parameters

TUid aPostProcessor

"The post-processor to query."

Return value

CPostProcessorInfo *

"Post-processor information as a CPostProcessorInfo 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."


SelectDecoderL(TUid)

IMPORT_C THwDeviceId SelectDecoderL(TUid aDecoder);

Pre-Condition

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

Description

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 CMMFDevVideoPlay::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.

Parameters

TUid aDecoder

"The video decoder to use."

Return value

THwDeviceId

"Hardware device ID, used in other methods for configuring the decoder."

Leave codes

"The

method will leave if an error occurs. Typical error codes used: KErrNotFound - No decoder was found with the given UID"


SelectPostProcessorL(TUid)

IMPORT_C THwDeviceId SelectPostProcessorL(TUid aPostProcessor);

Pre-Condition

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

Description

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 CMMFDevVideoPlay::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.

Parameters

TUid aPostProcessor

"The post-processor to use."

Return value

THwDeviceId

"Hardware device ID, used in other methods for configuring the post-processor."

Leave codes

"The

method will leave if an error occurs. Typical error codes used: KErrNotFound - No post-processor was found with the given UID"


GetHeaderInformationL(TVideoDataUnitType,TVideoDataUnitEncapsulation,TVideoInputBuffer *)

IMPORT_C TVideoPictureHeader* GetHeaderInformationL(TVideoDataUnitType aDataUnitType, TVideoDataUnitEncapsulation aDataUnitEncapsulation, TVideoInputBuffer *aDataUnit);

Description

Reads header information from a coded data unit. [1 #59] This method can be called only after CMMFDevVideoPlay::SelectDecoderL(TUid).

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

TVideoDataUnitEncapsulation aDataUnitEncapsulation

"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 API using CMMFDevVideoPlay::ReturnHeader(TVideoPictureHeader *) before the API is shut down or the decoder is changed. 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."


ConfigureDecoderL(const TVideoPictureHeader &)

IMPORT_C void ConfigureDecoderL(const TVideoPictureHeader &aVideoPictureHeader);

Pre-Condition

"This method can only be called before the API 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.


ReturnHeader(TVideoPictureHeader *)

IMPORT_C void ReturnHeader(TVideoPictureHeader *aHeader);

Pre-Condition

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

Description

Returns a header from CMMFDevVideoPlay::GetHeaderInformationL(TVideoDataUnitType,TVideoDataUnitEncapsulation,TVideoInputBuffer *) back to the decoder so that the memory can be freed.

Parameters

TVideoPictureHeader *aHeader

"The header to return."


SetInputFormatL(THwDeviceId,const TUncompressedVideoFormat &)

IMPORT_C void SetInputFormatL(THwDeviceId aHwDevice, const TUncompressedVideoFormat &aFormat);

Pre-Condition

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

Description

Sets a hardware device input format to an uncompressed video format. Only post-processors support uncompressed video input.

Parameters

THwDeviceId aHwDevice

"The hardware device to configure. The value is returned from CMMFDevVideoPlay::SelectPostProcessorL(TUid) when the device is selected."

const TUncompressedVideoFormat &aFormat

"The input format to use."

Leave codes

"The

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


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

IMPORT_C void SetInputFormatL(THwDeviceId aHwDevice, const CCompressedVideoFormat &aFormat, TVideoDataUnitType aDataUnitType, TVideoDataUnitEncapsulation aEncapsulation, TBool aDataInOrder);

Pre-Condition

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

Description

Sets a hardware device Input format to a compressed video format. Only decoders support compressed video input.

Parameters

THwDeviceId aHwDevice

"The hardware device to configure. The value is returned from CMMFDevVideoPlay::SelectDecoderL(TUid) 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."

Leave codes

"The

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


GetOutputFormatListL(THwDeviceId,RArray< TUncompressedVideoFormat > &)

IMPORT_C void GetOutputFormatListL(THwDeviceId aHwDevice, RArray< TUncompressedVideoFormat > &aFormats);

Pre-Condition

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

Description

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.

Parameters

THwDeviceId aHwDevice

"The hardware device to configure. The value is returned from CMMFDevVideoPlay::SelectDecoderL(TUid) or CMMFDevVideoPlay::SelectPostProcessorL(TUid) 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."

Leave codes

"This

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


SetOutputFormatL(THwDeviceId,const TUncompressedVideoFormat &)

IMPORT_C void SetOutputFormatL(THwDeviceId aHwDevice, const TUncompressedVideoFormat &aFormat);

Pre-Condition

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

Description

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.

Parameters

THwDeviceId aHwDevice

"The hardware device to configure. The value is returned from CMMFDevVideoPlay::SelectDecoderL(TUid) or CMMFDevVideoPlay::SelectPostProcessorL(TUid) when the device is selected."

const TUncompressedVideoFormat &aFormat

"The format to use."

Leave codes

"The

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


SetClockSource(MMMFClockSource *)

IMPORT_C void SetClockSource(MMMFClockSource *aClock);

Pre-Condition

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

Description

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 CMMFDevVideoPlay::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.

Parameters

MMMFClockSource *aClock

"The clock source to use"


SetVideoDestScreenL(TBool)

IMPORT_C void SetVideoDestScreenL(TBool aScreen);

Pre-Condition

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

Description

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.

Parameters

TBool aScreen

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

Leave codes

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


SynchronizeDecoding(TBool)

IMPORT_C void SynchronizeDecoding(TBool aSynchronize);

Pre-Condition

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

Description

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.

Parameters

TBool aSynchronize

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


SetBufferOptionsL(const TBufferOptions &)

IMPORT_C void SetBufferOptionsL(const TBufferOptions &aOptions);

Pre-Condition

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

Description

Sets video decoder buffering options.

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

IMPORT_C void GetBufferOptions(TBufferOptions &aOptions);

Pre-Condition

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

Description

Gets the video decoder buffer options actually in use. This can be used before calling CMMFDevVideoPlay::SetBufferOptionsL(const TBufferOptions &) 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 &)

IMPORT_C void SetHrdVbvSpec(THrdVbvSpecification aHrdVbvSpec, const TDesC8 &aHrdVbvParams);

Pre-Condition

"This method can only be called before the API 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, 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."


SetPostProcessTypesL(THwDeviceId,TUint32)

IMPORT_C void SetPostProcessTypesL(THwDeviceId aHwDevice, TUint32 aPostProcCombination);

Pre-Condition

"This method can be called either before or after the API has been initialized with CMMFDevVideoPlay::Initialize(). If called after initialization, the change will only be committed once CMMFDevVideoPlay::CommitL() is called."

Description

Sets the post-processing types to be used. This method, like all post-processing configuration methods, must be called before CMMFDevVideoPlay::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.

Parameters

THwDeviceId aHwDevice

"The hardware device to configure. The value is returned from CMMFDevVideoPlay::SelectDecoderL(TUid) or CMMFDevVideoPlay::SelectPostProcessorL(TUid) when the device is selected."

TUint32 aPostProcCombination

"The post-processing steps to perform, a bitwise OR of values from TPrePostProcessType."

Leave codes

"The

method will leave if an error occurs. Typical error codes used: KErrNotSupported - The post-processing combination is not supported"


SetInputCropOptionsL(THwDeviceId,const TRect &)

IMPORT_C void SetInputCropOptionsL(THwDeviceId aHwDevice, const TRect &aRect);

Pre-Condition

"This method can be called either before or after the API has been initialized with CMMFDevVideoPlay::Initialize(). If called after initialization, the change will only be committed once CMMFDevVideoPlay::CommitL() is called."

Description

Sets post-processing options for input (pan-scan) cropping. CMMFDevVideoPlay::SetPostProcessTypesL(THwDeviceId,TUint32) must be called before this method is used.

Parameters

THwDeviceId aHwDevice

"The hardware device to configure. The value is returned from CMMFDevVideoPlay::SelectDecoderL(TUid) or CMMFDevVideoPlay::SelectPostProcessorL(TUid) when the device is selected."

const TRect &aRect

"The cropping rectangle to use."

Leave codes

"The

method will leave if an error occurs. Typical error codes used: KErrNotSupported - Pan-scan cropping is not supported"


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

IMPORT_C void SetYuvToRgbOptionsL(THwDeviceId aHwDevice, const TYuvToRgbOptions &aOptions, const TYuvFormat &aYuvFormat, TRgbFormat aRgbFormat);

Pre-Condition

"This method can be called either before or after the API has been initialized with CMMFDevVideoPlay::Initialize(). If called after initialization, the change will only be committed once CMMFDevVideoPlay::CommitL() is called."

Description

Sets post-processing options for YUV to RGB color space conversion. Specifies the input YUV and output RGB formats to use explicitly. SetSourceFormatL() and CMMFDevVideoPlay::SetOutputFormatL(THwDeviceId,const TUncompressedVideoFormat &), and CMMFDevVideoPlay::SetPostProcessTypesL(THwDeviceId,TUint32) must be called before this method is used.

Parameters

THwDeviceId aHwDevice

"The hardware device to configure. The value is returned from CMMFDevVideoPlay::SelectDecoderL(TUid) or CMMFDevVideoPlay::SelectPostProcessorL(TUid) 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."

Leave codes

"The

method will leave if an error occurs. Typical error codes used: KErrNotSupported - The conversion options are not supported."


SetYuvToRgbOptionsL(THwDeviceId,const TYuvToRgbOptions &)

IMPORT_C void SetYuvToRgbOptionsL(THwDeviceId aHwDevice, const TYuvToRgbOptions &aOptions);

Pre-Condition

"This method can be called either before or after the API has been initialized with CMMFDevVideoPlay::Initialize(). If called after initialization, the change will only be committed once CMMFDevVideoPlay::CommitL() is called."

Description

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 CMMFDevVideoPlay::SetOutputFormatL(THwDeviceId,const TUncompressedVideoFormat &), and CMMFDevVideoPlay::SetPostProcessTypesL(THwDeviceId,TUint32) must be called before this method is used.

Parameters

THwDeviceId aHwDevice

"The hardware device to configure. The value is returned from CMMFDevVideoPlay::SelectDecoderL(TUid) or CMMFDevVideoPlay::SelectPostProcessorL(TUid) when the device is selected."

const TYuvToRgbOptions &aOptions

"The conversion options to use."

Leave codes

"The

method will leave if an error occurs. Typical error codes used: KErrNotSupported - The conversion options are not supported."


SetRotateOptionsL(THwDeviceId,TRotationType)

IMPORT_C void SetRotateOptionsL(THwDeviceId aHwDevice, TRotationType aRotationType);

Pre-Condition

"This method can be called either before or after the API has been initialized with CMMFDevVideoPlay::Initialize(). If called after initialization, the change will only be committed once CMMFDevVideoPlay::CommitL() is called."

Description

Sets post-processing options for rotation. CMMFDevVideoPlay::SetPostProcessTypesL(THwDeviceId,TUint32) must be called before this method is used.

Parameters

THwDeviceId aHwDevice

"The hardware device to configure. The value is returned from CMMFDevVideoPlay::SelectDecoderL(TUid) or CMMFDevVideoPlay::SelectPostProcessorL(TUid) when the device is selected."

TRotationType aRotationType

"The rotation to perform."

Leave codes

"The

method will leave if an error occurs. Typical error codes used: KErrNotSupported - The rotation options are not supported."


SetScaleOptionsL(THwDeviceId,const TSize &,TBool)

IMPORT_C void SetScaleOptionsL(THwDeviceId aHwDevice, const TSize &aTargetSize, TBool aAntiAliasFiltering);

Pre-Condition

"This method can be called either before or after the API has been initialized with CMMFDevVideoPlay::Initialize(). If called after initialization, the change will only be committed once CMMFDevVideoPlay::CommitL() is called."

Description

Sets post-processing options for scaling. CMMFDevVideoPlay::SetPostProcessTypesL(THwDeviceId,TUint32) must be called before this method is used.

Parameters

THwDeviceId aHwDevice

"The hardware device to configure. The value is returned from CMMFDevVideoPlay::SelectDecoderL(TUid) or CMMFDevVideoPlay::SelectPostProcessorL(TUid) when the device is selected."

const TSize &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."

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

Leave codes

"The

method will leave if an error occurs. Typical error codes used: KErrNotSupported - The scale options are not supported."


SetOutputCropOptionsL(THwDeviceId,const TRect &)

IMPORT_C void SetOutputCropOptionsL(THwDeviceId aHwDevice, const TRect &aRect);

Pre-Condition

"This method can be called either before or after the API has been initialized with CMMFDevVideoPlay::Initialize(). If called after initialization, the change will only be committed once CMMFDevVideoPlay::CommitL() is called."

Description

Sets post-processing options for output cropping. CMMFDevVideoPlay::SetPostProcessTypesL(THwDeviceId,TUint32) must be called before this method is used.

Parameters

THwDeviceId aHwDevice

"The hardware device to configure. The value is returned from CMMFDevVideoPlay::SelectDecoderL(TUid) # CMMFDevVideoPlay::SelectPostProcessorL(TUid) when the device is selected."

const TRect &aRect

"Output cropping area."

Leave codes

"The

method will leave if an error occurs. Typical error codes used: KErrNotSupported - Output cropping is not supported."


SetPostProcSpecificOptionsL(THwDeviceId,const TDesC8 &)

IMPORT_C void SetPostProcSpecificOptionsL(THwDeviceId aHwDevice, const TDesC8 &aOptions);

Pre-Condition

"This method can be called either before or after the API has been initialized with CMMFDevVideoPlay::Initialize(). If called after initialization, the change will only be committed once CMMFDevVideoPlay::CommitL() is called."

Description

Sets post-processing hardware device specific options. CMMFDevVideoPlay::SetPostProcessTypesL(THwDeviceId,TUint32) must be called before this method is used.

Parameters

THwDeviceId aHwDevice

"The hardware device to configure. The value is returned from CMMFDevVideoPlay::SelectDecoderL(TUid) or CMMFDevVideoPlay::SelectPostProcessorL(TUid) when the device is selected."

const TDesC8 &aOptions

"The options. The format is plug-in specific."

Leave codes

"The

method will leave if an error occurs. Typical error codes used: KErrNotSupported - The options are not supported."


Initialize()

IMPORT_C void Initialize();

Description

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.


CommitL()

IMPORT_C void CommitL();

Pre-Condition

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

Description

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

Leave codes

"The

method will leave if an error occurs."

See also:


Revert()

IMPORT_C void Revert();

Pre-Condition

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

Description

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

See also:


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

IMPORT_C void StartDirectScreenAccessL(const TRect &aVideoRect, CFbsScreenDevice &aScreenDevice, const TRegion &aClipRegion);

Pre-Condition

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

Description

Starts video decoding directly to the display frame buffer using Direct Screen Access. Playback to the display can start immediately.

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

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

const TRegion &aClipRegion

"Initial clipping region to use."

Leave codes

"The

method will leave if an error occurs. Typical error codes used: KErrNotSupported - Direct Screen Access is not supported"


SetScreenClipRegion(const TRegion &)

IMPORT_C void SetScreenClipRegion(const TRegion &aRegion);

Pre-Condition

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

Description

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 CMMFDevVideoPlay::SetPauseOnClipFail(TBool), and the result can be verified with CMMFDevVideoPlay::IsPlaying(). Clipping can be disabled by setting a new clipping region that includes the whole video window.

Parameters

const TRegion &aRegion

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


SetPauseOnClipFail(TBool)

IMPORT_C void SetPauseOnClipFail(TBool aPause);

Pre-Condition

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

Description

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.

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


AbortDirectScreenAccess()

IMPORT_C void AbortDirectScreenAccess();

Pre-Condition

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

Description

Aborts Direct Screen Access completely, to be called from MAbortDirectScreenAccess::AbortNow(RDirectScreenAccess::TTerminationReasons) and similar methods. DSA can be resumed by calling CMMFDevVideoPlay::StartDirectScreenAccessL(const TRect &,CFbsScreenDevice &,const TRegion &).


IsPlaying()

IMPORT_C TBool IsPlaying();

Pre-Condition

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

Description

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.

Return value

TBool

"ETrue if video is still being played (even if not necessarily displayed)."


Redraw()

IMPORT_C void Redraw();

Pre-Condition

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

Description

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.


Start()

IMPORT_C void Start();

Pre-Condition

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

Description

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.


Stop()

IMPORT_C void Stop();

Pre-Condition

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

Description

Stops video playback. No new pictures will be decoded, post-processed, or rendered.


Pause()

IMPORT_C void Pause();

Pre-Condition

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

Description

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.


Resume()

IMPORT_C void Resume();

Pre-Condition

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

Description

Resumes video playback after a pause. The client is responsible for restarting the clock source if necessary.


SetPosition(const TTimeIntervalMicroSeconds &)

IMPORT_C void SetPosition(const TTimeIntervalMicroSeconds &aPlaybackPosition);

Pre-Condition

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

Description

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.

Parameters

const TTimeIntervalMicroSeconds &aPlaybackPosition

"The new playback position in the video stream."


FreezePicture(const TTimeIntervalMicroSeconds &)

IMPORT_C void FreezePicture(const TTimeIntervalMicroSeconds &aPlaybackPosition);

Pre-Condition

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

Description

Freezes a picture on the screen. After the picture has been frozen, no picture is displayed until the freeze is released with CMMFDevVideoPlay::ReleaseFreeze(const TTimeIntervalMicroSeconds &). 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."


ReleaseFreeze(const TTimeIntervalMicroSeconds &)

IMPORT_C void ReleaseFreeze(const TTimeIntervalMicroSeconds &aPlaybackPosition);

Pre-Condition

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

Description

Releases a picture frozen with CMMFDevVideoPlay::FreezePicture(const TTimeIntervalMicroSeconds &).

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


DecodingPosition()

IMPORT_C TTimeIntervalMicroSeconds DecodingPosition();

Pre-Condition

"This method can only be called after the API 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."


PlaybackPosition()

IMPORT_C TTimeIntervalMicroSeconds PlaybackPosition();

Pre-Condition

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

Description

Returns the current playback position, i.e. the timestamp for the most recently displayed or virtually displayed picture.

Return value

TTimeIntervalMicroSeconds

"Current playback position."


PreDecoderBufferBytes()

IMPORT_C TUint PreDecoderBufferBytes();

Pre-Condition

"This method can only be called after the API 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."


PictureBufferBytes()

IMPORT_C TUint PictureBufferBytes();

Pre-Condition

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

Description

Returns the total amount of memory allocated for uncompressed pictures.

Return value

TUint

"Total number of bytes of memory allocated for uncompressed pictures."


GetPictureCounters(TPictureCounters &)

IMPORT_C void GetPictureCounters(TPictureCounters &aCounters);

Pre-Condition

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

Description

Reads various counters related to decoded pictures. See the definition of CMMFDevVideoPlay::TPictureCounters for a description of the counters. The counters are reset when CMMFDevVideoPlay::Initialize() or this method is called, and thus they only include pictures processed since the last call.

Parameters

CMMFDevVideoPlay::TPictureCounters &aCounters

"The counter structure to fill."


GetBitstreamCounters(TBitstreamCounters &)

IMPORT_C void GetBitstreamCounters(TBitstreamCounters &aCounters);

Pre-Condition

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

Description

Reads various counters related to the received input bitstream and coded data units. See the definition of CMMFDevVideoPlay::TBitstreamCounters for a description about the counters. The counters are reset when CMMFDevVideoPlay::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()

IMPORT_C TUint NumFreeBuffers();

Pre-Condition

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

Description

Retrieves the number of free input buffers the decoder has available. If only a post-processor is used, the return value is undefined.

Return value

TUint

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


SetComplexityLevel(THwDeviceId,TUint)

IMPORT_C void SetComplexityLevel(THwDeviceId aHwDevice, TUint aLevel);

Pre-Condition

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

Description

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 CMMFDevVideoPlay::SelectDecoderL(TUid)or CMMFDevVideoPlay::SelectPostProcessorL(TUid) 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."


NumComplexityLevels(THwDeviceId)

IMPORT_C TUint NumComplexityLevels(THwDeviceId aHwDevice);

Pre-Condition

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

Description

Gets the number of complexity levels available.

Parameters

THwDeviceId aHwDevice

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

Return value

TUint

"The number of complexity control levels available, or zero if the information is not available yet. The information may not be available if the number of levels depends on the input data, and enough input data has not been read yet. In that case, using level zero is safe."


GetComplexityLevelInfo(THwDeviceId,TUint,TComplexityLevelInfo &)

IMPORT_C void GetComplexityLevelInfo(THwDeviceId aHwDevice, TUint aLevel, TComplexityLevelInfo &aInfo);

Pre-Condition

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

Description

Gets information about a computational complexity level. This method can be called after CMMFDevVideoPlay::NumComplexityLevels(THwDeviceId) 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.

Parameters

THwDeviceId aHwDevice

"The hw device to query. The value is returned from CMMFDevVideoPlay::SelectDecoderL(TUid)or CMMFDevVideoPlay::SelectPostProcessorL(TUid) when the device is selected."

TUint aLevel

"The computational complexity level to query. The level numbers range from zero (the most complex) to CMMFDevVideoPlay::NumComplexityLevels(THwDeviceId)-1."

CMMFDevVideoPlay::TComplexityLevelInfo &aInfo

"The information structure to fill."


GetBufferL(TUint)

IMPORT_C TVideoInputBuffer* GetBufferL(TUint aBufferSize);

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

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.

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

IMPORT_C void WriteCodedDataL(TVideoInputBuffer *aBuffer);

Pre-Condition

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

Description

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

Parameters

TVideoInputBuffer *aBuffer

"The coded data unit to write."

Leave codes

"The

method will leave if an error occurs."


WritePictureL(TVideoPicture *)

IMPORT_C void WritePictureL(TVideoPicture *aPicture);

Pre-Condition

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

Description

Writes an uncompressed video picture. The picture must remain valid and unmodified until it is returned with the MdvpoReturnPicture() callback.

Parameters

TVideoPicture *aPicture

"The picture to write."

Leave codes

"The

method will leave if an error occurs."


InputEnd()

IMPORT_C void InputEnd();

Pre-Condition

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

Description

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 CMMFDevVideoPlay::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.


GetNewPictureInfo(TUint &,TTimeIntervalMicroSeconds &,TTimeIntervalMicroSeconds &)

IMPORT_C void GetNewPictureInfo(TUint &aNumPictures, TTimeIntervalMicroSeconds &aEarliestTimestamp, TTimeIntervalMicroSeconds &aLatestTimestamp);

Pre-Condition

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

Description

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

TTimeIntervalMicroSeconds &aEarliestTimestamp

"Timestamp for the earliest available new decoded picture. If the number of new decoded pictures (aNumPictures) is zero, the timestamp is not valid."

TTimeIntervalMicroSeconds &aLatestTimestamp

"Timestamp for the latest available new decoded picture. If the number of new decoded pictures (aNumPictures) is zero, the timestamp is not valid."


NextPictureL()

IMPORT_C TVideoPicture* NextPictureL();

Pre-Condition

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

Description

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 CMMFDevVideoPlay::ReturnPicture(TVideoPicture *) before a new one can be read.

Return value

TVideoPicture *

"The next new decoded picture. The pointer and the related data is valid until the picture is returned using CMMFDevVideoPlay::ReturnPicture(TVideoPicture *), or the API is shut down. If no new picture is available, the method returns NULL."

Leave codes

"The

method will leave if an error occurs."


ReturnPicture(TVideoPicture *)

IMPORT_C void ReturnPicture(TVideoPicture *aPicture);

Pre-Condition

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

Description

Returns a picture from NextPicture() back to the device. The picture data cannot be used afterwards.

Parameters

TVideoPicture *aPicture

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


GetSnapshotL(TPictureData &,const TUncompressedVideoFormat &)

IMPORT_C TBool GetSnapshotL(TPictureData &aPictureData, const TUncompressedVideoFormat &aFormat);

Pre-Condition

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

Description

Gets a copy of the latest picture displayed.

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

const TUncompressedVideoFormat &aFormat

"The picture format to use for the snapshot."

Return value

TBool

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

Leave codes

"The

method will leave if an error occurs. Typical error codes used: KErrNotSupported - The requested data format or picture size is not supported."


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

IMPORT_C void GetTimedSnapshotL(TPictureData *aPictureData, const TUncompressedVideoFormat &aFormat, const TTimeIntervalMicroSeconds &aPresentationTimestamp);

Pre-Condition

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

Description

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 CMMFDevVideoPlay::CancelTimedSnapshot(). Only one timed snapshot request can be active at a time.

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

const TUncompressedVideoFormat &aFormat

"The picture format to use for the snapshot."

const TTimeIntervalMicroSeconds &aPresentationTimestamp

"Presentation timestamp for the picture to copy. The timestamp must match the timestamp in the picture exactly"

Leave codes

"The

method will leave if an error occurs. Typical error codes used: KErrNotSupported - The requested data format or picture size is not supported."


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

IMPORT_C void GetTimedSnapshotL(TPictureData *aPictureData, const TUncompressedVideoFormat &aFormat, const TPictureId &aPictureId);

Pre-Condition

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

Description

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 CMMFDevVideoPlay::CancelTimedSnapshot(). Only one timed snapshot request can be active at a time.

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

const TUncompressedVideoFormat &aFormat

"The picture format to use for the snapshot."

const TPictureId &aPictureId

"Picture identifier for the picture to copy."

Leave codes

"The

method will leave if an error occurs. Typical error codes used: KErrNotSupported - The requested data format or picture size is not supported."


CancelTimedSnapshot()

IMPORT_C void CancelTimedSnapshot();

Pre-Condition

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

Description

Cancels a timed snapshot request.


GetSupportedSnapshotFormatsL(RArray< TUncompressedVideoFormat > &)

IMPORT_C void GetSupportedSnapshotFormatsL(RArray< TUncompressedVideoFormat > &aFormats);

Pre-Condition

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

Description

Gets a list of the supported snapshot picture formats.

Parameters

RArray< TUncompressedVideoFormat > &aFormats

"An array for the result format list. The array must be created and destroyed by the caller."

Leave codes

"The

method will leave if an error occurs."


CustomInterface(THwDeviceId,TUid)

IMPORT_C TAny* CustomInterface(THwDeviceId aHwDevice, TUid aInterface);

Description

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 CMMFDevVideoPlay::SelectDecoderL(TUid) or CMMFDevVideoPlay::SelectPostProcessorL(TUid) when the device is selected."

TUid aInterface

"Interface UID, defined with the custom interface."

Return value

TAny *

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


MdvppNewPicture(TVideoPicture *)

private: virtual void MdvppNewPicture(TVideoPicture *aPicture);

Description

Delivers a new decoded picture to the client. The CMMFDevVideoPlay implementation will maintain a list of decoded pictures and implement CMMFDevVideoPlay::GetNewPictureInfo(TUint &,TTimeIntervalMicroSeconds &,TTimeIntervalMicroSeconds &) and CMMFDevVideoPlay::NextPictureL() based on those. The pictures will be returned back to the hardware device using CMMFDevVideoPlay::ReturnPicture(TVideoPicture *).

Parameters

TVideoPicture *aPicture

"The newly processed picture."


MdvppNewBuffers()

private: virtual void MdvppNewBuffers();

Description

Notifies the client that one or more new empty input buffers are available. Called by the decoder hardware device.


MdvppReturnPicture(TVideoPicture *)

private: virtual void MdvppReturnPicture(TVideoPicture *aPicture);

Description

Returns a used input video picture back to the caller. Called by a post-processor hardware device after the picture has been processed and the picture source was the client, not another plug-in.

Parameters

TVideoPicture *aPicture

"The picture to return."


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

private: virtual void MdvppSupplementalInformation(const TDesC8 &aData, const TTimeIntervalMicroSeconds &aTimestamp, const TPictureId &aPictureId);

Description

Delivers supplemental information from a decoder hardware device to the client. The information is codec-dependent. The method is synchronous - the client MMMFDevVideoPlayObserver::MdvppSupplementalInformation() method is called immediately, and the memory for the supplemental information can be re-used when the call returns.

Parameters

const TDesC8 &aData

"The supplemental data."

const TTimeIntervalMicroSeconds &aTimestamp

"The presentation timestamp for the picture that the supplemental data is part of."

const TPictureId &aPictureId

"Picture identifier for the picture. If a picture ID is not available, aPictureId.iIdType is set to ENone."


MdvppPictureLoss()

private: virtual void MdvppPictureLoss();

Description

Back channel information, indicating a picture loss without specifying the lost picture.


MdvppPictureLoss(const TArray< TPictureId > &)

private: virtual void MdvppPictureLoss(const TArray< TPictureId > &aPictures);

Description

Back channel information, indicating the pictures that have been lost.

Parameters

const TArray< TPictureId > &aPictures

"Picture identifiers for the lost pictures. The reference is only valid until the method returns."


MdvppSliceLoss(TUint,TUint,const TPictureId &)

private: virtual void MdvppSliceLoss(TUint aFirstMacroblock, TUint aNumMacroblocks, const TPictureId &aPicture);

Description

Back channel information, indicating the loss of consecutive macroblocks in raster scan order.

Parameters

TUint aFirstMacroblock

"The first lost macroblock. The macroblocks are numbered such that the macroblock in the upper left corner of the picture is considered macroblock number 1 and the number for each macroblock increases from left to right and then from top to bottom in raster-scan order."

TUint aNumMacroblocks

"The number of lost macroblocks that are consecutive in raster-scan order."

const TPictureId &aPicture

"The picture identifier for the picture where the macroblocks were lost. If the picture is not known, aPicture.iIdType is set to ENone. The reference is only valid until the method returns."


MdvppReferencePictureSelection(const TDesC8 &)

private: virtual void MdvppReferencePictureSelection(const TDesC8 &aSelectionData);

Description

Back channel information from the decoder, indicating a reference picture selection request. The request is delivered as a coding-standard specific binary message. Reference picture selection can be used to select a pervious correctly transmitted picture to use as a reference in case later pictures have been lost.

Parameters

const TDesC8 &aSelectionData

"The reference picture selection request message. The message format is coding-standard specific, and defined separately. The reference is only valid until the method returns."


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

private: virtual void MdvppTimedSnapshotComplete(TInt aError, TPictureData *aPictureData, const TTimeIntervalMicroSeconds &aPresentationTimestamp, const TPictureId &aPictureId);

Description

Delivers a timed snapshot result to the client. The memory reserved for the snapshot picture can no longer be used in the device.

Parameters

TInt aError

"An error code, KErrNone if no errors occurred. If an error occurred, the data in the snapshot may not be valid, but the memory can still be freed."

TPictureData *aPictureData

"The snapshot picture data."

const TTimeIntervalMicroSeconds &aPresentationTimestamp

"The presentation timestamp for the snapshot picture."

const TPictureId &aPictureId

"Picture identifier for the picture. If a picture ID is not available, aPictureId.iIdType is set to ENone."


MdvppFatalError(CMMFVideoHwDevice *,TInt)

private: virtual void MdvppFatalError(CMMFVideoHwDevice *aDevice, TInt aError);

Description

Reports a fatal error to the client. The device must automatically stop processing video data when such errors occur, and may not do further processing before it has been deleted and re-created.

Parameters

CMMFVideoHwDevice *aDevice

"The device that reported the error."

TInt aError

"The error code."


MdvppInitializeComplete(CMMFVideoHwDevice *,TInt)

private: virtual void MdvppInitializeComplete(CMMFVideoHwDevice *aDevice, TInt aError);

Description

Reports that an asynchronous CMMFDevVideoPlay::Initialize() method has completed. The device is now ready for playback.

Parameters

CMMFVideoHwDevice *aDevice

"The device that was initialzied."

TInt aError

"Initialization result error code, KErrNone if initialization was successful."


MdvppStreamEnd()

private: virtual void MdvppStreamEnd();

Description

Reports that the input video stream end has been reached and all pictures have been processed. Called by each hardware device after their CMMFDevVideoPlay::InputEnd() methods have been called and all data has been processed. The proxy implementation will notify the client about stream end when all hardware devices have called this method.

[Top]


Member classes


Class TPictureCounters

class TPictureCounters;

Description

Picture statistic counters. Used for following playback progress. The counters can be retrieved using CMMFDevVideoPlay::GetPictureCounters(TPictureCounters &) and are reset after each call. The client must keep track of the cumulative values for counters and picture processing rates itself if necessary.

Members

Defined in CMMFDevVideoPlay::TPictureCounters:

Construction and destruction


TPictureCounters()

inline TPictureCounters();

Description

Default constructor. Zeros all members.

Member data


iPicturesSkipped

TUint iPicturesSkipped;

Description

The number of pictures skipped due to lack of processing power. This does not include pictures inside data bytes discarded due to buffer overflows, but includes all pictures skipped at picture decoding, post-processing and rendering phase.


iPicturesDecoded

TUint iPicturesDecoded;

Description

The number of pictures decoded.


iPicturesDisplayed

TUint iPicturesDisplayed;

Description

The number of pictures "virtually" displayed. "Virtually" displayed pictures are pictures that have been drawn on the screen, when using direct rendering, or pictures that have been decoded, processed, and delivered to the client when not using direct rendering.


iTotalPictures

TUint iTotalPictures;

Description

The total number of pictures in the input bitstream. This figure does not include pictures that have been lost due to transmission errors, since those have not been processed by the MSL hardware devices, but does include pictures that have been discarded by the HW devices due to buffer overflows or other reasons.


Class TBitstreamCounters

class TBitstreamCounters;

Description

Bitstream statistic counters, used for following decoding progress. The counters can be retrieved using CMMFDevVideoPlay::GetBitstreamCounters(TBitstreamCounters &) and are reset after each call. The client must keep track of the cumulative values for counters itself if necessary.

Members

Defined in CMMFDevVideoPlay::TBitstreamCounters:

Construction and destruction


TBitstreamCounters()

inline TBitstreamCounters();

Description

Default constructor. Zeros all members.

Member data


iLostPackets

TUint iLostPackets;

Description

Number of lost packets. This figure includes all packets that have been dropped by the hardware devices due to buffer overruns, but it does not include packets lost due to transmission errors.


iTotalPackets

TUint iTotalPackets;

Description

Total number of packets. This figure includes all the packets that have been received by the decoder, including packets that have been dropped due to buffer overruns.


Class TBufferOptions

class TBufferOptions;

Description

Buffer options used with CMMFDevVideoPlay::SetBufferOptionsL(const TBufferOptions &).

Members

Defined in CMMFDevVideoPlay::TBufferOptions:

Construction and destruction


TBufferOptions()

inline TBufferOptions();

Description

Default constructor. Zeros all members.

Member data


iPreDecodeBufferSize

TUint iPreDecodeBufferSize;

Description

Pre-decoder buffer size in bytes. Set to zero to use decoder default value.


iMaxPostDecodeBufferSize

TUint iMaxPostDecodeBufferSize;

Description

Maximum post-decoder buffer size in bytes. Set to zero to remove limitations.


iPreDecoderBufferPeriod

TTimeIntervalMicroSeconds iPreDecoderBufferPeriod;

Description

Initial pre-decoder buffering period, the amount of coded data to be buffered before decoding starts. If the value is set to zero, decoding begins immediately when all data associated with the first decoding timestamp is received. Default value is zero.


iPostDecoderBufferPeriod

TTimeIntervalMicroSeconds iPostDecoderBufferPeriod;

Description

The amount of data buffered after the decoding before playback starts. If the value is zero, playback begins immediately when the first picture has been decoded. The default value is zero.


iMaxInputBufferSize

TUint iMaxInputBufferSize;

Description

The maximum input buffer size that the client will request. If the buffer options have been set successfully, the decoder must be able to supply buffers of this size. If no information is available about the bitstream, the client may have to set this value to a relatively large value, and thus the decoder should not by default allocate buffers of this size before they are explicitly requested.


iMinNumInputBuffers

TUint iMinNumInputBuffers;

Description

The minimum number of input buffers the decoder needs to have available. This is the number of buffers the client can request through CMMFDevVideoPlay::GetBufferL(TUint) before writing any back using CMMFDevVideoPlay::WriteCodedDataL(TVideoInputBuffer *).


Class TComplexityLevelInfo

class TComplexityLevelInfo;

Description

Information about a single computational complexity level.

Members

Defined in CMMFDevVideoPlay::TComplexityLevelInfo:

Member enumerations


Enum TOptions

TOptions

Description

EAvgPictureRate

The average picture rate field is valid.

EPictureSize

The picture size field is valid.

ERelativeImageQuality

The relative image quality field is valid.

ERequiredMIPS

The required MIPS field is valid.

ERelativeProcessTime

The relative processing time field is valid.

Member data


iOptions

TUint32 iOptions;

Description

Structure options. The value is a bitfield combined from values from TOptions.


iAvgPictureRate

TReal iAvgPictureRate;

Description

The average picture rate, in pictures per second. Valid only if EAvgPictureRate is set in the options. This value depends on the input bitstream, and may not be available if enough bitstream has not been read.


iPictureSize

TSize iPictureSize;

Description

Picture size (spatial resolution), in pixels. Valid only if EPictureSize is set in the options.


iRelativeImageQuality

TReal iRelativeImageQuality;

Description

Relative image quality, compared to the best available level. 1.0 is the quality at the maximum quality level (level zero). Valid only if ERelativeImageQuality is set in the options.


iRequiredMIPS

TUint iRequiredMIPS;

Description

The number of MIPS required to process the data. Valid only if ERequiredMIPS is set in the options.


iRelativeProcessTime

TReal iRelativeProcessTime;

Description

Relative amount of processing time needed compared to standard-compliant decoding of all data. 1.0 is the processing time required for full processing, which usually corresponds to complexity level zero. Valid only if ERelativeProcessTime is set in the options.