sl@0: // Copyright (c) 2008-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 DEVVIDEOSTANDARDCUSTOMINTERFACES_H sl@0: #define DEVVIDEOSTANDARDCUSTOMINTERFACES_H sl@0: sl@0: #include sl@0: #include sl@0: sl@0: /** sl@0: MMmfVideoMediaProtected interface UID. sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: const TUid KUidMmfVideoMediaProtected = { 0x10273827 }; sl@0: sl@0: /** sl@0: Used to notify a video rendering media device that the data can only be passed to a secure output. sl@0: Typically used for DRM-protected content and implemented on video decoding or post-processing media sl@0: device where insecure video outputs could be used. sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: class MMmfVideoMediaProtected sl@0: { sl@0: public: sl@0: /** sl@0: Notifies a media device if the content is protected, with the intent that it may only be sent to a secure output. sl@0: sl@0: The device display is typically considered a secure output, but a high-quality unprotected analogue sl@0: or digital video output connector is not. sl@0: Once protection has been indicated, playback could fail when Start() is called or at any time sl@0: during playback. The failure is reported using MdvpoFatalError(KErrorOutputUnsecured), if the current output sl@0: has been switched to an insecure output. sl@0: sl@0: @param aProtected Set to ETrue if the content can only be sent to a secure output, sl@0: EFalse if both secure and non-secure outputs can be used. By default all content can be sent to sl@0: both secure and insecure outputs. (aProtected == EFalse) sl@0: @leave KErrNotSupported Secure outputs are not supported. The client should not play protected content. sl@0: */ sl@0: virtual void MmvsoMediaIsProtectedL(TBool aProtected) = 0; sl@0: }; sl@0: sl@0: /*****************************************************************************/ sl@0: /** sl@0: KUidMmfVideoInputSnapshot interface UID. sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: const TUid KUidMmfVideoInputSnapshot = { 0x10204beb }; sl@0: /** sl@0: The callback interface used by MMmfVideoInputSnapshot to notify snapshot completion. sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: class MMmfVideoInputSnapshotObserver sl@0: { sl@0: public: sl@0: /** sl@0: The callback method that the observer should implement to receive notifications sl@0: from the MMmfVideoInputSnapshot implementation. sl@0: @param aError One of the system wide error codes. sl@0: */ sl@0: virtual void SnapshotComplete(TInt aError) = 0; sl@0: }; sl@0: sl@0: /** sl@0: Single frame capture support for video recording media devices. sl@0: sl@0: The interface is typically implemented in pre-processing and encoding media devices with direct capture support. sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: class MMmfVideoInputSnapshot sl@0: { sl@0: public: sl@0: /** sl@0: Sets the observer object to use for snapshot complete callbacks. sl@0: sl@0: This method can be called both before and after the media device has been initialised with InitializeL(). sl@0: It must be called before GetSnapshotL() is called for the first time. sl@0: @param aObserver A pointer to the observer object to use. sl@0: */ sl@0: virtual void MmvisSetObserver(MMmfVideoInputSnapshotObserver* aObserver) = 0; sl@0: sl@0: /** sl@0: Grabs a duplicate of the next input frame. This method is asynchronous; the media device will call sl@0: MMmfVideoInputSnapshotObserver::SnapshotComplete() when the picture is available. sl@0: sl@0: This method may only be called after the media device has been initialised with InitialiseL() sl@0: and after Start() has been called. The request can be cancelled with CancelSnapshot(). Some implementations sl@0: may not support format conversions or scaling for snapshot images. sl@0: sl@0: @param aPictureData Target picture. The memory for the picture must be allocated by the caller and sl@0: initialised properly. The data formats must match the snapshot format requested. sl@0: @param aFormat A reference to the picture format structure that indicates the snapshot format to use. sl@0: sl@0: @leave KErrNotSupported The requested data format or picture size is not supported. sl@0: sl@0: @pre This method can only be called after the media device has been initialized with InitializeL() sl@0: and the MMmfVideoInputSnapshotObserver has been set. sl@0: */ sl@0: virtual void MmvisGetSnapshotL(TPictureData& aPictureData, const TUncompressedVideoFormat& aFormat) = 0; sl@0: sl@0: /** sl@0: Cancels an outstanding snapshot request. sl@0: sl@0: If there is no active request pending then this call is ignored. sl@0: */ sl@0: virtual void MmvisCancelSnapshot() = 0; sl@0: }; sl@0: sl@0: /*****************************************************************************/ sl@0: /** sl@0: MMmfVideoPlayHWDeviceColourInfoCustomHeader interface UID. sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: const TUid KUidMmfVideoPlayHWDeviceColourInfoCustomHeader = { 0x10273828 }; sl@0: sl@0: /** sl@0: Interface support for the HW Device Plug-in to supply colour space and pixel aspect ratio information to the controller sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: class MMmfVideoPlayHWDeviceColourInfoCustomHeader sl@0: { sl@0: public: sl@0: /** sl@0: Reads colour space data format information from a coded data unit. Returns the colour space, data sl@0: range and pixel aspect ratio used in the bitstream. sl@0: sl@0: @param aDataUnitType The type of coded data unit that is contained in aDataUnit. If the data is a sl@0: simple piece of bitstream, use EDuArbitraryStreamSection. sl@0: @param aDataUnitEncapsulation The encapsulation type used for the coded data. If the data is a simple sl@0: piece of bitstream, use EDuElementaryStream. sl@0: @param aDataUnit The coded data unit, contained in a TVideoInputBuffer. sl@0: @param aYuvFormat Target data structure for data format information. The media device will fill the sl@0: iCoefficients, iPattern, iAspectRatioNum, and iAspectRatioDenum fields. sl@0: @leave KErrNotSupported The data is not in a supported format. sl@0: @leave KErrCorrupt The data appears to be in a supported format, but is corrupted. sl@0: */ sl@0: virtual void MmvpciGetColourSpaceHeaderInfoL(TVideoDataUnitType& aDataUnitType, sl@0: TVideoDataUnitEncapsulation& aDataUnitEncapsulation, sl@0: TVideoInputBuffer* aDataUnit, TYuvFormat& aYuvFormat) = 0; sl@0: }; sl@0: sl@0: /*****************************************************************************/ sl@0: /** sl@0: MMmfVideoHwDevClientNotifier interface UID. sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: const TUid KUidMmfVideoHwDevVideoPolicyExtension = {0x101FBFC3}; sl@0: sl@0: /** sl@0: This class needs to be inherited by the video client. This is so that the video client will sl@0: receive a notification if its access has been revoked. sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: class MMmfVideoHwDevClientNotifier sl@0: { sl@0: public: sl@0: /** sl@0: Method to allow notification to the video client that their access to the video driver has been sl@0: revoked and their access to the video resources has already been removed. VideoAccessRevoked can sl@0: be called anytime after Initialize() has been called. sl@0: sl@0: Once called it means that the video client should no longer be inputting any data. sl@0: The only thing the video client can do at this stage is destroy the MDF plug-in. sl@0: */ sl@0: virtual void MmvhcnVideoAccessRevoked() = 0 ; sl@0: sl@0: /** sl@0: Method to allow notification to the video client that they need to release the video resources. sl@0: This allows the client slightly more control over their release process behaviour. sl@0: sl@0: ReleaseVideoResource can be called anytime after Initialize has been called. Once called it sl@0: means that the video client needs to either call InputEnd() or Stop() to release the video resource sl@0: */ sl@0: virtual void MmvhcnReleaseVideoResource() = 0; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: Custom extension to allow MMF controller to set video policy priority preference. sl@0: sl@0: Acceptable Priorities range from -100 to 100. sl@0: sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: class MMmfVideoHwDeviceVideoPolicyExtension sl@0: { sl@0: public: sl@0: /** sl@0: Video client should call this function so that the MDF plugins will have a handle to the video client. sl@0: This is required so that the MDF plugin can notify the video client if their access has been revoked. sl@0: sl@0: @param aClient Pointer to the video client sl@0: */ sl@0: virtual void MmvhvpeSetVideoClient(MMmfVideoHwDevClientNotifier* aClient) = 0; sl@0: sl@0: /** sl@0: Allows the video client to specify the video priority they wish their process to have for their sl@0: video request. This may or may not be honoured depending upon the client process's platform security capabilities. sl@0: sl@0: @param aPriority Preferred priority for video processing into the video manager. sl@0: */ sl@0: virtual void MmvhvpeSetVideoPriority(TInt aPriority) = 0; sl@0: }; sl@0: sl@0: /*****************************************************************************/ sl@0: /** sl@0: MMmfVideoBufferManagement interface UID. sl@0: sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: const TUid KUidMmfVideoBufferManagement = {0x10204bea}; sl@0: sl@0: /** sl@0: An observer class for the buffer management custom interface, MMmfVideoBufferManagement. sl@0: Clients and source media devices using the interface must implement this class. sl@0: sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: class MMmfVideoBufferManagementObserver sl@0: { sl@0: public: sl@0: /** sl@0: Notifies the observer that one or more new input buffers are available. The client can then sl@0: use MMmfVideoBufferManagement:: MmvbmGetBufferL() to get a buffer. sl@0: */ sl@0: virtual void MmvbmoNewBuffers() = 0; sl@0: sl@0: /** sl@0: Notifies the observer all outstanding input buffers must be released immediately. The client sl@0: must synchronously call MMmfVideoBufferManagement:: MmvbmReleaseBuffer() for each of the buffers sl@0: it has allocated but not returned before returning from this method. It is intended that this method sl@0: is used when the target media device loses access to the buffers, as a result of a Direct Screen Access sl@0: abort, resource management override, or media device destruction. sl@0: */ sl@0: virtual void MmvbmoReleaseBuffers() = 0; sl@0: }; sl@0: sl@0: /** sl@0: Enables target media devices to allocate input data buffers for uncompressed data. sl@0: sl@0: Client applications and source media devices can therefore write the input data directly sl@0: into a suitable memory area that the target media device can use, possibly eliminating one extra sl@0: memory copy from the data path. This is especially important with hardware implementations, where the sl@0: target hardware may only have access to specially allocated memory that only the media device can allocate. sl@0: sl@0: The interface is typically implemented in pre-processing, encoding, and post-processing media devices. sl@0: It is mainly used for video encoder memory buffer input in applications like video editors and when sl@0: using hardware-accelerated post-processors with software video decoders. sl@0: sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: class MMmfVideoBufferManagement sl@0: { sl@0: public: sl@0: /** sl@0: Used to signal the buffer options used. sl@0: */ sl@0: class TBufferOptions sl@0: { sl@0: public: sl@0: /** sl@0: The number of input buffers that the media device has. This is the number of buffers the sl@0: client can request through GetBufferL() before writing any back. sl@0: */ sl@0: TUint iNumInputBuffers; sl@0: sl@0: /** sl@0: Buffer size in pixels. This should match the input data picture size, optionally with padding to sl@0: meet coding standard requirements. sl@0: */ sl@0: TSize iBufferSize; sl@0: }; sl@0: sl@0: /** sl@0: Sets the observer object to use. The observer gets notified when new buffers are available sl@0: and when buffers need to be released back to the media device. sl@0: sl@0: This method can only be called before the media device has been initialised with InitializeL(). sl@0: sl@0: @param aObserver The observer object to use. sl@0: */ sl@0: virtual void MmvbmSetObserver(MMmfVideoBufferManagementObserver* aObserver) = 0; sl@0: sl@0: /** sl@0: Enables input buffer management mode. In buffer management mode the target media device allocates sl@0: memory for input buffers and the client can only use input buffers allocated with GetBufferL(). sl@0: sl@0: This method can only be called before the media device has been initialised with InitializeL(). sl@0: This method must be called if the client uses GetBufferL(). sl@0: sl@0: @param aEnable ETrue if input buffer management mode is used. sl@0: */ sl@0: virtual void MmvbmEnable(TBool aEnable) = 0; sl@0: sl@0: /** sl@0: Sets the buffer options to use. The client can request the number of input buffers that should sl@0: be available, but typically only few (one or two) buffers can be used. sl@0: sl@0: This method can only be called before the media device has been initialised with InitializeL(). sl@0: sl@0: @param aOptions The buffer options to use. sl@0: @see TBufferOptions. sl@0: sl@0: @leave KErrNotSupported The requested buffer options are not supported. Typically the client sl@0: has requested too many input buffers. sl@0: */ sl@0: virtual void MmvbmSetBufferOptionsL(const TBufferOptions& aOptions) = 0; sl@0: sl@0: /** sl@0: Gets the buffer options currently in use. sl@0: sl@0: This method can only be called before the media device has been initialised with InitializeL(). sl@0: sl@0: @param aOptions Target buffer options data structure. sl@0: */ sl@0: virtual void MmvbmGetBufferOptions(TBufferOptions& aOptions) = 0; sl@0: sl@0: /** sl@0: Gets a new input picture buffer. The client can then write data into the buffer and write it back sl@0: to the media device with WritePictureL(). After the media device has processed the TVideoPicture and sl@0: no longer needs any data from the buffer, it will notify the client by calling ReturnPicture(). sl@0: sl@0: This method can only be called after the media device has been initialised with InitializeL(). This sl@0: method can only be called in buffer management mode, i.e. if the client has called Enable(ETrue). sl@0: sl@0: Note that target-allocated and client-allocated input buffers cannot be mixed. In buffer management mode sl@0: only input buffers allocated with this method can be sent to the media device. sl@0: sl@0: If a client has retrieved buffers with GetBufferL(), it must be prepared to release them synchronously at sl@0: any point if MmmfBufferManagementObserver::ReleaseBuffers() is called. This may happen if the target media sl@0: device suddenly loses access to the buffers due to DSA abort, resource management conflict, or media device sl@0: destruction. sl@0: sl@0: The returned TVideoPicture object will have iHeader and iLayerBitRates set to NULL. The client can sl@0: allocate memory for those fields, and any data they may contain (such as TVideoPictureHeader::iOptional) sl@0: and set the pointers accordingly before writing the buffer back to the target media device. The memory must sl@0: remain valid and accessible until the media device returns the buffer with ReturnPicture(), at which time the sl@0: client can free or reuse the memory. sl@0: sl@0: @param aSize The requested buffer size, in pixels. The buffer size should match the picture size set at sl@0: initialisation phase, or otherwise a suitable buffer may not be available. If the size is smaller than sl@0: the size set at initialisation phase, the allocated buffer may be larger than requested. sl@0: sl@0: @return A new input picture buffer. If no free buffers are available, the return value is NULL. sl@0: sl@0: @leave KErrGeneral The method will leave only if an error occurs. Note: Lack of free buffers is not sl@0: considered an error. sl@0: */ sl@0: virtual TVideoPicture* MmvbmGetBufferL(const TSize& aSize) = 0; sl@0: sl@0: /** sl@0: Releases an input buffer back to the media device without using it. This method is mainly used as a sl@0: response to a ReleaseBuffers() callback. sl@0: sl@0: @param aBuffer The buffer to release. sl@0: */ sl@0: virtual void MmvbmReleaseBuffer(TVideoPicture* aBuffer) = 0; sl@0: }; sl@0: sl@0: /*****************************************************************************/ sl@0: /** sl@0: MMmfVideoWindowControl Custom Interface UID. sl@0: sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: const TUid KUidMmfVideoWindowControl = { 0x10282646 }; sl@0: sl@0: /** sl@0: Enables the client to control video position using a logical video window, sl@0: and specify the exact location of the picture within that window. sl@0: The logical video window may be partially or completely off-screen. sl@0: sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: class MMmfVideoWindowControl sl@0: { sl@0: public: sl@0: /** sl@0: Horizontal alignment constants. sl@0: */ sl@0: enum THorizAlign sl@0: { sl@0: /** sl@0: The picture is horizontally centered. sl@0: */ sl@0: EHorizAlignCenter, sl@0: /** sl@0: The picture is horizontally left-aligned. sl@0: */ sl@0: EHorizAlignLeft, sl@0: /** sl@0: The picture is horizontally right-aligned. sl@0: */ sl@0: EHorizAlignRight sl@0: }; sl@0: sl@0: /** sl@0: Vertical alignment constants. sl@0: */ sl@0: enum TVertAlign sl@0: { sl@0: /** sl@0: The picture is vertically centered. sl@0: */ sl@0: EVertAlignCenter, sl@0: /** sl@0: The picture is vertically top-aligned. sl@0: */ sl@0: EVertAlignTop, sl@0: /** sl@0: The picture is vertically bottom-aligned. sl@0: */ sl@0: EVertAlignBottom sl@0: }; sl@0: sl@0: /** sl@0: Sets the logical video window to use for positioning the video sl@0: picture on the screen. By default the logical video window is the same sl@0: as the display video window set with StartDirectScreenAccessL(). sl@0: sl@0: @param aWindow Logical window rectangle, relative to the device display. sl@0: */ sl@0: virtual void MmvwcSetLogicalVideoWindow(const TRect& aWindow) = 0; sl@0: sl@0: /** sl@0: Sets the offset where the video picture will be located in the sl@0: logical video window. By default the picture is centered in the window sl@0: if its content and window sizes do not match. sl@0: sl@0: This method and MmvwcSetContentAlignment() are mutually exclusive, and sl@0: only one of them should be used. Calling one will override the settings sl@0: made by the other. sl@0: sl@0: If an error occurs, this function leaves with any of the system sl@0: wide error codes. Common error codes are listed below. sl@0: sl@0: @param aOffset Offset, the position of the upper left hand corner of the sl@0: picture relative to the upper left hand corner of the sl@0: logical window. The picture must be fully contained within the sl@0: window. sl@0: sl@0: @leave KErrArgument The picture is not fully contained within the window. sl@0: */ sl@0: virtual void MmvwcSetContentOffsetL(const TPoint& aOffset) = 0; sl@0: sl@0: /** sl@0: Sets video picture alignment within the logical video window. sl@0: By default the picture is centered in the window sl@0: if its content and window sizes do not match. sl@0: sl@0: This method and MmvwcSetContentOffsetL() are mutually exclusive, and sl@0: only one of them should be used. Calling one will override the settings sl@0: made by the other. sl@0: sl@0: @param aHorizAlign Horizontal alignment within the logical window sl@0: @param aVertAlign Vertical alignment within the logical window sl@0: */ sl@0: virtual void MmvwcSetContentAlignment(const THorizAlign aHorizAlign, const TVertAlign aVertAlign) = 0; sl@0: }; sl@0: sl@0: /*****************************************************************************/ sl@0: /** sl@0: KUidMmfVideoResourceManagement Custom Interface UID. sl@0: sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: const TUid KUidMmfVideoResourceManagement = { 0x1028264B }; sl@0: sl@0: /** sl@0: Video resource observer interface, implemented by clients using the sl@0: MMmfVideoResourceHandler custom interface. sl@0: sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: class MMmfVideoResourceObserver sl@0: { sl@0: public: sl@0: /** sl@0: Indicates that a media device has lost its resources. The client must sl@0: synchronously pause or stop processing before returning from this method sl@0: so that the media device can release its resources to the system. If sl@0: the client does not pause or stop, resource loss will be handled as a sl@0: fatal error. sl@0: sl@0: If the client is holding any buffers allocated by the media sl@0: device, such as video decoder input or output buffers, it must sl@0: synchronously return them before returning from this sl@0: method. Additionally, in video playback use, the client must empty sl@0: any queued output pictures from DevVideoPlay by repeatedly calling sl@0: CMMFDevVideoPlay::NextPictureL() and sl@0: CMMFDevVideoPlay::ReturnPicture() until no more pictures are sl@0: available. sl@0: sl@0: The client may start again or resume after receiving a sl@0: MmvroResourcesRestored() callback. sl@0: sl@0: @param aMediaDevice UID for the media device that lost resources. The sl@0: client can use this for example to determine whether sl@0: the decoder or the post-processor lost resources. sl@0: This is typically not required though since the client sl@0: must pause DevVideo entirely. sl@0: */ sl@0: virtual void MmvroResourcesLost(TUid aMediaDevice) = 0; sl@0: sl@0: /** sl@0: Indicates that a media device has regained its resources after a sl@0: previous resource loss. The client can restart or resume processing. sl@0: This can be done either synchronously or asynchronously. sl@0: sl@0: @param aMediaDevice UID for the media device that regained resources. sl@0: */ sl@0: virtual void MmvroResourcesRestored(TUid aMediaDevice) = 0; sl@0: }; sl@0: sl@0: sl@0: sl@0: /** sl@0: Video hardware resource handler custom interface. sl@0: sl@0: Video decoder, encoder, pre or post-processor media devices can implement sl@0: this interface. Clients can use this interface to register for resource sl@0: management notifications and to set resource management priorities. sl@0: sl@0: This custom interface is only intended for media devices that can save sl@0: their internal state as resources are lost, making resource loss recoverable. sl@0: As such it is not appropriate for all media devices. sl@0: sl@0: By default resource loss is considered a fatal error. Clients can sl@0: use the notification callbacks to pause or stop processing when resources sl@0: are lost and restart or resume when resources are available again, thus sl@0: avoiding errors and providing a better user experience. sl@0: sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: class MMmfVideoResourceHandler sl@0: { sl@0: public: sl@0: /** sl@0: Sets the video resource observer to use. The observer will receive sl@0: resource loss and restore callbacks. If no observer has been set, sl@0: resources losses will be handled as fatal errors. sl@0: sl@0: @param aObserver The observer to use, NULL to remove observer. sl@0: */ sl@0: virtual void MmvrhSetObserver(MMmfVideoResourceObserver* aObserver) = 0; sl@0: }; sl@0: sl@0: /*****************************************************************************/ sl@0: /** sl@0: KUidMmfVideoResourcePriority Custom Interface UID. sl@0: sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: const TUid KUidMmfVideoResourcePriority = { 0x1028264C }; sl@0: sl@0: /** sl@0: Video resource priority control custom interface. sl@0: sl@0: Video decoder, encoder, pre or post-processor media devices can implement sl@0: this interface. Clients can use this interface to set resource reservation sl@0: priority for the media device. Typically this interface is used to lower sl@0: the priority for background tasks to ensure they do not remove resources sl@0: from foreground applications. sl@0: sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: class MMmfVideoResourcePriority sl@0: { sl@0: public: sl@0: /** sl@0: Sets the priority the media device uses to reserve resources. sl@0: Media devices with higher priority may override requests from ones sl@0: with a lower priority. This method can be called at any point, but sl@0: implementations may ignore it after initialization. Therefore clients sl@0: should call this before calling Initialize(). sl@0: sl@0: The behaviour of the underlying resource manager and policy is sl@0: implementation-specific. Most implementations will limit high sl@0: priorities to clients that have certain capabilities sl@0: (for example, MultimediaDD) or specific Vendor IDs only. sl@0: All implementations should do some policing to ensure untrusted sl@0: applications cannot block the system by allocating all available sl@0: resources at a high priority. sl@0: sl@0: @param aPriority Resource management priority. The values use the same sl@0: range as TMdaPriority. sl@0: */ sl@0: virtual void MmvpSetResourcePriority(TInt aPriority) = 0; sl@0: }; sl@0: sl@0: /*****************************************************************************/ sl@0: /** sl@0: KUidMmfVideoPropertiesManagement Custom Interface UID. sl@0: sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: const TUid KUidMmfVideoPropertiesManagement = { 0x10283231 }; sl@0: sl@0: /** sl@0: Video property change observer. DevVideoPlay clients or media devices can sl@0: implement this observer and use the MMmfVideoPropertiesNotifier extension sl@0: to receive notifications when decoded video properties (such as picture sl@0: size and pixel aspect ratio) change. sl@0: sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: class MMmfVideoPropertiesObserver sl@0: { sl@0: public: sl@0: /** sl@0: Decoded video properties updated. The media device implementing the sl@0: MMmfVideoPropertiesNotifier extension will call this method immediately sl@0: before outputting a picture with the updated properties. sl@0: sl@0: When the extension is used between a decoder and a post-processor media sl@0: device, the post-processor can associate the changed properties with the sl@0: correct picture, since the next incoming picture after this call will sl@0: be the first updated one. sl@0: sl@0: When the extension is used between a DevVideoPlay client and a sl@0: post-processor media device, the client can synchronously reconfigure sl@0: video display options using SetScaleOptionsL() and related methods. This sl@0: lets the client reconfigure the display for the correct picture. sl@0: sl@0: @param aYuvFormat Updated YUV format parameters. The updated fields are sl@0: iAspectRatioDenom, iAspectRatioNum, and iCoefficients sl@0: @param aPictureSize Updated picture size. This size will be the true sl@0: picture display size, excluding any padding that sl@0: the codec might use. sl@0: */ sl@0: virtual void MmvpoUpdateVideoProperties(const TYuvFormat& aYuvFormat, const TSize& aPictureSize) = 0; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: Video property notifier extension. DevVideoPlay decoders and post-processor sl@0: can implement this extension to provide notifications when decoded video sl@0: picture properties such as size or pixel aspect ratio change. The extension sl@0: is typically used to get size and pixel aspect ratio updates from a decoder sl@0: to a post-processor media device, and from a post-processor to the sl@0: DevVideoPlay client. sl@0: sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: class MMmfVideoPropertiesNotifier sl@0: { sl@0: public: sl@0: /** sl@0: Sets a new video properties observer. This method can be called at any sl@0: time after the media device has been instantiated. sl@0: sl@0: @param aObserver New observer object. sl@0: */ sl@0: virtual void MmvpnSetObserver(MMmfVideoPropertiesObserver* aObserver) = 0; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: KUidMmfVideoH324AnnexKMode Custom Interface UID. sl@0: sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: const TUid KUidMmfVideoH324AnnexKMode = { 0x102836C2 }; sl@0: sl@0: /** sl@0: Video encoder H.324M Annex K mode extension. DevVideoRecord MPEG-4 and H.264 sl@0: encoders can implement this extension to support using ITu-T H.324 Annex K sl@0: encoding parameters. sl@0: sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: class MMmfVideoH324AnnexKMode sl@0: { sl@0: public: sl@0: /** sl@0: * Enables or disables encoder ITU-T H.324M Annex K mode. This method sl@0: * is only applicable for MPEG-4 and H.264 video. sl@0: * sl@0: * When the encoder is in Annex K mode, it will use the encoding sl@0: * parameters and bitstream headers defined in ITU-T H.324M Annex sl@0: * K. Enabling Annex K mode will reset all the specified settings sl@0: * apart from picture size and output format to the values sl@0: * specified in Annex K. This includes codec profile and level, sl@0: * maximum bit rate, and other encoding constraints. sl@0: * sl@0: * When Annex K mode is active, the client cannot change encoder settings sl@0: * that would conflict with the ones specified in Annex K. Attempts to do sl@0: * so will cause the corresponding setting methods to fail with sl@0: * KErrNotSupported. sl@0: * sl@0: * Annex K mode can be deactivated by calling this method with a false sl@0: * parameter. This will remove restrictions on encoder settings. sl@0: * sl@0: * This method can only be called before the encoder is sl@0: * initialized. The client should set the input and output formats sl@0: * and picture size before calling this method. sl@0: * sl@0: * If an error occurs this method will fail with a system-wide error code. sl@0: * Typical error codes are listed below. sl@0: * Typically errors are only expected if the current output format or sl@0: * picture size do not meet Annex K constraints. sl@0: * sl@0: * @param aAnnexKMode ETrue to enable H.324M Annex K mode, EFalse to sl@0: * disable it sl@0: * sl@0: * @pre The client has called SelectEncoderL(), SetOutputFormatL(), and sl@0: * SetInputFormatL(). This method can only be called before sl@0: * Initialize(). sl@0: * sl@0: * @leave KErrNotSupported Annex K mode cannot be supported with the sl@0: * current settings. Possible causes are incorrect sl@0: * output format (not MPEG-4 or H.264) or picture sl@0: * size (not QCIF). sl@0: */ sl@0: virtual void MmvhakmSetH324MAnnexKModeL(TBool aAnnexKMode) = 0; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: MMmfVideoClientThreadInfo interface UID. sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: const TUid KMmfUidDevVideoClientThreadInfoCustomInterface = {0x102834A9}; sl@0: sl@0: /** sl@0: @publishedPartner sl@0: @released sl@0: sl@0: Custom interface providing support for setting the client thread info for the DevVideo. sl@0: */ sl@0: class MMmfVideoClientThreadInfo sl@0: { sl@0: public: sl@0: /** sl@0: Set client thread info for the DevVideo. sl@0: sl@0: @param aTid the client thread Id. sl@0: @return An error code indicating if the function call was successful. sl@0: */ sl@0: virtual TInt MmvctSetClientThreadInfo(TThreadId aTid) = 0; sl@0: }; sl@0: sl@0: sl@0: #endif