h264_dec/arih264dechwdevice/inc/arih264dechwdevice.h
changeset 0 bb31fbe78861
equal deleted inserted replaced
-1:000000000000 0:bb31fbe78861
       
     1 /*
       
     2 * Copyright (c) 2009 Aricent and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Aricent - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 * Interface of the arih264dechwdevice.
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef ARIH264DECHWDEVICE_H
       
    20 #define ARIH264DECHWDEVICE_H
       
    21 
       
    22 //System includes
       
    23 #include <videoplayhwdevice.h>
       
    24 #include <ImplementationProxy.h>
       
    25 #include <buffermanagementci.h>
       
    26 
       
    27 //User includes
       
    28 #include "aribaseengine.h"
       
    29 #include "arih264dechwdeviceuid.hrh"
       
    30 
       
    31 // CONSTANTS
       
    32 const TInt KMaxAllowPicLoss		= 75;
       
    33 const TInt KMaxInputBufferSize  = ( 248 * 2048 );
       
    34 const TInt KMaxOutputBuffers    = 2;
       
    35 const TInt KMaxInputBuffers		= 2;
       
    36 const TInt KMinInputBuffers		= 2;
       
    37 // Implementatin id for the hwdevice
       
    38 const TUid KUidH264DecoderHwDevice = {KUidH264DecoderHwDeviceImplUid};
       
    39 
       
    40 const TUint KMaxBitRate = 15*1024*1024;
       
    41 const TInt KDecoderInfoCount = 14;
       
    42 
       
    43 //const TInt KMaxFrameWidth			= 1280;
       
    44 //const TInt KMaxFrameHeight		= 720;
       
    45 const TInt KPicRate					= 30;
       
    46 
       
    47 // FORWARD DECLARTIONS
       
    48 class CAriH264decWrapper;
       
    49 class CStateMachine;
       
    50 //CLASS DECLARATIONS
       
    51 
       
    52 /**
       
    53  * This class is part of Aricent's H264 decoder HwDevice plugin used for
       
    54  * decoding H264 content to yuv420.
       
    55  * Provides implementation for standard MDF HwDevice plugin APIs as well as private functions
       
    56  * used internal to this class for .This class also implements callback APIs from
       
    57  * MMmfVideoBufferManagementObserver and MProcessEngineObserver which are called from CBaseEngine.
       
    58  */
       
    59 class CAriH264decHwDevice: public CMMFVideoDecodeHwDevice,
       
    60 						   public MProcessEngineObserver,
       
    61 						   public MMmfVideoBufferManagementObserver
       
    62 {
       
    63 public:	//Constructors and destructor
       
    64 
       
    65 	/**
       
    66 	 * Two-phased constructor.
       
    67 	 * @return pointer to an instance of CMMFVideoDecodeHwDevice
       
    68 	 */
       
    69 	static CMMFVideoDecodeHwDevice* NewL();
       
    70 
       
    71 	/**
       
    72 	 * Function to destroy resources allocated by this object
       
    73 	 */
       
    74 	virtual ~CAriH264decHwDevice();
       
    75 
       
    76 public:	//CMMFVideoHwDevice Functions
       
    77 
       
    78    /**
       
    79 	* Retrieves a custom interface to the specified hardware device
       
    80 
       
    81 	* @param	aInteface	Interface UID, defined with the custom interface
       
    82 	* @return	Pointer to the interface implementation, or NULL if the
       
    83 	*           device does not implement the interface requested.
       
    84 	*       	The return value must be cast to the correct type by the user.
       
    85 	*/
       
    86 	virtual TAny* CustomInterface( TUid aInterface );
       
    87 
       
    88 public:	//CMMFVideoDecodeHwDevice Functions
       
    89 
       
    90     /**
       
    91 	 * Retrieves decoder information about this hardware device.
       
    92 	 * The device creates a CVideoDecoderInfo structure,
       
    93 	 * fills it with correct data, pushes it to cleanup stack and returns it.
       
    94 	 * The client will delete the object when it is no longer needed
       
    95 
       
    96 	 * @return	Decoder information as a CVideoDecoderInfo object.
       
    97 	 * The object is pushed to the cleanup stack, and must be deallocated by
       
    98 	 * the caller.
       
    99 
       
   100 	 * @leave	The method will leave if an error occurs.
       
   101 	 */
       
   102 	virtual CVideoDecoderInfo* VideoDecoderInfoLC();
       
   103 
       
   104    /**
       
   105 	* Reads header information from a coded data unit.
       
   106 
       
   107 	* @param aDataUnitType   The type of the coded data unit that is contained
       
   108 	*                        in aDataUnit.
       
   109 	*						 If the data is a simple piece of bitstream, use
       
   110 	*						 EDuArbitraryStreamSection.
       
   111 	* @param aEncapsulation  The encapsulation type used for the coded data.
       
   112 	*                        If the data is a simple piece of bitstream, use
       
   113 	*                        EDuElementaryStream.
       
   114 	* @param aDataUnit	     The coded data unit, contained in a
       
   115 	*                        TVideoInputBuffer.
       
   116 
       
   117 	* @return				 Header information for the data unit, or NULL if
       
   118 	*                        the coded data unit did not contain enough data
       
   119 	*                        to parse the header.The header data must be
       
   120 	* 						 returned to device using ReturnHeader() before
       
   121 	*                        Initialize() is called or decoder is destroyed.
       
   122 	* 						 The data remains valid until it is returned.
       
   123 
       
   124 	* @leave				 This method may leave with one of the standard
       
   125 	*                        error codes.
       
   126 
       
   127 	* @pre					 This method can only be called before hwdevice
       
   128 	*                        has been initialized with Initialize()
       
   129 	*/
       
   130 	virtual TVideoPictureHeader* GetHeaderInformationL(
       
   131 			                       TVideoDataUnitType aDataUnitType,
       
   132 		                           TVideoDataUnitEncapsulation aEncapsulation,
       
   133 		                           TVideoInputBuffer* aDataUnit );
       
   134 
       
   135    /**
       
   136 	* Returns a header from GetHeaderInformationL() back to the decoder so
       
   137 	* that the memory can be freed.
       
   138 
       
   139 	* @param aHeader	The header to return
       
   140 
       
   141 	* @pre				This method can only be called before the hwdevice
       
   142 	*                    has been initialized with Initialize()
       
   143 	*/
       
   144 	virtual void ReturnHeader( TVideoPictureHeader* aHeader );
       
   145 
       
   146    /**
       
   147 	* Sets the device input format to a compressed video format.
       
   148 
       
   149 	* @param aFormat		  The input format to use
       
   150 	* @param aDataUnitType	  The encapsulation type used for the coded data
       
   151 	* @param aEncapsulation   The encapsulation type used for the coded data
       
   152 	* @param aDataInOrder	  True if the input data is written in correct
       
   153 	*                         decoding order, false if will be written in
       
   154 	*                         arbitrary order.
       
   155 
       
   156 	* @leave				  This method may leave with one of the standard
       
   157 	*                         error codes.
       
   158 
       
   159 	* @pre					  This method can only be called before hwdevice
       
   160 	*                          has been initialized with Initialize()
       
   161 	*/
       
   162 	virtual void SetInputFormatL( const CCompressedVideoFormat& aFormat,
       
   163 								   TVideoDataUnitType aDataUnitType,
       
   164 								   TVideoDataUnitEncapsulation aEncapsulation,
       
   165 								   TBool aDataInOrder );
       
   166 
       
   167    /**
       
   168 	* Sets whether decoding should be synchronzed to the current clock source,
       
   169 	* if any, or if pictures should instead be decoded as soon as possible.
       
   170 	* If decoding is synchronized, decoding timestamps are used if available,
       
   171 	* presentation timestamps are used if not. When decoding is not
       
   172 	* synchronized, pictures are decoded as soon as source data is available
       
   173 	* for them, and the decoder has a free output buffer. If a clock source is
       
   174 	* not available, decoding will not be synchronized.
       
   175 
       
   176 	* @param aSynchronize	True if decoding should be synchronized to a clock
       
   177 	*                       source.
       
   178 
       
   179 	* @pre					This method can only be called before the hwdevice
       
   180 	*                       has been initialized with Initialize()
       
   181 	*/
       
   182 	virtual void SynchronizeDecoding( TBool aSynchronize );
       
   183 
       
   184    /**
       
   185 	* Sets decoder buffering options
       
   186 
       
   187 	* @param aOptions   Buffering options
       
   188 
       
   189 	* @leave			This method may leave with one of the standard error
       
   190 	*                   codes.
       
   191 
       
   192 	* @pre				This method can only be called before the hwdevice has
       
   193 	*                   been initialized with Initialize()
       
   194 	*/
       
   195 	virtual void SetBufferOptionsL(
       
   196 			               const CMMFDevVideoPlay::TBufferOptions& aOptions );
       
   197 
       
   198    /**
       
   199 	* Gets the video decoder buffer options actually in use. This can be used
       
   200 	* before calling SetBufferOptions() to determine the default options, or
       
   201 	* afterwards to check the values actually in use ( if some default values
       
   202 	* were used ).
       
   203 
       
   204 	* @param aOptions  Buffering options structure to fill.
       
   205 
       
   206 	* @pre			   This method can only be called before the hwdevice has
       
   207 	*                  been initialized with Initialize()
       
   208 	*/
       
   209 	virtual void GetBufferOptions(
       
   210 			                     CMMFDevVideoPlay::TBufferOptions& aOptions );
       
   211 
       
   212    /**
       
   213 	* Indicates which HRD/VBV specification is fulfilled in the input stream
       
   214 	* and any related parameters.
       
   215 
       
   216 	* @param aHrdVbvSpec	The HRD/VBV specification fulfilled
       
   217 	* @param aHrdVbvParams	HRD/VBV parameters. The data format depends on the
       
   218 	*                       parameters chosen. For 3GPP TS 26.234. parameters
       
   219 	*                       aHrdVbvSpec=EHrdVbv3GPP, data in the descriptor
       
   220 	*                       is a package of type TPckC<T3gppHrdVbvParams>
       
   221 	* 						If no HRD/VBV parameters are used, the descriptor
       
   222 	*                       is empty.
       
   223 
       
   224 	* @pre					This method can only be called before the hwdevice
       
   225 	*                       has been initialized with Initialize()
       
   226 	*/
       
   227 	virtual void SetHrdVbvSpec( THrdVbvSpecification aHrdVbvSpec,
       
   228 			                   const TDesC8& aHrdVbvParams );
       
   229 
       
   230    /**
       
   231 	* Sets the output post-procesor device to use. If an output device is set,
       
   232 	* all decoded pictures are delivered to that device, and not drawn on
       
   233 	* screen or returned to the client. Pictures are written using
       
   234 	* CMMDVideoPostProcDevice::WritePictureL() or a custom interface after
       
   235 	* they have been decoded. The post-processor must then synchronize
       
   236 	* rendering to the clock source if necessary.
       
   237 	*
       
   238 	* @param aDevice	 The output post-processor device to use.
       
   239 
       
   240 	* @pre				 This method can only be called before the hwdevice
       
   241 	*                     has been initialized with Initialize()
       
   242 	*/
       
   243 	virtual void SetOutputDevice( CMMFVideoPostProcHwDevice* aDevice );
       
   244 
       
   245    /**
       
   246 	* Returns the current decoding position, i.e. the timestamp for the most
       
   247 	* recently decoded picture.
       
   248 
       
   249 	* @return		Current decoding position.
       
   250 
       
   251 	* @pre			This method can only be called before the hwdevice has
       
   252 	*                been initialized with Initialize()
       
   253 	*/
       
   254 	virtual TTimeIntervalMicroSeconds DecodingPosition();
       
   255 
       
   256    /**
       
   257 	* Returns the current pre-decoder buffer size
       
   258 
       
   259 	* @return		The number of bytes of data in the pre-decoder buffer.
       
   260 
       
   261 	* @pre			This method can only be called after the hwdevice has been
       
   262 	*               initialized with Initialize().
       
   263 	*/
       
   264 	virtual TUint PreDecoderBufferBytes();
       
   265 
       
   266    /**
       
   267 	* Reads various counters related to the received input bitstream and coded
       
   268 	* data units.
       
   269 
       
   270 	* @param aCounters     The counter structure to fill.
       
   271 
       
   272 	* @pre				   This method can only be called after the hwdevice
       
   273 	*                      has been initialized with Initialize().
       
   274 	*/
       
   275 	virtual void GetBitstreamCounters(
       
   276 			                CMMFDevVideoPlay::TBitstreamCounters& aCounters );
       
   277 
       
   278    /**
       
   279 	* Retrieves the number of free input buffers the decoder has available
       
   280 
       
   281 	* @return	Number of free input buffers the decoder has available.
       
   282 
       
   283 	* @leave	This method may leave with one of the standard error codes.
       
   284 
       
   285 	* @pre		This method can only be called after the hwdevice has been
       
   286 	*            initialized with Initialize().
       
   287 	*/
       
   288 	virtual TUint NumFreeBuffers();
       
   289 
       
   290    /**
       
   291 	* Retrieves an empty video input buffer from the decoder. After input data
       
   292 	* has been written to the buffer, it can be written to the decoder using
       
   293 	* WriteCodedDataL(). The number of buffers the decoder must be able
       
   294 	* to provide before expecting any back, and the maximum size for each
       
   295 	* buffer, are specified in the buffer options.The decoder maintains
       
   296 	* ownership of the buffers even while they have been retrieved by client,
       
   297 	* and will take care of deallocating them.
       
   298 
       
   299 	* @param aBufferSize	Required buffer size, in bytes. The resulting
       
   300 	*                        buffer can be larger than this, but not smaller
       
   301 
       
   302 	* @return				A new input data buffer. The buffer is at least
       
   303 	*                        as large as requested, but it may be larger.
       
   304 	* 						If no free buffers are available, the return value
       
   305 	*                       is NULL.
       
   306 
       
   307 	* @leave				This method may leave with one of the standard
       
   308 	*                        error codes.
       
   309 
       
   310 	* @pre					This method can only be called after the hwdevice
       
   311 	*                        has been initialized with Initialize().
       
   312 	*/
       
   313 	virtual TVideoInputBuffer* GetBufferL( TUint aBufferSize );
       
   314 
       
   315    /**
       
   316 	* Writes a piece of coded video data to the decoder. The data buffer must
       
   317 	* be retrieved from the decoder with GetBufferL().
       
   318 
       
   319 	* @param aBuffer	The coded data unit to write.
       
   320 
       
   321 	* @leave				This method may leave with one of the standard
       
   322 	*                        error codes.
       
   323 
       
   324 	* @pre				This method can only be called after the hwdevice has
       
   325 	*                    been initialized with Initialize().
       
   326 	*/
       
   327 	virtual void WriteCodedDataL( TVideoInputBuffer* aBuffer );
       
   328 
       
   329 #ifdef SYMBIAN_MDF_API_V2
       
   330    /**
       
   331 	* Configures the Decoder using header information known by the client.
       
   332 	* @param	aVideoPictureHeader	Header information to configure the
       
   333 	*                                    decoder with
       
   334 	* @leave	The method will leave if an error occurs. Running out of data
       
   335 	*            is not considered an error,
       
   336 	* 		as described above.
       
   337 	* @pre	This method can only be called before the hwdevice has been
       
   338 	*        initialized with Initialize().
       
   339 	*/
       
   340     virtual void ConfigureDecoderL(
       
   341     		                 const TVideoPictureHeader& aVideoPictureHeader );
       
   342 
       
   343 #endif
       
   344 
       
   345 public:	//Inherited from CMMFVideoPlayHwDevice
       
   346 
       
   347    /**
       
   348 	* Retrieves post-processing information about this hardware device. The
       
   349 	* device creates a CPostProcessorInfo structure ( defined in [3] ), fills
       
   350 	* it with correct data, pushes it to the cleanup stack and returns it. The
       
   351 	* client will delete the object when it is no longer needed.
       
   352 
       
   353 	* @return		Post-processor information as a CPostProcessorInfo object.
       
   354 	* 				The object is pushed to the cleanup stack, and must be
       
   355 	*               deallocated by the caller.
       
   356 
       
   357 	* @leave		This method may leave with one of the standard error codes
       
   358 	*/
       
   359 	virtual CPostProcessorInfo* PostProcessorInfoLC();
       
   360 
       
   361    /**
       
   362 	* Retrieves the list of the output formats that the device supports. The
       
   363 	* list is ordered in plug-in preference order, with the preferred formats
       
   364 	* at the beginning of the list. The list can depend on the device source
       
   365 	* format, and therefore SetSourceFormatL() must be called before calling
       
   366 	* this method.
       
   367 
       
   368 	* @param aFormats		An array for the result format list. The array
       
   369 	*                       must be created and destroyed by the caller.
       
   370 
       
   371 	* @leave				This method may leave with one of the standard
       
   372 	*                       error codes.
       
   373 
       
   374 	* @pre					This method can only be called after the hwdevice
       
   375 	*                       has been initialized with Initialize().
       
   376 	*/
       
   377 	virtual void GetOutputFormatListL(
       
   378 			                     RArray<TUncompressedVideoFormat>& aFormats );
       
   379 
       
   380    /**
       
   381 	* Sets the device output format.
       
   382 
       
   383 	* @param aDataUnit	    The format to use.
       
   384 
       
   385 	* @leave				This method may leave with one of the standard
       
   386 	*                       error codes.
       
   387 
       
   388 	* @pre					This method can only be called after the hwdevice
       
   389 	*                       has been initialized with Initialize().
       
   390 	*/
       
   391 	virtual void SetOutputFormatL( const TUncompressedVideoFormat &aFormat );
       
   392 
       
   393    /**
       
   394 	* Sets the clock source to use for video timing. See [3] for a discussion
       
   395 	* about audio/video synchronization. If no clock source is set. video
       
   396 	* playback will not be synchronized, but will proceed as fast as possible,
       
   397 	* depending on input data and output buffer availability.
       
   398 
       
   399 	* @param aDataUnitType  The clock source to use.
       
   400 
       
   401 	* @pre					This method can only be called after the hwdevice
       
   402 	*                       has been initialized with Initialize().
       
   403 	*/
       
   404 	virtual void SetClockSource( MMMFClockSource* aClock );
       
   405 
       
   406    /**
       
   407 	* Sets the device video output destination. The destination can be the
       
   408 	* screen ( using direct screen access ) or memory buffers. By default
       
   409 	* memory buffers are used. If data is written to another device, this
       
   410 	* method is ignored, and suitable memory buffers are always used.
       
   411 
       
   412 	* @param aScreen  True if video output destination is the screen, false
       
   413 	*                 if memory buffers.
       
   414 
       
   415 	* @leave		  This method may leave with one of the standard error
       
   416 	*                 codes.
       
   417 
       
   418 	* @pre			  This method can only be called after the hwdevice has
       
   419 	*                 been initialized with Initialize().
       
   420 	*/
       
   421 	virtual void SetVideoDestScreenL( TBool aScreen );
       
   422 
       
   423    /**
       
   424 	* Sets the post-processing types to be used.
       
   425 
       
   426 	* @param aPostProcCombination   The post-processing steps to perform, a
       
   427 	*                               bitwise or of values from TPostProcessType
       
   428 	* @leave						This method may leave with one of the
       
   429 	*                               standard error codes.
       
   430 
       
   431 	* @pre							This method can be called either before
       
   432 	*                               or after the hwdevice has been initialized
       
   433 	*								with Initialize(). If called after
       
   434 	*								with initialization, the change will only
       
   435 	*								with be committed once CommitL() is called
       
   436 	*/
       
   437 	virtual void SetPostProcessTypesL( TUint32 aPostProcCombination );
       
   438 
       
   439    /**
       
   440 	* Sets post-processing options for input ( pan-scan ) cropping.
       
   441 
       
   442 	* @param aRect  The type of the coded data unit that is contained in
       
   443 	*               aDataUnit.
       
   444 
       
   445 	* @leave		This method may leave with one of the standard error codes
       
   446 
       
   447 	* @pre			This method can be called either before or after the
       
   448 	*               hwdevice has been initialized with Initialize(). If called
       
   449 	*               after initialization, the change will only be committed
       
   450 	*               once CommitL() is called.
       
   451 	*/
       
   452 	virtual void SetInputCropOptionsL( const TRect& aRect );
       
   453 
       
   454    /**
       
   455 	* Sets post-processing options for YUV to RGB color space conversion. The
       
   456 	* first variant specifies the input YUV and output RGB formats to use
       
   457 	* explicitly, while the second variant uses the device input and output
       
   458 	* formats. For decoder devices the default YUV format used is the format
       
   459 	* specified in the input bitstream. SetSourceFormatL(), SetOutputFormatL()
       
   460 	* and SetPostProcessTypesL() must be called before this method is used
       
   461 
       
   462 	* @param aOptions	 The conversion options to use
       
   463 	* @param aYuvFormat	 Conversion source YUV format, if specified.
       
   464 	* @param aRgbFormat	 Conversion target RGB format, if specified..
       
   465 
       
   466 	* @leave			 This method may leave with one of the standard error
       
   467 	*                    codes.
       
   468 
       
   469 	* @pre				 This method can be called either before or after the
       
   470 	*                    hwdevice has been initialized with Initialize(). If
       
   471 	*                    called after initialization, the change will only be
       
   472 	*					 committed once CommitL() is called.
       
   473 	*/
       
   474 	virtual void SetYuvToRgbOptionsL( const TYuvToRgbOptions& aOptions,
       
   475 									 const TYuvFormat& aYuvFormat,
       
   476 									 TRgbFormat aRgbFormat );
       
   477    /**
       
   478 	* Sets post-processing options for YUV to RGB color space conversion. The
       
   479 	* first variant specifies the input YUV and output RGB formats to use
       
   480 	* explicitly, while the second variant uses the device input and output
       
   481 	* formats. For decoder devices the default YUV format used is the format
       
   482 	* specified in the input bitstream. SetSourceFormatL(), SetOutputFormatL()
       
   483 	* and SetPostProcessTypesL() must be called before this method is used
       
   484 
       
   485 	* @param aOptions	 The conversion options to use
       
   486 
       
   487 	* @leave			 This method may leave with one of the standard error
       
   488 	*                    codes.
       
   489 
       
   490 	* @pre				 This method can be called either before or after the
       
   491 	*                    hwdevice has been initialized
       
   492 	*					 with Initialize(). If called after initialization,
       
   493 	*					 the change will only be committed once CommitL() is
       
   494 	*					 called
       
   495 	*/
       
   496 	virtual void SetYuvToRgbOptionsL( const TYuvToRgbOptions& aOptions );
       
   497 
       
   498    /**
       
   499 	* Sets post-processing options for YUV to RGB color space conversion. The
       
   500 	* first variant specifies the input YUV and output RGB formats to use
       
   501 	* explicitly, while the second variant uses the device input and output
       
   502 	* formats. For decoder devices the default YUV format used is the format
       
   503 	* specified in the input bitstream. SetSourceFormatL(), SetOutputFormatL()
       
   504 	* and SetPostProcessTypesL() must be called before this method is used
       
   505 
       
   506 	* @param aRotationType The rotation to perform.
       
   507 
       
   508 	* @leave			  This method may leave with one of the standard
       
   509 	*                     error codes.
       
   510 
       
   511 	* @pre				  This method can be called either before or after
       
   512 	*                     the hwdevice has been initialized with Initialize().
       
   513 	*                     If called after initialization, the change will only
       
   514 	*                     be committed once CommitL() is called.
       
   515 	*/
       
   516 	virtual void SetRotateOptionsL( TRotationType aRotationType );
       
   517 
       
   518    /**
       
   519 	* @param aRotationType The rotation to perform.
       
   520 
       
   521 	* @leave			  This method may leave with one of the standard
       
   522 	*                     error codes.
       
   523 
       
   524 	* @pre				  This method can be called either before or after
       
   525 	*                     the hwdevice has been initialized with Initialize().
       
   526 	*                     If called after initialization, the change will
       
   527 	*                     only be committed once CommitL() is called.
       
   528 	*/
       
   529 	virtual void SetScaleOptionsL( const TSize& aTargetSize,
       
   530 			                      TBool aAntiAliasFiltering );
       
   531 
       
   532    /**
       
   533 	* Sets post-processing options for output cropping. SetPostProcessTypesL()
       
   534 	* must be called before this method is used.
       
   535 
       
   536 	* @param aRect Output cropping area
       
   537 
       
   538 	* @leave	   This method may leave with one of the standard error codes.
       
   539 
       
   540 	* @pre		   This method can be called either before or after the
       
   541 	*              hwdevice has been initialized with Initialize(). If called
       
   542 	*              after initialization, the change will only be committed
       
   543 	*              once CommitL() is called.
       
   544 	*/
       
   545 	virtual void SetOutputCropOptionsL( const TRect& aRect );
       
   546 
       
   547    /**
       
   548 	* Sets post-processing plug-in specific options. SetPostProcessTypesL()
       
   549 	* must be called before this method is used.
       
   550 
       
   551 	* @param aOptions  The format is plug-in specific
       
   552 
       
   553 	* @leave		   This method may leave with one of the standard error
       
   554 	*                  codes.
       
   555 
       
   556 	* @pre		       This method can be called either before or after the
       
   557 	*                  hwdevice has been initialized with Initialize(). If
       
   558 	*                  called after initialization, the change will only be
       
   559 	* 			       committed once CommitL() is called.
       
   560 	*/
       
   561 	virtual void SetPostProcSpecificOptionsL( const TDesC8& aOptions );
       
   562 
       
   563    /**
       
   564 	* Initializes the device. This method is asynchronous, the device will
       
   565 	* call MMFVideoPlayProxy::MdvppInitializeComplete() after initialization
       
   566 	* has completed. After this method has successfully completed, further
       
   567 	* configuration changes are not possible except where separately noted
       
   568 
       
   569 	* @leave	   This method may leave with one of the standard error codes.
       
   570 	*/
       
   571 	virtual void Initialize();
       
   572 
       
   573    /**
       
   574 	* Commit all configuration changes since the last CommitL(), Revert() or
       
   575 	* Initialize(). This only applies to methods that can be called both
       
   576 	* before AND after the hwdevice has been initialized.
       
   577 
       
   578 	@leave		   This method may leave with one of the standard error codes.
       
   579 	*/
       
   580 	virtual void CommitL();
       
   581 
       
   582    /**
       
   583 	* Revert any configuration changes that have not yet been committed using
       
   584 	* CommitL(). This only applies to methods that can be called both before
       
   585 	* AND after the hwdevice has been initialized.
       
   586 
       
   587 	* @leave	This method may leave with one of the standard error codes.
       
   588 
       
   589   	* @pre		This method can only be called after the hwdevice has been
       
   590   	*           initialized with Initialize().
       
   591 	*/
       
   592 	virtual void Revert();
       
   593 
       
   594    /**
       
   595 	* Starts writing output directly to the display frame buffer using Direct
       
   596 	* Screen Access.
       
   597 
       
   598 	* @param aVideoRect		The video output rectangle on screen.
       
   599 	* @param aScreenDevice	The screen device to use. The screen device object
       
   600 	*                       must be valid in the current thread.
       
   601 	* @param aClipRegion    Initial clipping region to use.
       
   602 
       
   603 	* @leave				This method may leave with one of the standard
       
   604 	*                       error codes.
       
   605 
       
   606 	* @pre					This method can only be called after the hwdevice
       
   607 	*                       has been initialized with Initialize().
       
   608 	*/
       
   609 	virtual void StartDirectScreenAccessL( const TRect& aVideoRect,
       
   610 											CFbsScreenDevice& aScreenDevice,
       
   611 											const TRegion& aClipRegion );
       
   612 
       
   613    /**
       
   614 	* Sets a new clipping region for Direct Screen Access. After the method
       
   615 	* returns, no video will be drawn outside of the region. If clipping is
       
   616 	* not supported, or the clipping region is too complex, either playback
       
   617 	* will pause or will resume without video display, depending on the
       
   618 	* current setting of SetPauseOnClipFail(), and the result can be verified
       
   619 	* with IsPlaying(). Clipping can be disabled by setting a new clipping
       
   620 	* region that includes the whole video window.
       
   621 
       
   622 	* @param aRegion		The new clipping region. After the method returns,
       
   623 	*                       no video will be drawn outside the region.
       
   624 
       
   625 	* @pre					This method can only be called after the hwdevice
       
   626 	*                       has been initialized with Initialize().
       
   627 	*/
       
   628 	virtual void SetScreenClipRegion( const TRegion& aRegion );
       
   629 
       
   630 
       
   631    /**
       
   632 	* Sets whether the system should pause playback when it gets a clipping
       
   633 	* region it cannot handle, or Direct Screen Access is aborted completely.
       
   634 	* If not, processing will proceed normally, but no video will be drawn.
       
   635 	* By default, playback is paused.
       
   636 
       
   637 	* @param aPause		True if playback should be paused when clipping fails,
       
   638 	*                   false if not.
       
   639 	*					If playback is not paused, it will be continued
       
   640 	*					If without video display
       
   641     *
       
   642 	* @pre				This method can only be called after the hwdevice has
       
   643 	*                   been initialized with Initialize().
       
   644 	*/
       
   645 	virtual void SetPauseOnClipFail( TBool aPause );
       
   646 
       
   647    /**
       
   648 	* Aborts Direct Screen Access completely, to be called from
       
   649 	* MAbortDirectScreenAccess::AbortNow() and similar methods. DSA can be
       
   650 	* resumed by calling StartDirectScreenAccessL().
       
   651 
       
   652 	* @pre		This method can only be called after the hwdevice has been
       
   653 	* initialized with Initialize().
       
   654 	*/
       
   655 	virtual void AbortDirectScreenAccess();
       
   656 
       
   657    /**
       
   658 	* Indicates Whether playback is proceeding
       
   659 	* @return		ETrue if video is still being played ( even if not
       
   660 	*               necessarily displayed )
       
   661 
       
   662 	* @pre		    This method can only be called after the hwdevice has been
       
   663 	*               initialized with Initialize().
       
   664 	*/
       
   665 	virtual TBool IsPlaying();
       
   666 
       
   667    /**
       
   668 	* Re-draws the latest video picture.Only available when DSA is being used.
       
   669 	* If DSA is aborted or a non-supported clipping region has been set, the
       
   670 	* request may be ignored.
       
   671 
       
   672 	* @pre		This method can only be called after the hwdevice has been
       
   673 	*           initialized with Initialize().
       
   674 	*/
       
   675 	virtual void Redraw();
       
   676 
       
   677    /**
       
   678 	* Starts video playback, including decoding, post-processing, and
       
   679 	* rendering. Playback will proceed until it has been stopped or paused, or
       
   680 	* the end of the bitstream is reached.
       
   681 
       
   682 	* @pre		This method can only be called after the hwdevice has been
       
   683 	*           initialized with Initialize().
       
   684 	*/
       
   685 	virtual void Start();
       
   686 
       
   687    /**
       
   688 	* Stops video playback. No new pictures will be decoded, post-processed,
       
   689 	* or rendered.
       
   690 
       
   691 	* @pre		This method can only be called after the hwdevice has been
       
   692 	*           initialized with Initialize().
       
   693 	*/
       
   694 	virtual void Stop();
       
   695 
       
   696    /**
       
   697 	* Pauses video playback, including decoding, post-processing, and
       
   698 	* rendering. No pictures will be decoded, post-processed, or rendered
       
   699 	* until playback has been resumed.
       
   700 
       
   701 	* @pre		This method can only be called after the hwdevice has been
       
   702 	*           initialized with Initialize().
       
   703 	*/
       
   704 	virtual void Pause();
       
   705 
       
   706    /**
       
   707 	* Resumes video playback after a pause.
       
   708 
       
   709 	* @pre		This method can only be called after the hwdevice has been
       
   710 	*           initialized with Initialize().
       
   711 	*/
       
   712 	virtual void Resume();
       
   713 
       
   714    /**
       
   715 	* Changes to a new decoding and playback position, used for randomly
       
   716 	* accessing ( seeking ) the input stream. The position change flushes all
       
   717 	* input and output buffers, pre-decoder and post-decoder buffering are
       
   718 	* handled as if a new bitstream was. If the device still has buffered
       
   719 	* pictures that precede the new playback position, they will be discarded.
       
   720 	* If playback is synchronized to a clock source, the client is responsible
       
   721 	* for setting the clock source to the new position.
       
   722 
       
   723 	* @param aPlaybackPositio	The new playback position in the video stream.
       
   724 
       
   725 	* @pre					This method can only be called after the hwdevice
       
   726 	*                       has been initialized with Initialize().
       
   727 	*/
       
   728 	virtual void SetPosition(
       
   729 			             const TTimeIntervalMicroSeconds& aPlaybackPosition );
       
   730 
       
   731    /**
       
   732 	* Freezes a picture on the screen. After the picture has been frozen, no
       
   733 	* new pictures are displayed until the freeze is released with
       
   734 	* ReleaseFreeze(). If the device output is being written to memory buffers
       
   735 	* or to another plug-in, instead of the screen, no decoded pictures will
       
   736 	* be delivered while the freeze is active, and they are simply discarded.
       
   737 
       
   738 	* @param aTimestamp		The presentation timestamp of the picture to
       
   739 	*                       freeze. The frozen picture will be the first
       
   740 	*                       picture with a timestamp greater than or equal to
       
   741 	*                       this parameter
       
   742 
       
   743 	* @pre					This method can only be called after the hwdevice
       
   744 	*                       has been initialized with Initialize().
       
   745 	*/
       
   746 	virtual void FreezePicture( const TTimeIntervalMicroSeconds& aTimestamp );
       
   747 
       
   748    /**
       
   749 	* Releases a picture frozen with FreezePicture()
       
   750 
       
   751 	* @param aTimestamp		The presentation timestamp of the picture to
       
   752 	*                       release. The first picture displayed after the
       
   753 	*                       release will be the first picture with a timestamp
       
   754 	*						greater than or equal to this parameter. To
       
   755 	*						greater release the freeze immediately,	set the
       
   756 	*						greater timestamp to zero.
       
   757 
       
   758 	* @pre					This method can only be called after the hwdevice
       
   759 	*                       has been initialized with Initialize().
       
   760 	*/
       
   761 	virtual void ReleaseFreeze( const TTimeIntervalMicroSeconds& aTimestamp );
       
   762 
       
   763    /**
       
   764 	* Returns the current playback position, i.e. the timestamp for the most
       
   765 	* recently displayed or virtually displayed picture. If the device output
       
   766 	* is written to another device, the most recent output picture is used.
       
   767 
       
   768 	* @return	Current playback position
       
   769 
       
   770 	* @pre		This method can only be called after the hwdevice has been
       
   771 	*           initialized with Initialize().
       
   772 	*/
       
   773 	virtual TTimeIntervalMicroSeconds PlaybackPosition();
       
   774 
       
   775    /**
       
   776 	* Returns the total amount of memory allocated for uncompressed pictures.
       
   777 	* This figure only includes the pictures actually allocated by the plug-in
       
   778 	* itself, so that the total number of bytes allocated in the system can be
       
   779 	* calculated by taking the sum of the values from all plug-ins.
       
   780 
       
   781 	* @return		Total number of bytes of memory allocated for uncompressed
       
   782 	*               pictures.
       
   783 
       
   784 	* @pre		    This method can only be called after the hwdevice has been
       
   785 	*               initialized with Initialize().
       
   786 	*/
       
   787 	virtual TUint PictureBufferBytes();
       
   788 
       
   789    /**
       
   790 	* Reads various counters related to decoded pictures. See the definition
       
   791 	* of TPictureCounters for a description of the counters. The counters are
       
   792 	* reset when Initialize() or this method is called, and thus they only
       
   793 	* include pictures processed since the last call.
       
   794 
       
   795 	* @param aCounters	The counter structure to fill
       
   796 	* @pre				This method can only be called after the hwdevice has
       
   797 	*                   been initialized with Initialize().
       
   798 	*/
       
   799 	virtual void GetPictureCounters(
       
   800 			                  CMMFDevVideoPlay::TPictureCounters& aCounters );
       
   801 
       
   802    /**
       
   803 	* Sets the computational complexity level to use. If separate complexity
       
   804 	* levels are not available, the method call is ignored. If the level
       
   805 	* specified is not available, the results are undefined. Typically the
       
   806 	* device will either ignore the request or use the nearest suitable level.
       
   807 
       
   808 	* @param aLevel	The computational complexity level to use. Level zero (0)
       
   809 	*               is the most complex one, with the highest quality. Higher
       
   810 	*               level numbers require less processing and may have lower
       
   811 	*               quality
       
   812 
       
   813 	* @pre			This method can only be called after the hwdevice has been
       
   814 	*               initialized with Initialize().
       
   815 	*/
       
   816 	virtual void SetComplexityLevel( TUint aLevel );
       
   817 
       
   818    /**
       
   819 	* Gets the number of complexity levels available.
       
   820 
       
   821 	* @return	The number of complexity control levels available, or zero if
       
   822 	*           the information is not available yet. The information may not
       
   823 	*           be available if the number of levels depends on the input
       
   824 	*           data, and enough input data has not	been read yet. In that
       
   825 	*           case, using level zero is safe.
       
   826 
       
   827 	* @pre		This method can only be called after the hwdevice has been
       
   828 	*           initialized with Initialize().
       
   829 	*/
       
   830 	virtual TUint NumComplexityLevels();
       
   831 
       
   832    /**
       
   833 	* Gets information about a computational complexity level. This method can
       
   834 	* be called after NumComplexityLevels() has returned a non-zero value - at
       
   835 	* that point the information is guaranteed to be available. Some hardware
       
   836 	* device implementations may not be able to provide all values, in that
       
   837 	* case the values will be approximated.
       
   838 
       
   839 	* @param aLevel		The computational complexity level to query. The level
       
   840 	*                   numbers range from zero ( the most complex ) to
       
   841 	*                   NumComplexityLevels()-1.
       
   842 	* @param aInfo		The information structure to fill
       
   843 
       
   844 	* @pre				This method can only be called after the hwdevice has
       
   845 	*                   been initialized with Initialize().
       
   846 	*/
       
   847 	virtual void GetComplexityLevelInfo( TUint aLevel,
       
   848 			                  CMMFDevVideoPlay::TComplexityLevelInfo& aInfo );
       
   849 
       
   850    /**
       
   851 	* Returns a picture back to the device. This method is called by
       
   852 	* CDevVideoPlay to return pictures from the client ( after they have been
       
   853 	* written with NewPicture() ), or by the output device when it has
       
   854 	* finished using a picture.
       
   855 
       
   856 	* @param aPicture	The picture to return. The device can re-use the
       
   857 	*                   memory for the picture.
       
   858 
       
   859 	* @pre				This method can only be called after the hwdevice has
       
   860 	*                   been initialized with Initialize().
       
   861 	*/
       
   862 	virtual void ReturnPicture( TVideoPicture* aPicture );
       
   863 
       
   864    /**
       
   865 	* Gets a copy of the latest picture sent to output
       
   866 
       
   867 	* @param aPictureData	  Target picture. The memory for the picture
       
   868 	*                         must be allocated by the caller, and
       
   869 	*                         initialized properly. The data formats must
       
   870 	*                         match the snapshot format requested.
       
   871 	* @param aFormat		  The picture format to use for the snapshot.
       
   872 
       
   873 	* @return				  ETrue if the snapshot was taken, EFalse if a
       
   874 	*                         picture is not available. The picture may not
       
   875 	*                         be available if decoding has not progressed
       
   876 	*                         far enough yet.
       
   877 
       
   878 	* @leave				  The method will leave if an error occurs.
       
   879 
       
   880 	* @pre					  This method can only be called after the
       
   881 	*                         hwdevice has been initialized with Initialize().
       
   882 	*/
       
   883 	virtual TBool GetSnapshotL( TPictureData& aPictureData,
       
   884 			                    const TUncompressedVideoFormat& aFormat );
       
   885 
       
   886    /**
       
   887 	* Gets a copy of a specified picture.When the snapshot is available, it
       
   888 	* will be returned to the client using the TimedSnapshotComplete()
       
   889 	* callback. To cancel a timed snapshot request, use CancelTimedSnapshot().
       
   890 	* Only one timed snapshot request can be active at a time.
       
   891 
       
   892 	* @param aPictureData			Target picture. The memory for the picture
       
   893 	*                               must be allocated by the caller, and
       
   894 	*                               initialized properly. The data formats
       
   895 	*                               must match the snapshot format requested.
       
   896 	*                               The picture must remain valid until
       
   897 	*								the snapshot has been taken or until the
       
   898 	*								the request has been cancelled with
       
   899 	*								the CancelTimedSnapshot().
       
   900 	* @param aFormat				The picture format to use for the snapshot
       
   901 	* @param aPresentationTimestamp	Presentation timestamp for the picture to
       
   902 	* copy. The timestamp
       
   903 	*								must match the timestamp in the picture
       
   904 	*								must exactly, so the same clock frequency
       
   905 	*								must should be used. Used for the first
       
   906 	*								must method variant
       
   907 
       
   908 	* @leave						The method will leave if an error occurs.
       
   909 
       
   910 	* @pre							This method can only be called after the
       
   911 	*                               hwdevice has been initialized with
       
   912 	*                               Initialize().
       
   913 	*/
       
   914 	virtual void GetTimedSnapshotL( TPictureData* aPictureData,
       
   915 			        const TUncompressedVideoFormat& aFormat,
       
   916 					const TTimeIntervalMicroSeconds& aPresentationTimestamp );
       
   917 
       
   918    /**
       
   919 	* Gets a copy of a specified picture.When the snapshot is available, it
       
   920 	* will be returned to the client using the TimedSnapshotComplete()
       
   921 	* callback. To cancel a timed snapshot request, use CancelTimedSnapshot().
       
   922 	* Only one timed snapshot request can be active at a time.
       
   923 
       
   924 	* @param aPictureData	Target picture. The memory for the picture must be
       
   925 	*                       allocated by the caller, and initialized properly.
       
   926 	*                       The data formats must match	the snapshot format
       
   927 	*                       requested. The picture must remain valid until
       
   928 							the snapshot has been taken or until the request
       
   929 							has been cancelled with CancelTimedSnapshot().
       
   930 	* @param aFormat		The picture format to use for the snapshot.
       
   931 	* @param aPictureId  	Picture identifier for the picture to copy. Used
       
   932 	*                       for the second method variant
       
   933 
       
   934 	* @leave				The method will leave if an error occurs.
       
   935 
       
   936 	* @pre					This method can only be called after the hwdevice
       
   937 	*                       has been initialized with Initialize().
       
   938 	*/
       
   939 	virtual void GetTimedSnapshotL( TPictureData* aPictureData,
       
   940 			                        const TUncompressedVideoFormat& aFormat,
       
   941 									const TPictureId& aPictureId );
       
   942 	/**
       
   943 	* Cancels a timed snapshot request
       
   944 
       
   945 	* @pre		This method can only be called after the hwdevice has been
       
   946 	*           initialized with Initialize().
       
   947 	*/
       
   948 	virtual void CancelTimedSnapshot();
       
   949 
       
   950    /**
       
   951 	* Gets a list of the supported snapshot picture formats.
       
   952 
       
   953 	* @param aFormats		An array for the result format list. The array
       
   954 	*                       must be created and destroyed by the caller
       
   955 
       
   956 	* @leave				The method will leave if an error occurs.
       
   957 
       
   958 	* @pre					This method can only be called after the hwdevice
       
   959 	*                       has been initialized with Initialize().
       
   960 	*/
       
   961 	virtual void GetSupportedSnapshotFormatsL(
       
   962 			                     RArray<TUncompressedVideoFormat>& aFormats );
       
   963 
       
   964    /**
       
   965 	* Notifies the hardware device that the end of input data has been reached
       
   966 	* and no more input data will be written. The hardware device can use this
       
   967 	* signal to ensure that the remaining data gets processed, without waiting
       
   968 	* for new data. After the remaining data has been processed, the hardware
       
   969 	* device must notify call the proxy MdvppStreamEnd() callback.This method
       
   970 	* is mainly useful for file-to-file conversions and other non-realtime
       
   971 	* processing. For real-time playback all video pictures are processed or
       
   972 	* discarded according to their timestamps.
       
   973 
       
   974 	* @pre		This method can only be called after the hwdevice has been
       
   975 	*           initialized with Initialize().
       
   976 	*/
       
   977 	virtual void InputEnd();
       
   978 
       
   979 public:	// MProcessEngineObserver Function
       
   980 
       
   981    /**
       
   982     * Callback from Engine to represent buffer has been consumed
       
   983     * @param  :  aInp and aError
       
   984     * @return :  TInt: KErrNone or KErrCancel
       
   985     */
       
   986 	virtual TInt InputBufferConsumed ( TAny* aInp, TInt aError );
       
   987 
       
   988    /**
       
   989     * Callback to reprsent that output buffer is ready
       
   990     * @param  :  aInp and aError
       
   991     * @return :  TInt: KErrNone or KErrCancel
       
   992     */
       
   993 	virtual TInt OutputBufferReady ( TAny* aOup, TInt aError );
       
   994 
       
   995    /**
       
   996     * CallBack to handle error
       
   997     * @return :  None
       
   998     */
       
   999 	virtual void FatalErrorFromProcessEngine ( TInt aError );
       
  1000     /**
       
  1001 	 * added as a dummy function, to make compatibility with the
       
  1002 	 * encoder for the utility-processengine
       
  1003 	 */
       
  1004 	// Callback to indicate the completion of callback
       
  1005 	void CommandProcessed ( TInt aCmd, TAny* aCmdData, TInt aError );
       
  1006 
       
  1007 public : // MMmfVideoBufferManagementObserver Functions
       
  1008 
       
  1009    /**
       
  1010     * Notifies the observer that one or more new input buffers are available.
       
  1011 	* The client can then use MmvbmGetBufferL() to get a buffer.
       
  1012     */
       
  1013 	virtual void MmvbmoNewBuffers() ;
       
  1014 
       
  1015    /**
       
  1016     * Notifies the observer all outstanding input buffers must be
       
  1017     * released immediately
       
  1018     */
       
  1019 	virtual void MmvbmoReleaseBuffers();
       
  1020 
       
  1021 protected:
       
  1022 
       
  1023    /**
       
  1024 	* Set the proxy implementation to be used. Called just after the object is
       
  1025 	* constructed.
       
  1026 
       
  1027 	* @param	aProxy	The proxy to use.
       
  1028 	*/
       
  1029 	virtual void SetProxy( MMMFDevVideoPlayProxy& aProxy );
       
  1030 
       
  1031 private:
       
  1032 	/**
       
  1033      * C++ default constructor.
       
  1034      */
       
  1035 	CAriH264decHwDevice();
       
  1036 
       
  1037 	/**
       
  1038      *  Symbian 2nd phase constructor .
       
  1039      */
       
  1040 	void ConstructL();
       
  1041 
       
  1042 	/**
       
  1043 	 *Creates o/p buffers based on the o/p formats supported
       
  1044 	 *@param  : None
       
  1045 	 */
       
  1046 	void CreateOutputBuffersL();
       
  1047 
       
  1048 	/**
       
  1049 	 * Gives call backs to clinet regarding slice and picture loss
       
  1050 	 * @param  : None
       
  1051 	 */
       
  1052 
       
  1053 	void SliceAndPictureLoss();
       
  1054 
       
  1055 	/**
       
  1056 	 * Allcotion and reallocation of input buffers
       
  1057 	 * @param  : None
       
  1058 	 */
       
  1059 
       
  1060 	void CreateInputBufferL( TUint aBufferSize, TBool aReallocate );
       
  1061 
       
  1062 	/**
       
  1063 	 * HandleInputEndInStopping
       
  1064 	 * @param  : None
       
  1065 	 */
       
  1066 	void HandleInputEndInStopping();
       
  1067 
       
  1068 private : //Data
       
  1069 
       
  1070 	// Reference to Input Free Buffer Queue
       
  1071 	RArray<TVideoInputBuffer*>		iInputFreeBufferQueue;
       
  1072 
       
  1073 	// Free Input Buffers
       
  1074 	TVideoInputBuffer*				iInputFreeBuffers;
       
  1075 
       
  1076 	// Reference to Output Device
       
  1077 	CMMFVideoPostProcHwDevice*		iOutputDevice;
       
  1078 
       
  1079 	// Reference to Proxy Object
       
  1080 	MMMFDevVideoPlayProxy*			iMMFDevVideoPlayProxy;
       
  1081 
       
  1082 	// Represents the state of the Decoder Hw Device
       
  1083 	CStateMachine					*iState;
       
  1084 
       
  1085 	// Reference to Video Picture Header
       
  1086 	TVideoPictureHeader*			iVideoPictureHeader;
       
  1087 
       
  1088 	// Current Decoding Position
       
  1089 	TTimeIntervalMicroSeconds		iDecodingPosition;
       
  1090 
       
  1091 	//	Handle to the Compressed video format
       
  1092 	CCompressedVideoFormat*			iInputFormat;
       
  1093 
       
  1094 	//	Uncompressed Output format
       
  1095 	TUncompressedVideoFormat		iOutputFormat;
       
  1096 
       
  1097 	// Buffer Options Set by the Client
       
  1098 	CMMFDevVideoPlay::TBufferOptions		iBufferOptions;
       
  1099 
       
  1100 	// Current Picture Counter value
       
  1101 	CMMFDevVideoPlay::TPictureCounters		iPictureCounters;
       
  1102 
       
  1103 	// Current Bit Stream Counter value
       
  1104 	CMMFDevVideoPlay::TBitstreamCounters	iBitstreamCounters;
       
  1105 
       
  1106 	// Codec Reference
       
  1107 	CAriH264decWrapper*						iCodec;
       
  1108 
       
  1109 	//	Base Process Engine Reference
       
  1110 	CBaseEngine*				iEngine;
       
  1111 
       
  1112 	// To Check whether inputend is called or not
       
  1113 	TBool						iInputEndCalled;
       
  1114 
       
  1115 	// OutPut  Buffers
       
  1116 	TVideoPicture*				iOutputFreeBuffer;
       
  1117 
       
  1118 	// Free OutPut Buffer Queue
       
  1119 	RArray<TVideoPicture*>		iOutputFreeBufferQueue;
       
  1120 
       
  1121 	// counter to keep track of the no of buffers added to the engine
       
  1122 	TInt						iFilledBufferCounter;
       
  1123 
       
  1124 	// data unit type set by the client
       
  1125 	TVideoDataUnitType			iDataUnitType;
       
  1126 
       
  1127 	// Encapulation set by the client
       
  1128 	TVideoDataUnitEncapsulation iEncapsulation;
       
  1129 
       
  1130 	// represents the o/p buffer size
       
  1131 	TInt						iOutputBufferSize;
       
  1132 
       
  1133 	// flag to whether o/p buffers created or not
       
  1134 	TBool						iOutputBuffersCreated;
       
  1135 
       
  1136 	// Picture Number
       
  1137 	TUint						iPictureNumber;
       
  1138 
       
  1139 	// represents the number of inputbuffers created so avoids reallocation
       
  1140 	TUint						iNumberOfInputBuffersAllocated;
       
  1141 
       
  1142 	// Reference to the custom buffer interface
       
  1143 	MMmfVideoBufferManagement*	iCustomBufferHandle;
       
  1144 
       
  1145 	// buffer options for the custom interface
       
  1146 	MMmfVideoBufferManagement::TBufferOptions *iCustomBufferOptions;
       
  1147 
       
  1148 	// represents whether the o/p buffers should be added to engine or not
       
  1149 	TBool 			iBufferAdded;
       
  1150 
       
  1151     // flag to indciate that ConfigureDecoderL is called
       
  1152 	TBool			iConfigureDecoderCalled;
       
  1153 
       
  1154 	// flag to indciate that decoder has been configured
       
  1155 	TBool			iDecoderConfigured;
       
  1156 
       
  1157 	// the width of the source file
       
  1158 	TInt			iWidthSource;
       
  1159 
       
  1160 	// the height of the source file
       
  1161 	TInt			iHeightSource;
       
  1162 
       
  1163 	// type of the input stream
       
  1164 	TInt			iStreamType;
       
  1165 
       
  1166 	// length of the NAL hdr
       
  1167 	TUint iLenOfNalLenFld, iLenOfHdrLen;
       
  1168 
       
  1169 	// array which holds the list of supported formats
       
  1170 	RArray<CCompressedVideoFormat*> iSupportedFormats;
       
  1171 
       
  1172 	// array which holds the max value of the picture rates
       
  1173 	RArray<TPictureRateAndSize> iMaxPictureRates;
       
  1174 
       
  1175 };
       
  1176 
       
  1177 #endif //ARIH264DECHWDEVICE_H