sl@0: // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #ifndef __DEVVIDEOPLAY_H__ sl@0: #define __DEVVIDEOPLAY_H__ sl@0: sl@0: #include sl@0: #include sl@0: sl@0: class MMMFDevVideoPlayObserver; sl@0: class CMMFVideoPlayHwDevice; sl@0: class CMMFVideoDecodeHwDevice; sl@0: class CMMFVideoPostProcHwDevice; sl@0: sl@0: sl@0: /** sl@0: MMMFDevVideoPlayProxy is the interface to the CMMFDevVideoPlay API implementation that the hardware devices sl@0: use to deliver data back to the client and report their progress to the API implementation. sl@0: @publishedAll sl@0: @released sl@0: */ sl@0: class MMMFDevVideoPlayProxy sl@0: { sl@0: public: sl@0: /** sl@0: Delivers a new decoded picture to the client. The CMMFDevVideoPlay implementation will maintain sl@0: a list of decoded pictures and implement GetNewPictureInfo() and NextPictureL() based on those. sl@0: The pictures will be returned back to the hardware device using ReturnPicture(). sl@0: sl@0: @param "aPicture" "The newly processed picture." sl@0: */ sl@0: virtual void MdvppNewPicture(TVideoPicture* aPicture) = 0; sl@0: sl@0: /** sl@0: Notifies the client that one or more new empty input buffers are available. Called by the decoder sl@0: hardware device. sl@0: */ sl@0: virtual void MdvppNewBuffers() = 0; sl@0: sl@0: /** sl@0: Returns a used input video picture back to the caller. Called by a post-processor hardware device sl@0: after the picture has been processed and the picture source was the client, not another plug-in. sl@0: sl@0: @param "aPicture" "The picture to return." sl@0: */ sl@0: virtual void MdvppReturnPicture(TVideoPicture* aPicture) = 0; sl@0: sl@0: /** sl@0: Delivers supplemental information from a decoder hardware device to the client. sl@0: The information is codec-dependent. The method is synchronous - the client sl@0: MMMFDevVideoPlayObserver::MdvppSupplementalInformation() method is called immediately, sl@0: and the memory for the supplemental information can be re-used when the call returns. sl@0: sl@0: @param "aData" "The supplemental data." sl@0: @param "aTimestamp" "The presentation timestamp for the picture that the supplemental data is part of." sl@0: @param "aPictureId" "Picture identifier for the picture. If a picture ID is not available, sl@0: aPictureId.iIdType is set to ENone." sl@0: */ sl@0: virtual void MdvppSupplementalInformation(const TDesC8& aData, sl@0: const TTimeIntervalMicroSeconds& aTimestamp, const TPictureId& aPictureId) = 0; sl@0: sl@0: /** sl@0: Back channel information, indicating a picture loss without specifying the lost picture. sl@0: */ sl@0: virtual void MdvppPictureLoss() = 0; sl@0: sl@0: /** sl@0: Back channel information, indicating the pictures that have been lost. sl@0: sl@0: @param "aPictures" "Picture identifiers for the lost pictures. The reference is only valid sl@0: until the method returns." sl@0: */ sl@0: virtual void MdvppPictureLoss(const TArray& aPictures) = 0; sl@0: sl@0: /** sl@0: Back channel information, indicating the loss of consecutive macroblocks in raster scan order. sl@0: sl@0: @param "aFirstMacroblock" "The first lost macroblock. The macroblocks are numbered sl@0: such that the macroblock in the upper left corner of the picture is sl@0: considered macroblock number 1 and the number for each macroblock increases sl@0: from left to right and then from top to bottom in raster-scan order." sl@0: @param "aNumMacroblocks" "The number of lost macroblocks that are consecutive in raster-scan order." sl@0: @param "aPicture" "The picture identifier for the picture where the macroblocks were lost. sl@0: If the picture is not known, aPicture.iIdType is set to ENone. The sl@0: reference is only valid until the method returns." sl@0: */ sl@0: virtual void MdvppSliceLoss(TUint aFirstMacroblock, TUint aNumMacroblocks, const TPictureId& aPicture)= 0; sl@0: sl@0: /** sl@0: Back channel information from the decoder, indicating a reference picture selection request. sl@0: The request is delivered as a coding-standard specific binary message. Reference picture selection sl@0: can be used to select a pervious correctly transmitted picture to use as a reference in case later sl@0: pictures have been lost. sl@0: sl@0: @param "aSelectionData" "The reference picture selection request message. The message format is sl@0: coding-standard specific, and defined separately. The reference is only sl@0: valid until the method returns." sl@0: */ sl@0: virtual void MdvppReferencePictureSelection(const TDesC8& aSelectionData)= 0; sl@0: sl@0: /** sl@0: Delivers a timed snapshot result to the client. The memory reserved for the snapshot picture sl@0: can no longer be used in the device. sl@0: sl@0: @param "aError" "An error code, KErrNone if no errors occurred. sl@0: If an error occurred, the data in the snapshot may not be valid, sl@0: but the memory can still be freed." sl@0: @param "aPictureData" "The snapshot picture data." sl@0: @param "aPresentationTimestamp" "The presentation timestamp for the snapshot picture." sl@0: @param "aPictureId" "Picture identifier for the picture. If a picture ID is not sl@0: available, aPictureId.iIdType is set to ENone." sl@0: */ sl@0: virtual void MdvppTimedSnapshotComplete(TInt aError, TPictureData* aPictureData, sl@0: const TTimeIntervalMicroSeconds& aPresentationTimestamp, const TPictureId& aPictureId) = 0; sl@0: sl@0: /** sl@0: Reports a fatal error to the client. The device must automatically stop processing sl@0: video data when such errors occur, and may not do further processing before it has sl@0: been deleted and re-created. sl@0: sl@0: @param "aDevice" "The device that reported the error." sl@0: @param "aError" "The error code." sl@0: */ sl@0: virtual void MdvppFatalError(CMMFVideoHwDevice* aDevice, TInt aError) = 0; sl@0: sl@0: /** sl@0: Reports that an asynchronous Initialize() method has completed. sl@0: The device is now ready for playback. sl@0: sl@0: @param "aDevice" "The device that was initialzied." sl@0: @param "aError" "Initialization result error code, KErrNone if initialization was successful." sl@0: */ sl@0: virtual void MdvppInitializeComplete(CMMFVideoHwDevice* aDevice, TInt aError) = 0; sl@0: sl@0: /** sl@0: Reports that the input video stream end has been reached and all pictures have been processed. sl@0: Called by each hardware device after their InputEnd() methods have been called and all data has sl@0: been processed. The proxy implementation will notify the client about stream end when all sl@0: hardware devices have called this method. sl@0: */ sl@0: virtual void MdvppStreamEnd() = 0; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: A buffer for compressed video data, contains one coded data unit. Video buffers are used for writing sl@0: video data to the API. sl@0: sl@0: @publishedAll sl@0: @released sl@0: */ sl@0: class TVideoInputBuffer sl@0: { sl@0: public: sl@0: /** sl@0: Default constructor. Zeroes all members (including iData which will point to garbage until manually sl@0: set to point to the real video buffer memory data area by the user). sl@0: */ sl@0: IMPORT_C TVideoInputBuffer(); sl@0: sl@0: public: sl@0: /** sl@0: */ sl@0: enum TVideoBufferOptions sl@0: { sl@0: /** The sequence number field is valid. */ sl@0: ESequenceNumber = 0x00000001, sl@0: /** The decoding timestamp field is valid */ sl@0: EDecodingTimestamp = 0x00000002, sl@0: /** The presentation timestamp field is valid.*/ sl@0: EPresentationTimestamp = 0x00000004, sl@0: /** Content protected pictures cannot be displayed on unprotected sl@0: external displays such as TV-out. sl@0: */ sl@0: EContentProtected = 0x00000008 sl@0: }; sl@0: sl@0: /** sl@0: Pointer to the video data. sl@0: */ sl@0: TPtr8 iData; sl@0: sl@0: /** sl@0: Data unit options. The value is a bitfield combined from values from TVideoBufferOptions. sl@0: @see TVideoBufferOptions sl@0: */ sl@0: TUint32 iOptions; sl@0: sl@0: /** sl@0: Data unit decoding timestamp. Valid if EDecodingTimestamp is set in the options. sl@0: */ sl@0: TTimeIntervalMicroSeconds iDecodingTimestamp; sl@0: sl@0: /** sl@0: Data unit presentation timestamp. Valid if EPresentationTimestamp is set in the options. sl@0: If the input bitstream does not contain timestamp information, this field should be valid, sl@0: otherwise pictures cannot be displayed at the correct time. If the input bitstream contains sl@0: timestamp information (such as the TR syntax element of H.263 bitstreams) and valid sl@0: iPresentationTimestamp is provided, the value of iPresentationTimestamp is used in playback. sl@0: */ sl@0: TTimeIntervalMicroSeconds iPresentationTimestamp; sl@0: sl@0: /** sl@0: True if the data is part of a pre-roll period and may not be drawn. The decoder may skip sl@0: display-related operations, but must still decode normally since pre-roll may not end in a key sl@0: frame. sl@0: */ sl@0: TBool iPreRoll; sl@0: sl@0: /** sl@0: Data unit sequence number. Valid if ESequenceNumber is set in the options. If present, the sl@0: sequence number is incremented once per coded data unit, a gap in the numbers indicates missing sl@0: data. sl@0: */ sl@0: TUint iSequenceNumber; sl@0: sl@0: /** sl@0: True if the data unit is known to contain erroneous data. sl@0: */ sl@0: TBool iError; sl@0: sl@0: /** sl@0: A queue link used internally by the MSL API. The field must not be modified while the buffer is sl@0: in the MSL API, but can be used by the client before the buffer has been written and after the sl@0: buffer has been returned. sl@0: */ sl@0: TDblQueLink iLink; sl@0: sl@0: /** sl@0: A pointer for free-form user data. The pointer is set by the module that created the buffer, and sl@0: is usually used for memory management purposes. sl@0: */ sl@0: TAny* iUser; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: This class contains information about the post-processing functionality that a single post-processor sl@0: or decoder hardware device has. Although it mainly contains static data, it is defined as a complete sl@0: CBase-derived class since the data is relatively complex and proper memory management is necessary. sl@0: sl@0: The objects are created by the post-processor or decoder devices, and used by the MSL video client code. sl@0: @publishedAll sl@0: @released sl@0: */ sl@0: class CPostProcessorInfo : public CBase sl@0: { sl@0: public: sl@0: /** sl@0: Creates and returns a new CPostProcessorInfo object. sl@0: sl@0: @param "aUid" "The UID of the post-processor." sl@0: @param "aManufacturer" "The manufacturer of the post-processor hw device." sl@0: @param "aIdentifier" "The post-processor hw device manufacturer-specific sl@0: identifier." sl@0: @param "aVersion" "The post-processor version." sl@0: @param "aSupportedFormats" "The source formats supported by the post-processor." sl@0: @param "aSupportedCombinations" "The supported post-processing combinations. An array of sl@0: values created by the bitwise OR-ing of values from sl@0: TPrePostProcessType." sl@0: @param "aAccelerated" "Whether the post processor is hardware-accelerated. sl@0: Accelerated post-processors can run on an application DSP sl@0: or dedicated hardware." sl@0: @param "aSupportsDirectDisplay" "Whether the hw device supports output directly to the sl@0: screen." sl@0: @param "aYuvToRgbCapabilities" "The post-processor YUV to RGB conversion capabilities." sl@0: @param "aSupportedRotations" "A bitwise OR of values of TRotationType to indicate the sl@0: supported rotation types." sl@0: @param "aSupportArbitraryScaling" "Whether the post-processor supports arbitrary scaling." sl@0: @param "aSupportedScaleFactors" "A list of the discrete scaling factors supported. If the sl@0: post-processor supports arbitrary scaling, this list should sl@0: be left zero-length." sl@0: @param "aAntiAliasedScaling" "Whether anti-aliasing filtering for scaling is supported." sl@0: @param "aImplementationSpecificInfo" "Implementation-specific information." sl@0: sl@0: @return "A new CPostProcessorInfo object." sl@0: @leave "This method may leave with one of the system-wide error codes." sl@0: */ sl@0: IMPORT_C static CPostProcessorInfo* NewL(TUid aUid, sl@0: const TDesC& aManufacturer, sl@0: const TDesC& aIdentifier, sl@0: TVersion aVersion, sl@0: const TArray& aSupportedFormats, sl@0: const TArray& aSupportedCombinations, sl@0: TBool aAccelerated, sl@0: TBool aSupportsDirectDisplay, sl@0: const TYuvToRgbCapabilities& aYuvToRgbCapabilities, sl@0: TUint32 aSupportedRotations, sl@0: TBool aSupportArbitraryScaling, sl@0: const TArray& aSupportedScaleFactors, sl@0: TBool aAntiAliasedScaling, sl@0: const TDesC8& aImplementationSpecificInfo = KNullDesC8); sl@0: sl@0: /** sl@0: Destructor sl@0: */ sl@0: IMPORT_C ~CPostProcessorInfo(); sl@0: sl@0: /** sl@0: Returns the post-processor UID. sl@0: @return "Post-processor UID" sl@0: */ sl@0: IMPORT_C TUid Uid() const; sl@0: sl@0: /** sl@0: Returns the post-processor hardware device manufacturer. sl@0: @return "The manufacturer name as a standard Symbian descriptor. The reference is valid until the sl@0: CPostProcessorInfo object is destroyed." sl@0: */ sl@0: IMPORT_C const TDesC& Manufacturer() const; sl@0: sl@0: /** sl@0: Returns the post-processor hardware device manufacturer-specific identifier. sl@0: The combination of the manufacturer and identifier uniquely identifies the device. sl@0: @return "The identifier as a standard Symbian descriptor. The reference is valid until the sl@0: CPostProcessorInfo object is destroyed." sl@0: */ sl@0: IMPORT_C const TDesC& Identifier() const; sl@0: sl@0: /** sl@0: Returns the post-processor version. sl@0: @return "Post-processor version." sl@0: */ sl@0: IMPORT_C TVersion Version() const; sl@0: sl@0: /** sl@0: Checks if the post-processor supports the given format as a source format. sl@0: @param "aFormat" "The format to check. The reference is not used after the method returns." sl@0: @return "ETrue if the post-processor supports the given format, EFalse if not." sl@0: */ sl@0: IMPORT_C TBool SupportsFormat(const TUncompressedVideoFormat& aFormat) const; sl@0: sl@0: /** sl@0: Lists the source formats supported by the post-processor. sl@0: @return "A RArray table of supported video formats (TUncompressedVideoFormat). The reference is sl@0: valid until the CPostProcessorInfo object is destroyed." sl@0: */ sl@0: IMPORT_C const RArray& SupportedFormats() const; sl@0: sl@0: /** sl@0: Checks if the post-processor supports the given post-processing combination. sl@0: @param "aCombination" "Post-processing combination, a bitwise OR of values from TPrePostProcessType." sl@0: @return "ETrue if the post-processing combination is supported, EFalse if not." sl@0: */ sl@0: IMPORT_C TBool SupportsCombination(TUint32 aCombination) const; sl@0: sl@0: /** sl@0: Lists all supported post-processing combinations. sl@0: @return "A RArray table or post-processing combinations. Each value is a bitwise OR of values from sl@0: TPrePostProcessType. The reference is valid until the CPostProcessorInfo object is destroyed." sl@0: */ sl@0: IMPORT_C const RArray& SupportedCombinations() const; sl@0: sl@0: /** sl@0: Returns whether the hardware device is hardware-accelerated. Hardware-accelerated post-processors sl@0: can run on an application DSP or dedicated hardware. sl@0: @return "ETrue if the device is hardware-accelerated." sl@0: */ sl@0: IMPORT_C TBool Accelerated() const; sl@0: sl@0: /** sl@0: Returns whether the hardware device supports output directly to the screen. Output to memory buffers sl@0: is always supported. sl@0: @return "ETrue if the post-processor supports direct screen output." sl@0: */ sl@0: IMPORT_C TBool SupportsDirectDisplay() const; sl@0: sl@0: /** sl@0: Returns the post-processor YUV to RGB color conversion capabilities. sl@0: @return "The conversion capabilities as a TYuvToRgbCapabilities structure. The reference is valid sl@0: until the CPostProcessorInfo object is destroyed. If the post-processor does not support sl@0: YUV to RGB conversion, the contents are undefined." sl@0: */ sl@0: IMPORT_C const TYuvToRgbCapabilities& YuvToRgbCapabilities() const; sl@0: sl@0: /** sl@0: Returns the rotation types the post-processor supports. sl@0: @return "The supported rotation types as a bitwise OR of TRotationType values. If the sl@0: post-processor does not support rotation, the return value is zero." sl@0: */ sl@0: IMPORT_C TUint32 SupportedRotations() const; sl@0: sl@0: /** sl@0: Returns whether the post-processor supports arbitrary scaling. If arbitrary scaling is not sl@0: supported, a limited selection of scaling factors may still be available, use sl@0: SupportedScaleFactors() to retrieve those. sl@0: @return "ETrue if the post-processor supports arbitrary scaling, EFalse if not." sl@0: */ sl@0: IMPORT_C TBool SupportsArbitraryScaling() const; sl@0: sl@0: /** sl@0: Returns the scaling factors the post-processor supports. If the post-processor supports arbitrary sl@0: scaling the list is empty - use SupportsArbitraryScaling() first. sl@0: @return "A RArray list of supported scale factors (TScaleFactor). The reference is valid until the sl@0: CPostProcessorInfo object is destroyed. If the post-processor supports arbitrary scaling sl@0: or no scaling at all, the list is empty." sl@0: */ sl@0: IMPORT_C const RArray& SupportedScaleFactors() const; sl@0: sl@0: /** sl@0: Returns whether the hardware device supports anti-aliasing filtering for scaling. sl@0: @return "True if anti-aliasing filtering is supported." sl@0: */ sl@0: IMPORT_C TBool AntiAliasedScaling() const; sl@0: sl@0: /** sl@0: Returns implementation-specific information about the post-processor. sl@0: @return "Implementation- specific information about the post-processor. The data format is sl@0: implementation-specific, and defined separately by the post-processor supplier. The sl@0: reference is valid until the CPostProcessorInfo object is destroyed." sl@0: */ sl@0: IMPORT_C const TDesC8& ImplementationSpecificInfo() const; sl@0: sl@0: /** sl@0: Adds the screen number into the list of screens supported by the post processor. sl@0: @leave "KErrNoMemory when there is no memory to expand the list of supported screens. sl@0: KErrNotSupported if the secondary screen display is not supported in Multimedia Framework." sl@0: */ sl@0: IMPORT_C void AddSupportedScreenL(TInt aScreenNo); sl@0: sl@0: /** sl@0: Lists the screens supported by the post processor. sl@0: @param "aSupportedScreens" "An array to retrieve the list of supported screens. sl@0: This method resets the array before adding elements to it. sl@0: The array must be created and destroyed by the caller." sl@0: @leave "KErrNotSupported if the secondary screen display is not supported in Multimedia Framework. sl@0: KErrNoMemory when there is no memory to expand the list." sl@0: */ sl@0: IMPORT_C void GetSupportedScreensL(RArray& aSupportedScreens) const; sl@0: sl@0: /** Sets a flag indicating whether the PostProcessor supports per picture content protection. sl@0: E.g. Where content protection within a video stream can alter. sl@0: @param "aSetting" "Set to TRUE to indicate PostProcessor supports content protection. sl@0: @See TVideoPicture::TVideoPictureOptions::EContentProtected sl@0: @See TVideoInputBuffer::TVideoBufferOptions::EContentProtected sl@0: */ sl@0: IMPORT_C void SetSupportsContentProtected(const TBool aSetting); sl@0: sl@0: /** Returns whether the PostProcessor supports per picture content protection. sl@0: E.g. Where content protection within a video stream can alter. sl@0: @return "True if the PostProcessor supports Content Protection." sl@0: @See TVideoPicture::TVideoPictureOptions::EContentProtected sl@0: @See TVideoInputBuffer::TVideoBufferOptions::EContentProtected sl@0: */ sl@0: IMPORT_C TBool SupportsContentProtected() const; sl@0: sl@0: private: sl@0: CPostProcessorInfo(TUid aUid, sl@0: TVersion aVersion, sl@0: TBool aAccelerated, sl@0: TBool aSupportDirectDisplay, sl@0: const TYuvToRgbCapabilities& aYuvToRgbCapabilities, sl@0: TUint32 aSupportedRotations, sl@0: TBool aSupportArbitraryScaling, sl@0: TBool aAntiAliasedScaling); sl@0: sl@0: void ConstructL(const TDesC& aManufacturer, sl@0: const TDesC& aIdentifier, sl@0: const TArray& aSupportedFormats, sl@0: const TArray& aSupportedCombinations, sl@0: const TArray& aSupportedScaleFactors, sl@0: const TDesC8& aImplementationSpecificInfo); sl@0: private: sl@0: TUid iUid; sl@0: TVersion iVersion; sl@0: TBool iAccelerated; sl@0: TBool iSupportDirectDisplay; sl@0: TYuvToRgbCapabilities iYuvToRgbCapabilities; sl@0: TUint32 iSupportedRotations; sl@0: TBool iSupportArbitraryScaling; sl@0: TBool iAntiAliasedScaling; sl@0: HBufC* iManufacturer; sl@0: HBufC* iIdentifier; sl@0: HBufC8* iImplementationSpecificInfo; sl@0: RArray iSupportedFormats; sl@0: RArray iSupportedCombinations; sl@0: RArray iSupportedScaleFactors; sl@0: RArray iSupportedScreens; sl@0: TBool iSupportsContentProtected; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: This class contains information about a single video decoder. Although it mainly contains static data, sl@0: it is defined as a complete CBase-derived class since the data is relatively complex and proper memory sl@0: management is necessary. sl@0: sl@0: The objects are created by the video decoder hardware devices, and used by the MSL video client code. sl@0: @publishedAll sl@0: @released sl@0: */ sl@0: class CVideoDecoderInfo : public CBase sl@0: { sl@0: public: sl@0: /** sl@0: Creates and returns a new CVideoDecoderInfo object. sl@0: sl@0: @param "aUid" "The uid of the decoder." sl@0: @param "aManufacturer" "The video decoder manufacturer." sl@0: @param "aIdentifier" "The manufacturer-specific identifier for this video decoder." sl@0: @param "aVersion" "The version of this video decoder." sl@0: @param "aSupportedFormats" "An array of the formats supported by the decoder. sl@0: A copy will be taken of the array and the referenced sl@0: CCompressedVideoFormat objects" sl@0: @param "aAccelerated" "Whether this decoder is accelerated or not." sl@0: @param "aSupportsDirectDisplay" "Whether this decoder supports direct display or not." sl@0: @param "aMaxPictureSize" "The maximum picture size supported by the decoder." sl@0: @param "aMaxBitrate" "The maximum bit rate supported by the decoder. Use KMaxTUint32 if there are no bit-rate restrictions." sl@0: @param "aMaxPictureRates" "An array of the maximum picture size/rate combinations supported by the decoder." sl@0: @param "aSupportsPictureLoss" "Whether the decoder supports picture loss indications." sl@0: @param "aSupportsSliceLoss" "Whether the decoder supports slice loss indications." sl@0: @param "aCodingStandardSpecificInfo" "Coding-standard specific information about the decoder." sl@0: @param "aImplementationSpecificInfo" "Implementation-specific information about the decoder." sl@0: sl@0: @return "A new CVideoDecoderInfo object." sl@0: @leave "This method may leave with one of the system-wide error codes." sl@0: */ sl@0: IMPORT_C static CVideoDecoderInfo* NewL(TUid aUid, sl@0: const TDesC& aManufacturer, sl@0: const TDesC& aIdentifier, sl@0: TVersion aVersion, sl@0: const TArray& aSupportedFormats, sl@0: TBool aAccelerated, sl@0: TBool aSupportsDirectDisplay, sl@0: const TSize& aMaxPictureSize, sl@0: TUint aMaxBitrate, sl@0: const TArray& aMaxPictureRates, sl@0: TBool aSupportsPictureLoss, sl@0: TBool aSupportsSliceLoss, sl@0: const TDesC8& aCodingStandardSpecificInfo = KNullDesC8, sl@0: const TDesC8& aImplementationSpecificInfo = KNullDesC8); sl@0: sl@0: /** sl@0: Destructor. sl@0: */ sl@0: IMPORT_C ~CVideoDecoderInfo(); sl@0: sl@0: /** sl@0: Checks if the decoder supports the given format. sl@0: @param "aFormat" "The format to check. The reference is not used after the method returns." sl@0: @return "ETrue if the codec supports the given format, EFalse if not." sl@0: */ sl@0: IMPORT_C TBool SupportsFormat(const CCompressedVideoFormat& aFormat) const; sl@0: sl@0: /** sl@0: Lists the video formats, including submodes, supported by the decoder. sl@0: @return "A RPointerArray table of supported video formats (CCompressedVideoFormat). The reference sl@0: is valid until the CVideoDecoderInfo object is destroyed." sl@0: */ sl@0: IMPORT_C const RPointerArray& SupportedFormats() const; sl@0: sl@0: /** sl@0: Returns the codec device manufacturer. sl@0: @return "The manufacturer name as a standard Symbian descriptor. The reference is valid until the sl@0: CVideoDecoderInfo object is destroyed." sl@0: */ sl@0: IMPORT_C const TDesC& Manufacturer() const; sl@0: sl@0: /** sl@0: Returns the codec device manufacturer-specific identifier. The combination of the manufacturer sl@0: and identifier uniquely identifies the hardware device. sl@0: @return "The identifier as a standard Symbian descriptor. The reference is valid until the sl@0: CVideoDecoderInfo object is destroyed." sl@0: */ sl@0: IMPORT_C const TDesC& Identifier() const; sl@0: sl@0: /** sl@0: Returns the decoder version. sl@0: @return "Decoder version." sl@0: */ sl@0: IMPORT_C TVersion Version() const; sl@0: sl@0: /** sl@0: Returns the decoder UID. sl@0: @return "Decoder UID." sl@0: */ sl@0: IMPORT_C TUid Uid() const; sl@0: sl@0: /** sl@0: Returns whether the decoder is hardware-accelerated. A hardware-accelerated decoder can run on sl@0: an application DSP or dedicated hardware. sl@0: @return "True if the decoder is hardware-accelerated." sl@0: */ sl@0: IMPORT_C TBool Accelerated() const; sl@0: sl@0: /** sl@0: Returns whether the hardware device supports output directly to the screen. Output to memory sl@0: buffers is always supported. sl@0: @return "True if the hardware device supports direct screen output." sl@0: */ sl@0: IMPORT_C TBool SupportsDirectDisplay() const; sl@0: sl@0: /** sl@0: Returns the maximum picture size the decoder supports. sl@0: sl@0: Note that if the decoder reports that it supports a certain profile and level, then it sl@0: shall support all bitstreams corresponding to that profile/level. This method can be used sl@0: to specify capabilities that are beyond the standard levels (for example some MPEG-4 bitstreams sl@0: are encoded with picture sizes that are larger than those specified by the profile/level of the sl@0: bitstream). sl@0: sl@0: @return "The maximum picture size supported. The reference is valid until the CVideoDecoderInfo sl@0: object is destroyed." sl@0: */ sl@0: IMPORT_C const TSize& MaxPictureSize() const; sl@0: sl@0: /** sl@0: Returns the maximum bit-rate supported by the decoder. sl@0: sl@0: Note that if the decoder reports that it supports a certain profile and level, then it shall sl@0: support all bitstreams corresponding to that profile/level. This method can be used to sl@0: specify capabilities that are beyond the standard levels (for example some MPEG-4 bitstreams sl@0: are encoded with bit rates that are higher than those specified by the profile/level of the sl@0: bitstream). sl@0: sl@0: @return "Maximum bit-rate supported, in bits per second. KMaxTUint32 can be used if the decoder sl@0: has no bit-rate restrictions." sl@0: */ sl@0: IMPORT_C TUint MaxBitrate() const; sl@0: sl@0: /** sl@0: Returns the maximum picture size/rate combinations supported by the decoder. sl@0: sl@0: Video decoders can have different maximum picture rate limitations depending on the picture size used. sl@0: Note that if the decoder reports that it supports a certain profile and level, then it shall sl@0: support all bitstreams corresponding to that profile/level. This method can be used to specify sl@0: capabilities that are beyond the standard levels (for example some MPEG-4 bitstreams are encoded sl@0: with picture rates that are beyond those specified by the profile/level of the bitstream). sl@0: sl@0: @return "A reference to an array of picture size/rate combinations. The reference remains valid sl@0: until this object is deleted." sl@0: */ sl@0: IMPORT_C const RArray& MaxPictureRates() const; sl@0: sl@0: /** sl@0: Returns whether the decoder supports picture loss indications. If true, the decoder indicates sl@0: lost pictures by calling MdvpoPictureLoss(). sl@0: sl@0: @return "True if the decoder supports picture loss indications." sl@0: */ sl@0: IMPORT_C TBool SupportsPictureLoss() const; sl@0: sl@0: /** sl@0: Returns whether the decoder supports slice loss indications. If true, the decoder indicates sl@0: lost macroblocks by calling MdvpoSliceLoss(). sl@0: sl@0: @return "True if the decoder supports slice loss indications." sl@0: */ sl@0: IMPORT_C TBool SupportsSliceLoss() const; sl@0: sl@0: /** sl@0: Returns coding-standard specific information about the decoder. sl@0: @return "Coding-standard specific information about the decoder. The data format is coding-standard sl@0: specific, and defined separately. The reference is valid until the CVideoDecoderInfo object sl@0: is destroyed." sl@0: */ sl@0: IMPORT_C const TDesC8& CodingStandardSpecificInfo() const; sl@0: sl@0: /** sl@0: Returns implementation-specific information about the decoder. sl@0: @return "Implementation- specific information about the decoder. The data format is sl@0: implementation-specific, and defined separately by the decoder supplier. The reference sl@0: is valid until the CVideoDecoderInfo object is destroyed." sl@0: */ sl@0: IMPORT_C const TDesC8& ImplementationSpecificInfo() const; sl@0: sl@0: /** sl@0: Adds the screen number into the list of screens supported by the decoder. sl@0: @leave "KErrNoMemory when there is no memory to expand the list of supported screens. sl@0: KErrNotSupported if the secondary screen display is not supported in Multimedia Framework." sl@0: */ sl@0: IMPORT_C void AddSupportedScreenL(TInt aScreenNo); sl@0: sl@0: /** sl@0: Lists the screens supported by the decoder. sl@0: @param "aSupportedScreens" "An array to retrieve the list of supported screens. sl@0: This method resets the array before adding elements to it. sl@0: The array must be created and destroyed by the caller." sl@0: @leave "KErrNotSupported if the secondary screen display is not supported in Multimedia Framework. sl@0: KErrNoMemory when there is no memory to expand the list." sl@0: */ sl@0: IMPORT_C void GetSupportedScreensL(RArray& aSupportedScreens) const; sl@0: sl@0: /** Sets a flag indicating whether the Decoder supports per picture content protection. sl@0: E.g. Where content protection within a video stream can alter. sl@0: @param "aSetting" "Set to TRUE to indicate decoder supports content protection. sl@0: @See TVideoPicture::TVideoPictureOptions::EContentProtected sl@0: @See TVideoInputBuffer::TVideoBufferOptions::EContentProtected sl@0: */ sl@0: IMPORT_C void SetSupportsContentProtected(const TBool aSetting); sl@0: sl@0: /** Returns whether the Decoder supports per picture content protection. sl@0: E.g. Where content protection within a video stream can alter. sl@0: @return "True if the Decoder supports Content Protection." sl@0: @See TVideoPicture::TVideoPictureOptions::EContentProtected sl@0: @See TVideoInputBuffer::TVideoBufferOptions::EContentProtected sl@0: */ sl@0: IMPORT_C TBool SupportsContentProtected() const; sl@0: sl@0: private: sl@0: CVideoDecoderInfo(TUid aUid, sl@0: TVersion aVersion, sl@0: TBool aAccelerated, sl@0: TBool aSupportsDirectDisplay, sl@0: const TSize& aMaxPictureSize, sl@0: TUint aMaxBitrate, sl@0: TBool aSupportsPictureLoss, sl@0: TBool aSupportsSliceLoss); sl@0: sl@0: void ConstructL(const TDesC& aManufacturer, sl@0: const TDesC& aIdentifier, sl@0: const TArray& aSupportedFormats, sl@0: const TArray& aMaxPictureRates, sl@0: const TDesC8& aCodingStandardSpecificInfo, sl@0: const TDesC8& aImplementationSpecificInfo); sl@0: private: sl@0: TUid iUid; sl@0: TVersion iVersion; sl@0: TBool iAccelerated; sl@0: TBool iSupportsDirectDisplay; sl@0: TSize iMaxPictureSize; sl@0: TUint iMaxBitrate; sl@0: TBool iSupportsPictureLoss; sl@0: TBool iSupportsSliceLoss; sl@0: HBufC* iManufacturer; sl@0: HBufC* iIdentifier; sl@0: RPointerArray iSupportedFormats; sl@0: RArray iMaxPictureRates; sl@0: HBufC8* iCodingStandardSpecificInfo; sl@0: HBufC8* iImplementationSpecificInfo; sl@0: RArray iSupportedScreens; sl@0: TBool iSupportsContentProtected; sl@0: }; sl@0: sl@0: sl@0: sl@0: sl@0: /** sl@0: CMMFDevVideoPlay is the main client API for DevVideoPlay. sl@0: @publishedAll sl@0: @released sl@0: */ sl@0: class CMMFDevVideoPlay : public CBase, private MMMFDevVideoPlayProxy sl@0: { sl@0: public: sl@0: /** sl@0: Picture statistic counters. Used for following playback progress. The counters can be retrieved sl@0: using GetPictureCounters() and are reset after each call. The client must keep track of the sl@0: cumulative values for counters and picture processing rates itself if necessary. sl@0: */ sl@0: class TPictureCounters sl@0: { sl@0: public: sl@0: /** sl@0: Default constructor. Zeros all members. sl@0: */ sl@0: inline TPictureCounters(); sl@0: public: sl@0: /** sl@0: The number of pictures skipped due to lack of processing power. This does not include pictures sl@0: inside data bytes discarded due to buffer overflows, but includes all pictures skipped at sl@0: picture decoding, post-processing and rendering phase. sl@0: */ sl@0: TUint iPicturesSkipped; sl@0: sl@0: /** sl@0: The number of pictures decoded. sl@0: */ sl@0: TUint iPicturesDecoded; sl@0: sl@0: /** sl@0: The number of pictures "virtually" displayed. "Virtually" displayed pictures are pictures sl@0: that have been drawn on the screen, when using direct rendering, or pictures that have been sl@0: decoded, processed, and delivered to the client when not using direct rendering. sl@0: */ sl@0: TUint iPicturesDisplayed; sl@0: sl@0: /** sl@0: The total number of pictures in the input bitstream. This figure does not include pictures that sl@0: have been lost due to transmission errors, since those have not been processed by the MSL sl@0: hardware devices, but does include pictures that have been discarded by the HW devices due sl@0: to buffer overflows or other reasons. sl@0: */ sl@0: TUint iTotalPictures; sl@0: }; sl@0: sl@0: /** sl@0: Bitstream statistic counters, used for following decoding progress. The counters can be retrieved sl@0: using GetBitstreamCounters() and are reset after each call. The client must keep track of the sl@0: cumulative values for counters itself if necessary. sl@0: */ sl@0: class TBitstreamCounters sl@0: { sl@0: public: sl@0: /** sl@0: Default constructor. Zeros all members. sl@0: */ sl@0: inline TBitstreamCounters(); sl@0: public: sl@0: /** sl@0: Number of lost packets. This figure includes all packets that have been dropped by the hardware sl@0: devices due to buffer overruns, but it does not include packets lost due to transmission errors. sl@0: */ sl@0: TUint iLostPackets; sl@0: sl@0: /** sl@0: Total number of packets. This figure includes all the packets that have been received by the sl@0: decoder, including packets that have been dropped due to buffer overruns. sl@0: */ sl@0: TUint iTotalPackets; sl@0: }; sl@0: sl@0: /** sl@0: Buffer options used with SetBufferOptionsL(). sl@0: */ sl@0: class TBufferOptions sl@0: { sl@0: public: sl@0: /** sl@0: Default constructor. Zeros all members. sl@0: */ sl@0: inline TBufferOptions(); sl@0: sl@0: public: sl@0: /** sl@0: Pre-decoder buffer size in bytes. Set to zero to use decoder default value. sl@0: */ sl@0: TUint iPreDecodeBufferSize; sl@0: sl@0: /** sl@0: Maximum post-decoder buffer size in bytes. Set to zero to remove limitations. sl@0: */ sl@0: TUint iMaxPostDecodeBufferSize; sl@0: sl@0: /** sl@0: Initial pre-decoder buffering period, the amount of coded data to be buffered before decoding sl@0: starts. If the value is set to zero, decoding begins immediately when all data associated with sl@0: the first decoding timestamp is received. Default value is zero. sl@0: */ sl@0: TTimeIntervalMicroSeconds iPreDecoderBufferPeriod; sl@0: sl@0: /** sl@0: The amount of data buffered after the decoding before playback starts. If the value is zero, sl@0: playback begins immediately when the first picture has been decoded. The default value is zero. sl@0: */ sl@0: TTimeIntervalMicroSeconds iPostDecoderBufferPeriod; sl@0: sl@0: /** sl@0: The maximum input buffer size that the client will request. If the buffer options have been sl@0: set successfully, the decoder must be able to supply buffers of this size. If no information sl@0: is available about the bitstream, the client may have to set this value to a relatively large sl@0: value, and thus the decoder should not by default allocate buffers of this size before they sl@0: are explicitly requested. sl@0: */ sl@0: TUint iMaxInputBufferSize; sl@0: sl@0: /** sl@0: The minimum number of input buffers the decoder needs to have available. This is the number of sl@0: buffers the client can request through GetBufferL() before writing any back using sl@0: WriteCodedDataL(). sl@0: */ sl@0: TUint iMinNumInputBuffers; sl@0: }; sl@0: sl@0: /** sl@0: Information about a single computational complexity level. sl@0: */ sl@0: class TComplexityLevelInfo sl@0: { sl@0: public: sl@0: enum TOptions sl@0: { sl@0: /** The average picture rate field is valid. */ sl@0: EAvgPictureRate = 0x00000001, sl@0: /** The picture size field is valid. */ sl@0: EPictureSize = 0x00000002, sl@0: /** The relative image quality field is valid. */ sl@0: ERelativeImageQuality = 0x00000004, sl@0: /** The required MIPS field is valid. */ sl@0: ERequiredMIPS = 0x00000008, sl@0: /** The relative processing time field is valid. */ sl@0: ERelativeProcessTime = 0x00000010 sl@0: }; sl@0: /** sl@0: Structure options. The value is a bitfield combined from values from TOptions. sl@0: */ sl@0: TUint32 iOptions; sl@0: sl@0: /** sl@0: The average picture rate, in pictures per second. Valid only if EAvgPictureRate is set in the sl@0: options. This value depends on the input bitstream, and may not be available if enough sl@0: bitstream has not been read. sl@0: */ sl@0: TReal iAvgPictureRate; sl@0: sl@0: /** sl@0: Picture size (spatial resolution), in pixels. Valid only if EPictureSize is set in the options. sl@0: */ sl@0: TSize iPictureSize; sl@0: sl@0: /** sl@0: Relative image quality, compared to the best available level. 1.0 is the quality at the sl@0: maximum quality level (level zero). Valid only if ERelativeImageQuality is set in the options. sl@0: */ sl@0: TReal iRelativeImageQuality; sl@0: sl@0: /** sl@0: The number of MIPS required to process the data. Valid only if ERequiredMIPS is set in sl@0: the options. sl@0: */ sl@0: TUint iRequiredMIPS; sl@0: sl@0: /** sl@0: Relative amount of processing time needed compared to standard-compliant decoding of all data. sl@0: 1.0 is the processing time required for full processing, which usually corresponds to sl@0: complexity level zero. Valid only if ERelativeProcessTime is set in the options. sl@0: */ sl@0: TReal iRelativeProcessTime; sl@0: }; sl@0: sl@0: public: sl@0: sl@0: /** sl@0: Constructs a new MSL video client instance. Each client instance supports a single video bitstream. sl@0: sl@0: @param aObserver sl@0: The observer object to use. sl@0: sl@0: @return A pointer to a new CMMFDevVideoPlay object. sl@0: @leave This method may leave with one of the system-wide error codes. sl@0: */ sl@0: IMPORT_C static CMMFDevVideoPlay* NewL(MMMFDevVideoPlayObserver& aObserver); sl@0: sl@0: /** sl@0: Destructor. sl@0: */ sl@0: IMPORT_C ~CMMFDevVideoPlay(); sl@0: sl@0: /** sl@0: Finds a common format from two lists of uncompressed video formats. Used typically to find a sl@0: suitable intermediate format between a video decoder and a post-processor. If multiple common sl@0: formats are available, the lowest-cost format is selected, assuming that the cost of each format sl@0: is equal to its position in the input array. sl@0: @param "aFormats1" "The first format list." sl@0: @param "aFormats2" "The second format list." sl@0: @param "aCommonFormat" "The target variable where the common format found (if any) is stored." sl@0: @return "True if a common format was found, false if not. If no common format was found, sl@0: aCommonFormat is not modified." sl@0: */ sl@0: IMPORT_C static TBool FindCommonFormat(const TArray& aFormats1, sl@0: const TArray& aFormats2, sl@0: TUncompressedVideoFormat& aCommonFormat); sl@0: sl@0: /** sl@0: Finds all available decoders for a given video type with support for certain post-processing sl@0: operations. The video type is specified using its MIME type, which may include parameters sl@0: specifying the supported level, version, and other information. Decoder HW devices can use sl@0: wildcards when listing the supported video types in the ECom registration information, so it is sl@0: possible that all the decoders returned do not support the specified submode, e.g. profile and sl@0: level, unless aExactMatch is set. sl@0: The decoder capabilities can be checked with VideoCodecInfoLC(). sl@0: sl@0: @param "aMimeType" "The video type that will be decoded." sl@0: @param "aPostProcType" "The post-processing types that the decoder has to support, a binary OR sl@0: of TPrePostProcessType values. If no post-processing support is needed, sl@0: set this value to zero." sl@0: @param "aDecoders" "An array for the result decoder UIDs. The array must be created and sl@0: destroyed by the caller." sl@0: @param "aExactMatch" "True if exact matching should be used. In this only decoders that support sl@0: exactly the MIME-type given will be returned. Since verifying this may sl@0: require loading the decoders into memory, this can be a fairly expensive sl@0: operation, and if the user needs to verify their capabilities further in sl@0: any case this parameter should be set to EFalse." sl@0: @leave "This method may leave with one of the system-wide error codes. Typical error codes used: sl@0: * KErrNotFound: No decoders were found matching the search parameters." sl@0: */ sl@0: IMPORT_C void FindDecodersL(const TDesC8& aMimeType, sl@0: TUint32 aPostProcType, sl@0: RArray& aDecoders, sl@0: TBool aExactMatch=ETrue); sl@0: sl@0: /** sl@0: Finds all available post-processors for a given set of post-processing operations. sl@0: @param "aPostProcType" "The post-processing types that the hardware device has to support, sl@0: a binary OR of TPrePostProcessType values." sl@0: @param "aPostProcessors" "An array for the result post-processor UIDs. The array must be sl@0: created and destroyed by the caller." sl@0: @leave "This method may leave with one of the system-wide error codes. Typical error codes used: sl@0: * KErrNotFound: No post-processors were found matching the search parameters." sl@0: */ sl@0: IMPORT_C void FindPostProcessorsL(TUint32 aPostProcType, RArray& aPostProcessors); sl@0: sl@0: /** sl@0: Retrieves a list of available video decoders in the system. sl@0: @param "aDecoders" "An array for the result decoder UIDs. The array must be created and sl@0: destroyed by the caller." sl@0: @leave "This method may leave with one of the system-wide error codes. Not finding any decoders sl@0: is not treated as an error condition: in this situation, aDecoders will be empty." sl@0: */ sl@0: IMPORT_C void GetDecoderListL(RArray& aDecoders); sl@0: sl@0: /** sl@0: Retrieves a list of available video post-processors in the system. sl@0: sl@0: @param aPostProcessors sl@0: An array for the result post-processor UIDs. The array must be created and sl@0: destroyed by the caller. sl@0: sl@0: @leave This method may leave with one of the system-wide error codes. Not finding any post-processors sl@0: is not treated as an error condition: in this situation, aDecoders will be empty. sl@0: */ sl@0: IMPORT_C void GetPostProcessorListL(RArray& aPostProcessors); sl@0: sl@0: /** sl@0: Retrieves information about an installed video decoder. Note that this method will need to load sl@0: the codec hardware device into memory, and can thus be relatively expensive. sl@0: @param "aVideoDecoder" "The video decoder to query." sl@0: @return "Decoder information as a CVideoDecoderInfo object. The object is pushed to the cleanup sl@0: stack, and must be deallocated by the caller." sl@0: @leave "This method may leave with one of the system-wide error codes." sl@0: */ sl@0: IMPORT_C CVideoDecoderInfo* VideoDecoderInfoLC(TUid aVideoDecoder); sl@0: sl@0: /** sl@0: Retrieves information about the post-processing capabilities of an installed post-processor or sl@0: decoder hardware device. Note that this method will need to load the device into memory, and can sl@0: thus be relatively expensive. sl@0: @param "aPostProcessor" "The post-processor to query." sl@0: @return "Post-processor information as a CPostProcessorInfo object. The object is pushed to the sl@0: cleanup stack, and must be deallocated by the caller." sl@0: @leave "This method may leave with one of the system-wide error codes." sl@0: */ sl@0: IMPORT_C CPostProcessorInfo* PostProcessorInfoLC(TUid aPostProcessor); sl@0: sl@0: /** sl@0: Selects the video decoder to be used. This method must be called before any other video decoder sl@0: related methods are used. The decoder to use can be changed by calling this method again before sl@0: the API has been initialized with Initialize(). sl@0: All video decoder settings are reset to their default values, which are up to the implementation sl@0: to decide if not specified in any of the MSL specifications. By default no post-processing is sl@0: performed. sl@0: sl@0: @param "aDecoder" "The video decoder to use." sl@0: @return "Hardware device ID, used in other methods for configuring the decoder." sl@0: @leave "The method will leave if an error occurs. Typical error codes used: sl@0: * KErrNotFound - No decoder was found with the given UID" sl@0: @pre "This method can only be called before the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C THwDeviceId SelectDecoderL(TUid aDecoder); sl@0: sl@0: /** sl@0: Selects the video post-processor to be used. This method must be called before any other sl@0: post-processor related methods are used. The post-processor to use can be changed by calling sl@0: this method again before the API has been initialized with Initialize(). sl@0: All post-processor settings are reset to their default values, which are up to the implementation sl@0: to decide if not specified in any of the MSL specifications. sl@0: sl@0: @param "aPostProcessor" "The post-processor to use." sl@0: @return "Hardware device ID, used in other methods for configuring the post-processor." sl@0: @leave "The method will leave if an error occurs. Typical error codes used: sl@0: * KErrNotFound - No post-processor was found with the given UID" sl@0: @pre "This method can only be called before the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C THwDeviceId SelectPostProcessorL(TUid aPostProcessor); sl@0: sl@0: /** sl@0: Reads header information from a coded data unit. [1 #59] This method can be called only after sl@0: SelectDecoderL(). sl@0: @param "aDataUnitType" "The type of coded data unit that is contained in aDataUnit. If the sl@0: data is a simple piece of bitstream, use sl@0: EDuArbitraryStreamSection." sl@0: @param "aDataUnitEncapsulation" "The encapsulation type used for the coded data. If the data sl@0: is a simple piece of bitstream, use EDuElementaryStream." sl@0: @param "aDataUnit" "The coded data unit, contained in a TVideoInputBuffer." sl@0: @return "Header information for the data unit, or NULL if the coded data unit did not contain sl@0: enough data to parse the header. The header data must be returned to the API using sl@0: ReturnHeader() before the API is shut down or the decoder is changed. The data remains sl@0: valid until it is returned." sl@0: @leave "The method will leave if an error occurs. Running out of data is not considered an error, sl@0: as described above. Typical error codes used: sl@0: * KErrNotSupported - The data is not in a supported format. sl@0: * KErrCorrupt - The data appears to be in a supported format, but is corrupted." sl@0: */ sl@0: IMPORT_C TVideoPictureHeader* GetHeaderInformationL(TVideoDataUnitType aDataUnitType, sl@0: TVideoDataUnitEncapsulation aDataUnitEncapsulation, sl@0: TVideoInputBuffer* aDataUnit); sl@0: sl@0: IMPORT_C void ConfigureDecoderL(const TVideoPictureHeader& aVideoPictureHeader); sl@0: sl@0: /** sl@0: Returns a header from GetHeaderInformationL() back to the decoder so that the memory can be freed. sl@0: @param "aHeader" "The header to return." sl@0: @pre "This method can only be called before the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C void ReturnHeader(TVideoPictureHeader* aHeader); sl@0: sl@0: /** sl@0: Sets a hardware device input format to an uncompressed video format. Only post-processors support sl@0: uncompressed video input. sl@0: @param "aHwDevice" "The hardware device to configure. The value is returned from sl@0: SelectPostProcessorL() when the device is selected." sl@0: @param "aFormat" "The input format to use." sl@0: @leave "The method will leave if an error occurs. Typical error codes used: sl@0: * KErrNotSupported - The input format is not supported." sl@0: @pre "This method can only be called before the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C void SetInputFormatL(THwDeviceId aHwDevice, const TUncompressedVideoFormat& aFormat); sl@0: sl@0: /** sl@0: Sets a hardware device Input format to a compressed video format. Only decoders support compressed sl@0: video input. sl@0: @param "aHwDevice" "The hardware device to configure. The value is returned from sl@0: SelectDecoderL() when the device is selected." sl@0: @param "aFormat" "The input format to use." sl@0: @param "aDataUnitType" "The data unit type for input data." sl@0: @param "aEncapsulation" "The encapsulation type used for the coded data." sl@0: @param "aDataInOrder" "True if the input data is written in correct decoding order, false if sl@0: the input data may be written in arbitrary order." sl@0: @leave "The method will leave if an error occurs. Typical error codes used: sl@0: * KErrNotSupported - The input format is not supported." sl@0: @pre "This method can only be called before the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C void SetInputFormatL(THwDeviceId aHwDevice, sl@0: const CCompressedVideoFormat& aFormat, sl@0: TVideoDataUnitType aDataUnitType, sl@0: TVideoDataUnitEncapsulation aEncapsulation, sl@0: TBool aDataInOrder); sl@0: sl@0: /** sl@0: Retrieves the list of the output formats a hardware device supports. The list is ordered in sl@0: preference order, with the preferred formats at the beginning of the list. The list can depend sl@0: on the device source format, and therefore SetSourceFormatL() must be called for the device sl@0: before calling this method. sl@0: @param "aHwDevice" "The hardware device to configure. The value is returned from SelectDecoderL() sl@0: or SelectPostProcessorL() when the device is selected." sl@0: @param "aFormats" "An array for the result format list. The array must be created and destroyed sl@0: by the caller." sl@0: @leave "This method may leave with one of the system-wide error codes." sl@0: @pre "This method can only be called before the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C void GetOutputFormatListL(THwDeviceId aHwDevice, RArray& aFormats); sl@0: sl@0: /** sl@0: Sets the output format for a hardware device. If a decoder and a post-processor are used, the sl@0: decoder output format must match the post-processor source format. sl@0: sl@0: If direct screen access is being used, then it is not necessary to call this method on the sl@0: hwdevice performing the direct screen access. sl@0: sl@0: @param "aHwDevice" "The hardware device to configure. The value is returned from SelectDecoderL() sl@0: or SelectPostProcessorL() when the device is selected." sl@0: @param "aFormat" "The format to use." sl@0: @leave "The method will leave if an error occurs. Typical error codes used: sl@0: * KErrNotSupported - The output format is not supported." sl@0: @pre "This method can only be called before the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C void SetOutputFormatL(THwDeviceId aHwDevice, const TUncompressedVideoFormat &aFormat); sl@0: sl@0: /** sl@0: Sets the clock source to use for video timing. When video playback is synchronized with audio, the sl@0: clock source is implemented by the audio playback subsystem, otherwise the clock source should get sl@0: the time from the system clock. If no clock source is set, video playback will not be synchronized, sl@0: but will proceed as fast as possible, depending on input data and output buffer availability. This sl@0: method can be called after all hardware devices have been selected, but before calling Initialize(). sl@0: sl@0: All decoders must support synchronization with an external clock source, as well as unsynchronized sl@0: non-realtime operation. When a clock source is set, the decoder can skip pictures to maintain sl@0: synchronization. When non-realtime operation is used and no clock source has been set, pictures sl@0: may not be skipped unless a lower complexity level is used that requires this. sl@0: sl@0: @param "aClock" "The clock source to use" sl@0: @pre "This method can only be called before the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C void SetClockSource(MMMFClockSource* aClock); sl@0: sl@0: /** sl@0: Sets the video output destination. The destination can be the screen (using direct screen access) sl@0: or memory buffers. By default memory buffers are used. This method must be called after the sl@0: decoder and post-processor have been selected and their options set, since support for direct sl@0: screen access can vary between hardware devices. sl@0: @param "aScreen" "True if video output destination is the screen, false if memory buffers." sl@0: @leave "The method will leave if an error occurs. Typical error codes used: sl@0: * KErrNotSupported - The selected video destination is not supported with the sl@0: current codec and post-processor settings." sl@0: @pre "This method can only be called before the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C void SetVideoDestScreenL(TBool aScreen); sl@0: sl@0: /** sl@0: Sets whether the decoder should synchronize decoding to the current clock source, if any, or sl@0: should decode all pictures as soon as possible. If decoding is synchronized, decoding timestamps sl@0: are used if available, presentation timestamps are used if not. When decoding is not synchronized, sl@0: pictures are decoded as soon as source data is available for them and the decoder has a free sl@0: output buffer. If a clock source is not available, decoding will not be synchronized. sl@0: sl@0: @param "aSynchronize" "True if decoding should be synchronized to a clock source." sl@0: @pre "This method can only be called before the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C void SynchronizeDecoding(TBool aSynchronize); sl@0: sl@0: /** sl@0: Sets video decoder buffering options. sl@0: @param "aOptions" "Buffering options." sl@0: @leave "The method will leave if an error occurs. Typical error codes used: sl@0: * KErrNotSupported - The specified buffering options are not supported. If the sl@0: client receives this error code, it can call GetBufferOptions() to determine sl@0: the options the decoder is able to support." sl@0: @pre "This method can only be called before the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C void SetBufferOptionsL(const TBufferOptions& aOptions); sl@0: sl@0: /** sl@0: Gets the video decoder buffer options actually in use. This can be used before calling sl@0: SetBufferOptionsL() to determine the default options, or afterwards to check the values actually sl@0: in use (if some default values were used). sl@0: @param "aOptions" "Buffering options structure to fill." sl@0: @pre "This method can only be called before the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C void GetBufferOptions(TBufferOptions& aOptions); sl@0: sl@0: /** sl@0: Indicates which HRD/VBV specification is fulfilled in the input stream and any related parameters. sl@0: @param "aHrdVbvSpec" "The HRD/VBV specification fulfilled, see the definition of sl@0: THrdVbvSpecification for details." sl@0: @param "aHrdVbvParams" "HRD/VBV parameters. The data format depends on the parameters chosen. sl@0: For 3GPP TS 26.234 parameters (aHrdVbvSpec=EHrdVbv3GPP), the data in the sl@0: descriptor is a package of type TPckC sl@0: (see T3gppHrdVbvParams). If no HRD/VBV parameters are used, the descriptor sl@0: is empty." sl@0: @pre "This method can only be called before the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C void SetHrdVbvSpec(THrdVbvSpecification aHrdVbvSpec, const TDesC8& aHrdVbvParams); sl@0: sl@0: /** sl@0: Sets the post-processing types to be used. This method, like all post-processing configuration sl@0: methods, must be called before Initialize(). sl@0: sl@0: Post-processing operations are carried out in the following order: sl@0: 1. Input cropping sl@0: 2. Mirroring sl@0: 3. Rotating sl@0: 4. Scaling sl@0: 5. Output cropping sl@0: Color space conversion can be performed at any point in the post-processing flow. sl@0: sl@0: @param "aHwDevice" "The hardware device to configure. The value is returned from sl@0: SelectDecoderL() or SelectPostProcessorL() when the device is sl@0: selected." sl@0: @param "aPostProcCombination" "The post-processing steps to perform, a bitwise OR of values sl@0: from TPrePostProcessType." sl@0: @leave "The method will leave if an error occurs. Typical error codes used: sl@0: * KErrNotSupported - The post-processing combination is not supported" sl@0: @pre "This method can be called either before or after the API has been initialized with Initialize(). sl@0: If called after initialization, the change will only be committed once CommitL() is called." sl@0: */ sl@0: IMPORT_C void SetPostProcessTypesL(THwDeviceId aHwDevice, TUint32 aPostProcCombination); sl@0: sl@0: /** sl@0: Sets post-processing options for input (pan-scan) cropping. SetPostProcessTypesL() must be called sl@0: before this method is used. sl@0: @param "aHwDevice" "The hardware device to configure. The value is returned from SelectDecoderL() sl@0: or SelectPostProcessorL() when the device is selected." sl@0: @param "aRect" "The cropping rectangle to use." sl@0: @leave "The method will leave if an error occurs. Typical error codes used: sl@0: * KErrNotSupported - Pan-scan cropping is not supported" sl@0: @pre "This method can be called either before or after the API has been initialized with Initialize(). sl@0: If called after initialization, the change will only be committed once CommitL() is called." sl@0: */ sl@0: IMPORT_C void SetInputCropOptionsL(THwDeviceId aHwDevice, const TRect& aRect); sl@0: sl@0: /** sl@0: Sets post-processing options for YUV to RGB color space conversion. Specifies the input YUV and sl@0: output RGB formats to use explicitly. SetSourceFormatL() and SetOutputFormatL(), and sl@0: SetPostProcessTypesL() must be called before this method is used. sl@0: @param "aHwDevice" "The hardware device to configure. The value is returned from sl@0: SelectDecoderL() or SelectPostProcessorL() when the device is selected." sl@0: @param "aOptions" "The conversion options to use." sl@0: @param "aYuvFormat" "Conversion source YUV format." sl@0: @param "aRgbFormat" "Conversion target RGB format." sl@0: @leave "The method will leave if an error occurs. Typical error codes used: sl@0: * KErrNotSupported - The conversion options are not supported." sl@0: @pre "This method can be called either before or after the API has been initialized with Initialize(). sl@0: If called after initialization, the change will only be committed once CommitL() is called." sl@0: */ sl@0: IMPORT_C void SetYuvToRgbOptionsL(THwDeviceId aHwDevice, sl@0: const TYuvToRgbOptions& aOptions, sl@0: const TYuvFormat& aYuvFormat, sl@0: TRgbFormat aRgbFormat); sl@0: sl@0: /** sl@0: Sets post-processing options for YUV to RGB color space conversion. Uses the device input and sl@0: output formats. For decoders the default YUV format used is the format specified in the input sl@0: bitstream. SetSourceFormatL() and SetOutputFormatL(), and SetPostProcessTypesL() must be called sl@0: before this method is used. sl@0: @param "aHwDevice" "The hardware device to configure. The value is returned from sl@0: SelectDecoderL() or SelectPostProcessorL() when the device is selected." sl@0: @param "aOptions" "The conversion options to use." sl@0: @leave "The method will leave if an error occurs. Typical error codes used: sl@0: * KErrNotSupported - The conversion options are not supported." sl@0: @pre "This method can be called either before or after the API has been initialized with Initialize(). sl@0: If called after initialization, the change will only be committed once CommitL() is called." sl@0: */ sl@0: IMPORT_C void SetYuvToRgbOptionsL(THwDeviceId aHwDevice, const TYuvToRgbOptions& aOptions); sl@0: sl@0: /** sl@0: Sets post-processing options for rotation. SetPostProcessTypesL() must be called before this sl@0: method is used. sl@0: @param "aHwDevice" "The hardware device to configure. The value is returned from sl@0: SelectDecoderL() or SelectPostProcessorL() when the device is selected." sl@0: @param "aRotationType" "The rotation to perform." sl@0: @leave "The method will leave if an error occurs. Typical error codes used: sl@0: * KErrNotSupported - The rotation options are not supported." sl@0: @pre "This method can be called either before or after the API has been initialized with Initialize(). sl@0: If called after initialization, the change will only be committed once CommitL() is called." sl@0: */ sl@0: IMPORT_C void SetRotateOptionsL(THwDeviceId aHwDevice, TRotationType aRotationType); sl@0: sl@0: /** sl@0: Sets post-processing options for scaling. SetPostProcessTypesL() must be called before this method sl@0: is used. sl@0: @param "aHwDevice" "The hardware device to configure. The value is returned from sl@0: SelectDecoderL() or SelectPostProcessorL() when the device is sl@0: selected." sl@0: @param "aTargetSize" "Scaling target size. If a fixed scale factor size is used, the sl@0: new dimensions must be set to width=floor(factor*width), sl@0: height=floor(factor*height). For example, scaling a QCIF (176x144) sl@0: picture up by a factor of 4/3 yields a size of 234x192." sl@0: @param "aAntiAliasFiltering" "True if anti-aliasing filtering should be used. If the sl@0: post-processor does not support anti-aliased scaling, or supports sl@0: anti-aliased scaling only, this argument is ignored." sl@0: @leave "The method will leave if an error occurs. Typical error codes used: sl@0: * KErrNotSupported - The scale options are not supported." sl@0: @pre "This method can be called either before or after the API has been initialized with Initialize(). sl@0: If called after initialization, the change will only be committed once CommitL() is called." sl@0: */ sl@0: IMPORT_C void SetScaleOptionsL(THwDeviceId aHwDevice, sl@0: const TSize& aTargetSize, sl@0: TBool aAntiAliasFiltering); sl@0: sl@0: /** sl@0: Sets post-processing options for output cropping. SetPostProcessTypesL() must be called before this sl@0: method is used. sl@0: @param "aHwDevice" "The hardware device to configure. The value is returned from SelectDecoderL() sl@0: # SelectPostProcessorL() when the device is selected." sl@0: @param "aRect" "Output cropping area." sl@0: @leave "The method will leave if an error occurs. Typical error codes used: sl@0: * KErrNotSupported - Output cropping is not supported." sl@0: @pre "This method can be called either before or after the API has been initialized with Initialize(). sl@0: If called after initialization, the change will only be committed once CommitL() is called." sl@0: */ sl@0: IMPORT_C void SetOutputCropOptionsL(THwDeviceId aHwDevice, const TRect& aRect); sl@0: sl@0: /** sl@0: Sets post-processing hardware device specific options. SetPostProcessTypesL() must be called sl@0: before this method is used. sl@0: @param "aHwDevice" "The hardware device to configure. The value is returned from SelectDecoderL() sl@0: or SelectPostProcessorL() when the device is selected." sl@0: @param "aOptions" "The options. The format is plug-in specific." sl@0: @leave "The method will leave if an error occurs. Typical error codes used: sl@0: * KErrNotSupported - The options are not supported." sl@0: @pre "This method can be called either before or after the API has been initialized with Initialize(). sl@0: If called after initialization, the change will only be committed once CommitL() is called." sl@0: */ sl@0: IMPORT_C void SetPostProcSpecificOptionsL(THwDeviceId aHwDevice, const TDesC8& aOptions); sl@0: sl@0: /** sl@0: Initializes the video device. This method is asynchronous, DevVideoPlay will call sl@0: MMMFDevVideoPlayObserver::MdvpoInitializeComplete() after initialization has completed. No sl@0: DevVideoPlay method may be called while initialization is in progress, the initialization process sl@0: can only be cancelled by destroying the DevVideoPlay object. After this initialization has been sl@0: successfully completed, further configuration changes are not possible except where separately sl@0: noted. sl@0: sl@0: If initialization fails for any reason, the DevVideoPlay object must be destroyed and set up from sl@0: scratch. sl@0: */ sl@0: IMPORT_C void Initialize(); sl@0: sl@0: /** sl@0: Commit all configuration changes since the last CommitL(), Revert() or Initialize(). This only applies sl@0: to methods that can be called both before AND after DevVideoPlay has been initialized. sl@0: See the following methods for details. sl@0: sl@0: @see SetPostProcessTypesL sl@0: @see SetInputCropOptionsL sl@0: @see SetYuvToRgbOptionsL sl@0: @see SetRotateOptionsL sl@0: @see SetScaleOptionsL sl@0: @see SetOutputCropOptionsL sl@0: @see SetPostProcSpecificOptionsL sl@0: sl@0: @leave "The method will leave if an error occurs." sl@0: @pre "This method can only be called after the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C void CommitL(); sl@0: sl@0: /** sl@0: Revert any configuration changes that have not yet been committed using CommitL(). This only applies sl@0: to methods that can be called both before AND after DevVideoPlay has been initialized. sl@0: See the following methods for details. sl@0: sl@0: @see SetPostProcessTypesL sl@0: @see SetInputCropOptionsL sl@0: @see SetYuvToRgbOptionsL sl@0: @see SetRotateOptionsL sl@0: @see SetScaleOptionsL sl@0: @see SetOutputCropOptionsL sl@0: @see SetPostProcSpecificOptionsL sl@0: sl@0: @pre "This method can only be called after the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C void Revert(); sl@0: sl@0: /** sl@0: Starts video decoding directly to the display frame buffer using Direct Screen Access. sl@0: Playback to the display can start immediately. sl@0: @param "aVideoRect" "The video output rectangle on screen. The rectangle size should be the sl@0: same as the output video size, otherwise results are undefined. Some sl@0: decoders may set limitations to the position and alignment of the sl@0: rectangle. The rectangle must be aligned to a 32-bit boundary on screen sl@0: (even X-coordinate on 12-bpp and 16-bpp displays) and must fit completely sl@0: on the screen." sl@0: @param "aScreenDevice" "The screen device to use. The screen device will supply frame buffer sl@0: information, and is used to update the frame buffer to screen. The screen sl@0: device object must be valid in the current thread." sl@0: @param "aClipRegion" "Initial clipping region to use." sl@0: @leave "The method will leave if an error occurs. Typical error codes used: sl@0: *KErrNotSupported - Direct Screen Access is not supported" sl@0: @pre "This method can only be called after the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C void StartDirectScreenAccessL(const TRect& aVideoRect, sl@0: CFbsScreenDevice& aScreenDevice, sl@0: const TRegion& aClipRegion); sl@0: sl@0: /** sl@0: Sets a new clipping region for Direct Screen Access. After the method returns, no video will be sl@0: drawn outside of the region. (Note that in Symbian OS clipping regions are "positive" - that is, sl@0: they define the legal area inside which an application may draw.) sl@0: sl@0: If clipping is not supported, or the clipping region is too complex, either playback will pause sl@0: or will resume without video display, depending on the current setting of SetPauseOnClipFail(), sl@0: and the result can be verified with IsPlaying(). Clipping can be disabled by setting a new sl@0: clipping region that includes the whole video window. sl@0: sl@0: @param "aRegion" "The new clipping region. After the method returns, no video will be drawn sl@0: outside the region." sl@0: @pre "This method can only be called after the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C void SetScreenClipRegion(const TRegion& aRegion); sl@0: sl@0: /** sl@0: Sets whether the system should pause playback when it gets a clipping region it cannot handle, sl@0: or Direct Screen Access is aborted completely. If not, decoding will proceed normally, but no sl@0: video will be drawn. By default, playback is paused. sl@0: @param "aPause" "True if playback should be paused when clipping fails, false if not. If sl@0: playback is not paused, it will be continued without video display." sl@0: @pre "This method can only be called after the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C void SetPauseOnClipFail(TBool aPause); sl@0: sl@0: /** sl@0: Aborts Direct Screen Access completely, to be called from MAbortDirectScreenAccess::AbortNow() and sl@0: similar methods. DSA can be resumed by calling StartDirectScreenAccessL(). sl@0: @pre "This method can only be called after the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C void AbortDirectScreenAccess(); sl@0: sl@0: /** sl@0: Indicates whether playback is proceeding. This method can be used to check whether playback was sl@0: paused or not in response to a new clipping region or DSA abort. sl@0: @return "ETrue if video is still being played (even if not necessarily displayed)." sl@0: @pre "This method can only be called after the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C TBool IsPlaying(); sl@0: sl@0: /** sl@0: Re-draws the latest video picture. Only available when DSA is being used. If DSA is aborted sl@0: or a non-supported clipping region has been set, the request may be ignored. sl@0: @pre "This method can only be called after the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C void Redraw(); sl@0: sl@0: /** sl@0: Starts video playback, including decoding, post-processing, and rendering. Playback will proceed sl@0: until it has been stopped or paused, or the end of the bitstream is reached. sl@0: @pre "This method can only be called after the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C void Start(); sl@0: sl@0: /** sl@0: Stops video playback. No new pictures will be decoded, post-processed, or rendered. sl@0: @pre "This method can only be called after the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C void Stop(); sl@0: sl@0: /** sl@0: Pauses video playback, including decoding, post-processing, and rendering. No pictures will be sl@0: decoded, post-processed, or rendered until playback has been resumed. The client is responsible sl@0: for pausing the clock source (typically by pausing audio output) if necessary. sl@0: @pre "This method can only be called after the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C void Pause(); sl@0: sl@0: /** sl@0: Resumes video playback after a pause. The client is responsible for restarting the clock source sl@0: if necessary. sl@0: @pre "This method can only be called after the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C void Resume(); sl@0: sl@0: /** sl@0: Changes to a new decoding and playback position, used for randomly accessing (seeking) the input sl@0: stream. The position change flushes all input and output buffers. Pre-decoder and post-decoder sl@0: buffering are handled as if a new bitstream was started. If the MSL video subsystem still has sl@0: buffered pictures that precede the new playback position, they will be discarded. If playback is sl@0: synchronized to a clock source, the client is responsible for setting the clock source to the new sl@0: position. sl@0: @param "aPlaybackPosition" "The new playback position in the video stream." sl@0: @pre "This method can only be called after the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C void SetPosition(const TTimeIntervalMicroSeconds& aPlaybackPosition); sl@0: sl@0: /** sl@0: Freezes a picture on the screen. After the picture has been frozen, no picture is displayed until sl@0: the freeze is released with ReleaseFreeze(). If the video output is being written to memory sl@0: buffers, not the screen, decoded pictures will not be delivered to the client when a freeze is sl@0: active, but are simply discarded. sl@0: @param "aPlaybackPosition" "The presentation timestamp of the picture to freeze. The frozen sl@0: picture will be the first picture with a timestamp greater than or sl@0: equal to this parameter." sl@0: @pre "This method can only be called after the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C void FreezePicture(const TTimeIntervalMicroSeconds& aPlaybackPosition); sl@0: sl@0: /** sl@0: Releases a picture frozen with FreezePicture(). sl@0: @param "aPlaybackPosition" "The presentation timestamp of the picture to release. The first sl@0: picture displayed after the release will be the first picture with a sl@0: timestamp greater than or equal to this parameter. To release the sl@0: freeze immediately, set the timestamp to zero." sl@0: @pre "This method can only be called after the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C void ReleaseFreeze(const TTimeIntervalMicroSeconds& aPlaybackPosition); sl@0: sl@0: /** sl@0: Returns the current decoding position, i.e. the timestamp for the most recently decoded picture. sl@0: @return "Current decoding position." sl@0: @pre "This method can only be called after the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C TTimeIntervalMicroSeconds DecodingPosition(); sl@0: sl@0: /** sl@0: Returns the current playback position, i.e. the timestamp for the most recently displayed or sl@0: virtually displayed picture. sl@0: @return "Current playback position." sl@0: @pre "This method can only be called after the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C TTimeIntervalMicroSeconds PlaybackPosition(); sl@0: sl@0: /** sl@0: Returns the current pre-decoder buffer size. sl@0: @return "The number of bytes of data in the pre-decoder buffer." sl@0: @pre "This method can only be called after the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C TUint PreDecoderBufferBytes(); sl@0: sl@0: /** sl@0: Returns the total amount of memory allocated for uncompressed pictures. sl@0: @return "Total number of bytes of memory allocated for uncompressed pictures." sl@0: @pre "This method can only be called after the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C TUint PictureBufferBytes(); sl@0: sl@0: /** sl@0: Reads various counters related to decoded pictures. See the definition of TPictureCounters for a sl@0: description of the counters. The counters are reset when Initialize() or this method is called, sl@0: and thus they only include pictures processed since the last call. sl@0: @param "aCounters" "The counter structure to fill." sl@0: @pre "This method can only be called after the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C void GetPictureCounters(TPictureCounters& aCounters); sl@0: sl@0: /** sl@0: Reads various counters related to the received input bitstream and coded data units. See the sl@0: definition of TBitstreamCounters for a description about the counters. The counters are reset sl@0: when Initialize() or this method is called, and thus they only include data processed since the sl@0: last call. sl@0: @param "aCounters" "The counter structure to fill." sl@0: @pre "This method can only be called after the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C void GetBitstreamCounters(TBitstreamCounters& aCounters); sl@0: sl@0: /** sl@0: Retrieves the number of free input buffers the decoder has available. If only a post-processor sl@0: is used, the return value is undefined. sl@0: @return "Number of free input buffers the decoder has available." sl@0: @pre "This method can only be called after the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C TUint NumFreeBuffers(); sl@0: sl@0: /** sl@0: Sets the computational complexity level to use. The level can be set separately for each hardware sl@0: device in use. If separate complexity levels are not available, the method call is ignored. If the sl@0: level specified is not available, the results are undefined. Typically the device will either sl@0: ignore the request or use the nearest suitable level. sl@0: sl@0: The complexity level can be changed at any point during playback. sl@0: sl@0: @param "aHwDevice" "The plug-in to control. The value is returned from SelectDecoderL()or sl@0: SelectPostProcessorL() when the device is selected." sl@0: @param "aLevel" "The computational complexity level to use. Level zero (0) is the most sl@0: complex one, with the highest quality. Higher level numbers require less sl@0: processing and may have lower quality." sl@0: @pre "This method can only be called after the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C void SetComplexityLevel(THwDeviceId aHwDevice, TUint aLevel); sl@0: sl@0: /** sl@0: Gets the number of complexity levels available. sl@0: @param "aHwDevice" "The plug-in to query. The value is returned from SelectDecoderL()or sl@0: SelectPostProcessorL() when the device is selected." sl@0: @return "The number of complexity control levels available, or zero if the information is not sl@0: available yet. The information may not be available if the number of levels depends on sl@0: the input data, and enough input data has not been read yet. In that case, using level sl@0: zero is safe." sl@0: @pre "This method can only be called after the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C TUint NumComplexityLevels(THwDeviceId aHwDevice); sl@0: sl@0: /** sl@0: Gets information about a computational complexity level. This method can be called after sl@0: NumComplexityLevels() has returned a non-zero value - at that point the information is guaranteed sl@0: to be available. Some hardware device implementations may not be able to provide all values, sl@0: in that case the values will be approximated. sl@0: @param "aHwDevice" "The hw device to query. The value is returned from SelectDecoderL()or sl@0: SelectPostProcessorL() when the device is selected." sl@0: @param "aLevel" "The computational complexity level to query. The level numbers range from sl@0: zero (the most complex) to NumComplexityLevels()-1." sl@0: @param "aInfo" "The information structure to fill." sl@0: @pre "This method can only be called after the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C void GetComplexityLevelInfo(THwDeviceId aHwDevice, TUint aLevel, TComplexityLevelInfo& aInfo); sl@0: sl@0: /** sl@0: Retrieves an empty video input buffer from the decoder. After input data has been written to the sl@0: buffer, it can be written to the decoder using WriteCodedDataL(). The maximum number of buffers sl@0: the client can retrieve before returning any to the decoder is determined by the sl@0: TBufferOptions.iMinNumInputBuffers value set with SetBufferOptionsL(). sl@0: sl@0: If a buffer is not immediately available, the client can wait for a MdvpoNewBuffers() callback sl@0: before trying again, or poll for new buffer availability after a delay. Note that video decoding sl@0: may be performed in the same thread, in a separate active object, so the client must not block sl@0: the active scheduler while waiting for buffers to become available, otherwise the system can sl@0: deadlock. Assuming that the client does not keep too many buffers retrieved and playback is in sl@0: progress, new buffers will be available after some time. sl@0: sl@0: The decoder maintains ownership of the buffers even while they have been retrieved by the client, sl@0: and will take care of deallocating them. The client must not destroy the buffer objects, even if sl@0: it has retrieved buffers and it is being shut down. The buffers will be destroyed by the decoder, sl@0: and will not be valid after the decoder has been shut down. sl@0: sl@0: @param "aBufferSize" "Required buffer size, in bytes. The resulting buffer can be larger than sl@0: this, but not smaller" sl@0: @return "A new input data buffer. The buffer is at least as large as requested, but it may be sl@0: larger. If no free buffers are available, the return value is NULL." sl@0: @leave "The method will leave if an error occurs. Lack of free buffers is not considered an error." sl@0: */ sl@0: IMPORT_C TVideoInputBuffer* GetBufferL(TUint aBufferSize); sl@0: sl@0: /** sl@0: Writes a piece of coded video data. The data will be passed to the video decoder and sl@0: post-processor to be used in video playback. The data buffer must be retrieved from the decoder sl@0: with GetBufferL(). sl@0: @param "aBuffer" "The coded data unit to write." sl@0: @leave "The method will leave if an error occurs." sl@0: @pre "This method can only be called after the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C void WriteCodedDataL(TVideoInputBuffer* aBuffer); sl@0: sl@0: /** sl@0: Writes an uncompressed video picture. The picture must remain valid and unmodified until it is sl@0: returned with the MdvpoReturnPicture() callback. sl@0: @param "aPicture" "The picture to write." sl@0: @leave "The method will leave if an error occurs." sl@0: @pre "This method can only be called after the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C void WritePictureL(TVideoPicture* aPicture); sl@0: sl@0: /** sl@0: Notifies the system that the end of input data has been reached. sl@0: sl@0: The decoder and post-processor can use this signal to ensure that the remaining data gets processed, sl@0: without waiting for new data. For example when the data type is not EDuCodedPicture, calling this sl@0: method is necessary otherwise a decoder implementation might be waiting for the start code for the sl@0: next picture to ensure it has a complete picture before starting to decode the previous one. sl@0: sl@0: sl@0: After the remaining data has been processed (and displayed, if applicable), the client gets sl@0: notified with the MdvpoStreamEnd() callback. The client must then call Stop() on the interface. sl@0: sl@0: DevVideo clients are encouraged to call this method, but its use is not mandatory for synchronized sl@0: processing. For synchronized playback, all video pictures are processed or discarded according to sl@0: their timestamps, and so the client can easily infer when processing is complete. However, it sl@0: should be noted that the last picture might not be displayed if this method is not called and the sl@0: input data type is not EDuCodedPicture. sl@0: sl@0: For non-synchronized playback (e.g. file conversion), a client must call this method otherwise it sl@0: will never find out when the hardware device has finished processing the data. sl@0: sl@0: @pre "This method can only be called after the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C void InputEnd(); sl@0: sl@0: /** sl@0: Gets information about new decoded pictures. "New decoded pictures" are pictures that have not sl@0: been returned to the caller using NextPicture(). This method can only be called if video sl@0: destination is memory buffers, i.e. Direct Screen Access is not used. sl@0: @param "aNumPictures" "Target for the number of new decoded pictures. If no pictures are sl@0: available, the value written is zero, and the timestamps are not sl@0: valid." sl@0: @param "aEarliestTimestamp" "Timestamp for the earliest available new decoded picture. If the sl@0: number of new decoded pictures (aNumPictures) is zero, the sl@0: timestamp is not valid." sl@0: @param "aLatestTimestamp" "Timestamp for the latest available new decoded picture. If the sl@0: number of new decoded pictures (aNumPictures) is zero, the sl@0: timestamp is not valid." sl@0: @pre "This method can only be called after the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C void GetNewPictureInfo(TUint& aNumPictures, sl@0: TTimeIntervalMicroSeconds& aEarliestTimestamp, sl@0: TTimeIntervalMicroSeconds& aLatestTimestamp); sl@0: sl@0: /** sl@0: Gets the next (in displaying order) new decoded picture. Only one picture can be retrieved at a sl@0: time, the current picture must be returned with ReturnPicture() before a new one can be read. sl@0: @return "The next new decoded picture. The pointer and the related data is valid until the picture sl@0: is returned using ReturnPicture(), or the API is shut down. If no new picture is available, sl@0: the method returns NULL." sl@0: @leave "The method will leave if an error occurs." sl@0: @pre "This method can only be called after the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C TVideoPicture* NextPictureL(); sl@0: sl@0: /** sl@0: Returns a picture from NextPicture() back to the device. The picture data cannot be used afterwards. sl@0: @param "aPicture" "The picture to return. After this method returns, the pointer is no longer sl@0: valid and the picture data cannot be used." sl@0: @pre "This method can only be called after the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C void ReturnPicture(TVideoPicture* aPicture); sl@0: sl@0: /** sl@0: Gets a copy of the latest picture displayed. sl@0: @param "aPictureData" "Target picture. The memory for the picture must be allocated by the sl@0: caller, and initialized properly. The data formats must match the snapshot sl@0: format requested." sl@0: @param "aFormat" "The picture format to use for the snapshot." sl@0: @return "ETrue if the snapshot was taken, EFalse if a picture is not available. The picture may not sl@0: be available if decoding has not progressed far enough yet." sl@0: @leave "The method will leave if an error occurs. Typical error codes used: sl@0: *KErrNotSupported - The requested data format or picture size is not supported." sl@0: @pre "This method can only be called after the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C TBool GetSnapshotL(TPictureData& aPictureData, const TUncompressedVideoFormat& aFormat); sl@0: sl@0: /** sl@0: Gets a copy of a specified picture. Timed snapshots are required for implementing the video sl@0: telephony use-case. Simply using the latest picture may not work, since the latest picture sl@0: is typically not the one whose supplemental information is being processed. sl@0: sl@0: The picture is specified using its presentation timestamp. The timestamp must match the timestamp sl@0: in the picture exactly, otherwise no snapshot will be taken. The timestamp must refer to the sl@0: currently displayed picture or a future picture. Typically the timestamp is received with sl@0: supplemental information (with the MdvpoSupplementalInformation() callback) indicating a snapshot sl@0: picture. sl@0: sl@0: When the snapshot is available, it will be returned to the client using the sl@0: MdvpoTimedSnapshotComplete() callback. To cancel a timed snapshot request, use sl@0: CancelTimedSnapshot(). Only one timed snapshot request can be active at a time. sl@0: sl@0: @param "aPictureData" "Target picture. The memory for the picture must be allocated sl@0: by the caller, and initialized properly. The data formats must sl@0: match the snapshot format requested. The picture must remain sl@0: valid until the snapshot has been taken or until the request sl@0: has been cancelled with CancelTimedSnapshot()." sl@0: @param "aFormat" "The picture format to use for the snapshot." sl@0: @param "aPresentationTimestamp" "Presentation timestamp for the picture to copy. The timestamp sl@0: must match the timestamp in the picture exactly" sl@0: @leave "The method will leave if an error occurs. Typical error codes used: sl@0: *KErrNotSupported - The requested data format or picture size is not supported." sl@0: @pre "This method can only be called after the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C void GetTimedSnapshotL(TPictureData* aPictureData, sl@0: const TUncompressedVideoFormat& aFormat, sl@0: const TTimeIntervalMicroSeconds& aPresentationTimestamp); sl@0: sl@0: /** sl@0: Gets a copy of a specified picture. Timed snapshots are required for implementing the video sl@0: telephony use-case. Simply using the latest picture may not work, since the latest picture sl@0: is typically not the one whose supplemental information is being processed. sl@0: sl@0: The picture is specified using either its picture identifier. The id must refer to the currently sl@0: displayed picture or a future picture. Typically the picture ID is received with supplemental sl@0: information (with the MdvpoSupplementalInformation() callback) indicating a snapshot picture. sl@0: sl@0: When the snapshot is available, it will be returned to the client using the sl@0: MdvpoTimedSnapshotComplete() callback. To cancel a timed snapshot request, use sl@0: CancelTimedSnapshot(). Only one timed snapshot request can be active at a time. sl@0: sl@0: @param "aPictureData" "Target picture. The memory for the picture must be allocated by the sl@0: caller, and initialized properly. The data formats must match the snapshot sl@0: format requested. The picture must remain valid until the snapshot has been sl@0: taken or until the request has been cancelled with CancelTimedSnapshot()." sl@0: @param "aFormat" "The picture format to use for the snapshot." sl@0: @param "aPictureId" "Picture identifier for the picture to copy." sl@0: @leave "The method will leave if an error occurs. Typical error codes used: sl@0: *KErrNotSupported - The requested data format or picture size is not supported." sl@0: @pre "This method can only be called after the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C void GetTimedSnapshotL(TPictureData* aPictureData, sl@0: const TUncompressedVideoFormat& aFormat, sl@0: const TPictureId& aPictureId); sl@0: sl@0: /** sl@0: Cancels a timed snapshot request. sl@0: @pre "This method can only be called after the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C void CancelTimedSnapshot(); sl@0: sl@0: /** sl@0: Gets a list of the supported snapshot picture formats. sl@0: @param "aFormats" "An array for the result format list. The array must be created and destroyed by the caller." sl@0: @leave "The method will leave if an error occurs." sl@0: @pre "This method can only be called after the API has been initialized with Initialize()." sl@0: */ sl@0: IMPORT_C void GetSupportedSnapshotFormatsL(RArray& aFormats); sl@0: sl@0: /** sl@0: Retrieves a custom interface to the specified hardware device. sl@0: @param "aHwDevice" "The hardware device from which the custom interface shall be requested. sl@0: The value is returned from SelectDecoderL() or SelectPostProcessorL() when sl@0: the device is selected." sl@0: @param "aInterface" "Interface UID, defined with the custom interface." sl@0: @return "Pointer to the interface implementation, or NULL if the device does not sl@0: implement the interface requested. The return value must be cast to the sl@0: correct type by the user." sl@0: */ sl@0: IMPORT_C TAny* CustomInterface(THwDeviceId aHwDevice, TUid aInterface); sl@0: sl@0: private: sl@0: enum TInitializationState sl@0: { sl@0: ENotInitialized = 0x01, sl@0: EInitializing = 0x02, sl@0: EInitialized = 0x04, sl@0: EInitializationFailed = 0x08 sl@0: }; sl@0: private: sl@0: CMMFDevVideoPlay(MMMFDevVideoPlayObserver& aObserver); sl@0: sl@0: // Methods to check aHwDevice is valid and return the appropriate HwDevice sl@0: CMMFVideoPlayHwDevice& VideoPlayHwDevice(THwDeviceId aHwDevice) const; sl@0: CMMFVideoPlayHwDevice& RenderingHwDevice() const; //returns the last plugin in the chain sl@0: CMMFVideoDecodeHwDevice& VideoDecodeHwDevice(THwDeviceId aHwDevice) const;// Checks that aHwDevice is valid sl@0: CMMFVideoPostProcHwDevice& VideoPostProcHwDevice(THwDeviceId aHwDevice) const;// Checks that aHwDevice is valid sl@0: CMMFVideoDecodeHwDevice& VideoDecodeHwDevice() const; sl@0: CMMFVideoPostProcHwDevice& VideoPostProcHwDevice() const; sl@0: CMMFVideoHwDevice& VideoHwDevice(THwDeviceId aHwDevice) const; sl@0: sl@0: // Connects the plugins together sl@0: void ConnectPlugins(); sl@0: sl@0: // Check that we are in a valid initialization state sl@0: // Panics if iInitializationState is not one of aExpected sl@0: void CheckInitializationState(TUint aExpected); sl@0: sl@0: // Methods to handle init complete callbacks from the hw devices sl@0: void HandlePostProcInitializeComplete(TInt aError); sl@0: void HandleDecodeInitializeComplete(TInt aError); sl@0: sl@0: CMMFVideoDecodeHwDevice* CreateDecoderL(TUid aVideoDecoder); sl@0: sl@0: sl@0: // From MMMFDevVideoPlayProxy sl@0: virtual void MdvppNewPicture(TVideoPicture* aPicture); sl@0: virtual void MdvppNewBuffers(); sl@0: virtual void MdvppReturnPicture(TVideoPicture* aPicture); sl@0: virtual void MdvppSupplementalInformation(const TDesC8& aData, sl@0: const TTimeIntervalMicroSeconds& aTimestamp, sl@0: const TPictureId& aPictureId); sl@0: virtual void MdvppPictureLoss(); sl@0: virtual void MdvppPictureLoss(const TArray& aPictures); sl@0: virtual void MdvppSliceLoss(TUint aFirstMacroblock, TUint aNumMacroblocks, const TPictureId& aPicture); sl@0: virtual void MdvppReferencePictureSelection(const TDesC8& aSelectionData); sl@0: virtual void MdvppTimedSnapshotComplete(TInt aError, sl@0: TPictureData* aPictureData, sl@0: const TTimeIntervalMicroSeconds& aPresentationTimestamp, sl@0: const TPictureId& aPictureId); sl@0: virtual void MdvppFatalError(CMMFVideoHwDevice* aDevice, TInt aError); sl@0: virtual void MdvppInitializeComplete(CMMFVideoHwDevice* aDevice, TInt aError); sl@0: virtual void MdvppStreamEnd(); sl@0: sl@0: private: sl@0: MMMFDevVideoPlayObserver& iObserver; sl@0: CMMFVideoDecodeHwDevice* iVideoDecodeHwDevice; sl@0: CMMFVideoPostProcHwDevice* iVideoPostProcHwDevice; sl@0: TUint iInitializationState; sl@0: sl@0: TDblQue iVideoPictureQue; sl@0: TDblQueIter iVideoPictureQueIter; sl@0: TUint iNumberOfVideoPictures; sl@0: // Not to be used, but kept for BC purposes sl@0: TInt iReserved; sl@0: sl@0: TUint iNumberOfMdvppStreamEndCallbacks; sl@0: TBool iIsDecodeComplete; sl@0: sl@0: #ifdef SYMBIAN_MULTIMEDIA_CODEC_API sl@0: RImplInfoPtrArray iPuImplementations; sl@0: TBool iPuListCreated; sl@0: #endif // SYMBIAN_MULTIMEDIA_CODEC_API sl@0: }; sl@0: sl@0: sl@0: /** sl@0: The MMMFDevVideoPlayObserver mixin class defines a set of callback functions that the client using sl@0: the MSL video API needs to implement. The callbacks are called in the context of the same thread that sl@0: uses the API. DevVideo API methods can be safely called from the callbacks. sl@0: @publishedAll sl@0: @released sl@0: */ sl@0: class MMMFDevVideoPlayObserver sl@0: { sl@0: public: sl@0: /** sl@0: Notifies the client that one or more new empty input buffers are available. The client can fetch sl@0: the input buffer with GetBufferL(). sl@0: */ sl@0: virtual void MdvpoNewBuffers() = 0; sl@0: sl@0: /** sl@0: Returns a used input video picture back to the caller. The picture memory can be re-used or freed. sl@0: @param "aPicture" "The picture to return." sl@0: */ sl@0: virtual void MdvpoReturnPicture(TVideoPicture* aPicture) = 0; sl@0: sl@0: /** sl@0: Delivers supplemental information from a coded data unit. The information is codec-dependent. sl@0: @param "aData" "The supplemental data. The reference is only valid until the method sl@0: returns, and thus the data must be processed or copied immediately." sl@0: @param "aTimestamp" "The presentation timestamp for the picture that the supplemental data sl@0: is part of." sl@0: @param "aPictureId" "Picture identifier for the picture. If a picture ID is not available, sl@0: aPictureId.iIdType is set to ENone." sl@0: */ sl@0: virtual void MdvpoSupplementalInformation(const TDesC8& aData, sl@0: const TTimeIntervalMicroSeconds& aTimestamp, sl@0: const TPictureId& aPictureId) = 0; sl@0: sl@0: /** sl@0: Back channel information from the decoder, indicating a picture loss without specifying the lost picture. sl@0: */ sl@0: virtual void MdvpoPictureLoss() = 0; sl@0: sl@0: /** sl@0: Back channel information from the decoder, indicating the pictures that have been lost. sl@0: sl@0: @param "aPictures" "Picture identifiers for the lost pictures. The reference is only valid until the sl@0: method returns, and thus the data must be processed or copied immediately." sl@0: */ sl@0: virtual void MdvpoPictureLoss(const TArray& aPictures) = 0; sl@0: sl@0: /** sl@0: Back channel information from the decoder, indicating the loss of consecutive macroblocks in raster sl@0: scan order. sl@0: sl@0: @param "aFirstMacroblock" "The first lost macroblock. The macroblocks are numbered such sl@0: that the macroblock in the upper left corner of the picture is considered sl@0: macroblock number 1 and the number for each macroblock increases from left sl@0: to right and then from top to bottom in raster-scan order." sl@0: @param "aNumMacroblocks" "The number of lost macroblocks that are consecutive in raster-scan order." sl@0: @param "aPicture" "The picture identifier for the picture where the macroblocks were lost. sl@0: If the picture is not known, aPicture.iIdType is set to ENone. The reference sl@0: is only valid until the method returns." sl@0: */ sl@0: virtual void MdvpoSliceLoss(TUint aFirstMacroblock, TUint aNumMacroblocks, const TPictureId& aPicture)= 0; sl@0: sl@0: /** sl@0: Back channel information from the decoder, indicating a reference picture selection request. The sl@0: request is delivered as a coding-standard specific binary message. Reference picture selection can sl@0: be used to select a pervious correctly transmitted picture to use as a reference in case later pictures sl@0: have been lost. sl@0: sl@0: @param "aSelectionData" "The reference picture selection request message. The message format is sl@0: coding-standard specific, and defined separately. The reference is only sl@0: valid until the method returns, and thus the data must be processed or sl@0: copied immediately." sl@0: */ sl@0: virtual void MdvpoReferencePictureSelection(const TDesC8& aSelectionData)= 0; sl@0: sl@0: /** sl@0: Called when a timed snapshot request has been completed. When this method is called, the snapshot sl@0: has been taken, and the memory reserved for the picture can be re-used or freed. sl@0: @param "aError" "An error code, KErrNone if no errors occurred. If an error sl@0: occurred, the data in the snapshot may not be valid, but the sl@0: memory can still be freed." sl@0: @param "aPictureData" "The snapshot picture data." sl@0: @param "aPresentationTimestamp" "The presentation timestamp for the snapshot picture. " sl@0: @param "aPictureId" "Picture identifier for the picture. If a picture ID is not sl@0: available, aPictureId.iIdType is set to ENone." sl@0: */ sl@0: virtual void MdvpoTimedSnapshotComplete(TInt aError, sl@0: TPictureData* aPictureData, sl@0: const TTimeIntervalMicroSeconds& aPresentationTimestamp, sl@0: const TPictureId& aPictureId) = 0; sl@0: sl@0: /** sl@0: Notifies the client that one or more new output pictures are available. The client can then use sl@0: GetNewPictureInfo() and NextPicture() to fetch the pictures. sl@0: */ sl@0: virtual void MdvpoNewPictures() = 0; sl@0: sl@0: /** sl@0: Reports a fatal decoding or playback error to the client. When these errors sl@0: occur, decoding and playback is stopped automatically. The client must sl@0: destroy the CMMFDevVideoPlay object and create a new instance before sl@0: attempting to continue. Note that scenarios have been identified where sl@0: MdvpoFatalError may get referenced at some point during the execution of a sl@0: CMMFDevVideoPlay procedure. Therefore CMMFDevVideoPlay object should be sl@0: deleted outside of MdvpoFatalError context in order to avoid accidental sl@0: access to de-allocated CMMFDevVideoPlay data members. sl@0: sl@0: Note that running out of processing power or encountering corrupted sl@0: bitstream data should not be classified as errors if the decoder and sl@0: post-processor can recover automatically. sl@0: sl@0: @param "aError" "The error code." sl@0: */ sl@0: virtual void MdvpoFatalError(TInt aError) = 0; sl@0: sl@0: /** sl@0: Reports that DevVideoPlay initialization has completed. The interface can now be used for video sl@0: playback. sl@0: @param "aError" "Initialization error code, KErrNone if no error occurred." sl@0: */ sl@0: virtual void MdvpoInitComplete(TInt aError) = 0; sl@0: sl@0: /** sl@0: Reports that the input video stream end has been reached and all pictures have been processed. sl@0: This method is only called after the client has called InputEnd(). No more output pictures will sl@0: be available. sl@0: */ sl@0: virtual void MdvpoStreamEnd() = 0; sl@0: }; sl@0: sl@0: sl@0: #include sl@0: sl@0: #endif