os/mm/mmhais/videohai/devvideo/inc/devvideostandardcustominterfaces.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/mm/mmhais/videohai/devvideo/inc/devvideostandardcustominterfaces.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,781 @@
     1.4 +// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +#ifndef DEVVIDEOSTANDARDCUSTOMINTERFACES_H
    1.20 +#define DEVVIDEOSTANDARDCUSTOMINTERFACES_H
    1.21 +
    1.22 +#include <e32base.h>
    1.23 +#include <mmf/devvideo/devvideoplay.h>
    1.24 +
    1.25 +/**
    1.26 +MMmfVideoMediaProtected interface UID.
    1.27 +@publishedPartner
    1.28 +@released
    1.29 +*/
    1.30 +const TUid KUidMmfVideoMediaProtected = { 0x10273827 };
    1.31 +
    1.32 +/**
    1.33 +Used to notify a video rendering media device that the data can only be passed to a secure output. 
    1.34 +Typically used for DRM-protected content and implemented on video decoding or post-processing media 
    1.35 +device where insecure video outputs could be used.
    1.36 +@publishedPartner
    1.37 +@released
    1.38 +*/
    1.39 +class MMmfVideoMediaProtected
    1.40 +    {
    1.41 +public:
    1.42 +	/**
    1.43 +	Notifies a media device if the content is protected, with the intent that it may only be sent to a secure output.
    1.44 +
    1.45 +	The device display is typically considered a secure output, but a high-quality unprotected analogue 
    1.46 +	or digital video output connector is not. 
    1.47 +	Once protection has been indicated, playback could fail when Start() is called or at any time 
    1.48 +	during playback. The failure is reported using MdvpoFatalError(KErrorOutputUnsecured), if the current output 
    1.49 +	has been switched to an insecure output.
    1.50 +
    1.51 +	@param aProtected Set to ETrue if the content can only be sent to a secure output, 
    1.52 +	EFalse if both secure and non-secure outputs can be used. By default all content can be sent to 
    1.53 +	both secure and insecure outputs. (aProtected == EFalse)
    1.54 +	@leave KErrNotSupported Secure outputs are not supported. The client should not play protected content.
    1.55 +	*/
    1.56 +    virtual void MmvsoMediaIsProtectedL(TBool aProtected) = 0;
    1.57 +    };
    1.58 +
    1.59 +/*****************************************************************************/
    1.60 +/**
    1.61 +KUidMmfVideoInputSnapshot interface UID.
    1.62 +@publishedPartner
    1.63 +@released
    1.64 +*/
    1.65 +const TUid KUidMmfVideoInputSnapshot = { 0x10204beb };
    1.66 +/**
    1.67 +The callback interface used by MMmfVideoInputSnapshot to notify snapshot completion.
    1.68 +@publishedPartner
    1.69 +@released
    1.70 +*/
    1.71 +class MMmfVideoInputSnapshotObserver
    1.72 +    {
    1.73 +public:
    1.74 +	/**
    1.75 +	The callback method that the observer should implement to receive notifications
    1.76 +	from the MMmfVideoInputSnapshot implementation.
    1.77 +	@param aError One of the system wide error codes.
    1.78 +	*/
    1.79 +    virtual void SnapshotComplete(TInt aError) = 0;
    1.80 +    };
    1.81 +	
    1.82 +/**
    1.83 +Single frame capture support for video recording media devices.
    1.84 +
    1.85 +The interface is typically implemented in pre-processing and encoding media devices with direct capture support.
    1.86 +@publishedPartner
    1.87 +@released
    1.88 +*/
    1.89 +class MMmfVideoInputSnapshot
    1.90 +    {
    1.91 +public:
    1.92 +	/**
    1.93 +	Sets the observer object to use for snapshot complete callbacks.
    1.94 +
    1.95 +	This method can be called both before and after the media device has been initialised with InitializeL(). 
    1.96 +	It must be called before GetSnapshotL() is called for the first time.
    1.97 +	@param aObserver A pointer to the observer object to use.
    1.98 +	*/
    1.99 +	virtual void MmvisSetObserver(MMmfVideoInputSnapshotObserver* aObserver) = 0;
   1.100 +
   1.101 +	/**
   1.102 +	Grabs a duplicate of the next input frame. This method is asynchronous; the media device will call 
   1.103 +	MMmfVideoInputSnapshotObserver::SnapshotComplete() when the picture is available. 
   1.104 +
   1.105 +	This method may only be called after the media device has been initialised with InitialiseL() 
   1.106 +	and after Start() has been called. The request can be cancelled with CancelSnapshot(). Some implementations 
   1.107 +	may not support format conversions or scaling for snapshot images. 
   1.108 +
   1.109 +	@param	aPictureData	Target picture. The memory for the picture must be allocated by the caller and 
   1.110 +			initialised properly. The data formats must match the snapshot format requested.
   1.111 +	@param	aFormat A reference to the picture format structure that indicates the snapshot format to use.
   1.112 +
   1.113 +	@leave	KErrNotSupported The requested data format or picture size is not supported.
   1.114 +
   1.115 +	@pre	This method can only be called after the media device has been initialized with InitializeL() 
   1.116 +			and the MMmfVideoInputSnapshotObserver has been set.
   1.117 +	*/
   1.118 +	virtual void MmvisGetSnapshotL(TPictureData& aPictureData, const TUncompressedVideoFormat& aFormat) = 0;
   1.119 +   
   1.120 +	/**
   1.121 +	Cancels an outstanding snapshot request.
   1.122 +
   1.123 +	If there is no active request pending then this call is ignored.
   1.124 +	*/
   1.125 +	virtual void MmvisCancelSnapshot() = 0;
   1.126 +    };
   1.127 +
   1.128 +/*****************************************************************************/
   1.129 +/**
   1.130 +MMmfVideoPlayHWDeviceColourInfoCustomHeader interface UID.
   1.131 +@publishedPartner
   1.132 +@released
   1.133 +*/
   1.134 +const TUid KUidMmfVideoPlayHWDeviceColourInfoCustomHeader = { 0x10273828 };
   1.135 +
   1.136 +/**
   1.137 +Interface support for the HW Device Plug-in to supply colour space and pixel aspect ratio information to the controller
   1.138 +@publishedPartner
   1.139 +@released
   1.140 +*/
   1.141 +class MMmfVideoPlayHWDeviceColourInfoCustomHeader
   1.142 +	{
   1.143 +public:
   1.144 +	/**
   1.145 +	 Reads colour space data format information from a coded data unit. Returns the colour space, data 
   1.146 +	 range and pixel aspect ratio used in the bitstream.
   1.147 +	 
   1.148 +	 @param aDataUnitType The type of coded data unit that is contained in aDataUnit. If the data is a 
   1.149 +	 		simple piece of bitstream, use EDuArbitraryStreamSection.
   1.150 +	 @param aDataUnitEncapsulation The encapsulation type used for the coded data. If the data is a simple 
   1.151 +	 		piece of bitstream, use EDuElementaryStream.
   1.152 +	 @param aDataUnit The coded data unit, contained in a TVideoInputBuffer.
   1.153 +	 @param aYuvFormat Target data structure for data format information. The media device will fill the 
   1.154 +	 		iCoefficients, iPattern, iAspectRatioNum, and iAspectRatioDenum fields.
   1.155 +	 @leave KErrNotSupported The data is not in a supported format.
   1.156 +	 @leave KErrCorrupt The data appears to be in a supported format, but is corrupted.
   1.157 +	 */
   1.158 +	virtual void MmvpciGetColourSpaceHeaderInfoL(TVideoDataUnitType& aDataUnitType,
   1.159 +												TVideoDataUnitEncapsulation& aDataUnitEncapsulation, 
   1.160 +												TVideoInputBuffer* aDataUnit, TYuvFormat& aYuvFormat) = 0;
   1.161 +	};
   1.162 +
   1.163 +/*****************************************************************************/
   1.164 +/**
   1.165 +MMmfVideoHwDevClientNotifier interface UID.
   1.166 +@publishedPartner
   1.167 +@released
   1.168 +*/
   1.169 +const TUid KUidMmfVideoHwDevVideoPolicyExtension = {0x101FBFC3};
   1.170 +
   1.171 +/**
   1.172 +This class needs to be inherited by the video client. This is so that the video client will
   1.173 +receive a notification if its access has been revoked. 
   1.174 +@publishedPartner
   1.175 +@released
   1.176 +*/
   1.177 +class MMmfVideoHwDevClientNotifier
   1.178 +	{
   1.179 +public:
   1.180 +	/**
   1.181 +	Method to allow notification to the video client that their access to the video driver has been 
   1.182 +	revoked and their access to the video resources has already been removed. VideoAccessRevoked can 
   1.183 +	be called anytime after Initialize()  has been called.
   1.184 +
   1.185 +	Once called it means that the video client should no longer be inputting any data.
   1.186 +	The only thing the video client can do at this stage is destroy the MDF plug-in. 
   1.187 +	*/
   1.188 +	virtual void MmvhcnVideoAccessRevoked() = 0 ;
   1.189 +	
   1.190 +	/**
   1.191 +	Method to allow notification to the video client that they need to release the video resources. 
   1.192 +	This allows the client slightly more control over their release process behaviour. 
   1.193 +
   1.194 +	ReleaseVideoResource can be called anytime after Initialize has been called. Once called it 
   1.195 +	means that the video client needs to either call InputEnd() or Stop() to release the video resource
   1.196 +	*/
   1.197 +	virtual void MmvhcnReleaseVideoResource() = 0;
   1.198 +	};
   1.199 +
   1.200 +	
   1.201 +/**
   1.202 +Custom extension to allow MMF controller to set video policy priority preference.
   1.203 +
   1.204 +Acceptable Priorities range from -100 to 100.
   1.205 +
   1.206 +@publishedPartner
   1.207 +@released
   1.208 +*/
   1.209 +class MMmfVideoHwDeviceVideoPolicyExtension
   1.210 +	{
   1.211 +public:
   1.212 +	/**
   1.213 +	Video client should call this function so that the MDF plugins will have a handle to the video client. 
   1.214 +	This is required so that the MDF plugin can notify the video client if their access has been revoked.
   1.215 +
   1.216 +	@param aClient Pointer to the video client 
   1.217 +	*/
   1.218 +	virtual void MmvhvpeSetVideoClient(MMmfVideoHwDevClientNotifier* aClient) = 0;
   1.219 +
   1.220 +	/**
   1.221 +	Allows the video client to specify the video priority they wish their process to have for their 
   1.222 +	video request. This may or may not be honoured depending upon the client process's platform security capabilities.
   1.223 +
   1.224 +	@param aPriority Preferred priority for video processing into the video manager.
   1.225 +	*/
   1.226 +	virtual void MmvhvpeSetVideoPriority(TInt aPriority) = 0;  
   1.227 +	};	
   1.228 +
   1.229 +/*****************************************************************************/
   1.230 +/**
   1.231 +MMmfVideoBufferManagement interface UID.
   1.232 +
   1.233 +@publishedPartner
   1.234 +@released
   1.235 +*/
   1.236 +const TUid KUidMmfVideoBufferManagement = {0x10204bea};
   1.237 +
   1.238 +/**
   1.239 +An observer class for the buffer management custom interface, MMmfVideoBufferManagement. 
   1.240 +Clients and source media devices using the interface must implement this class. 
   1.241 +
   1.242 +@publishedPartner
   1.243 +@released
   1.244 +*/
   1.245 +class MMmfVideoBufferManagementObserver
   1.246 +	{
   1.247 +public:
   1.248 +	/**
   1.249 +	Notifies the observer that one or more new input buffers are available. The client can then 
   1.250 +	use MMmfVideoBufferManagement:: MmvbmGetBufferL() to get a buffer.
   1.251 +	*/
   1.252 +	virtual void MmvbmoNewBuffers() = 0;
   1.253 +
   1.254 +	/**
   1.255 +	Notifies the observer all outstanding input buffers must be released immediately. The client 
   1.256 +	must synchronously call MMmfVideoBufferManagement:: MmvbmReleaseBuffer() for each of the buffers 
   1.257 +	it has allocated but not returned before returning from this method. It is intended that this method 
   1.258 +	is used when the target media device loses access to the buffers, as a result of a Direct Screen Access 
   1.259 +	abort, resource management override, or media device destruction.
   1.260 +	*/
   1.261 +	virtual void MmvbmoReleaseBuffers() = 0;
   1.262 +	};
   1.263 +
   1.264 +/**
   1.265 +Enables target media devices to allocate input data buffers for uncompressed data. 
   1.266 +
   1.267 +Client applications and source media devices can therefore write the input data directly 
   1.268 +into a suitable memory area that the target media device can use, possibly eliminating one extra 
   1.269 +memory copy from the data path. This is especially important with hardware implementations, where the 
   1.270 +target hardware may only have access to specially allocated memory that only the media device can allocate.
   1.271 + 
   1.272 +The interface is typically implemented in pre-processing, encoding, and post-processing media devices. 
   1.273 +It is mainly used for video encoder memory buffer input in applications like video editors and when 
   1.274 +using hardware-accelerated post-processors with software video decoders.
   1.275 +
   1.276 +@publishedPartner
   1.277 +@released
   1.278 +*/
   1.279 +class MMmfVideoBufferManagement
   1.280 +	{
   1.281 +public:
   1.282 +	/** 
   1.283 +	Used to signal the buffer options used.
   1.284 +	*/
   1.285 +	class TBufferOptions
   1.286 +		{
   1.287 +	public:
   1.288 +		/**
   1.289 +		The number of input buffers that the media device has. This is the number of buffers the 
   1.290 +		client can request through GetBufferL() before writing any back.
   1.291 +		*/        
   1.292 +		TUint iNumInputBuffers;
   1.293 +
   1.294 +		/**
   1.295 +		Buffer size in pixels. This should match the input data picture size, optionally with padding to 
   1.296 +		meet coding standard requirements.
   1.297 +		*/
   1.298 +		TSize iBufferSize;
   1.299 +		};
   1.300 +    
   1.301 +	/** 
   1.302 +	Sets the observer object to use. The observer gets notified when new buffers are available 
   1.303 +	and when buffers need to be released back to the media device.
   1.304 +
   1.305 +	This method can only be called before the media device has been initialised with InitializeL().
   1.306 +
   1.307 +	@param aObserver The observer object to use.
   1.308 +	*/
   1.309 +	virtual void MmvbmSetObserver(MMmfVideoBufferManagementObserver* aObserver) = 0;
   1.310 +
   1.311 +	/** 
   1.312 +	Enables input buffer management mode. In buffer management mode the target media device allocates 
   1.313 +	memory for input buffers and the client can only use input buffers allocated with GetBufferL().
   1.314 +
   1.315 +	This method can only be called before the media device has been initialised with InitializeL(). 
   1.316 +	This method must be called if the client uses GetBufferL().
   1.317 +
   1.318 +	@param aEnable ETrue if input buffer management mode is used.
   1.319 +	*/
   1.320 +	virtual void MmvbmEnable(TBool aEnable) = 0;
   1.321 +
   1.322 +	/** 
   1.323 +	Sets the buffer options to use. The client can request the number of input buffers that should 
   1.324 +	be available, but typically only few (one or two) buffers can be used.
   1.325 +
   1.326 +	This method can only be called before the media device has been initialised with InitializeL().
   1.327 +
   1.328 +	@param aOptions The buffer options to use.
   1.329 +	@see TBufferOptions.
   1.330 +
   1.331 +	@leave KErrNotSupported The requested buffer options are not supported. Typically the client 
   1.332 +	has requested too many input buffers.
   1.333 +	*/
   1.334 +	virtual void MmvbmSetBufferOptionsL(const TBufferOptions& aOptions) = 0;
   1.335 +
   1.336 +	/** 
   1.337 +	Gets the buffer options currently in use.
   1.338 +
   1.339 +	This method can only be called before the media device has been initialised with InitializeL().
   1.340 +
   1.341 +	@param aOptions Target buffer options data structure.
   1.342 +	*/
   1.343 +	virtual void MmvbmGetBufferOptions(TBufferOptions& aOptions) = 0;
   1.344 +
   1.345 +	/** 
   1.346 +	Gets a new input picture buffer. The client can then write data into the buffer and write it back 
   1.347 +	to the media device with WritePictureL(). After the media device has processed the TVideoPicture and 
   1.348 +	no longer needs any data from the buffer, it will notify the client by calling ReturnPicture().
   1.349 +
   1.350 +	This method can only be called after the media device has been initialised with InitializeL(). This 
   1.351 +	method can only be called in buffer management mode, i.e. if the client has called Enable(ETrue).
   1.352 +
   1.353 +	Note that target-allocated and client-allocated input buffers cannot be mixed. In buffer management mode 
   1.354 +	only input buffers allocated with this method can be sent to the media device.
   1.355 +
   1.356 +	If a client has retrieved buffers with GetBufferL(), it must be prepared to release them synchronously at 
   1.357 +	any point if MmmfBufferManagementObserver::ReleaseBuffers() is called. This may happen if the target media 
   1.358 +	device suddenly loses access to the buffers due to DSA abort, resource management conflict, or media device 
   1.359 +	destruction.
   1.360 +
   1.361 +	The returned TVideoPicture object will have iHeader and iLayerBitRates set to NULL. The client can 
   1.362 +	allocate memory for those fields, and any data they may contain (such as TVideoPictureHeader::iOptional) 
   1.363 +	and set the pointers accordingly before writing the buffer back to the target media device. The memory must 
   1.364 +	remain valid and accessible until the media device returns the buffer with ReturnPicture(), at which time the 
   1.365 +	client can free or reuse the memory.
   1.366 +
   1.367 +	@param aSize The requested buffer size, in pixels. The buffer size should match the picture size set at 
   1.368 +	initialisation phase, or otherwise a suitable buffer may not be available. If the size is smaller than 
   1.369 +	the size set at initialisation phase, the allocated buffer may be larger than requested.
   1.370 +
   1.371 +	@return A new input picture buffer. If no free buffers are available, the return value is NULL.
   1.372 +
   1.373 +	@leave KErrGeneral The method will leave only if an error occurs. Note: Lack of free buffers is not 
   1.374 +	considered an error.
   1.375 +	*/
   1.376 +	virtual TVideoPicture* MmvbmGetBufferL(const TSize& aSize) = 0;
   1.377 +
   1.378 +	/** 
   1.379 +	Releases an input buffer back to the media device without using it. This method is mainly used as a 
   1.380 +	response to a ReleaseBuffers() callback.
   1.381 +
   1.382 +	@param aBuffer The buffer to release.
   1.383 +	*/
   1.384 +	virtual void MmvbmReleaseBuffer(TVideoPicture* aBuffer) = 0;
   1.385 +    };
   1.386 +
   1.387 +/*****************************************************************************/
   1.388 +/** 
   1.389 +MMmfVideoWindowControl Custom Interface UID.
   1.390 +
   1.391 +@publishedPartner
   1.392 +@released
   1.393 +*/
   1.394 +const TUid KUidMmfVideoWindowControl = { 0x10282646 };
   1.395 +
   1.396 +/** 
   1.397 +Enables the client to control video position using a logical video window, 
   1.398 +and specify the exact location of the picture within that window. 
   1.399 +The logical video window may be partially or completely off-screen.
   1.400 +
   1.401 +@publishedPartner
   1.402 +@released
   1.403 +*/
   1.404 +class MMmfVideoWindowControl
   1.405 +    {
   1.406 +public:
   1.407 +    /**
   1.408 +    Horizontal alignment constants.
   1.409 +    */
   1.410 +    enum THorizAlign
   1.411 +        {
   1.412 +        /**
   1.413 +        The picture is horizontally centered.
   1.414 +        */
   1.415 +        EHorizAlignCenter,
   1.416 +        /**
   1.417 +        The picture is horizontally left-aligned.
   1.418 +        */
   1.419 +        EHorizAlignLeft,
   1.420 +        /**
   1.421 +        The picture is horizontally right-aligned.
   1.422 +        */
   1.423 +        EHorizAlignRight
   1.424 +        };
   1.425 +
   1.426 +    /**
   1.427 +    Vertical alignment constants.
   1.428 +    */
   1.429 +    enum TVertAlign
   1.430 +        {
   1.431 +        /**
   1.432 +        The picture is vertically centered.
   1.433 +        */
   1.434 +        EVertAlignCenter,
   1.435 +        /**
   1.436 +        The picture is vertically top-aligned.
   1.437 +        */
   1.438 +        EVertAlignTop,
   1.439 +        /**
   1.440 +        The picture is vertically bottom-aligned.
   1.441 +        */
   1.442 +        EVertAlignBottom
   1.443 +        };
   1.444 +
   1.445 +    /** 
   1.446 +    Sets the logical video window to use for positioning the video
   1.447 +    picture on the screen. By default the logical video window is the same
   1.448 +    as the display video window set with StartDirectScreenAccessL().
   1.449 +    
   1.450 +    @param aWindow Logical window rectangle, relative to the device display.
   1.451 +    */
   1.452 +    virtual void MmvwcSetLogicalVideoWindow(const TRect& aWindow) = 0;
   1.453 +
   1.454 +    /**
   1.455 +    Sets the offset where the video picture will be located in the
   1.456 +    logical video window. By default the picture is centered in the window
   1.457 +    if its content and window sizes do not match.
   1.458 +    
   1.459 +    This method and MmvwcSetContentAlignment() are mutually exclusive, and
   1.460 +    only one of them should be used. Calling one will override the settings
   1.461 +    made by the other.
   1.462 +
   1.463 + 	If an error occurs, this function leaves with any of the system
   1.464 +    wide error codes. Common error codes are listed below.   
   1.465 +    
   1.466 +    @param aOffset Offset, the position of the upper left hand corner of the
   1.467 +                   picture relative to the upper left hand corner of the
   1.468 +                   logical window. The picture must be fully contained within the 
   1.469 +       			   window.
   1.470 +       
   1.471 +    @leave KErrArgument The picture is not fully contained within the window.
   1.472 +    */
   1.473 +    virtual void MmvwcSetContentOffsetL(const TPoint& aOffset) = 0;
   1.474 +
   1.475 +    /**
   1.476 +    Sets video picture alignment within the logical video window.
   1.477 +    By default the picture is centered in the window
   1.478 +    if its content and window sizes do not match.
   1.479 +    
   1.480 +    This method and MmvwcSetContentOffsetL() are mutually exclusive, and
   1.481 +    only one of them should be used. Calling one will override the settings
   1.482 +    made by the other.
   1.483 +    
   1.484 +    @param aHorizAlign Horizontal alignment within the logical window
   1.485 +    @param aVertAlign Vertical alignment within the logical window
   1.486 +    */
   1.487 +    virtual void MmvwcSetContentAlignment(const THorizAlign aHorizAlign, const TVertAlign aVertAlign) = 0;
   1.488 +    };
   1.489 +
   1.490 +/*****************************************************************************/
   1.491 +/** 
   1.492 +KUidMmfVideoResourceManagement Custom Interface UID.
   1.493 +
   1.494 +@publishedPartner
   1.495 +@released
   1.496 +*/
   1.497 +const TUid KUidMmfVideoResourceManagement = { 0x1028264B  };
   1.498 +
   1.499 +/**
   1.500 +Video resource observer interface, implemented by clients using the
   1.501 +MMmfVideoResourceHandler custom interface.
   1.502 +
   1.503 +@publishedPartner
   1.504 +@released
   1.505 +*/
   1.506 +class MMmfVideoResourceObserver
   1.507 +    {
   1.508 +public:
   1.509 +    /** 
   1.510 +    Indicates that a media device has lost its resources. The client must
   1.511 +    synchronously pause or stop processing before returning from this method
   1.512 +    so that the media device can release its resources to the system. If
   1.513 +    the client does not pause or stop, resource loss will be handled as a
   1.514 +    fatal error.
   1.515 +
   1.516 +    If the client is holding any buffers allocated by the media
   1.517 +    device, such as video decoder input or output buffers, it must
   1.518 +    synchronously return them before returning from this
   1.519 +    method. Additionally, in video playback use, the client must empty
   1.520 +    any queued output pictures from DevVideoPlay by repeatedly calling
   1.521 +    CMMFDevVideoPlay::NextPictureL() and
   1.522 +    CMMFDevVideoPlay::ReturnPicture() until no more pictures are
   1.523 +    available.
   1.524 +     
   1.525 +    The client may start again or resume after receiving a
   1.526 +    MmvroResourcesRestored() callback.
   1.527 +     
   1.528 +    @param aMediaDevice UID for the media device that lost resources. The
   1.529 +                        client can use this for example to determine whether 
   1.530 +                        the decoder or the post-processor lost resources. 
   1.531 +                        This is typically not required though since the client
   1.532 +                        must pause DevVideo entirely.
   1.533 +    */
   1.534 +    virtual void MmvroResourcesLost(TUid aMediaDevice) = 0;
   1.535 +
   1.536 +    /** 
   1.537 +    Indicates that a media device has regained its resources after a
   1.538 +    previous resource loss. The client can restart or resume processing.
   1.539 +    This can be done either synchronously or asynchronously.
   1.540 +     
   1.541 +    @param aMediaDevice UID for the media device that regained resources.
   1.542 +    */
   1.543 +    virtual void MmvroResourcesRestored(TUid aMediaDevice) = 0;
   1.544 +    };
   1.545 +
   1.546 +
   1.547 +
   1.548 +/**
   1.549 +Video hardware resource handler custom interface.
   1.550 + 
   1.551 +Video decoder, encoder, pre or post-processor media devices can implement
   1.552 +this interface. Clients can use this interface to register for resource
   1.553 +management notifications and to set resource management priorities.
   1.554 +
   1.555 +This custom interface is only intended for media devices that can save 
   1.556 +their internal state as resources are lost, making resource loss recoverable. 
   1.557 +As such it is not appropriate for all media devices. 
   1.558 +
   1.559 +By default resource loss is considered a fatal error. Clients can
   1.560 +use the notification callbacks to pause or stop processing when resources
   1.561 +are lost and restart or resume when resources are available again, thus 
   1.562 +avoiding errors and providing a better user experience.
   1.563 + 
   1.564 +@publishedPartner
   1.565 +@released
   1.566 +*/
   1.567 +class MMmfVideoResourceHandler
   1.568 +    {
   1.569 +public:
   1.570 +    /**
   1.571 +    Sets the video resource observer to use. The observer will receive
   1.572 +    resource loss and restore callbacks. If no observer has been set,
   1.573 +    resources losses will be handled as fatal errors.
   1.574 +     
   1.575 +    @param aObserver The observer to use, NULL to remove observer.
   1.576 +    */
   1.577 +    virtual void MmvrhSetObserver(MMmfVideoResourceObserver* aObserver) = 0;
   1.578 +    };
   1.579 +
   1.580 +/*****************************************************************************/
   1.581 +/** 
   1.582 +KUidMmfVideoResourcePriority Custom Interface UID.
   1.583 +
   1.584 +@publishedPartner
   1.585 +@released
   1.586 +*/
   1.587 +const TUid KUidMmfVideoResourcePriority = { 0x1028264C };
   1.588 +
   1.589 +/** 
   1.590 +Video resource priority control custom interface.
   1.591 + 
   1.592 +Video decoder, encoder, pre or post-processor media devices can implement
   1.593 +this interface. Clients can use this interface to set resource reservation
   1.594 +priority for the media device. Typically this interface is used to lower
   1.595 +the priority for background tasks to ensure they do not remove resources
   1.596 +from foreground applications.
   1.597 + 
   1.598 +@publishedPartner
   1.599 +@released
   1.600 +*/
   1.601 +class MMmfVideoResourcePriority
   1.602 +    {
   1.603 +public:
   1.604 +    /**
   1.605 +    Sets the priority the media device uses to reserve resources.
   1.606 +    Media devices with higher priority may override requests from ones
   1.607 +    with a lower priority. This method can be called at any point, but
   1.608 +    implementations may ignore it after initialization. Therefore clients
   1.609 +    should call this before calling Initialize().
   1.610 +     
   1.611 +    The behaviour of the underlying resource manager and policy is
   1.612 +    implementation-specific. Most implementations will limit high
   1.613 +    priorities to clients that have certain capabilities
   1.614 +    (for example, MultimediaDD) or specific Vendor IDs only. 
   1.615 +    All implementations should do some policing to ensure untrusted 
   1.616 +    applications cannot block the system by allocating all available 
   1.617 +    resources at a high priority.
   1.618 +     
   1.619 +    @param aPriority Resource management priority. The values use the same 
   1.620 +                     range as TMdaPriority.
   1.621 +    */
   1.622 +    virtual void MmvpSetResourcePriority(TInt aPriority) = 0;
   1.623 +    };
   1.624 +
   1.625 +/*****************************************************************************/
   1.626 +/** 
   1.627 +KUidMmfVideoPropertiesManagement Custom Interface UID.
   1.628 +
   1.629 +@publishedPartner
   1.630 +@released
   1.631 +*/
   1.632 +const TUid KUidMmfVideoPropertiesManagement = { 0x10283231 };
   1.633 +
   1.634 +/**
   1.635 +Video property change observer. DevVideoPlay clients or media devices can
   1.636 +implement this observer and use the MMmfVideoPropertiesNotifier extension
   1.637 +to receive notifications when decoded video properties (such as picture
   1.638 +size and pixel aspect ratio) change.
   1.639 +
   1.640 +@publishedPartner
   1.641 +@released
   1.642 +*/
   1.643 +class MMmfVideoPropertiesObserver
   1.644 +    {
   1.645 +public:
   1.646 +    /** 
   1.647 +    Decoded video properties updated. The media device implementing the
   1.648 +    MMmfVideoPropertiesNotifier extension will call this method immediately
   1.649 +    before outputting a picture with the updated properties.
   1.650 +    
   1.651 +    When the extension is used between a decoder and a post-processor media
   1.652 +    device, the post-processor can associate the changed properties with the
   1.653 +    correct picture, since the next incoming picture after this call will
   1.654 +    be the first updated one. 
   1.655 +    
   1.656 +    When the extension is used between a DevVideoPlay client and a
   1.657 +    post-processor media device, the client can synchronously reconfigure
   1.658 +    video display options using SetScaleOptionsL() and related methods. This
   1.659 +    lets the client reconfigure the display for the correct picture.
   1.660 +    
   1.661 +    @param aYuvFormat Updated YUV format parameters. The updated fields are
   1.662 +                      iAspectRatioDenom, iAspectRatioNum, and iCoefficients     
   1.663 +    @param aPictureSize	Updated picture size. This size will be the true
   1.664 +                       	picture display size, excluding any padding that
   1.665 +                       	the codec might use.
   1.666 +    */
   1.667 +    virtual void MmvpoUpdateVideoProperties(const TYuvFormat& aYuvFormat, const TSize& aPictureSize) = 0;
   1.668 +    };
   1.669 +
   1.670 +
   1.671 +/**
   1.672 +Video property notifier extension. DevVideoPlay decoders and post-processor
   1.673 +can implement this extension to provide notifications when decoded video
   1.674 +picture properties such as size or pixel aspect ratio change. The extension
   1.675 +is typically used to get size and pixel aspect ratio updates from a decoder
   1.676 +to a post-processor media device, and from a post-processor to the
   1.677 +DevVideoPlay client.
   1.678 +
   1.679 +@publishedPartner
   1.680 +@released
   1.681 +*/
   1.682 +class MMmfVideoPropertiesNotifier
   1.683 +    {
   1.684 +public:
   1.685 +    /** 
   1.686 +    Sets a new video properties observer. This method can be called at any
   1.687 +    time after the media device has been instantiated.
   1.688 +     
   1.689 +    @param aObserver New observer object.
   1.690 +    */
   1.691 +    virtual void MmvpnSetObserver(MMmfVideoPropertiesObserver* aObserver) = 0;
   1.692 +    };
   1.693 +
   1.694 +
   1.695 +/** 
   1.696 +KUidMmfVideoH324AnnexKMode Custom Interface UID.
   1.697 +
   1.698 +@publishedPartner
   1.699 +@released
   1.700 +*/
   1.701 +const TUid KUidMmfVideoH324AnnexKMode = { 0x102836C2 };
   1.702 +
   1.703 +/**
   1.704 +Video encoder H.324M Annex K mode extension. DevVideoRecord MPEG-4 and H.264
   1.705 +encoders can implement this extension to support using ITu-T H.324 Annex K
   1.706 +encoding parameters.
   1.707 + 
   1.708 +@publishedPartner
   1.709 +@released
   1.710 +*/
   1.711 +class MMmfVideoH324AnnexKMode
   1.712 +    {
   1.713 +public:
   1.714 +    /** 
   1.715 +     * Enables or disables encoder ITU-T H.324M Annex K mode. This method
   1.716 +     * is only applicable for MPEG-4 and H.264 video.
   1.717 +     *
   1.718 +     * When the encoder is in Annex K mode, it will use the encoding
   1.719 +     * parameters and bitstream headers defined in ITU-T H.324M Annex
   1.720 +     * K. Enabling Annex K mode will reset all the specified settings
   1.721 +     * apart from picture size and output format to the values
   1.722 +     * specified in Annex K. This includes codec profile and level,
   1.723 +     * maximum bit rate, and other encoding constraints.
   1.724 +     *
   1.725 +     * When Annex K mode is active, the client cannot change encoder settings
   1.726 +     * that would conflict with the ones specified in Annex K. Attempts to do
   1.727 +     * so will cause the corresponding setting methods to fail with
   1.728 +     * KErrNotSupported.
   1.729 +     *
   1.730 +     * Annex K mode can be deactivated by calling this method with a false
   1.731 +     * parameter. This will remove restrictions on encoder settings.
   1.732 +     *
   1.733 +     * This method can only be called before the encoder is
   1.734 +     * initialized. The client should set the input and output formats
   1.735 +     * and picture size before calling this method.
   1.736 +     *
   1.737 +     * If an error occurs this method will fail with a system-wide error code.
   1.738 +     * Typical error codes are listed below.
   1.739 +     * Typically errors are only expected if the current output format or
   1.740 +     * picture size do not meet Annex K constraints.
   1.741 +     * 
   1.742 +     * @param aAnnexKMode ETrue to enable H.324M Annex K mode, EFalse to
   1.743 +     *                    disable it
   1.744 +     *
   1.745 +     * @pre The client has called SelectEncoderL(), SetOutputFormatL(), and
   1.746 +     *      SetInputFormatL(). This method can only be called before
   1.747 +     *      Initialize().
   1.748 +     *
   1.749 +     * @leave KErrNotSupported Annex K mode cannot be supported with the
   1.750 +     *                         current settings. Possible causes are incorrect
   1.751 +     *                         output format (not MPEG-4 or H.264) or picture
   1.752 +     *                         size (not QCIF).
   1.753 +     */
   1.754 +    virtual void MmvhakmSetH324MAnnexKModeL(TBool aAnnexKMode) = 0;
   1.755 +    };
   1.756 +
   1.757 +
   1.758 +/**
   1.759 +MMmfVideoClientThreadInfo interface UID.
   1.760 +@publishedPartner
   1.761 +@released
   1.762 +*/
   1.763 +const TUid KMmfUidDevVideoClientThreadInfoCustomInterface = {0x102834A9};
   1.764 +
   1.765 +/**
   1.766 +@publishedPartner
   1.767 +@released
   1.768 + 
   1.769 +Custom interface providing support for setting the client thread info for the DevVideo.
   1.770 +*/
   1.771 +class MMmfVideoClientThreadInfo
   1.772 +	{	
   1.773 +public:
   1.774 +	/**
   1.775 +	Set client thread info for the DevVideo.
   1.776 + 	
   1.777 +	@param  aTid the client thread Id.
   1.778 +	@return An error code indicating if the function call was successful.
   1.779 +	*/
   1.780 +	virtual TInt MmvctSetClientThreadInfo(TThreadId aTid) = 0;
   1.781 +	};
   1.782 +
   1.783 +
   1.784 +#endif