Location:
devvideoplay.h
Link against: devvideo.lib
class CMMFDevVideoPlay : public CBase, private MMMFDevVideoPlayProxy;
CMMFDevVideoPlay is the main client API for DevVideoPlay.
MMMFDevVideoPlayProxy
- MMMFDevVideoPlayProxy is the interface to the
CBase
- Base class for all classes to be instantiated on the heap
CMMFDevVideoPlay
- CMMFDevVideoPlay is the main client API for DevVideoPlay
Defined in CMMFDevVideoPlay
:
AbortDirectScreenAccess()
, CancelTimedSnapshot()
, CommitL()
, ConfigureDecoderL()
, CustomInterface()
, DecodingPosition()
, FindCommonFormat()
, FindDecodersL()
, FindPostProcessorsL()
, FreezePicture()
, GetBitstreamCounters()
, GetBufferL()
, GetBufferOptions()
, GetComplexityLevelInfo()
, GetDecoderListL()
, GetHeaderInformationL()
, GetNewPictureInfo()
, GetOutputFormatListL()
, GetPictureCounters()
, GetPostProcessorListL()
, GetSnapshotL()
, GetSupportedSnapshotFormatsL()
, GetTimedSnapshotL()
, GetTimedSnapshotL()
, Initialize()
, InputEnd()
, IsPlaying()
, MdvppFatalError()
, MdvppInitializeComplete()
, MdvppNewBuffers()
, MdvppNewPicture()
, MdvppPictureLoss()
, MdvppPictureLoss()
, MdvppReferencePictureSelection()
, MdvppReturnPicture()
, MdvppSliceLoss()
, MdvppStreamEnd()
, MdvppSupplementalInformation()
, MdvppTimedSnapshotComplete()
, NewL()
, NextPictureL()
, NumComplexityLevels()
, NumFreeBuffers()
, Pause()
, PictureBufferBytes()
, PlaybackPosition()
, PostProcessorInfoLC()
, PreDecoderBufferBytes()
, Redraw()
, ReleaseFreeze()
, Resume()
, ReturnHeader()
, ReturnPicture()
, Revert()
, SelectDecoderL()
, SelectPostProcessorL()
, SetBufferOptionsL()
, SetClockSource()
, SetComplexityLevel()
, SetHrdVbvSpec()
, SetInputCropOptionsL()
, SetInputFormatL()
, SetInputFormatL()
, SetOutputCropOptionsL()
, SetOutputFormatL()
, SetPauseOnClipFail()
, SetPosition()
, SetPostProcSpecificOptionsL()
, SetPostProcessTypesL()
, SetRotateOptionsL()
, SetScaleOptionsL()
, SetScreenClipRegion()
, SetVideoDestScreenL()
, SetYuvToRgbOptionsL()
, SetYuvToRgbOptionsL()
, Start()
, StartDirectScreenAccessL()
, Stop()
, SynchronizeDecoding()
, TBitstreamCounters
, TBufferOptions
, TComplexityLevelInfo
, TPictureCounters
, VideoDecoderInfoLC()
, WriteCodedDataL()
, WritePictureL()
, ~CMMFDevVideoPlay()
Inherited from CBase
:
Delete()
,
Extension_()
,
operator new()
static IMPORT_C CMMFDevVideoPlay *NewL(MMMFDevVideoPlayObserver &aObserver);
Constructs a new MSL video client instance. Each client instance supports a single video bitstream.
|
|
|
static IMPORT_C TBool FindCommonFormat(const TArray< TUncompressedVideoFormat > &aFormats1, const TArray< TUncompressedVideoFormat
> &aFormats2, TUncompressedVideoFormat &aCommonFormat);
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.
|
|
IMPORT_C void FindDecodersL(const TDesC8 &aMimeType, TUint32 aPostProcType, RArray< TUid > &aDecoders, TBool aExactMatch=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().
|
|
IMPORT_C void FindPostProcessorsL(TUint32 aPostProcType, RArray< TUid > &aPostProcessors);
Finds all available post-processors for a given set of post-processing operations.
|
|
IMPORT_C void GetDecoderListL(RArray< TUid > &aDecoders);
Retrieves a list of available video decoders in the system.
|
|
IMPORT_C void GetPostProcessorListL(RArray< TUid > &aPostProcessors);
Retrieves a list of available video post-processors in the system.
|
|
IMPORT_C CVideoDecoderInfo *VideoDecoderInfoLC(TUid aVideoDecoder);
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.
|
|
|
IMPORT_C CPostProcessorInfo *PostProcessorInfoLC(TUid aPostProcessor);
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.
|
|
|
IMPORT_C THwDeviceId SelectDecoderL(TUid aDecoder);
"This method can only be called before the API has been initialized with Initialize()."
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.
|
|
|
IMPORT_C THwDeviceId SelectPostProcessorL(TUid aPostProcessor);
"This method can only be called before the API has been initialized with Initialize()."
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.
|
|
|
IMPORT_C TVideoPictureHeader *GetHeaderInformationL(TVideoDataUnitType aDataUnitType, TVideoDataUnitEncapsulation aDataUnitEncapsulation,
TVideoInputBuffer *aDataUnit);
Reads header information from a coded data unit. [1 #59] This method can be called only after SelectDecoderL()
.
|
|
|
IMPORT_C void ConfigureDecoderL(const TVideoPictureHeader &aVideoPictureHeader);
"This method can only be called before the API has been initialized with Initialize()."
Configures the Decoder using header information known by the client.
|
|
IMPORT_C void ReturnHeader(TVideoPictureHeader *aHeader);
"This method can only be called before the API has been initialized with Initialize()."
Returns a header from GetHeaderInformationL()
back to the decoder so that the memory can be freed.
|
IMPORT_C void SetInputFormatL(THwDeviceId aHwDevice, const TUncompressedVideoFormat &aFormat);
"This method can only be called before the API has been initialized with Initialize()."
Sets a hardware device input format to an uncompressed video format. Only post-processors support uncompressed video input.
|
|
IMPORT_C void SetInputFormatL(THwDeviceId aHwDevice, const CCompressedVideoFormat &aFormat, TVideoDataUnitType aDataUnitType,
TVideoDataUnitEncapsulation aEncapsulation, TBool aDataInOrder);
"This method can only be called before the API has been initialized with Initialize()."
Sets a hardware device Input format to a compressed video format. Only decoders support compressed video input.
|
|
IMPORT_C void GetOutputFormatListL(THwDeviceId aHwDevice, RArray< TUncompressedVideoFormat > &aFormats);
"This method can only be called before the API has been initialized with Initialize()."
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.
|
|
IMPORT_C void SetOutputFormatL(THwDeviceId aHwDevice, const TUncompressedVideoFormat &aFormat);
"This method can only be called before the API has been initialized with Initialize()."
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.
|
|
IMPORT_C void SetClockSource(MMMFClockSource *aClock);
"This method can only be called before the API has been initialized with Initialize()."
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.
|
IMPORT_C void SetVideoDestScreenL(TBool aScreen);
"This method can only be called before the API has been initialized with Initialize()."
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.
|
|
IMPORT_C void SynchronizeDecoding(TBool aSynchronize);
"This method can only be called before the API has been initialized with Initialize()."
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.
|
IMPORT_C void SetBufferOptionsL(const TBufferOptions &aOptions);
"This method can only be called before the API has been initialized with Initialize()."
Sets video decoder buffering options.
|
|
IMPORT_C void GetBufferOptions(TBufferOptions &aOptions);
"This method can only be called before the API has been initialized with Initialize()."
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).
|
IMPORT_C void SetHrdVbvSpec(THrdVbvSpecification aHrdVbvSpec, const TDesC8 &aHrdVbvParams);
"This method can only be called before the API has been initialized with Initialize()."
Indicates which HRD/VBV specification is fulfilled in the input stream and any related parameters.
|
IMPORT_C void SetPostProcessTypesL(THwDeviceId aHwDevice, TUint32 aPostProcCombination);
"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."
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.
|
|
IMPORT_C void SetInputCropOptionsL(THwDeviceId aHwDevice, const TRect &aRect);
"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."
Sets post-processing options for input (pan-scan) cropping. SetPostProcessTypesL()
must be called before this method is used.
|
|
IMPORT_C void SetYuvToRgbOptionsL(THwDeviceId aHwDevice, const TYuvToRgbOptions &aOptions, const TYuvFormat &aYuvFormat, TRgbFormat
aRgbFormat);
"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."
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.
|
|
IMPORT_C void SetYuvToRgbOptionsL(THwDeviceId aHwDevice, const TYuvToRgbOptions &aOptions);
"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."
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.
|
|
IMPORT_C void SetRotateOptionsL(THwDeviceId aHwDevice, TRotationType aRotationType);
"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."
Sets post-processing options for rotation. SetPostProcessTypesL()
must be called before this method is used.
|
|
IMPORT_C void SetScaleOptionsL(THwDeviceId aHwDevice, const TSize &aTargetSize, TBool aAntiAliasFiltering);
"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."
Sets post-processing options for scaling. SetPostProcessTypesL()
must be called before this method is used.
|
|
IMPORT_C void SetOutputCropOptionsL(THwDeviceId aHwDevice, const TRect &aRect);
"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."
Sets post-processing options for output cropping. SetPostProcessTypesL()
must be called before this method is used.
|
|
IMPORT_C void SetPostProcSpecificOptionsL(THwDeviceId aHwDevice, const TDesC8 &aOptions);
"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."
Sets post-processing hardware device specific options. SetPostProcessTypesL()
must be called before this method is used.
|
|
IMPORT_C void Initialize();
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.
IMPORT_C void CommitL();
"This method can only be called after the API has been initialized with Initialize()."
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.
|
IMPORT_C void Revert();
"This method can only be called after the API has been initialized with Initialize()."
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.
IMPORT_C void StartDirectScreenAccessL(const TRect &aVideoRect, CFbsScreenDevice &aScreenDevice, const TRegion &aClipRegion);
"This method can only be called after the API has been initialized with Initialize()."
Starts video decoding directly to the display frame buffer using Direct Screen Access. Playback to the display can start immediately.
|
|
IMPORT_C void SetScreenClipRegion(const TRegion &aRegion);
"This method can only be called after the API has been initialized with Initialize()."
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.
|
IMPORT_C void SetPauseOnClipFail(TBool aPause);
"This method can only be called after the API has been initialized with Initialize()."
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.
|
IMPORT_C void AbortDirectScreenAccess();
"This method can only be called after the API has been initialized with Initialize()."
Aborts Direct Screen Access completely, to be called from MAbortDirectScreenAccess::AbortNow()
and similar methods. DSA can be resumed by calling StartDirectScreenAccessL()
.
IMPORT_C TBool IsPlaying();
"This method can only be called after the API has been initialized with Initialize()."
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.
|
IMPORT_C void Redraw();
"This method can only be called after the API has been initialized with Initialize()."
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.
IMPORT_C void Start();
"This method can only be called after the API has been initialized with Initialize()."
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.
IMPORT_C void Stop();
"This method can only be called after the API has been initialized with Initialize()."
Stops video playback. No new pictures will be decoded, post-processed, or rendered.
IMPORT_C void Pause();
"This method can only be called after the API has been initialized with Initialize()."
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.
IMPORT_C void Resume();
"This method can only be called after the API has been initialized with Initialize()."
Resumes video playback after a pause. The client is responsible for restarting the clock source if necessary.
IMPORT_C void SetPosition(const TTimeIntervalMicroSeconds &aPlaybackPosition);
"This method can only be called after the API has been initialized with Initialize()."
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.
|
IMPORT_C void FreezePicture(const TTimeIntervalMicroSeconds &aPlaybackPosition);
"This method can only be called after the API has been initialized with Initialize()."
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.
|
IMPORT_C void ReleaseFreeze(const TTimeIntervalMicroSeconds &aPlaybackPosition);
"This method can only be called after the API has been initialized with Initialize()."
Releases a picture frozen with FreezePicture()
.
|
IMPORT_C TTimeIntervalMicroSeconds DecodingPosition();
"This method can only be called after the API has been initialized with Initialize()."
Returns the current decoding position, i.e. the timestamp for the most recently decoded picture.
|
IMPORT_C TTimeIntervalMicroSeconds PlaybackPosition();
"This method can only be called after the API has been initialized with Initialize()."
Returns the current playback position, i.e. the timestamp for the most recently displayed or virtually displayed picture.
|
IMPORT_C TUint PreDecoderBufferBytes();
"This method can only be called after the API has been initialized with Initialize()."
Returns the current pre-decoder buffer size.
|
IMPORT_C TUint PictureBufferBytes();
"This method can only be called after the API has been initialized with Initialize()."
Returns the total amount of memory allocated for uncompressed pictures.
|
IMPORT_C void GetPictureCounters(TPictureCounters &aCounters);
"This method can only be called after the API has been initialized with Initialize()."
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.
|
IMPORT_C void GetBitstreamCounters(TBitstreamCounters &aCounters);
"This method can only be called after the API has been initialized with Initialize()."
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.
|
IMPORT_C TUint NumFreeBuffers();
"This method can only be called after the API has been initialized with Initialize()."
Retrieves the number of free input buffers the decoder has available. If only a post-processor is used, the return value is undefined.
|
IMPORT_C void SetComplexityLevel(THwDeviceId aHwDevice, TUint aLevel);
"This method can only be called after the API has been initialized with Initialize()."
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.
|
IMPORT_C TUint NumComplexityLevels(THwDeviceId aHwDevice);
"This method can only be called after the API has been initialized with Initialize()."
Gets the number of complexity levels available.
|
|
IMPORT_C void GetComplexityLevelInfo(THwDeviceId aHwDevice, TUint aLevel, TComplexityLevelInfo &aInfo);
"This method can only be called after the API has been initialized with Initialize()."
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.
|
IMPORT_C TVideoInputBuffer *GetBufferL(TUint aBufferSize);
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.
|
|
|
IMPORT_C void WriteCodedDataL(TVideoInputBuffer *aBuffer);
"This method can only be called after the API has been initialized with Initialize()."
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()
.
|
|
IMPORT_C void WritePictureL(TVideoPicture *aPicture);
"This method can only be called after the API has been initialized with Initialize()."
Writes an uncompressed video picture. The picture must remain valid and unmodified until it is returned with the MdvpoReturnPicture() callback.
|
|
IMPORT_C void InputEnd();
"This method can only be called after the API has been initialized with Initialize()."
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.
IMPORT_C void GetNewPictureInfo(TUint &aNumPictures, TTimeIntervalMicroSeconds &aEarliestTimestamp, TTimeIntervalMicroSeconds
&aLatestTimestamp);
"This method can only be called after the API has been initialized with Initialize()."
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.
|
IMPORT_C TVideoPicture *NextPictureL();
"This method can only be called after the API has been initialized with Initialize()."
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.
|
|
IMPORT_C void ReturnPicture(TVideoPicture *aPicture);
"This method can only be called after the API has been initialized with Initialize()."
Returns a picture from NextPicture() back to the device. The picture data cannot be used afterwards.
|
IMPORT_C TBool GetSnapshotL(TPictureData &aPictureData, const TUncompressedVideoFormat &aFormat);
"This method can only be called after the API has been initialized with Initialize()."
Gets a copy of the latest picture displayed.
|
|
|
IMPORT_C void GetTimedSnapshotL(TPictureData *aPictureData, const TUncompressedVideoFormat &aFormat, const TTimeIntervalMicroSeconds
&aPresentationTimestamp);
"This method can only be called after the API has been initialized with Initialize()."
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.
|
|
IMPORT_C void GetTimedSnapshotL(TPictureData *aPictureData, const TUncompressedVideoFormat &aFormat, const TPictureId &aPictureId);
"This method can only be called after the API has been initialized with Initialize()."
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.
|
|
IMPORT_C void CancelTimedSnapshot();
"This method can only be called after the API has been initialized with Initialize()."
Cancels a timed snapshot request.
IMPORT_C void GetSupportedSnapshotFormatsL(RArray< TUncompressedVideoFormat > &aFormats);
"This method can only be called after the API has been initialized with Initialize()."
Gets a list of the supported snapshot picture formats.
|
|
IMPORT_C TAny *CustomInterface(THwDeviceId aHwDevice, TUid aInterface);
Retrieves a custom interface to the specified hardware device.
|
|
private: virtual void MdvppNewPicture(TVideoPicture *aPicture);
Delivers a new decoded picture to the client. The CMMFDevVideoPlay implementation will maintain a list of decoded pictures
and implement GetNewPictureInfo()
and NextPictureL()
based on those. The pictures will be returned back to the hardware device using ReturnPicture()
.
|
private: virtual void MdvppNewBuffers();
Notifies the client that one or more new empty input buffers are available. Called by the decoder hardware device.
private: virtual void MdvppReturnPicture(TVideoPicture *aPicture);
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.
|
private: virtual void MdvppSupplementalInformation(const TDesC8 &aData, const TTimeIntervalMicroSeconds &aTimestamp, const
TPictureId &aPictureId);
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.
|
private: virtual void MdvppPictureLoss();
Back channel information, indicating a picture loss without specifying the lost picture.
private: virtual void MdvppPictureLoss(const TArray< TPictureId > &aPictures);
Back channel information, indicating the pictures that have been lost.
|
private: virtual void MdvppSliceLoss(TUint aFirstMacroblock, TUint aNumMacroblocks, const TPictureId &aPicture);
Back channel information, indicating the loss of consecutive macroblocks in raster scan order.
|
private: virtual void MdvppReferencePictureSelection(const TDesC8 &aSelectionData);
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.
|
private: virtual void MdvppTimedSnapshotComplete(TInt aError, TPictureData *aPictureData, const TTimeIntervalMicroSeconds
&aPresentationTimestamp, const TPictureId &aPictureId);
Delivers a timed snapshot result to the client. The memory reserved for the snapshot picture can no longer be used in the device.
|
private: virtual void MdvppFatalError(CMMFVideoHwDevice *aDevice, TInt aError);
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.
|
private: virtual void MdvppInitializeComplete(CMMFVideoHwDevice *aDevice, TInt aError);
Reports that an asynchronous Initialize()
method has completed. The device is now ready for playback.
|
private: virtual void MdvppStreamEnd();
Reports that the input video stream end has been reached and all pictures have been processed. Called by each hardware device
after their 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.
class TPictureCounters;
Picture statistic counters. Used for following playback progress. The counters can be retrieved using GetPictureCounters()
and are reset after each call. The client must keep track of the cumulative values for counters and picture processing rates
itself if necessary.
Defined in CMMFDevVideoPlay::TPictureCounters
:
TPictureCounters()
, iPicturesDecoded
, iPicturesDisplayed
, iPicturesSkipped
, iTotalPictures
TPictureCounters()
inline TPictureCounters();
Default constructor. Zeros all members.
iPicturesSkipped
TUint iPicturesSkipped;
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;
The number of pictures decoded.
iPicturesDisplayed
TUint iPicturesDisplayed;
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;
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;
Bitstream statistic counters, used for following decoding progress. The counters can be retrieved using GetBitstreamCounters()
and are reset after each call. The client must keep track of the cumulative values for counters itself if necessary.
Defined in CMMFDevVideoPlay::TBitstreamCounters
:
TBitstreamCounters()
, iLostPackets
, iTotalPackets
TBitstreamCounters()
inline TBitstreamCounters();
Default constructor. Zeros all members.
iLostPackets
TUint iLostPackets;
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;
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;
Buffer options used with SetBufferOptionsL()
.
Defined in CMMFDevVideoPlay::TBufferOptions
:
TBufferOptions()
, iMaxInputBufferSize
, iMaxPostDecodeBufferSize
, iMinNumInputBuffers
, iPostDecoderBufferPeriod
, iPreDecodeBufferSize
, iPreDecoderBufferPeriod
TBufferOptions()
inline TBufferOptions();
Default constructor. Zeros all members.
iPreDecodeBufferSize
TUint iPreDecodeBufferSize;
Pre-decoder buffer size in bytes. Set to zero to use decoder default value.
iMaxPostDecodeBufferSize
TUint iMaxPostDecodeBufferSize;
Maximum post-decoder buffer size in bytes. Set to zero to remove limitations.
iPreDecoderBufferPeriod
TTimeIntervalMicroSeconds iPreDecoderBufferPeriod;
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;
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;
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;
The minimum number of input buffers the decoder needs to have available. This is the number of buffers the client can request
through GetBufferL()
before writing any back using WriteCodedDataL()
.
class TComplexityLevelInfo;
Information about a single computational complexity level.
Defined in CMMFDevVideoPlay::TComplexityLevelInfo
:
EAvgPictureRate
, EPictureSize
, ERelativeImageQuality
, ERelativeProcessTime
, ERequiredMIPS
, TOptions
, iAvgPictureRate
, iOptions
, iPictureSize
, iRelativeImageQuality
, iRelativeProcessTime
, iRequiredMIPS
TOptions
TOptions
|
iOptions
TUint32 iOptions;
Structure options. The value is a bitfield combined from values from TOptions.
iAvgPictureRate
TReal iAvgPictureRate;
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;
Picture size (spatial resolution), in pixels. Valid only if EPictureSize is set in the options.
iRelativeImageQuality
TReal iRelativeImageQuality;
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;
The number of MIPS required to process the data. Valid only if ERequiredMIPS is set in the options.
iRelativeProcessTime
TReal iRelativeProcessTime;
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.