epoc32/include/mmf/devvideo/devvideorecord.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef __DEVVIDEORECORD_H__
    17 #define __DEVVIDEORECORD_H__
    18 
    19 #include <e32std.h>
    20 #include <mmf/devvideo/devvideobase.h>
    21 
    22 class MMMFDevVideoRecordObserver;
    23 class CMMFVideoRecordHwDevice;
    24 class CMMFVideoEncodeHwDevice;
    25 class CMMFVideoPreProcHwDevice;
    26 class TVideoOutputBuffer;
    27 
    28 /**
    29 MMMFDevVideoRecordProxy is the interface the CDevVideoRecord implementation provides for video recording 
    30 hardware devices. The hardware devices use this interface to report events and send used pictures and 
    31 new buffers to the client.
    32 @publishedAll
    33 @released
    34 */
    35 class MMMFDevVideoRecordProxy
    36 	{
    37 public:
    38 	/**
    39 	Delivers a new coded data unit to the client. The CDevVideoRecord implementation will maintain a list 
    40 	of buffers and implement NumDataBuffers() and NextBufferL() based on those. The buffers will be returned
    41 	back to the device using ReturnBuffer().
    42 
    43 	@param	"aBuffer"	"The buffer containing the data to send."
    44 	*/
    45 	virtual void MdvrpNewBuffer(TVideoOutputBuffer* aBuffer) = 0;
    46 
    47 	/**
    48 	Returns a used input picture back to the client. Called by the encoder hardware device after the picture
    49 	has been encoded.
    50 
    51 	@param	"aPicture"	"The picture to return."
    52 	*/
    53 	virtual void MdvrpReturnPicture(TVideoPicture* aPicture) = 0;
    54 
    55 	/**
    56 	Sends a notification to the client that the current supplemental info send request has completed.
    57 	*/
    58 	virtual void MdvrpSupplementalInfoSent() = 0;
    59 
    60 	/**
    61 	Reports a fatal error to the client. The device must automatically stop processing video data when 
    62 	such errors occur, and may not do further processing before it has been deleted and re-created.
    63 
    64 	@param	"aDevice"	"The device that reports the error."
    65 	@param	"aError"	"The error code."
    66 	*/
    67 	virtual void MdvrpFatalError(CMMFVideoHwDevice* aDevice, TInt aError) = 0;
    68 
    69 	/**
    70 	Reports that an asynchronous Initialize() method has completed. The device is now ready for recording.
    71 
    72 	@param	"aDevice"	"The device that was initialized."
    73 	@param	"aError"	"Initialization result error code, KErrNone if initialization was successful."
    74 	*/
    75 	virtual void MdvrpInitializeComplete(CMMFVideoHwDevice* aDevice, TInt aError) = 0;
    76 
    77 	/**
    78 	Reports that the input video data end has been reached and all pictures have been processed. Called 
    79 	by each hardware device after their InputEnd() methods have been called and all data has been processed.
    80 	The proxy implementation will notify the client about stream end when all hardware devices have called 
    81 	this method.
    82 	*/
    83 	virtual void MdvrpStreamEnd() = 0;
    84 	};
    85 
    86 
    87 /**
    88 A video output buffer for a single output coded data unit from the encoder. In practice the encoder is 
    89 likely to inherit its own buffer class from this class, adding its own internal bookkeeping data.
    90 @publishedAll
    91 @released
    92 */
    93 class TVideoOutputBuffer
    94 	{
    95 public:
    96 	/**
    97 	Coded video data for this data unit.
    98 	*/
    99 	TPtrC8 iData;
   100 
   101 	/**
   102 	Capture timestamp for this data unit. If a single picture is divided into multiple data units, 
   103 	all data units have the same timestamp.
   104 	*/
   105 	TTimeIntervalMicroSeconds iCaptureTimestamp;
   106 
   107 	/**
   108 	Identification number indicating the start of the spatial coverage of the data in the output buffer, 
   109 	for example the first macroblock number. 
   110 	*/
   111 	TUint iCoverageStartPosition;
   112 
   113 	/**
   114 	End of the spatial coverage of the data in the buffer, for example the last macroblock number. 
   115 	The idenfication numbers can be used to match data partitions with each other.
   116 	*/
   117 	TUint iCoverageEndPosition;
   118 
   119 	/**
   120 	Order number of the output buffer having the same spatial coverage as an earlier output buffer 
   121 	of the same picture. Used with video pictures or segments that do not fit into an output buffer. 
   122 	The order number of the first output buffer of a particular spatial coverage area is 0. The order 
   123 	number shall be incremented by 1 for each subsequent output buffer having the same coverage in the 
   124 	same coded picture.
   125 	*/
   126 	TUint iOrderNumber;
   127 
   128 	/**
   129 	Lowest unequal error protection level present in the buffer. Level 0 indicates that the buffer can 
   130 	be discarded without causing temporal error propagation in the decoder, higher values indicate more 
   131 	important buffers. If unequal error protection is not used, the value is set to 1.
   132 	*/
   133 	TUint iMinErrorProtectionLevel;
   134 
   135 	/**
   136 	Highest unequal error protection level present in the buffer. If unequal error protection is not 
   137 	used, the value is set to 1.
   138 	*/
   139 	TUint iMaxErrorProtectionLevel;
   140 
   141 	/**
   142 	True if this buffer contains data that is required for decoding several pictures, for example the 
   143 	only copy of a sequence header. A picture needed for motion compensated prediction is not considered
   144 	"required for decoding several pictures".
   145 	*/
   146 	TBool iRequiredSeveralPictures;
   147 
   148 	/**
   149 	True if this buffer contains data that is required for decoding other parts of the same picture, 
   150 	for example the only copy of the picture header.
   151 	*/
   152 	TBool iRequiredThisPicture;
   153 
   154 	/**
   155 	The layer number for this picture if layered bit-rate scalability is used. If layers are not used, 
   156 	the layer number is always zero.
   157 	*/
   158 	TUint iLayer;
   159 
   160 	/**
   161 	Sub-sequence identifier of the output picture. A sub-sequence is a set of coded pictures within a 
   162 	bit-rate scalability layer. A picture shall reside in one scalability layer and in one sub-sequence 
   163 	only. A sub-sequence shall not depend on any other sub-sequence in the same or in a higher layer. 
   164 	A sub-sequence in layer 0 can be decoded independently of any other sub-sequences. A sub-sequence 
   165 	identifier labels the sub-sequence within a layer. Consecutive sub-sequences within a particular 
   166 	layer in decoding order shall have a different sub-sequence identifier from each other. See Annex D 
   167 	of H.264 | MPEG-4 AVC for further details.
   168 	*/
   169 	TUint iSubSeqId;
   170 	
   171 	/**
   172 	The in-layer scalability step for the data in the buffer if in-layer scalability is used. 
   173 	If in-layer scalability is not in use, the step is set to zero.
   174 	*/
   175 	TUint iInLayerScalabilityStep;
   176 
   177 	/**
   178 	iDataPartitionNumber equal to 0 indicates that data partitioning is not in use. Values of 
   179 	iDataPartitionNumber greater than 0 indicate the data partition number in descending order of 
   180 	importance, i.e. data partition 1 is the most important data partition subjectively. Data 
   181 	partitioning can be used with multiple unequal error protection levels.
   182 	*/
   183 	TUint iDataPartitionNumber;
   184 
   185 	/**
   186 	True if this buffer contains data for a random access point. 
   187 	*/
   188 	TBool iRandomAccessPoint;
   189 
   190 	/**
   191 	Updated HRD/VBV parameters, valid if HRD/VBV is in use and iRandomAccessPoint is true.
   192 	*/
   193 	TPtrC8 iHrdVbvParams;
   194 
   195 	/**
   196 	Coding-standard specific data.
   197 	*/
   198 	TPtrC8 iCodingStandardSpecificData;
   199 
   200 	/**
   201 	Implementation-specific data.
   202 	*/
   203 	TPtrC8 iImplementationSpecificData;
   204 
   205 	/**
   206 	A queue link used internally by the MSL API. The field must not be modified while the buffer is 
   207 	in the MSL API, but can be used by the client before the buffer has been written and after the 
   208 	buffer has been returned.
   209 	*/
   210 	TDblQueLink iLink;
   211 	};
   212 
   213 
   214 
   215 /**
   216 This class contains information about the pre-processing capabilities that an encoder or a pre-processor 
   217 hardware has. Although it mainly contains static data, it is defined as a complete CBase-derived class 
   218 since the data is relatively complex and proper memory management is necessary.
   219 
   220 The objects are created by the pre-processor or encoder devices, and used by the MSL video client code.
   221 
   222 @publishedAll
   223 @released
   224 */
   225 class CPreProcessorInfo : public CBase
   226 	{
   227 public:
   228 	/**
   229 	Creates and returns a new CPreProcessorInfo object. All data passed into this method is copied.
   230 	@param "aUid"							"The uid of the pre-processor."
   231 	@param "aManufacturer"					"The manufacturer of the pre-processor."
   232 	@param "aIdentifier"					"The manufacturer-specific identifier of the pre-processor."
   233 	@param "aVersion"						"The version of the pre-processor."
   234 	@param "aAccelerated"					"Whether the pre-processor is hw accelerated or not."
   235 	@param "aSupportsDirectCapture"			"Whether the pre-processor supports direct capture."
   236 	@param "aInputFormats"					"An array of the supported input formats."
   237 	@param "aOutputFormats"					"An array of the supported output formats."
   238 	@param "aSupportedCombinations"			"An array of the supported combinations."
   239 	@param "aSupportsArbitraryScaling"		"Whether the pre-processor supports arbitrary scaling."
   240 	@param "aSupportsAntiAliasedScaling"	"Whether the pre-processor supports anti-alias filtering on scaling.""
   241 	@param "aSupportedScaleFactors"			"An array of the supported scale factors if arbitrary scaling isn't suported"
   242 	@param "aYuvToYuvCapabilities"			"The yuv to yuv conversion capabilities of the pre-processor."
   243 	@param "aSupportedRgbRanges"			"The supported rgb ranges."
   244 	@param "aSupportedRotations"			"The supported rotations."
   245 	@param "aImplementationSpecificInfo"	"Implementation-specific information."
   246 	@return"The newly created CPreProcessorInfo object."
   247 	@leave "This method may leave with one of the system-wide error codes.
   248 	*/
   249 	IMPORT_C static CPreProcessorInfo* NewL(TUid aUid,
   250 											const TDesC& aManufacturer,
   251 											const TDesC& aIdentifier,
   252 											TVersion aVersion,
   253 											TBool aAccelerated,
   254 											TBool aSupportsDirectCapture,
   255 											const TArray<TUncompressedVideoFormat>& aInputFormats,
   256 											const TArray<TUncompressedVideoFormat>& aOutputFormats,
   257 											const TArray<TUint32>& aSupportedCombinations,
   258 											TBool aSupportsArbitraryScaling,
   259 											TBool aSupportsAntiAliasedScaling,
   260 											const TArray<TScaleFactor>& aSupportedScaleFactors,
   261 											const TYuvToYuvCapabilities& aYuvToYuvCapabilities,
   262 											TUint32 aSupportedRgbRanges,
   263 											TUint32 aSupportedRotations,
   264 											const TDesC8& aImplementationSpecificInfo);
   265 
   266 	/**
   267 	Destructor.
   268 	*/
   269 	IMPORT_C ~CPreProcessorInfo();
   270 
   271 	/**
   272 	Returns the pre-processor UID.
   273 	@return "Pre-processor UID."
   274 	*/
   275 	IMPORT_C TUid Uid() const;
   276 
   277 	/**
   278 	Returns the hardware device manufacturer.
   279 	@return "The hardware device manufacturer. The reference is valid until this is destroyed."
   280 	*/
   281 	IMPORT_C const TDesC& Manufacturer() const;
   282 
   283 	/**
   284 	Returns the hardware device manufacturer-specific identifier. The combination of the manufacturer 
   285 	and identifier uniquely identifies the plug-in.
   286 	@return "The hardware device identifier. The reference is valid until this object is destroyed."
   287 	*/
   288 	IMPORT_C const TDesC& Identifier() const;
   289 
   290 	/**
   291 	Returns the pre-processor version.
   292 	@return "Pre-processor version."
   293 	*/
   294 	IMPORT_C TVersion Version() const;
   295 
   296 	/**
   297 	Returns whether the plug-in is hardware-accelerated. Hardware-accelerated pre-processors can run on 
   298 	an application DSP or dedicated hardware.
   299 	@return "True if the pre-processor is hardware-accelerated." 
   300 	*/
   301 	IMPORT_C TBool Accelerated() const;
   302 
   303 	/**
   304 	Returns whether the hardware device supports direct capture. Pre-processors supporting direct capture 
   305 	can get the input pictures directly from a camera, possibly using an efficient hardware-dependent data 
   306 	path.
   307 	@return "True if the pre-processor supports direct capture."
   308 	*/
   309 	IMPORT_C TBool SupportsDirectCapture() const;
   310 
   311 	/**
   312 	Returns whether the pre-processor supports the given input format.
   313 	@param	"aFormat"	"The format to be checked."
   314 	@return "True if the pre-processor supports the given input format."
   315 	*/
   316 	IMPORT_C TBool SupportsInputFormat(const TUncompressedVideoFormat& aFormat) const;
   317 
   318 	/**
   319 	Returns the input formats that the pre-processor supports.
   320 	@return "An RArray table of supported video formats (TUncompressedVideoFormat). The reference is valid 
   321 			until the CPreProcessorInfo object is destroyed."
   322 	*/
   323 	IMPORT_C const RArray<TUncompressedVideoFormat>& SupportedInputFormats() const;
   324 
   325 	/**
   326 	Returns whether the pre-processor supports the given output format.
   327 	@param	"aFormat"	"The format to be checked."
   328 	@return "True if the pre-processor supports the given input format."
   329 	*/
   330 	IMPORT_C TBool SupportsOutputFormat(const TUncompressedVideoFormat& aFormat) const;
   331 
   332 	/**
   333 	Returns the output formats that the pre-processor supports.
   334 	@return "An RArray table of supported video formats (TUncompressedVideoFormat). The reference is valid 
   335 			until the CPreProcessorInfo object is destroyed."
   336 	*/
   337 	IMPORT_C const RArray<TUncompressedVideoFormat>& SupportedOutputFormats() const;
   338 
   339 	/**
   340 	Returns whether the pre-processor supports the given pre-processing combination.
   341 	@param	"aCombination"	"Pre-processing combination, a bitwise OR of values from TPrePostProcessType."
   342 	@return "True if the pre-processing combination is supported."
   343 	*/
   344 	IMPORT_C TBool SupportsCombination(TUint32 aCombination) const;
   345 
   346 	/**
   347 	Lists all supported pre-processing combinations.
   348 	@return "An RArray table of pre-processing combinations. Each value is a bitwise OR of values from 
   349 			TPrePostProcessType. The reference is valid until the CPreProcessorInfo object is destroyed."
   350 	*/
   351 	IMPORT_C const RArray<TUint32>& SupportedCombinations() const;
   352 
   353 	/**
   354 	Returns whether the pre-processor supports arbitrary scaling.
   355 	@return "True if arbitrary scaling is supported. If arbitrary scaling is not supported, some specific 
   356 			scale factors can still be available."
   357 	*/
   358 	IMPORT_C TBool SupportsArbitraryScaling() const;
   359 
   360 	/**
   361 	Returns whether the hardware device supports anti-aliasing filtering for scaling.
   362 	@return "True if anti-aliasing filtering is supported."
   363 	*/
   364 	IMPORT_C TBool SupportsAntiAliasedScaling() const;
   365 
   366 	/**
   367 	Returns the scaling factors the plug-in supports. If the plug-in supports arbitrary scaling the list 
   368 	is empty - use SupportsArbitraryScaling() first.
   369 	@return "An RArray list of supported scale factors (TScaleFactor). The reference is valid until the 
   370 			CPreProcessorInfo object is destroyed. If the pre-processor supports arbitrary scaling or 
   371 			no scaling at all, the list is empty."
   372 	*/
   373 	IMPORT_C const RArray<TScaleFactor>& SupportedScaleFactors() const;
   374 
   375 	/**
   376 	Returns the YUV to YUV conversion capabilities for the pre-processor.
   377 	@return "The conversion capabilities, as a TYuvToYuvCapabilities structure. The reference is valid 
   378 			until the CPreProcessorInfo object is destroyed."
   379 	*/
   380 	IMPORT_C const TYuvToYuvCapabilities& YuvToYuvCapabilities() const;
   381 
   382 	/**
   383 	Returns RGB value ranges the hardware device supports for RGB to YUV conversion.
   384 	@return "The supported RGB ranges as a bitwise OR of TRgbRange values."
   385 	*/
   386 	IMPORT_C TUint32 SupportedRgbRanges() const;
   387 
   388 	/**
   389 	Returns the rotation types the plug-in supports.
   390 	@return "The supported rotation types as a bitwise OR of TRotationType values. If the pre-processor 
   391 			does not support rotation, the return value is zero."
   392 	*/
   393 	IMPORT_C TUint32 SupportedRotations() const;
   394 
   395 	/**
   396 	Returns implementation-specific information about the pre-processor.
   397 	@return "Implementation- specific information about the pre-processor. The data format is 
   398 			implementation-specific, and defined separately by the pre-processor supplier. The reference 
   399 			is valid until the CPreProcessorInfo object is destroyed."
   400 	*/
   401 	IMPORT_C const TDesC8& ImplementationSpecificInfo() const;
   402 private:
   403 	CPreProcessorInfo(TUid aUid,
   404 					  TVersion aVersion,
   405 					  TBool aAccelerated,
   406 					  TBool aSupportsDirectCapture,
   407 					  TBool aSupportsArbitraryScaling,
   408 					  TBool aSupportsAntiAliasedScaling,
   409 					  const TYuvToYuvCapabilities& aYuvToYuvCapabilities,
   410 					  TUint32 aSupportedRgbRanges,
   411 					  TUint32 aSupportedRotations);
   412 
   413 	void ConstructL(const TDesC& aManufacturer,
   414 					const TDesC& aIdentifier,
   415 					const TArray<TUncompressedVideoFormat>& aInputFormats,
   416 					const TArray<TUncompressedVideoFormat>& aOutputFormats,
   417 					const TArray<TUint32>& aSupportedCombinations,
   418 					const TArray<TScaleFactor>& aSupportedScaleFactors,
   419 					const TDesC8& aImplementationSpecificInfo);
   420 private:
   421 	TUid iUid;
   422 	HBufC* iManufacturer;
   423 	HBufC* iIdentifier;
   424 	TVersion iVersion;
   425 	TBool iAccelerated;
   426 	TBool iSupportsDirectCapture;
   427 	RArray<TUncompressedVideoFormat> iInputFormats;
   428 	RArray<TUncompressedVideoFormat> iOutputFormats;
   429 	RArray<TUint32> iSupportedCombinations;
   430 	TBool iSupportsArbitraryScaling;
   431 	TBool iSupportsAntiAliasedScaling;
   432 	RArray<TScaleFactor> iSupportedScaleFactors;
   433 	TYuvToYuvCapabilities iYuvToYuvCapabilities;
   434 	TUint32 iSupportedRgbRanges;
   435 	TUint32 iSupportedRotations;
   436 	HBufC8* iImplementationSpecificInfo;
   437 	};
   438 
   439 /**
   440 This class contains information about a video encoder hardware device and its capabilities. 
   441 Although it mainly contains static data, it is defined as a complete CBase-derived class since the
   442 data is relatively complex and proper memory management is necessary.
   443 
   444 The objects are created by the encoder devices, and used by the MSL video client code.
   445 
   446 @publishedAll
   447 @released
   448 */
   449 class CVideoEncoderInfo : public CBase
   450 	{
   451 public:
   452 	/**
   453 	Creates and returns a new CVideoEncoderInfo object. 
   454 	All data passed in is copied on construction of the object.
   455 
   456 	@param  aUid
   457 	        The uid of the encoder.
   458 	@param  aManufacturer
   459 	        The video encoder manufacturer.
   460 	@param  aIdentifier
   461 	        The manufacturer-specific identifier for this encoder.
   462 	@param  aVersion
   463 	        The version of this encoder.
   464 	@param  aAccelerated
   465 	        Whether this encoder is accelerated.
   466 	@param  aSupportsDirectCapture
   467 	        Whether this encoder supports direct capture.
   468 	@param  aSupportedInputFormats
   469 	        An array of the supported input formats.
   470 	@param  aSupportedOutputFormats
   471 	        An array of the supported output formats.
   472 	@param  aMaxPictureSize
   473 	        The maximum supported picture size.
   474 	@param  aSupportedDataUnitTypes
   475 	        The supported data unit types.
   476 	@param  aSupportedDataUnitEncapsulations
   477 	        The supported data unit encapsulations.
   478 	@param  aMaxBitrateLayers
   479 	        The maximum number of bitrate layers supported.
   480 	@param  aSupportsSupplementalEnhancementInfo
   481 	        Whether supplemental enhancement info is supported.
   482 	@param  aMaxUnequalErrorProtectionLevels
   483 	        The maximum unequal error protection level supported.
   484 	@param  aMaxBitRate
   485 	        The maximum bit rate supported.
   486 	@param  aMaxPictureRates
   487 	        An array of the maximum picture size/rates supported.
   488 	@param  aMaxInLayerScalabilitySteps
   489 	        The maximum in-layer scalability steps supported.
   490 	@param  aSupportedPictureOptions
   491 	        The picture options supported.
   492 	@param  aCodingStandardSpecificInfo
   493 	        Coding standard specific info.
   494 	@param  aImplementationSpecificInfo
   495 	        Implementation specific info.
   496 
   497 	@return A new CVideoEncoderInfo object.
   498 	@leave  This method may leave with one of the system-wide error codes.
   499 	*/
   500 	IMPORT_C static CVideoEncoderInfo* NewL(TUid aUid,
   501 											const TDesC& aManufacturer,
   502 											const TDesC& aIdentifier,
   503 											TVersion aVersion,
   504 											TBool aAccelerated,
   505 											TBool aSupportsDirectCapture,
   506 											const TArray<TUncompressedVideoFormat>& aSupportedInputFormats,
   507 											const TArray<CCompressedVideoFormat*>& aSupportedOutputFormats,
   508 											const TSize& aMaxPictureSize,
   509 											TUint32 aSupportedDataUnitTypes,
   510 											TUint32 aSupportedDataUnitEncapsulations,
   511 											TUint aMaxBitrateLayers,
   512 											TBool aSupportsSupplementalEnhancementInfo,
   513 											TUint aMaxUnequalErrorProtectionLevels,
   514 											TUint aMaxBitRate,
   515 											const TArray<TPictureRateAndSize>& aMaxPictureRates,
   516 											TUint aMaxInLayerScalabilitySteps,
   517 											TUint32 aSupportedPictureOptions,
   518 											TBool aSupportsPictureLoss,
   519 											TBool aSupportsSliceLoss,
   520 											const TDesC8& aCodingStandardSpecificInfo,
   521 											const TDesC8& aImplementationSpecificInfo);
   522 
   523 	/**
   524 	Destructor.
   525 	*/
   526 	IMPORT_C ~CVideoEncoderInfo();
   527 
   528 	/**
   529 	Returns the encoder UID.
   530 	@return "The encoder UID."
   531 	*/
   532 	IMPORT_C TUid Uid() const;
   533 
   534 	/**
   535 	Returns the encoder version.
   536 	@return "The encoder version."
   537 	*/
   538 	IMPORT_C TVersion Version() const;
   539 
   540 	/**
   541 	Returns the encoder hardware device manufacturer.
   542 	@return "The manufacturer name. The reference is valid until the CVideoEncoderInfo object is destroyed."
   543 	*/
   544 	IMPORT_C const TDesC& Manufacturer() const;
   545 
   546 	/**
   547 	Returns the encoder hardware device manufacturer-specific identifier. The combination of the 
   548 	manufacturer and identifier uniquely identifies the plug-in.
   549 	@return "The identifier. The reference is valid until the CVideoEncoderInfo object is destroyed."
   550 	*/
   551 	IMPORT_C const TDesC& Identifier() const;
   552 
   553 	/**
   554 	Returns whether the encoder is hardware-accelerated. Hardware-accelerated encoders can run on an 
   555 	application DSP or dedicated hardware.
   556 	@return "True if the encoder is hardware-accelerated."
   557 	*/
   558 	IMPORT_C TBool Accelerated() const;
   559 
   560 	/**
   561 	Returns whether the encoder supports direct capture. Encoders supporting direct capture can get the 
   562 	input pictures directly from a camera, possibly using an efficient hardware-dependent data path.
   563 	@return "True if the encoder supports direct capture."
   564 	*/
   565 	IMPORT_C TBool SupportsDirectCapture() const;
   566 
   567 	/**
   568 	Returns whether the encoder supports the given input format.
   569 	@param  "aFormat" "The format to check."
   570 	@return "True if the encoder supports the given input format."
   571 	*/
   572 	IMPORT_C TBool SupportsInputFormat(const TUncompressedVideoFormat& aFormat) const;
   573 
   574 	/**
   575 	Returns the input formats that the encoder supports.
   576 	@return "An RArray table of supported video formats (TUncompressedVideoFormat). The reference is 
   577 			valid until the CVideoEncoderInfo object is destroyed."
   578 	*/
   579 	IMPORT_C const RArray<TUncompressedVideoFormat>& SupportedInputFormats() const;
   580 
   581 	/**
   582 	Returns whether the encoder supports the given output format.
   583 	@param	"aFormat" "The format to check."
   584 	@return "True if the encoder supports the given output format."
   585 	*/
   586 	IMPORT_C TBool SupportsOutputFormat(const CCompressedVideoFormat& aFormat) const;
   587 
   588 	/**
   589 	Returns the output formats that the encoder supports.
   590 	@return "An RArray table of supported video formats (CCompressedVideoFormat). The reference is 
   591 			valid until the CVideoEncoderInfo object is destroyed."
   592 	*/
   593 	IMPORT_C const RPointerArray<CCompressedVideoFormat>& SupportedOutputFormats() const;
   594 
   595 	/**
   596 	Returns the maximum picture size the encoder supports.
   597 	@return "The maximum picture size supported. The reference is valid until the CVideoEncoderInfo 
   598 			object is destroyed."
   599 	*/
   600 	IMPORT_C const TSize& MaxPictureSize() const;
   601 
   602 	/**
   603 	Returns the data unit types supported by the encoder.
   604 	@return "Supported data unit types. The value is a binary OR of values from TVideoDataUnitType."
   605 	*/
   606 	IMPORT_C TUint32 SupportedDataUnitTypes() const;
   607 
   608 	/**
   609 	Returns the data unit encapsulation types that the encoder supports.
   610 	@return "Supported data unit encapsulation types. The value is a binary OR of values from 
   611 			TVideoDataUnitEncapsulation."
   612 	*/
   613 	IMPORT_C TUint32 SupportedDataUnitEncapsulations() const;
   614 
   615 	/**
   616 	Returns the maximum number of bit-rate scalability layers supported.
   617 	@return "Maximum number of bit-rate scalability layers supported, one (1) if layered scalability 
   618 			is not supported."
   619 	*/
   620 	IMPORT_C TUint MaxBitrateLayers() const;
   621 
   622 	/**
   623 	Returns whether the encoder implements SendSupplementalInfoL(). If SendSupplementalInfoL() is 
   624 	implemented, the client can send supplemental enhancement information messages as binary strings
   625 	using that method. If SendSupplementalInfoL() is not implemented, this is not possible, but the 
   626 	encoder can still generate and send coding standard or implementation specific supplemental 
   627 	enhancement information automatically.
   628 	@return "True if the encoder supports supplemental enhancement information."
   629 	*/
   630 	IMPORT_C TBool SupportsSupplementalEnhancementInfo() const;
   631 
   632 	/**
   633 	Returns the maximum number of unequal error protection levels supported.
   634 	@return "Maximum number of unequal error protection levels supported, one (1) if unequal error 
   635 			protection is not supported."
   636 	*/
   637 	IMPORT_C TUint MaxUnequalErrorProtectionLevels() const;
   638 
   639 	/**
   640 	Returns the maximum bit-rate supported by the encoder.
   641 	@return "Maximum bit-rate supported, in bits per second. KMaxTUint32 can be used if the encoder has no 
   642 			bit-rate restrictions."
   643 	*/
   644 	IMPORT_C TUint MaxBitrate() const;
   645 
   646 	/**
   647 	Returns the maximum picture size/rate combinations supported by the encoder.  Video encoders can have
   648 	different maximum picture rate limitations depending on the picture size used.
   649 	@return "A reference to an array of picture size/rate combinations.  The reference remains valid until
   650 			this object is deleted."
   651 	*/
   652 	IMPORT_C const RArray<TPictureRateAndSize>& MaxPictureRates() const;
   653 
   654 	/**
   655 	Returns the maximum number of in-layer scalability steps supported.
   656 	@return "Maximum number of in-layer scalability steps supported, one (1) if in-layer scalability is 
   657 			not supported."
   658 	*/
   659 	IMPORT_C TUint MaxInLayerScalabilitySteps() const;
   660 
   661 	/**
   662 	Returns the input picture options that the encoder supports.
   663 	@return "Supported input picture options, a bitwise OR of values from TVideoPicture::TVideoPictureOptions."
   664 	*/
   665 	IMPORT_C TUint32 SupportedPictureOptions() const;
   666 
   667 	/**
   668 	Returns whether the encoder supports picture loss indications. If true, the encoder implements
   669 	PictureLoss(), and recovers lost picture contents when it receives the indication.
   670 	@return "True if the encoder supports picture loss indications."
   671 	*/
   672 	IMPORT_C TBool SupportsPictureLoss() const;
   673 
   674 	/**
   675 	Returns whether the encoder supports slice loss indications. If true, the encoder implements
   676 	SliceLoss(), and recovers lost or damaged macroblocks when it receives the indication.
   677 	@return "True if the encoder supports slice loss indications."
   678 	*/
   679 	IMPORT_C TBool SupportsSliceLoss() const;
   680 
   681 	/**
   682 	Returns coding-standard specific information about the encoder.
   683 	@return "Coding-standard specific information about the encoder. The data format is coding-standard 
   684 			specific, and defined separately. The reference is valid until the CVideoEncoderInfo object 
   685 			is destroyed."
   686 	*/
   687 	IMPORT_C const TDesC8& CodingStandardSpecificInfo() const;
   688 
   689 	/**
   690 	Returns implementation-specific information about the encoder.
   691 	@return "Implementation-specific information about the encoder. The data format is 
   692 	implementation-specific, and defined separately by the encoder supplier. The reference is valid until 
   693 	the CVideoEncoderInfo object is destroyed."
   694 	*/
   695 	IMPORT_C const TDesC8& ImplementationSpecificInfo() const;
   696 private:
   697 	CVideoEncoderInfo(TUid aUid,
   698 					  TVersion aVersion,
   699 					  TBool aAccelerated,
   700 					  TBool aSupportsDirectCapture,
   701 				 	  const TSize& aMaxPictureSize,
   702 					  TUint32 aSupportedDataUnitTypes,
   703 					  TUint32 aSupportedDataUnitEncapsulations,
   704 					  TUint aMaxBitrateLayers,
   705 					  TBool aSupportsSupplementalEnhancementInfo,
   706 					  TUint aMaxUnequalErrorProtectionLevels,
   707 					  TUint aMaxBitRate,
   708 					  TUint aMaxInLayerScalabilitySteps,
   709 					  TUint32 aSupportedPictureOptions,
   710 					  TBool aSupportsPictureLoss,
   711 					  TBool aSupportsSliceLoss);
   712 	void ConstructL(const TDesC& aManufacturer,
   713 					const TDesC& aIdentifier,
   714 					const TArray<TUncompressedVideoFormat>& aSupportedInputFormats,
   715 					const TArray<CCompressedVideoFormat*>& aSupportedOutputFormats,
   716 					const TArray<TPictureRateAndSize>& aMaxPictureRates,
   717 					const TDesC8& aCodingStandardSpecificInfo,
   718 					const TDesC8& aImplementationSpecificInfo);
   719 private:
   720 	TUid iUid;
   721 	TVersion iVersion;
   722 	HBufC* iManufacturer;
   723 	HBufC* iIdentifier;
   724 	TBool iAccelerated;
   725 	TBool iSupportsDirectCapture;
   726 	RArray<TUncompressedVideoFormat> iSupportedInputFormats;
   727 	RPointerArray<CCompressedVideoFormat> iSupportedOutputFormats;
   728 	TSize iMaxPictureSize;
   729 	TUint32 iSupportedDataUnitTypes;
   730 	TUint32 iSupportedDataUnitEncapsulations;
   731 	TUint iMaxBitrateLayers;
   732 	TBool iSupportsSupplementalEnhancementInfo;
   733 	TUint iMaxUnequalErrorProtectionLevels;
   734 	TUint iMaxBitRate;
   735 	RArray<TPictureRateAndSize> iMaxPictureRates;
   736 	TUint iMaxInLayerScalabilitySteps;
   737 	TUint32 iSupportedPictureOptions;
   738 	TBool iSupportsPictureLoss;
   739 	TBool iSupportsSliceLoss;
   740 	HBufC8* iCodingStandardSpecificInfo;
   741 	HBufC8* iImplementationSpecificInfo;
   742 	};
   743 
   744 
   745 /**
   746 CMMFDevVideoRecord is the main client class of DevVideoRecord.
   747 @publishedAll
   748 @released
   749 */
   750 class CMMFDevVideoRecord : public CBase, private MMMFDevVideoRecordProxy
   751 	{
   752 public:
   753 	/**
   754 	Class to define the picture counters available through GetPictureCounters.
   755 	@publishedAll
   756 	@released
   757 	*/
   758 	class TPictureCounters
   759 		{
   760  	public:
   761 		/**
   762 		Default constructor.  Zeros all members.
   763 		*/
   764 		inline TPictureCounters();
   765    public:
   766 		/** The number of pictures skipped due to lack of output buffers. */
   767 		TUint iPicturesSkippedBufferOverflow;
   768 
   769 		/** The number of pictures skipped due to lack of processing power. */
   770 		TUint iPicturesSkippedProcPower;
   771 
   772 		/** The number of pictures skipped for bit-rate control purposes. */
   773 		TUint iPicturesSkippedRateControl;
   774 
   775 		/** The number of processed (i.e. pre-processed and encoded) input pictures. */
   776 		TUint iPicturesProcessed;
   777 
   778 		/** The total number of input pictures. When using direct capture, this is the total number of 
   779 			pictures captured, otherwise it is the total number of input pictures written by the client. */
   780 		TUint iInputPictures;
   781 		};
   782 
   783 
   784 public:
   785 	/**
   786 	Creates a new CMMFDevVideoRecord object.
   787 	@param	"aObserver"	"The observer object to use. The observer callbacks are used to return input buffers 
   788 						back to the client."
   789 	@return "A new CMMFDevVideoRecord object.
   790 	@leave	"The method will leave if an error occurs. Typical error codes used:
   791 				- KErrHardwareNotAvailable - Not enough free video processing hardware resources
   792 				- KErrNoMemory - Not enough free memory available"
   793 	*/
   794 	IMPORT_C static CMMFDevVideoRecord* NewL(MMMFDevVideoRecordObserver& aObserver);
   795 
   796 	/**
   797 	Destructor.
   798 	*/
   799 	IMPORT_C ~CMMFDevVideoRecord();
   800 
   801 	/**
   802 	Finds all available encoders for a given video type with support for certain pre-processing operations. 
   803 	The video type is specified using its MIME type, which may include parameters specifying the supported 
   804 	level, version, and other information. Encoder hardware devices can use wildcards when listing the 
   805 	supported video types in the ECom registration information, so it is possible that all the encoders 
   806 	returned do not support the specified submode, e.g. profile and level, unless aExactMatch is set.
   807 	
   808 	The encoder capabilities can be checked with VideoEncoderInfoLC().
   809 
   810 	@param	"aMimeType"		"The video type that will be encoded."
   811 	@param	"aPreProcType"	"The pre-processing types that the encoder has to support, a binary OR of 
   812 							TPrePostProcessType values. If no pre-processing support is needed, set this 
   813 							value to zero."
   814 	@param	"aEncoders"		"An array for the result encoder UIDs. The array must be created and destroyed 
   815 							by the caller."
   816 	@param	"aExactMatch"	"True if exact matching should be used. In this case only encoders that support 
   817 							exactly the MIME-type given will be returned. Since verifying this may require 
   818 							loading the encoders into memory, this can be a fairly expensive operation, and 
   819 							if the user needs to verify their capabilities further in any case this parameter
   820 							should be set to EFalse."
   821 	@leave	"The method will leave if an error occurs. Typical error codes used:
   822 				-KErrNotFound - No encoders were found matching the search parameters."
   823 	*/
   824 	IMPORT_C void FindEncodersL(const TDesC8& aMimeType, 
   825 								TUint32 aPreProcType, 
   826 								RArray<TUid>& aEncoders, 
   827 								TBool aExactMatch=ETrue);
   828 
   829 	/**
   830 	Finds all available pre-processors for a given set of pre-processing operations.
   831 
   832 	@param	"aPreProcType"		"The pre-processing types that the device has to support, a binary OR of 
   833 								TPrePostProcessType values."
   834 	@param	"aPreProcessors"	"An array for the result pre-processor UIDs. The array must be created and 
   835 								destroyed by the caller."
   836 	@leave	"The method will leave if an error occurs. Typical error codes used:
   837 				- KErrNotFound - No pre-processors were found matching the search parameters."
   838 	*/
   839 	IMPORT_C void FindPreProcessorsL(TUint32 aPreProcType, RArray<TUid>& aPreProcessors);
   840 
   841 	/**
   842 	Retrieves a list of available video encoders in the system.
   843 	@param	"aEncoders"	"An array for the result encoder UIDs. The array must be created and destroyed by 
   844 						the caller."
   845 	@leave	"The method will leave if an error occurs. Not finding any encoders is not treated as an error 
   846 			condition: in this situation, aEncoders will be empty."
   847 	*/
   848 	IMPORT_C void GetEncoderListL(RArray<TUid>& aEncoders);
   849 
   850 	/**
   851 	Retrieves a list of available video pre-processor hardware devices in the system.
   852 	@param	"aPreProcessors"	"An array for the result pre-processor UIDs. The array must be created and 
   853 								destroyed by the caller."
   854 	@leave	"The method will leave if an error occurs. Not finding any pre-processors is not treated as an 
   855 			error condition: in this situation, aPreProcessors will be empty."
   856 	*/
   857 	IMPORT_C void GetPreProcessorListL(RArray<TUid>& aPreProcessors);
   858 
   859 	/**
   860 	Retrieves information about an installed video encoder. Note that this method will need to load the 
   861 	encoder hardware device into memory, and can thus be relatively expensive.
   862 	@param	"aVideoEncoder"	"The video encoder device to query."
   863 	@return	"Encoder information as a CVideoEncoderInfo object. The object is pushed to the cleanup stack, 
   864 			and must be deallocated by the caller."
   865 	@leave	"The method will leave if an error occurs. Typical error codes used:
   866 				- KErrNotFound - No encoder was found with the given UID"
   867 	*/
   868 	IMPORT_C CVideoEncoderInfo* VideoEncoderInfoLC(TUid aVideoEncoder);
   869 
   870 	/**
   871 	Retrieves information about the pre-processing capabilities of an installed pre-processor or encoder 
   872 	hardware device. Note that this method will need to load the device into memory, and can thus be 
   873 	relatively expensive.
   874 	@param	"aPreProcessor"	"The device to query."
   875 	@return	"Pre-processor information as a CPreProcessorInfo object. The object is pushed to the cleanupstack, 
   876 			and must be deallocated by the caller."
   877 	@leave	"The method will leave if an error occurs. Typical error codes used:
   878 				- KErrNotFound - No pre-processor was found with the given UID"
   879 	*/
   880 	IMPORT_C CPreProcessorInfo* PreProcessorInfoLC(TUid aPreProcessor);
   881 
   882 	/**
   883 	Selects the video encoder to be used. This method must be called before any other video encoder related 
   884 	methods are used. The encoder can be changed by calling this method again before the system has been 
   885 	initialized with Initialize().
   886 
   887 	All video encoder settings are reset to their default values. By default no pre-processing is performed.
   888 
   889 	@param	"aEncoder"	"The video encoder to use."
   890 	@return	"Hardware device ID, used in other methods for configuring the encoder."
   891 	@leave	"The method will leave if an error occurs. Typical error codes used:
   892 				- KErrNotFound - No encoder was found with the given UID"
   893 	@pre	"This method can only be called before the API has been initialized with Initialize()."
   894 	*/
   895 	IMPORT_C THwDeviceId SelectEncoderL(TUid aEncoder);
   896 
   897 	/**
   898 	Selects the video pre-processor to be used. This method must be called before any other pre-processor 
   899 	related methods are used. The pre-processor to use can be changed by calling this method again before 
   900 	the API has been initialized with Initialize().
   901 
   902 	All pre-processor settings are reset to their default values. By default no pre-processing is performed.
   903 
   904 	@param	"aPreProcessor"	"The pre-processor to use."
   905 	@return	"Hardware device ID, used in other methods for configuring the pre-processor."
   906 	@leave	"The method will leave if an error occurs. Typical error codes used:
   907 				- KErrNotFound - No pre-processor was found with the given UID"
   908 	@pre	"This method can only be called before the API has been initialized with Initialize()."
   909 	*/
   910 	IMPORT_C THwDeviceId SelectPreProcessorL(TUid aPreProcessor);
   911 
   912 	/**
   913 	Sets the input format for a hardware device. If both a pre-processor and an encoder are used, the 
   914 	pre-processor output format and the encoder input format must be the same. The input format for the 
   915 	first device in the system is the input format for video input data.
   916 
   917 	The method has to be called for both direct capture as well as memory buffer input. The camera API 
   918 	must be initialized by the device using it for capture, since there is no way to query the current 
   919 	format from the camera API.
   920 	
   921 	@param	"aHwDevice"		"The hardware device to configure. The value is returned from SelectEncoderL() 
   922 							or SelectPreProcessorL() when the device is selected."
   923 	@param	"aFormat"		"The input format to use."
   924 	@param	"aPictureSize"	"The input picture size in pixels."
   925 	@leave	"The method will leave if an error occurs. Typical error codes used:
   926 				- KErrNotSupported - The input format specified is not supported."
   927 	@pre	"This method can only be called before the API has been initialized with Initialize()."
   928 	*/
   929 	IMPORT_C void SetInputFormatL(THwDeviceId aHwDevice, 
   930 								  const TUncompressedVideoFormat& aFormat, 
   931 								  const TSize& aPictureSize);
   932 
   933 	/**
   934 	Sets the data source to be a camera, and sets the system to use direct capture for input. The first 
   935 	hardware device (pre-processor if both encoder and pre-processor are used, encoder otherwise) must 
   936 	support direct capture.
   937 	
   938 	@param	"aCameraHandle"	"A camera handle for the camera to use. The handle is passed to 
   939 							CCamera::NewDuplicateL() in the camera API."
   940 	@param	"aPictureRate"	"Video capture picture rate."
   941 	@leave	"The method will leave if an error occurs. Typical error codes used:
   942 				- KErrNotSupported - Direct capture is not supported or the picture rate specified is not 
   943 				  supported."
   944 	@pre	"This method can only be called before the API has been initialized with Initialize()."
   945 	*/
   946 	IMPORT_C void SetSourceCameraL(TInt aCameraHandle, TReal aPictureRate);
   947 
   948 	/**
   949 	Sets the data source to be memory buffers.
   950 	
   951 	@param	"aMaxPictureRate"		"The maximum picture rate for input pictures."
   952 	@param	"aConstantPictureRate"	"True if the input picture rate is constant. In that case, 
   953 									aMaxPictureRate specifies the picture rate. If pictures may be skipped 
   954 									in the input data due to performance reasons, this flag cannot be set."
   955 	@param	"aProcessRealtime"		"True if real-time processing is needed, false if not. Real-time 
   956 									processing is typically needed for video recording applications, while 
   957 									video conversion and off-line processing applications do not require it."
   958 	@leave	"The method will leave if an error occurs. Typical error codes used:
   959 				- KErrNotSupported - The picture rate specified is not supported."
   960 	@pre	"This method can only be called before the API has been initialized with Initialize()."
   961 	*/
   962 	IMPORT_C void SetSourceMemoryL(TReal aMaxPictureRate, TBool aConstantPictureRate, TBool aProcessRealtime);
   963 
   964 	/**
   965 	Sets the output format for a hardware device to a compressed video format. Only applicable for encoder 
   966 	devices. The picture size depends on the input data format and possible scaling performed.
   967 	
   968 	@param	"aHwDevice"				"The hardware device to configure. The value is returned from 
   969 									SelectEncoderL()when the device is selected."
   970 	@param	"aFormat"				"The video format to use."
   971 	@param	"aDataUnitType"			"The type of output coded data units."
   972 	@param	"aDataEncapsulation"	"Data encapsulation type for output encoded data units."
   973 	@param	"aSegmentationAllowed"	"True if a coded data unit can be segmented into multiple output buffers 
   974 									if a single buffer is not large enough."
   975 	@leave	"The method will leave if an error occurs. Typical error codes used:
   976 				- KErrNotSupported - The format specified is not supported."
   977 	@pre	"This method can only be called before the API has been initialized with Initialize()."
   978 	*/
   979 	IMPORT_C void SetOutputFormatL(THwDeviceId aHwDevice, 
   980 								   const CCompressedVideoFormat& aFormat, 
   981 								   TVideoDataUnitType aDataUnitType, 
   982 								   TVideoDataUnitEncapsulation aDataEncapsulation,
   983 								   TBool aSegmentationAllowed=EFalse);
   984 
   985 	/**
   986 	Sets the output format for a hardware device to an uncompressed video format. Only applicable for 
   987 	pre-processor devices. The picture size depends on the input data format and possible scaling performed.
   988 	
   989 	@param	"aHwDevice"	"The hardware device to configure. The value is returned from SelectPreProcessorL()
   990 						when the device is selected."
   991 	@param	"aFormat"	"The video format to use."
   992 	@leave	"The method will leave if an error occurs. Typical error codes used:
   993 				- KErrNotSupported - The format specified is not supported."
   994 	@pre	"This method can only be called before the API has been initialized with Initialize()."
   995 	*/
   996 	IMPORT_C void SetOutputFormatL(THwDeviceId aHwDevice, const TUncompressedVideoFormat& aFormat);
   997 
   998 	/**
   999 	Sets the clock source to use for video timing. When video recording is synchronized with audio, the clock
  1000 	source is implemented by the audio playback subsystem, otherwise the clock source should get the time 
  1001 	from the system clock. This method can be called after all hardware devices have been selected, but 
  1002 	before calling Initialize().
  1003 
  1004 	If no clock source is set, video recording will not be synchronized, but will proceed as fast as
  1005 	possible, depending on input data and output buffer availability. If direct capturing is used without a 
  1006 	clock source, the timestamps in the output data may not be valid. All encoders must support 
  1007 	synchronization with an external clock source, as well as unsynchronized non-realtime operation.
  1008 	
  1009 	@param	"aClock"	"The clock source to use."
  1010 	@pre	"This method can only be called before the API has been initialized with Initialize()."
  1011 	*/
  1012 	IMPORT_C void SetClockSource(MMMFClockSource* aClock);
  1013 
  1014 	/**
  1015 	Sets pre-processing options for RGB to YUV color space conversion. By default, input RGB data is 
  1016 	assumed to use the full value range ([0…255]), and the output YUV format is the hardware device 
  1017 	output format, so typically calling this method is not necessary.
  1018 	
  1019 	@param	"aHwDevice"		"The hardware device to configure. The value is returned from SelectEncoderL() 
  1020 							or SelectPreProcessorL() when the device is selected."
  1021 	@param	"aRgbRange"		"Input RGB data range"
  1022 	@param	"aOutputFormat"	"Conversion output YUV format."
  1023 	@leave	"The method will leave if an error occurs. Typical error codes used:
  1024 				- KErrNotSupported - The formats specified are not supported"
  1025 	@pre	"This method can only be called before the API has been initialized with Initialize()."
  1026 	*/
  1027 	IMPORT_C void SetRgbToYuvOptionsL(THwDeviceId aHwDevice, TRgbRange aRgbRange, const TYuvFormat& aOutputFormat);
  1028 
  1029 	/**
  1030 	Sets pre-processing options for YUV to YUV data format conversion. By default, the hardware device 
  1031 	input and output data formats are used. For encoder devices, the device input format and the closest 
  1032 	matching format supported by the encoding process are used. Typically calling this method is not 
  1033 	necessary.
  1034 	
  1035 	@param	"aHwDevice"		"The hardware device to configure. The value is returned from SelectEncoderL() 
  1036 							or SelectPreProcessorL() when the device is selected."
  1037 	@param	"aInputFormat"	"Conversion input format."
  1038 	@param	"aOutputFormat"	"Conversion output format."
  1039 	@leave	"The method will leave if an error occurs. Typical error codes used:
  1040 				- KErrNotSupported - The formats specified are not supported"
  1041 	@pre	"This method can only be called before the API has been initialized with Initialize()."
  1042 	*/
  1043 	IMPORT_C void SetYuvToYuvOptionsL(THwDeviceId aHwDevice, 
  1044 							 const TYuvFormat& aInputFormat, 
  1045 							 const TYuvFormat& aOutputFormat);
  1046 
  1047 	/**
  1048 	Sets the number of bit-rate scalability layers to use. Set to 1 to disable layered scalability. 
  1049 
  1050 	Bit-rate scalability refers to the ability of a coded stream to be decoded at different bit-rates. 
  1051 	Scalable video is typically ordered into hierarchical layers of data. A base layer contains an 
  1052 	individual representation of a video stream and enhancement layers contain refinement data in 
  1053 	addition to the base layer. The quality of the encoded video stream progressively improves as 
  1054 	enhancement layers are added to the base layer.
  1055 
  1056 	@param	"aNumLayers"	"The number of bit-rate scalability layers to use, set to 1 to disable
  1057 							scalability."
  1058 	@leave	"The method will leave if an error occurs. Typical error codes used:
  1059 				- KErrNotSupported - The scalability layers are not supported or too many layers specified."
  1060 	@pre	"This method can only be called before the API has been initialized with Initialize()."
  1061 	*/
  1062 	IMPORT_C void SetNumBitrateLayersL(TUint aNumLayers);
  1063 
  1064 	/**
  1065 	Sets the scalability type for a bit-rate scalability layer.
  1066 	
  1067 	@param	"aLayer"			"Layer number. Layers are numbered [0…n-1], where n is the number of layers 
  1068 								available. The first layer is the base layer, it can be decoded independently
  1069 								from the other layers, and it has the lowest total bitrate."
  1070 	@param	"aScalabilityType"	"Layer scalability type."
  1071 	@leave	"The method will leave if an error occurs. Typical error codes used:
  1072 				- KErrNotSupported - The scalability layers or the specified scalability type are not supported."
  1073 	@pre	"This method can only be called before the API has been initialized with Initialize()."
  1074 	*/
  1075 	IMPORT_C void SetScalabilityLayerTypeL(TUint aLayer, TScalabilityType aScalabilityType);
  1076 	
  1077 
  1078 	/**
  1079 	Sets the reference picture options to be used for all scalability layers. The settings can be 
  1080 	overridden for an individual scalability layer by using SetLayerReferenceOptions().
  1081 	
  1082 	@param	"aMaxReferencePictures"	"The maximum number of reference pictures to be used. More than one 
  1083 									reference frame can be used in the H.264 | MPEG-4 AVC and in some 
  1084 									advanced profiles of MPEG-4 Part 2 and H.263. The minimum value is one."
  1085 	@param	"aMaxPictureOrderDelay"	"The maximum picture order delay, in number of pictures. This specifies 
  1086 									the maximum number of  pictures that precede any picture in the sequence 
  1087 									in decoding order and follow the picture in presentation order. Pictures 
  1088 									may be coded/decoded in different order from their capture/display order.
  1089 									Thus, decoded pictures have to be buffered to order them in correct 
  1090 									display order. For example, if one conventional B picture is coded 
  1091 									between P pictures, a one-picture display ordering delay has to be 
  1092 									applied in the decoder. The minimum value is zero, which indicates that 
  1093 									pictures must be coded in capture/display order."
  1094 	@pre	"This method can only be called before the API has been initialized with Initialize()."
  1095 	*/
  1096 	IMPORT_C void SetGlobalReferenceOptions(TUint aMaxReferencePictures, TUint aMaxPictureOrderDelay);
  1097 
  1098 	/**
  1099 	Sets the reference picture options to be used for a single scalability layer. These settings override 
  1100 	those set with SetGlobalReferenceOptions().
  1101 	
  1102 	@param	"aLayer"				"Layer number."
  1103 	@param	"aMaxReferencePictures"	"The maximum number of reference pictures to be used."
  1104 	@param	"aMaxPictureOrderDelay"	"The maximum picture order delay, in number of pictures."
  1105 	@pre	"This method can only be called before the API has been initialized with Initialize()."
  1106 	*/
  1107 	IMPORT_C void SetLayerReferenceOptions(TUint aLayer, TUint aMaxReferencePictures, TUint aMaxPictureOrderDelay);
  1108 
  1109 	/**
  1110 	Sets encoder buffering options.
  1111 	
  1112 	@param	"aOptions"	"The buffering options."
  1113 	@leave	"The method will leave if an error occurs. Typical error codes used:
  1114 				- KErrNotSupported - The specified settings are not supported."
  1115 	@pre	"This method can only be called before the API has been initialized with Initialize()."
  1116 	*/
  1117 	IMPORT_C void SetBufferOptionsL(const TEncoderBufferOptions& aOptions);
  1118 
  1119 	/**
  1120 	Sets the encoder output rectangle for encoded video output. This rectangle specifies the part of the 
  1121 	input and output pictures which is displayed after encoding. Many video codecs process data in 16x16 
  1122 	pixel units but enable specifying and coding the decoder output rectangle for image sizes that are not 
  1123 	multiple of 16 pixels (e.g 160x120).
  1124 	
  1125 	@param	"aHwDevice"	"The hardware device to configure. The value is returned from SelectEncoderL()
  1126 						when the device is selected."
  1127 	@param	"aRect"		"The encoder output rectangle."
  1128 	@leave	"The method will leave if an error occurs."
  1129 	@pre	"This method can be called either before or after the API has been initialized with Initialize().
  1130 			If called after initialization, the change will only be committed once CommitL() is called."
  1131 	*/
  1132 	IMPORT_C void SetOutputRectL(THwDeviceId aHwDevice, const TRect& aRect);
  1133 
  1134 	/**
  1135 	Sets the pre-processing types to be used in a hardware device. [1 #191] If separate encoder and 
  1136 	pre-processor devices are used, both can be configured to perform different pre-processing operations.
  1137 
  1138 	Pre-processing operations are carried out in the following order:
  1139 
  1140 		1. Frame stabilisation
  1141 		2. Input cropping
  1142 		3. Mirroring
  1143 		4. Rotating
  1144 		5. Scaling
  1145 		6. Output cropping
  1146 		7. Output padding
  1147 
  1148 	Color space conversion and color enhancement can be performed at any point in the pre-processing flow.
  1149 	
  1150 	@param	"aHwDevice"			"The hardware device to configure. The value is returned from 
  1151 								SelectEncoderL() or SelectPreProcessorL() when the device is selected."
  1152 	@param	"aPreProcessTypes"	"The pre-processing steps to perform, a bitwise OR of values from 
  1153 								TPrePostProcessType."
  1154 	@leave	"The method will leave if an error occurs. Typical error codes used:
  1155 				- KErrNotSupported - The pre-processing combination is not supported"
  1156 	@pre	"This method can be called either before or after the API has been initialized with Initialize().
  1157 			If called after initialization, the change will only be committed once CommitL() is called."
  1158 	*/
  1159 	IMPORT_C void SetPreProcessTypesL(THwDeviceId aHwDevice, TUint32 aPreProcessTypes);
  1160 
  1161 	/**
  1162 	Sets pre-processing options for rotation.
  1163 	
  1164 	@param	"aHwDevice"		"The hardware device to configure. The value is returned from SelectEncoderL() 
  1165 							or SelectPreProcessorL() when the device is selected."
  1166 	@param	"aRotationType"	"The rotation to perform."
  1167 	@leave	"The method will leave if an error occurs. Typical error codes used:
  1168 				- KErrNotSupported - The rotation type is not supported."
  1169 	@pre	"This method can be called either before or after the API has been initialized with Initialize().
  1170 			If called after initialization, the change will only be committed once CommitL() is called."
  1171 	*/
  1172 	IMPORT_C void SetRotateOptionsL(THwDeviceId aHwDevice, TRotationType aRotationType);
  1173 
  1174 	/**
  1175 	Sets pre-processing options for scaling. 
  1176 	
  1177 	@param	"aHwDevice"				"The hardware device to configure. The value is returned from 
  1178 									SelectEncoderL() or SelectPreProcessorL() when the device is selected."
  1179 	@param	"aTargetSize"			"Target picture size. If a fixed scale factor size is used, the new 
  1180 									dimensions must be set to:
  1181 											width=floor(factor*width), height=floor(factor*height). 
  1182 									For example, scaling a QCIF (176x144) picture up by a factor of 4/3 
  1183 									yields a size of 234x192."
  1184 	@param	"aAntiAliasFiltering"	"True if anti-aliasing filtering should be used. If the pre-processor 
  1185 									does not support anti-aliased scaling, or supports anti-aliased scaling 
  1186 									only, this argument is ignored."
  1187 	@leave	"The method will leave if an error occurs. Typical error codes used:
  1188 				- KErrNotSupported - The specified target size is not supported."
  1189 	@pre	"This method can be called either before or after the API has been initialized with Initialize().
  1190 			If called after initialization, the change will only be committed once CommitL() is called."
  1191 	*/
  1192 	IMPORT_C void SetScaleOptionsL(THwDeviceId aHwDevice, const TSize& aTargetSize, TBool aAntiAliasFiltering);
  1193 
  1194 	/**
  1195 	Sets pre-processing options for input cropping. Input cropping is typically used for digital zooming.
  1196 	
  1197 	@param	"aHwDevice"	"The hardware device to configure. The value is returned from SelectEncoderL() or 
  1198 						SelectPreProcessorL() when the device is selected."
  1199 	@param	"aRect"		"The input cropping rectangle specifying the area of the picture to use. The 
  1200 						rectangle must fit completely inside the input picture."
  1201 	@leave	"The method will leave if an error occurs. Typical error codes used:
  1202 				- KErrNotSupported - The specified cropping rectangle is not supported."
  1203 	@pre	"This method can be called either before or after the API has been initialized with Initialize().
  1204 			If called after initialization, the change will only be committed once CommitL() is called."
  1205 	*/
  1206 	IMPORT_C void SetInputCropOptionsL(THwDeviceId aHwDevice, const TRect& aRect);
  1207 
  1208 	/**
  1209 	Sets pre-processing options for output cropping. Output cropping is performed after other pre-processing
  1210 	operations but before output padding. Output cropping and padding can be used in combination to prepare
  1211 	the picture size to suit the encoder, typically video encoders only support picture sizes that are 
  1212 	multiples of 16 pixels.
  1213 	
  1214 	@param	"aHwDevice"	"The hardware device to configure. The value is returned from SelectEncoderL() or 
  1215 						SelectPreProcessorL() when the device is selected."
  1216 	@param	"aRect"		"The output cropping rectangle specifying the area of the picture to use. The 
  1217 						rectangle must fit completely inside the picture."
  1218 	@leave	"The method will leave if an error occurs. Typical error codes used:
  1219 				- KErrNotSupported - The specified cropping rectangle is not supported."
  1220 	@pre	"This method can be called either before or after the API has been initialized with Initialize().
  1221 			If called after initialization, the change will only be committed once CommitL() is called."
  1222 	*/
  1223 	IMPORT_C void SetOutputCropOptionsL(THwDeviceId aHwDevice, const TRect& aRect);
  1224 
  1225 	/**
  1226 	Sets pre-processing options for output padding. Output padding is performed as the last pre-processing 
  1227 	operation, and typically used to prepare the picture size to suit the encoder. The image is padded with 
  1228 	black pixels.
  1229 	
  1230 	@param	"aHwDevice"		"The hardware device to configure. The value is returned from SelectEncoderL() 
  1231 							or SelectPreProcessorL() when the device is selected."
  1232 	@param	"aOutputSize"	"The padded output picture size. The output size must be large enough for the 
  1233 							picture in its new position."
  1234 	@param	"aPicturePos"	"The position for the original picture in the new padded picture. The original 
  1235 							picture in its new position must fit completely inside the new picture."
  1236 	@leave	"The method will leave if an error occurs. Typical error codes used:
  1237 				- KErrNotSupported - The specified padding settings are not supported."
  1238 	@pre	"This method can be called either before or after the API has been initialized with Initialize().
  1239 			If called after initialization, the change will only be committed once CommitL() is called."
  1240 	*/
  1241 	IMPORT_C void SetOutputPadOptionsL(THwDeviceId aHwDevice, const TSize& aOutputSize, const TPoint& aPicturePos);
  1242 
  1243 	/**
  1244 	Sets color enhancement pre-processing options.
  1245 	
  1246 	@param	"aHwDevice"	"The hardware device to configure. The value is returned from SelectEncoderL() 
  1247 						or SelectPreProcessorL() when the device is selected."
  1248 	@param	"aOptions"	"Color enchancement options."
  1249 	@leave	"The method will leave if an error occurs. Typical error codes used:
  1250 				- KErrNotSupported - The specified settings are not supported."
  1251 	@pre	"This method can be called either before or after the API has been initialized with Initialize().
  1252 			If called after initialization, the change will only be committed once CommitL() is called."
  1253 	*/
  1254 	IMPORT_C void SetColorEnhancementOptionsL(THwDeviceId aHwDevice, const TColorEnhancementOptions& aOptions);
  1255 
  1256 	/**
  1257 	Sets frame stabilisation options.
  1258 
  1259 	Frame stabilisation is performed as the first pre-processing operation in the hardware device. The 
  1260 	stabilisation process gets the complete hardware device input picture as its input, and it produces a 
  1261 	smaller stabilised output picture. The rest of the processing in the hardware device is done using the 
  1262 	stabilisation output picture.
  1263 	
  1264 	@param	"aHwDevice"				"The hardware device to configure. The value is returned from SelectEncoderL() 
  1265 									or SelectPreProcessorL() when the device is selected."
  1266 	@param	"aOutputSize"			"Output picture size. The output picture must size must be smaller than 
  1267 									or equal to the hardware device input picture size."
  1268 	@param	"aFrameStabilisation"	"True if frame stabilisation should be used. By default stabilisation 
  1269 									is not used."
  1270 	@leave	"The method will leave if an error occurs. Typical error codes used:
  1271 				- KErrNotSupported - The specified settings are not supported."
  1272 	@pre	"This method can be called either before or after the API has been initialized with Initialize().
  1273 			If called after initialization, the change will only be committed once CommitL() is called."
  1274 	*/
  1275 	IMPORT_C void SetFrameStabilisationOptionsL(THwDeviceId aHwDevice, 
  1276 												const TSize& aOutputSize,
  1277 												TBool aFrameStabilisation);
  1278 
  1279 	/**
  1280 	Sets custom implementation-specific pre-processing options.
  1281 	
  1282 	@param	"aHwDevice"	"The hardware device to configure. The value is returned from SelectEncoderL() 
  1283 						or SelectPreProcessorL() when the device is selected."
  1284 	@param	"aOptions"	"Post-processing options. The data format is implementation-specific."
  1285 	@leave	"The method will leave if an error occurs. Typical error codes used:
  1286 				- KErrNotSupported - The options are not supported."
  1287 	@pre	"This method can be called either before or after the API has been initialized with Initialize().
  1288 			If called after initialization, the change will only be committed once CommitL() is called."
  1289 	*/
  1290 	IMPORT_C void SetCustomPreProcessOptionsL(THwDeviceId aHwDevice, const TDesC8& aOptions);
  1291 	
  1292 	/**
  1293 	Sets whether bit errors or packets losses can be expected in the video transmission channel. The 
  1294 	video encoder can use this information to optimize the bitstream.
  1295 	
  1296 	@param	"aBitErrors"	"True if bit errors can be expected."
  1297 	@param	"aPacketLosses"	"True if packet losses can be expected."
  1298 	@pre	"This method can be called either before or after the API has been initialized with Initialize().
  1299 			If called after initialization, the change will only be committed once CommitL() is called."
  1300 	*/
  1301 	IMPORT_C void SetErrorsExpected(TBool aBitErrors, TBool aPacketLosses);
  1302 
  1303 	/**
  1304 	Sets the minimum frequency (in time) for instantaneous random access points in the bitstream. 
  1305 	An instantaneous random access point is such where the encoder can achieve a full output picture 
  1306 	immediately by encoding data starting from the random access point. The random access point frequency
  1307 	may be higher than signalled, if the sequence contains scene cuts which typically cause a coding of 
  1308 	a random access point.
  1309 	
  1310 	@param	"aRate"	"Random access point rate, in pictures per second. For example, to request a random 
  1311 					access point every ten seconds, set the value to 0.1."
  1312 	@pre	"This method can be called either before or after the API has been initialized with Initialize().
  1313 			If called after initialization, the change will only be committed once CommitL() is called."
  1314 	*/
  1315 	IMPORT_C void SetMinRandomAccessRate(TReal aRate);
  1316 
  1317 	/**
  1318 	Sets coding-standard specific encoder options.
  1319 	
  1320 	@param	"aOptions"	"The options to use. The data format for the options is coding-standard specific, 
  1321 						and defined seperately."
  1322 	@leave	"The method will leave if an error occurs. Typical error codes used:
  1323 				- KErrNotSupported - The specified settings are not supported."
  1324 	@pre	"This method can be called either before or after the API has been initialized with Initialize().
  1325 			If called after initialization, the change will only be committed once CommitL() is called."
  1326 	*/
  1327 	IMPORT_C void SetCodingStandardSpecificOptionsL(const TDesC8& aOptions);
  1328 
  1329 	/**
  1330 	Sets implementation-specific encoder options.
  1331 	
  1332 	@param	"aOptions"	"The options to use. The data format for the options is specific to the encoder
  1333 						implementation, and defined separately by the encoder implementor."
  1334 	@leave	"The method will leave if an error occurs. Typical error codes used:
  1335 				- KErrNotSupported - The specified settings are not supported."
  1336 	@pre	"This method can be called either before or after the API has been initialized with Initialize().
  1337 			If called after initialization, the change will only be committed once CommitL() is called."
  1338 	*/
  1339 	IMPORT_C void SetImplementationSpecificEncoderOptionsL(const TDesC8& aOptions);
  1340 
  1341 	/**
  1342 	Initializes the video devices, and reserves hardware resources. This method is asynchronous, 
  1343 	DevVideoRecord will call MMMFDevVideoRecordObserver::MdvroInitializeComplete() after initialization has 
  1344 	completed. If direct capture is used, this method also prepares the camera API for capture by calling 
  1345 	PrepareVideoCaptureL(). No DevVideoRecord method may be called while initialization is in progress, the 
  1346 	initialization process can only be cancelled by destroying the DevVideoRecord object. 
  1347 
  1348 	After initialization has successfully been completed, video capturing and encoding can be started with 
  1349 	Start() with a relatively low delay since the hardware has already been set up.
  1350 
  1351 	If Initialize() fails, the DevVideoRecord object must be destroyed, and set up from scratch.
  1352 
  1353 	Error handling: Errors are reported using the MdvroInitializeComplete() callback method. Typical error 
  1354 	codes used:
  1355 		- KErrHardwareNotAvailable - Not enough free video processing hardware resources
  1356 		- KErrNotSupported - The current configuration is not supported.
  1357 
  1358 	@pre	"This method can only be called before the API has been initialized."
  1359 	*/
  1360 	IMPORT_C void Initialize();
  1361 	
  1362 	/**
  1363 	Commit all configuration changes since the last CommitL(), Revert() or Initialize(). This only applies 
  1364 	to methods that can be called both before AND after DevVideoRecord has been initialized. 
  1365 	See the following methods for details.
  1366 
  1367 	@see	SetOutputRectL
  1368 	@see	SetPreProcessTypesL
  1369 	@see	SetRotateOptionsL
  1370 	@see	SetScaleOptionsL
  1371 	@see	SetInputCropOptionsL
  1372 	@see	SetOutputCropOptionsL
  1373 	@see	SetOutputPadOptionsL
  1374 	@see	SetColorEnhancementOptionsL
  1375 	@see	SetFrameStabilisationOptionsL
  1376 	@see	SetCustomPreProcessOptionsL
  1377 	@see	SetCodingStandardSpecificOptionsL
  1378 	@see	SetImplementationSpecificEncoderOptionsL
  1379 
  1380 	@leave  "The method will leave if an error occurs."
  1381 	@pre	"This method can only be called after the API has been initialized with Initialize()."
  1382 	*/
  1383 	IMPORT_C void CommitL();
  1384 
  1385 	/**
  1386 	Revert any configuration changes that have not yet been committed using CommitL().  This only applies 
  1387 	to methods that can be called both before AND after DevVideoRecord has been initialized. 
  1388 	See the following methods for details.
  1389 
  1390 	@see	SetOutputRectL
  1391 	@see	SetPreProcessTypesL
  1392 	@see	SetRotateOptionsL
  1393 	@see	SetScaleOptionsL
  1394 	@see	SetInputCropOptionsL
  1395 	@see	SetOutputCropOptionsL
  1396 	@see	SetOutputPadOptionsL
  1397 	@see	SetColorEnhancementOptionsL
  1398 	@see	SetFrameStabilisationOptionsL
  1399 	@see	SetCustomPreProcessOptionsL
  1400 	@see	SetCodingStandardSpecificOptionsL
  1401 	@see	SetImplementationSpecificEncoderOptionsL
  1402 
  1403 	@pre	"This method can only be called after the API has been initialized with Initialize()."
  1404 	*/
  1405 	IMPORT_C void Revert();
  1406 
  1407 	/**
  1408 	Returns coding-standard specific initialization output from the encoder. The information can contain, 
  1409 	for example, the MPEG-4 VOL header. This method can be called after Initialize() has been called.
  1410 	
  1411 	@return	"Coding-standard specific initialization output. The data format is coding-standard specific
  1412 			and defined separately. The buffer is pushed to the cleanup stack, and the caller is responsible 
  1413 			for deallocating it."
  1414 	@leave	"The method will leave if an error occurs."
  1415 	@pre	"This method can only be called after the API has been initialized with Initialize()."
  1416 	*/
  1417 	IMPORT_C HBufC8* CodingStandardSpecificInitOutputLC();
  1418 
  1419 	/**
  1420 	Returns implementation-specific initialization output from the encoder. This method can be called after 
  1421 	Initialize() has been called.
  1422 	
  1423 	@return	"Implementation-specific initialization output. The data format is specific to the encoder 
  1424 			implementation, and defined by the encoder supplier. The buffer is pushed to the cleanup stack, 
  1425 			and the caller is responsible for deallocating it."
  1426 	@leave	"The method will leave if an error occurs."
  1427 	@pre	"This method can only be called after the API has been initialized with Initialize()."
  1428 	*/
  1429 	IMPORT_C HBufC8* ImplementationSpecificInitOutputLC();
  1430 
  1431 	/**
  1432 	Sets the number of unequal error protection levels. By default unequal error protection is not used.
  1433 
  1434 	@param	"aNumLevels"		"The number of unequal error protection levels. To disable unequal error 
  1435 								protection, set this value to one. When unequal error protection is used, 
  1436 								the encoder should code pictures so that they can be divided into number of 
  1437 								unequal error protection levels having an ascending order of importance in 
  1438 								the quality of decoded pictures, with level zero indicating the least important level. 
  1439 								The encoder should map the requested bit-rate scalability layers and in-layer
  1440 								bit-rate scalability steps to the unequal error protection levels. In 
  1441 								addition, the encoder may use coded sub-pictures to divide coded pictures 
  1442 								to different regions of interest or data partitions to divide coded segments 
  1443 								into pieces of different importance."
  1444 	@param	"aSeparateBuffers"	"True if each unequal error protection level of a coded data unit shall be 
  1445 								encapsulated in its own output buffer. Ignored if unequal error protection 
  1446 								is not used. If each unequal error protection level (e.g. a data partition) 
  1447 								of coded data unit is encapsulated in its own output buffer, the caller can 
  1448 								transmit the output buffers in different logical channels or can apply a 
  1449 								different amount of application-level forward error coding for different 
  1450 								output buffers. If all unequal error protection levels (e.g. data partitions)
  1451 								of coded data unit are encapsulated in the same output buffer, the caller can
  1452 								apply a forward error control mechanism that protects the beginning of the 
  1453 								output buffer better than the remaining of the output buffer."
  1454 	@leave	"The method will leave if an error occurs. Typical error codes used:
  1455 				- KErrNotSupported - Unequal error protection is not supported."
  1456 	@pre	"This method can only be called after the API has been initialized with Initialize()."
  1457 	*/
  1458 	IMPORT_C void SetErrorProtectionLevelsL(TUint aNumLevels, TBool aSeparateBuffers);
  1459 
  1460 	/**
  1461 	Sets up an unequal error protection level. If unequal error protection is not used, this method can be 
  1462 	used to control settings for the whole encoded bitstream.
  1463 
  1464 	@param	"aLevel"	"Error protection level number. This argument is ignored if unequal error 
  1465 						protection is not in use."
  1466 	@param	"aBitrate"	"Target bit-rate for this error protection level."
  1467 	@param	"aStrength"	"Forward error control strength for this error protection level. The strength can be 
  1468 						specified using values from TErrorControlStrength (EFecStrengthNone, EFecStrengthLow,
  1469 						EFecStrengthNormal, EFecStrengthHigh), or with intermediate values between those 
  1470 						constants."
  1471 	@leave	"The method will leave if an error occurs. Typical error codes used:
  1472 				- KErrNotSupported - The specified bit-rate cannot be supported. "
  1473 	@pre	"This method can only be called after the API has been initialized with Initialize()."
  1474 	*/
  1475 	IMPORT_C void SetErrorProtectionLevelL(TUint aLevel, TUint aBitrate, TUint aStrength);
  1476 
  1477 	/**
  1478 	Sets the expected or prevailing channel conditions for an unequal error protection level, in terms of 
  1479 	expected packet loss rate. The video encoder can use this information to optimize the generated 
  1480 	bitstream.
  1481 
  1482 	@param	"aLevel"			"Error protection level number. This argument is ignored if unequal error 
  1483 								protection is not in use."
  1484 	@param	"aLossRate"			"Packet loss rate, in number of packets lost per second. Set to 0.0 if 
  1485 								packet losses are not expected."
  1486 	@param	"aLossBurstLength"	"Expected average packet loss burst length. Set to zero if the information 
  1487 								is not available."
  1488 	@pre	"This method can only be called after the API has been initialized with Initialize()."
  1489 	*/
  1490 	IMPORT_C void SetChannelPacketLossRate(TUint aLevel, TReal aLossRate, TTimeIntervalMicroSeconds32 aLossBurstLength);
  1491 
  1492 	/**
  1493 	Sets the expected or prevailing channel conditions for an unequal error protection level, in terms of 
  1494 	expected bit error rate. The video encoder can use this information to optimize the generated bitstream.
  1495 
  1496 	@param	"aLevel"		"Error protection level number. This argument is ignored if unequal error 
  1497 							protection is not in use."
  1498 	@param	"aErrorRate"	"Expected bit error rate, as a fraction of the total bits transmitted. Set 
  1499 							to 0.0 if bit errors are not expected."
  1500 	@param	"aStdDeviation"	"Expected bit error rate standard deviation."
  1501 	@pre	"This method can only be called after the API has been initialized with Initialize()."
  1502 	*/
  1503 	IMPORT_C void SetChannelBitErrorRate(TUint aLevel, TReal aErrorRate, TReal aStdDeviation);
  1504 
  1505 	/**
  1506 	Sets the target size of each coded video segment. The segment target size can be specified in terms 
  1507 	of number of bytes per segment, number of macroblocks per segment, or both.
  1508 
  1509 	@param	"aLayer"			"Layer number. Layers are numbered [0…n-1], where n is the number of layers 
  1510 								available. Use zero if layered bit-rate scalability is not used."
  1511 	@param	"aSizeBytes"		"Segment target size in bytes. Set to zero to use unlimited segment size. The
  1512 								segment size in bytes should include all data that is typically stored or
  1513 								transmitted for each segment in the format currently in use. This includes all
  1514 								related headers."
  1515 	@param	"aSizeMacroblocks"	"Segment target size in number of macroblocks per segment. Set to zero to 
  1516 								use unlimited segment size."
  1517 	@pre	"This method can only be called after the API has been initialized with Initialize()."
  1518 	*/
  1519 	IMPORT_C void SetSegmentTargetSize(TUint aLayer, TUint aSizeBytes, TUint aSizeMacroblocks);
  1520 
  1521 	/**
  1522 	Sets the bit-rate control options for a layer. If layered bit-rate scalability is not used, the options
  1523 	are set for the whole bitstream.
  1524 
  1525 	@param	"aLayer"	"Layer number. Layers are numbered [0…n-1], where n is the number of layers available. 
  1526 						Use zero if layered bit-rate scalability is not used."
  1527 	@param	"aOptions"	"Bit-rate control options."
  1528 	@pre	"This method can only be called after the API has been initialized with Initialize()."
  1529 	*/
  1530 	IMPORT_C void SetRateControlOptions(TUint aLayer, const TRateControlOptions& aOptions);
  1531 
  1532 	/**
  1533 	Sets in-layer scalability options for a layer. In-layer bit-rate scalability refers to techniques where 
  1534 	a specific part of a single-layer coded stream can be decoded correctly without decoding the leftover 
  1535 	part. For example, B-pictures can be used for this. By default in-layer scalability is not used.
  1536 
  1537 	@param	"aLayer"			"Layer number. Layers are numbered [0…n-1], where n is the number of layers 
  1538 								available. Use zero if layered bit-rate scalability is not used."
  1539 	@param	"aNumSteps"			"The number of in-layer scalability steps to use. Set to one to disable 
  1540 								in-layer scalability."
  1541 	@param	"aScalabilityType"	"The scalability type to use. See the definition of TInLayerScalabilityType 
  1542 								for more information."
  1543 	@param	"aBitrateShare"		"Bit-rate share for each scalability step. The bit-rate shares are defined 
  1544 								as fractions of total layer bit-rate, with the share for one layer being 
  1545 								aBitrateShare[i]/sum(aBitrateShare). For example, to use 2/3 of the total
  1546 								bitrate for the first layer and the remaining 1/3 for the second, the array 
  1547 								contents would be {2,1}."
  1548 	@param	"aPictureShare"		"Picture rate share for each scalability step. The picture rate shares are 
  1549 								defined similarly to the bit-rate shares. For example, a client wishing to 
  1550 								use two B-pictures between each pair of reference pictures should set the 
  1551 								array contents to {1,2}."
  1552 	@leave	"The method will leave if an error occurs. Typical error codes used:
  1553 				- KErrNotSupported	- In-layer scalability is not supported.
  1554 				- KErrArgument		- Some of the arguments are out of range. For example, it is not possible
  1555 									  to use the specified in-layer scalability setup due to other 
  1556 									  constraints (such as the maximum picture order delay)."
  1557 	@pre	"This method can only be called after the API has been initialized with Initialize()."
  1558 	*/
  1559 	IMPORT_C void SetInLayerScalabilityL(TUint aLayer, 
  1560 										 TUint aNumSteps, 
  1561 										 TInLayerScalabilityType aScalabilityType, 
  1562 										 const TArray<TUint>& aBitrateShare, 
  1563 										 const TArray<TUint>& aPictureShare);
  1564 
  1565 	/**
  1566 	Sets the period for layer promotions points for a scalability layer. A layer promotion point is a 
  1567 	picture where it is possible to start encoding this enhancement layer if only the lower layers were 
  1568 	encoded earlier.
  1569 
  1570 	@param	"aLayer"	"Layer number."
  1571 	@param	"aPeriod"	"Layer promotion point period. A value of one signals that each picture should be a 
  1572 						layer promotion point, value two that there is one picture between each promotion 
  1573 						point etc."
  1574 	@pre	"This method can only be called after the API has been initialized with Initialize()."
  1575 	*/
  1576 	IMPORT_C void SetLayerPromotionPointPeriod(TUint aLayer, TUint aPeriod);
  1577 
  1578 	/**
  1579 	Returns coding-standard specific settings output from the encoder. The information can contain, for 
  1580 	example, some bitstream headers that can change based on settings modified while encoding is in progress.
  1581 	
  1582 	@return	"Coding-standard specific output. The data format is coding-standard specific and defined 
  1583 			separately. The buffer is pushed to the cleanup stack, and the caller is responsible for 
  1584 			deallocating it."
  1585 	@leave	"The method will leave if an error occurs."
  1586 	@pre	"This method can only be called after the API has been initialized with Initialize()."
  1587 	*/
  1588 	IMPORT_C HBufC8* CodingStandardSpecificSettingsOutputLC();
  1589 
  1590 	/**
  1591 	Returns implementation-specific settings output from the encoder. The information can contain, for 
  1592 	example, some bitstream headers that can change based on settings modified while encoding is in progress.
  1593 	
  1594 	@return	"Implementation-specific initialization output. The data format is implementation-specific and 
  1595 			defined separately by the encoder supplier. The buffer is pushed to the cleanup stack, and the 
  1596 			caller is responsible for deallocating it."
  1597 	@leave	"The method will leave if an error occurs."
  1598 	@pre	"This method can only be called after the API has been initialized with Initialize()."
  1599 	*/
  1600 	IMPORT_C HBufC8* ImplementationSpecificSettingsOutputLC();
  1601 
  1602 	/**
  1603 	Writes an uncompressed input picture. The picture must remain valid and unmodified until it is returned 
  1604 	with the MdvroReturnPicture() callback. This method must not be called if direct capture is used.
  1605 
  1606 	@param	"aPicture"	"The picture to write."
  1607 	@leave	"The method will leave if an error occurs."
  1608 	@pre	"This method can only be called after the API has been initialized with Initialize()."
  1609 	*/
  1610 	IMPORT_C void WritePictureL(TVideoPicture* aPicture);
  1611 
  1612 	/**
  1613 	Requests the encoder to sends supplemental information in the bitstream. The information data format is 
  1614 	coding-standard dependent. Only one supplemental information send request can be active at a time. 
  1615 	This variant encodes the information to the next possible picture.
  1616 
  1617 	@param	"aData"	"Supplemental information data to send. The buffer can be reused immediately after the 
  1618 					method returns."
  1619 	@leave	"The method will leave if an error occurs. Typical error codes used:
  1620 				- KErrNotSupported - Supplemental information is not supported"
  1621 	@pre	"This method can only be called after the API has been initialized with Initialize()."
  1622 	*/
  1623 	IMPORT_C void SendSupplementalInfoL(const TDesC8& aData);
  1624 
  1625 	/**
  1626 	Requests the encoder to send supplemental information in the bitstream. The information data format is 
  1627 	coding-standard dependent. Only one supplemental information send request can be active at a time. This 
  1628 	variant encodes the information to the picture whose presentation timestamp is equal to or greater than 
  1629 	and closest to the value of aTimestamp.
  1630 
  1631 	@param	"aData"			"Supplemental information data to send. The buffer can be reused immediately 
  1632 							after the method returns."
  1633 	@param	"aTimestamp"	"Timestamp for the picture in which the supplemental information should be 
  1634 							included. If the timestamp is in the past, the supplemental information will
  1635 							not be sent."
  1636 	@leave	"The method will leave if an error occurs. Typical error codes used:
  1637 				- KErrNotSupported - Supplemental information is not supported"
  1638 	@pre	"This method can only be called after the API has been initialized with Initialize()."
  1639 	*/
  1640 	IMPORT_C void SendSupplementalInfoL(const TDesC8& aData, const TTimeIntervalMicroSeconds& aTimestamp);
  1641 
  1642 	/**
  1643 	Cancels the current supplemental information send request. The memory buffer reserved for supplemental 
  1644 	information data can be reused or deallocated after the method returns.
  1645 	@pre	"This method can only be called after the API has been initialized with Initialize()."
  1646 	*/
  1647 	IMPORT_C void CancelSupplementalInfo();
  1648 
  1649 	/**
  1650 	Notifies the system that the end of input data has been reached. No more input data can be written 
  1651 	through the API. The encoder and pre-processor can use this signal to ensure that the remaining data 
  1652 	gets processed, without waiting for new data. After the remaining data has been processed, the client 
  1653 	gets notified by the MdvroStreamEnd() callback.
  1654 
  1655 	This method is mainly useful for file-to-file conversions and other non-realtime processing. For 
  1656 	real-time recording all pictures are processed or discarded according to their timestamps.
  1657 	@pre	"This method can only be called after the API has been initialized with Initialize()."
  1658 	*/
  1659 	IMPORT_C void InputEnd();
  1660 
  1661 	/**
  1662 	Starts recording video. This includes capturing pictures from the camera (if direct capture is used), 
  1663 	pre-processing and encoding. Recording will proceed until it is stopped or paused. Initally recording 
  1664 	is stopped.
  1665 	@pre	"This method can only be called after the API has been initialized with Initialize()."
  1666 	*/
  1667 	IMPORT_C void Start();
  1668 
  1669 	/**
  1670 	Stops recording video. No new pictures will be captured, pre-processed, or encoded. If input pictures 
  1671 	are written while recording is stopped, they will be returned immediately.
  1672 	@pre	"This method can only be called after the API has been initialized with Initialize()."
  1673 	*/
  1674 	IMPORT_C void Stop();
  1675 
  1676 	/**
  1677 	Pauses video recording. Recording can be resumed using Resume().
  1678 
  1679 	While video is paused, new pictures are not captured, and input pictures written using WritePictureL() 
  1680 	are discarded. Timestamps are not incremented - the encoder assumes that the clock source is paused as 
  1681 	well, and input picture timestamps are adjusted accordingly. Pause is typically used in video recording 
  1682 	applications to pause recording, conversational applications should use Freeze() instead.
  1683 
  1684 	Note: The client has to ensure that the clock source is paused properly. If the paused picture should 
  1685 	be shown longer than normal, the client should either adjust input picture timestamps, or start 
  1686 	recording (when using direct capture) some time after restarting the clock source.
  1687 	@pre	"This method can only be called after the API has been initialized with Initialize()."
  1688 	*/
  1689 	IMPORT_C void Pause();
  1690 
  1691 	/**
  1692 	Resumes video recording after a pause.
  1693 	@pre	"This method can only be called after the API has been initialized with Initialize()."
  1694 	*/
  1695 	IMPORT_C void Resume();
  1696 
  1697 	/**
  1698 	Freezes the input picture. Freezing is similar to a pause, except that timestamps are incremented 
  1699 	normally during a freeze. Normal encoding can be continued using ReleaseFreeze(). 
  1700 
  1701 	Freeze is typically used in video telephony applications to stop sending new pictures. In that situation
  1702 	the audio encoding can still continue normally, and thus the clock source timestamps are incremented 
  1703 	normally. When the freeze is released, the encoder assumes that input picture timestamps have been 
  1704 	incremented normally. If direct capture is used, the picture timestamps are updated as if encoding had 
  1705 	been going on throughout the freeze.
  1706 	@pre	"This method can only be called after the API has been initialized with Initialize()."
  1707 	*/
  1708 	IMPORT_C void Freeze();
  1709 
  1710 	/**
  1711 	Releases a frozen input picture. Video capturing and encoding continues normally.
  1712 	@pre	"This method can only be called after the API has been initialized with Initialize()."
  1713 	*/
  1714 	IMPORT_C void ReleaseFreeze();
  1715 
  1716 	/**
  1717 	Returns the current recording position. The position is the capture timestamp from the latest input 
  1718 	picture, or the capture timestamp for the latest picture captured from the camera when direct capture 
  1719 	is used.
  1720 	
  1721 	@return	"The current recording position."
  1722 	@pre	"This method can only be called after the API has been initialized with Initialize()."
  1723 	*/
  1724 	IMPORT_C TTimeIntervalMicroSeconds RecordingPosition();
  1725 
  1726 	/**
  1727 	Gets the current output buffer status. The information includes the number of free output buffers and 
  1728 	the total size of free buffers in bytes.
  1729 
  1730 	@param	"aNumFreeBuffers"	"Target for the number of free output buffers."
  1731 	@param	"aTotalFreeBytes"	"Target for the total free buffer size in bytes."
  1732 	@pre	"This method can only be called after the API has been initialized with Initialize()."
  1733 	*/
  1734 	IMPORT_C void GetOutputBufferStatus(TUint& aNumFreeBuffers, TUint& aTotalFreeBytes);
  1735 
  1736 	/**
  1737 	Reads various counters related to processed video pictures. See the definition of TPictureCounters 
  1738 	for a description of the counters. The counters are reset when Initialize() or this method is called, 
  1739 	and thus they only include pictures processed since the last call.
  1740 
  1741 	@param	"aCounters"	"The counter structure to fill."
  1742 	@pre	"This method can only be called after the API has been initialized with Initialize()."
  1743 	*/
  1744 	IMPORT_C void GetPictureCounters(TPictureCounters& aCounters);
  1745 
  1746 	/**
  1747 	Reads the frame stabilisation output picture position. This information can be used for positioning 
  1748 	the viewfinder. The position returned is the stabilisation result for the most recent input picture.
  1749 
  1750 	@param	"aHwDevice"	"The hardware device to query. The value is returned from SelectEncoderL() or 
  1751 						SelectPreProcessorL() when the device is selected."
  1752 	@param	"aRect"		"The position of the stabilisation output picture inside the input picture. If 
  1753 						frame stabilisation is not used, the rectangle is set to cover the entire input 
  1754 						picture."
  1755 	@pre	"This method can only be called after the API has been initialized with Initialize()."
  1756 	*/
  1757 	IMPORT_C void GetFrameStabilisationOutput(THwDeviceId aHwDevice, TRect& aRect);
  1758 
  1759 	/**
  1760 	Returns the number of output buffers currently containing valid output data.
  1761 	
  1762 	@return	"The number of output buffers with valid output data."
  1763 	@pre	"This method can only be called after the API has been initialized with Initialize()."
  1764 	*/
  1765 	IMPORT_C TUint NumDataBuffers();
  1766 
  1767 	/**
  1768 	Retrieves the next output buffer, in coding order. The buffer must be returned using ReturnBuffer() when
  1769 	it is no longer used. The maximum amount of buffers that the caller can keep in its use is controlled by
  1770 	the iMinNumOutputBuffers and iMinTotalOutputBufferSize fields in the TEncoderBufferOptions settings. 
  1771 	
  1772 	@return	"The next output buffer, in coding order. If no new buffers are available, the return value 
  1773 			is NULL."
  1774 	@leave	"The method will leave if an error occurs."
  1775 	@pre	"This method can only be called after the API has been initialized with Initialize()."
  1776 	*/
  1777 	IMPORT_C TVideoOutputBuffer* NextBufferL();
  1778 
  1779 	/**
  1780 	Returns a used output buffer back to the encoder. The buffer can no longer be used by the client.
  1781 
  1782 	@param	"aBuffer"	"The buffer to return."
  1783 	@pre	"This method can only be called after the API has been initialized with Initialize()."
  1784 	*/
  1785 	IMPORT_C void ReturnBuffer(TVideoOutputBuffer* aBuffer);
  1786 
  1787 	/**
  1788 	Indicates a picture loss to the encoder, without specifying the lost picture. The encoder can react to
  1789 	this by transmitting an intra-picture.
  1790 	@pre	"This method can only be called after the API has been initialized with Initialize()."
  1791 	*/
  1792 	IMPORT_C void PictureLoss();
  1793 
  1794 	/**
  1795 	Indicates to the encoder the pictures that have been lost. The encoder can react to this by 
  1796 	transmitting an intra-picture.
  1797 
  1798 	@param	"aPictures"	"Picture identifiers for the lost pictures. See [6] for a definition of TPictureId."
  1799 	@pre	"This method can only be called after the API has been initialized with Initialize()."
  1800 	*/
  1801 	IMPORT_C void PictureLoss(const TArray<TPictureId>& aPictures);
  1802 
  1803 	/**
  1804 	Indicates a loss of consecutive macroblocks in raster scan order to the encoder. 
  1805 
  1806 	@param	"aFirstMacroblock"	"The first lost macroblock. The macroblocks are numbered such 
  1807 								that the macroblock in the upper left corner of the picture is considered 
  1808 								macroblock number 1 and the number for each macroblock increases from left 
  1809 								to right and then from top to bottom in raster-scan order."
  1810 	@param	"aNumMacroblocks"	"The number of lost macroblocks that are consecutive in raster scan order."
  1811 	@param	"aPicture"			"The picture number for the picture where the macroblocks were lost. 
  1812 								If the picture is not known, aPicture.iIdType is set to ENone."
  1813 	@pre	"This method can only be called after the API has been initialized with Initialize()."
  1814 	*/
  1815 	IMPORT_C void SliceLoss(TUint aFirstMacroblock, TUint aNumMacroblocks, const TPictureId& aPicture);
  1816 
  1817 	/**
  1818 	Sends a reference picture selection request to the encoder. The request is delivered as a coding-standard
  1819 	specific binary message. Reference picture selection can be used to select a previous correctly 
  1820 	transmitted picture to use as a reference in case later pictures have been lost.
  1821 
  1822 	@param	"aSelectionData"	"The reference picture selection request message. The message format is 
  1823 								coding-standard specific, and defined separately."
  1824 	@pre	"This method can only be called after the API has been initialized with Initialize()."
  1825 	*/
  1826 	IMPORT_C void ReferencePictureSelection(const TDesC8& aSelectionData);
  1827 
  1828 	/**
  1829 	Retrieves the number of complexity control levels available for a hardware device. Devices can support 
  1830 	processing the same input data with different computational complexity levels. The complexity level 
  1831 	can affect, for example, the motion vector search range used in an encoder.
  1832 	
  1833 	@param	"aHwDevice"	"The hardware device to configure. The value is returned from SelectEncoderL() or 
  1834 						SelectPreProcessorL() when the device is selected."
  1835 	@return	"The number of complexity control levels available, one if multiple levels are not supported."
  1836 	@pre	"This method can only be called after the API has been initialized with Initialize()."
  1837 	*/
  1838 	IMPORT_C TUint NumComplexityLevels(THwDeviceId aHwDevice);
  1839 
  1840 	/**
  1841 	Sets the complexity level to use for video processing in a hardware device. The level can be changed at 
  1842 	any time. 
  1843 
  1844 	@param	"aHwDevice"	"The hardware device to configure. The value is returned from SelectEncoderL() or 
  1845 						SelectPreProcessorL() when the device is selected."
  1846 	@param	"aLevel"	"The computational complexity level to use. Level zero (0) is the most complex one,
  1847 						with the highest quality. Higher level numbers require less processing and may have 
  1848 						lower quality."
  1849 	@pre	"This method can only be called after the API has been initialized with Initialize()."
  1850 	*/
  1851 	IMPORT_C void SetComplexityLevel(THwDeviceId aHwDevice, TUint aLevel); 
  1852 
  1853 	/**
  1854 	Retrieves a custom interface to the specified hardware device.
  1855 	@param	"aHwDevice"		"The hardware device from which the custom interface shall be requested. 
  1856 							The value is returned from SelectDecoderL() or SelectPostProcessorL() when
  1857 							the device is selected."
  1858 	@param  "aInterface"	"Interface UID, defined with the custom interface."
  1859 	@return "Pointer to the interface implementation, or NULL if the device does not 
  1860 			implement the interface requested. The return value must be cast to the 
  1861 			correct type by the user."
  1862 	*/
  1863 	IMPORT_C TAny* CustomInterface(THwDeviceId aHwDevice, TUid aInterface);
  1864 
  1865 private:
  1866 	enum TInitializationState 
  1867 		{
  1868 		ENotInitialized = 0x01, 
  1869 		EInitializing = 0x02,
  1870 		EInitialized = 0x04,
  1871 		EInitializationFailed = 0x08
  1872 		};
  1873 
  1874 private:
  1875 	CMMFDevVideoRecord(MMMFDevVideoRecordObserver& aObserver);
  1876 
  1877 	// Methods to check aHwDevice is valid and return the appropriate HwDevice
  1878 	CMMFVideoRecordHwDevice& VideoRecordHwDevice(THwDeviceId aHwDevice) const;
  1879 	CMMFVideoRecordHwDevice& CapturingHwDevice() const; //returns the first plugin in the chain
  1880 	CMMFVideoEncodeHwDevice& VideoEncodeHwDevice(THwDeviceId aHwDevice) const;// Checks that aHwDevice is valid
  1881 	CMMFVideoPreProcHwDevice& VideoPreProcHwDevice(THwDeviceId aHwDevice) const;// Checks that aHwDevice is valid
  1882 	CMMFVideoEncodeHwDevice& VideoEncodeHwDevice() const;
  1883 	CMMFVideoPreProcHwDevice& VideoPreProcHwDevice() const;
  1884 	CMMFVideoHwDevice& VideoHwDevice(THwDeviceId aHwDevice) const;
  1885 
  1886 	// Connects the plugins together
  1887 	void ConnectPlugins();
  1888 
  1889 	// Check that we are in a valid initialization state
  1890 	// Panics if iInitializationState is not one of aExpected
  1891 	void CheckInitializationState(TUint aExpected);
  1892 
  1893 	// Methods to handle init complete callbacks from the hw devices
  1894 	void HandlePreProcInitializeComplete(TInt aError);
  1895 	void HandleEncoderInitializeComplete(TInt aError);
  1896 	
  1897 	CMMFVideoEncodeHwDevice* CreateEncoderL(TUid aVideoEncoder);
  1898 
  1899 	// from MMMFDevVideoRecordProxy
  1900 	virtual void MdvrpNewBuffer(TVideoOutputBuffer* aBuffer);
  1901 	virtual void MdvrpReturnPicture(TVideoPicture* aPicture);
  1902 	virtual void MdvrpSupplementalInfoSent();
  1903 	virtual void MdvrpFatalError(CMMFVideoHwDevice* aDevice, TInt aError);
  1904 	virtual void MdvrpInitializeComplete(CMMFVideoHwDevice* aDevice, TInt aError);
  1905 	virtual void MdvrpStreamEnd();
  1906 
  1907 private:
  1908 	MMMFDevVideoRecordObserver& iObserver;
  1909  	CMMFVideoEncodeHwDevice* iVideoEncodeHwDevice;
  1910 	CMMFVideoPreProcHwDevice* iVideoPreProcHwDevice;
  1911 	TUint iInitializationState;
  1912 	TUint iNumberOfMdvrpStreamEndCallbacks;
  1913 
  1914 	TDblQue<TVideoOutputBuffer> iVideoOutputBufferQue;
  1915 	TDblQueIter<TVideoOutputBuffer> iVideoOutputBufferQueIter;
  1916 	TUint iNumberOfVideoOutputBuffers;
  1917 	TBool iIsPreProcComplete;
  1918 	
  1919 #ifdef SYMBIAN_MULTIMEDIA_CODEC_API
  1920 	TBool iPuListCreated;
  1921 	RImplInfoPtrArray iPuImplementations;
  1922 #endif // SYMBIAN_MULTIMEDIA_CODEC_API
  1923 	};
  1924 
  1925 
  1926 /**
  1927 The MMMFDevVideoObserver class defines the observer mixin-interface that any client using CMMFDevVideoRecord 
  1928 must implement. 
  1929 @publishedAll
  1930 @released
  1931 */
  1932 class MMMFDevVideoRecordObserver
  1933 	{
  1934 public:
  1935 	/**
  1936 	Returns a used input video picture back to the caller. The picture memory can be re-used or freed.
  1937 	@param	"aPicture"	"The picture to return."
  1938 	*/
  1939 	virtual void MdvroReturnPicture(TVideoPicture* aPicture) = 0;
  1940 
  1941 	/**
  1942 	Signals that the supplemental info send request has completed. The buffer used for supplemental 
  1943 	information can be re-used or freed.
  1944 	*/
  1945 	virtual void MdvroSupplementalInfoSent() = 0;
  1946 
  1947 	/**
  1948 	Notifies the client that one or more new output buffers are available. The client can then use 
  1949 	NextBufferL() and related methods to fetch the data. 
  1950 	*/
  1951 	virtual void MdvroNewBuffers() = 0;
  1952 
  1953 	/**
  1954 	Reports a fatal encoding or capturing error to the client. When these
  1955 	errors occur, capturing and encoding is stopped automatically. The client
  1956 	must destroy the CMMFDevVideoRecord object and create a new instance before
  1957 	attempting to continue. Note that scenarios have been identified where
  1958 	MdvroFatalError may get referenced at some point during the execution of a
  1959 	CMMFDevVideoRecord procedure. Therefore CMMFDevVideoRecord object should be
  1960 	deleted outside of MdvroFatalError context in order to avoid accidental
  1961 	access to de-allocated CMMFDevVideoRecord data members.
  1962 	@param "aError" "The error code."
  1963 	*/
  1964 	virtual void MdvroFatalError(TInt aError) = 0;
  1965 
  1966 	/**
  1967 	Reports that DevVideoRecord initialization has completed. The interface can now be used for video 
  1968 	recording.
  1969 	@param	"aError"	"Initialization error code, KErrNone if no error occurred."
  1970 	*/
  1971 	virtual void MdvroInitializeComplete(TInt aError) = 0;
  1972 
  1973 	/**
  1974 	Reports that the input video data end has been reached and all pictures have been processed. This
  1975 	method is only called after the client has called InputEnd(). No more output data will be available.
  1976 	*/
  1977 	virtual void MdvroStreamEnd() = 0;
  1978 	};
  1979 
  1980 
  1981 #include <mmf/devvideo/devvideorecord.inl>
  1982 
  1983 #endif