epoc32/include/mmf/devvideo/videorecordhwdevice.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     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 "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef __VIDEORECORDHWDEVICE_H__
    17 #define __VIDEORECORDHWDEVICE_H__
    18 
    19 #include <mmf/devvideo/devvideobase.h>
    20 #include <mmf/devvideo/devvideorecord.h>
    21 
    22 /**
    23 A base class for all video recording (encoding and pre-processing) hardware devices. Since both encoders 
    24 and pre-processors can implement pre-processing functionality, this class includes all pre-processing 
    25 related methods.
    26 @publishedAll
    27 @released
    28 */
    29 class CMMFVideoRecordHwDevice : public CMMFVideoHwDevice
    30 	{
    31 public:
    32 	/**
    33 	Retrieves information about the pre-processing capabilities of this hardware device.
    34 
    35 	@return	"Pre-processor information as a CPreProcessorInfo object. The object is pushed to the 
    36 			cleanup stack, and must be deallocated by the client."
    37 	@leave	"The method will leave if an error occurs."
    38 	*/
    39 	virtual CPreProcessorInfo* PreProcessorInfoLC() = 0;
    40 
    41 	/**
    42 	Sets the hardware device input format. If both a pre-processor and an encoder are used, the 
    43 	pre-processor output format and the encoder input format must be the same. The input format for 
    44 	the first device in the system is the input format for video input data. The method has to be called 
    45 	for both direct capture as well as memory buffer input.
    46 
    47 	@param	"aFormat"		"The input format to use."
    48 	@param	"aPictureSize"	"The input picture size in pixels."
    49 	@leave	"The method will leave if an error occurs. Typical error codes used:
    50 				- KErrNotSupported - The input format specified is not supported."
    51 	@pre	"This method may only be called before the hwdevice has been initialized using Initialize()."
    52 	*/
    53 	virtual void SetInputFormatL(const TUncompressedVideoFormat& aFormat, const TSize& aPictureSize) = 0;
    54 
    55 	/**
    56 	Sets the data source to be a camera, and sets the device to use direct capture for input.
    57 
    58 	@param	"aCameraHandle"	"A camera handle for the camera to use. The handle is passed 
    59 							to CCamera::NewDuplicateL() in the camera API "
    60 	@param	"aPictureRate"	"Video capture picture rate."
    61 	@leave	"The method will leave if an error occurs. Typical error codes used:
    62 				- KErrNotSupported - Direct capture is not supported or the picture rate specified is not 
    63 									 supported."
    64 	@pre	"This method may only be called before the hwdevice has been initialized using Initialize()."
    65 	*/
    66 	virtual void SetSourceCameraL(TInt aCameraHandle, TReal aPictureRate) = 0;
    67 
    68 	/**
    69 	Sets the data source to be memory buffers.
    70 
    71 	@param	"aMaxPictureRate"		"The maximum picture rate for input pictures."
    72 	@param	"aConstantPictureRate"	"True if the input picture rate is constant. In that case, 
    73 									aMaxPictureRate specifies the picture rate."
    74 	@param	"aProcessRealtime"		"True if real-time processing is needed, false if not. Real-time 
    75 									processing is typically neede for video recording applications, while
    76 									video conversion and off-line processing applications do not require it."
    77 	@leave	"The method will leave if an error occurs. Typical error codes used:
    78 				- KErrNotSupported - The picture rate specified is not supported."
    79 	@pre	"This method may only be called before the hwdevice has been initialized using Initialize()."
    80 	*/
    81 	virtual void SetSourceMemoryL(TReal aMaxPictureRate, TBool aConstantPictureRate, TBool aProcessRealtime) = 0;
    82 
    83 	/**
    84 	Sets the clock source to use for video timing. When video recording is synchronized with audio, 
    85 	the clock source is implemented by the audio playback subsystem, otherwise the clock source should 
    86 	get the time from the system clock.
    87 
    88 	If no clock source is set, video recording will not be synchronized, but will proceed as fast as
    89 	possible, depending on input data and output buffer availability. If direct capturing is used without
    90 	a clock source, the timestamps in the output data may not be valid.
    91 
    92 	@param	"aClock"	"The clock source to use."
    93 	@pre	"This method may only be called before the hwdevice has been initialized using Initialize()."
    94 	*/
    95 	virtual void SetClockSource(MMMFClockSource* aClock) = 0;
    96 
    97 	/**
    98 	Sets pre-processing options for RGB to YUV color space conversion. By default, input RGB data is 
    99 	assumed to use the full value range ([0…255]), and the output YUV format is the hardware device output 
   100 	format, so typically calling this method is not necessary.
   101 
   102 	@param	"aRange"		"Input RGB data range"
   103 	@param	"aOutputFormat"	"Conversion output YUV format."
   104 	@leave	"The method will leave if an error occurs. Typical error codes used:
   105 				- KErrNotSupported - The formats specified are not supported"
   106 	@pre	"This method may only be called before the hwdevice has been initialized using Initialize()."
   107 	*/
   108 	virtual void SetRgbToYuvOptionsL(TRgbRange aRange, const TYuvFormat& aOutputFormat) = 0;
   109 
   110 	/**
   111 	Sets pre-processing options for YUV to YUV data format conversion. By default, the hardware device input 
   112 	and output data formats are used. For encoder devices, the device input format and a the closest matching
   113 	format supported by the encoding process are used. Typically calling this method is not necessary.
   114 
   115 	@param	"aInputFormat"	"Conversion input format."
   116 	@param	"aOutputFormat"	"Conversion output format."
   117 	@leave	"The method will leave if an error occurs. Typical error codes used:
   118 				- KErrNotSupported - The formats specified are not supported"
   119 	@pre	"This method may only be called before the hwdevice has been initialized using Initialize()."
   120 	*/
   121 	virtual void SetYuvToYuvOptionsL(const TYuvFormat& aInputFormat, const TYuvFormat& aOutputFormat) = 0;
   122 
   123 	/**
   124 	Sets the pre-processing types to be used.
   125 
   126 	@param	"aPreProcessTypes"	"The pre-processing steps to perform, a bitwise OR of values from
   127 								TPrePostProcessType."
   128 	@leave	"The method will leave if an error occurs. Typical error codes used:
   129 				- KErrNotSupported - The pre-processing combination is not supported"
   130 	@pre	"This method can be called either before or after the hwdevice has been initialized with Initialize().
   131 			If called after initialization, the change must only be committed when CommitL() is called."
   132 	*/
   133 	virtual void SetPreProcessTypesL(TUint32 aPreProcessTypes) = 0;
   134 
   135 	/**
   136 	Sets pre-processing options for rotation.
   137 
   138 	@param	"aRotationType"	"The rotation to perform."
   139 	@leave	"The method will leave if an error occurs. Typical error codes used:
   140 				- KErrNotSupported - The rotation type is not supported."
   141 	@pre	"This method can be called either before or after the hwdevice has been initialized with Initialize().
   142 			If called after initialization, the change must only be committed when CommitL() is called."
   143 	*/
   144 	virtual void SetRotateOptionsL(TRotationType aRotationType) = 0;
   145 
   146 	/**
   147 	Sets pre-processing options for scaling.
   148 
   149 	@param	"aTargetSize"			"Target picture size. If a fixed scale factor size is used, the new 
   150 									dimensions must be set to: 
   151 										width=floor(factor*width), height=floor(factor*height). 
   152 									For example, scaling a QCIF (176x144) picture up by a factor of 4/3 
   153 									yields a size of 234x192."
   154 	@param	"aAntiAliasFiltering"	"True if anti-aliasing filtering should be used. If the pre-processor 
   155 									does not support anti-aliased scaling, or supports anti-aliased scaling
   156 									only, this argument is ignored."
   157 	@leave	"The method will leave if an error occurs. Typical error codes used:
   158 				- KErrNotSupported - The specified target size is not supported."
   159 	@pre	"This method can be called either before or after the hwdevice has been initialized with Initialize().
   160 			If called after initialization, the change must only be committed when CommitL() is called."
   161 	*/
   162 	virtual void SetScaleOptionsL(const TSize& aTargetSize, TBool aAntiAliasFiltering) = 0;
   163 
   164 	/**
   165 	Sets pre-processing options for input cropping. Input cropping is typically used for digital zooming.
   166 
   167 	@param	"aRect"	"The input cropping rectangle specifying the area of the picture to use. The rectangle 
   168 					must fit completely inside the input picture."
   169 	@leave	"The method will leave if an error occurs. Typical error codes used:
   170 				- KErrNotSupported - The specified cropping rectangle is not supported."
   171 	@pre	"This method can be called either before or after the hwdevice has been initialized with Initialize().
   172 			If called after initialization, the change must only be committed when CommitL() is called."
   173 	*/
   174 	virtual void SetInputCropOptionsL(const TRect& aRect) = 0;
   175 
   176 	/**
   177 	Sets pre-processing options for output cropping. Output cropping is performed after other 
   178 	pre-processing operations but before output padding. Output cropping and padding can be used in 
   179 	combination to prepare the picture size to suit the encoder, typically video encoders only support
   180 	picture sizes that are multiples of 16 pixels.
   181 
   182 	@param	"aRect"	"The output cropping rectangle specifying the area of the picture to use. The 
   183 					rectangle must fit completely inside the picture."
   184 	@leave	"The method will leave if an error occurs. Typical error codes used:
   185 				- KErrNotSupported - The specified cropping rectangle is not supported."
   186 	@pre	"This method can be called either before or after the hwdevice has been initialized with Initialize().
   187 			If called after initialization, the change must only be committed when CommitL() is called."
   188 	*/
   189 	virtual void SetOutputCropOptionsL(const TRect& aRect) = 0;
   190 
   191 	/**
   192 	Sets pre-processing options for output padding. Output padding is performed as the last pre-processing 
   193 	operation, and typically used to prepare the picture size to suit the encoder. The image is padded with 
   194 	black pixels.
   195 
   196 	@param	"aOutputSize"	"The padded output picture size. The output size must be large enough for the 
   197 							picture in its new position."
   198 	@param	"aPicturePos"	"The position for the original picture in the new padded picture. The original 
   199 							picture in its new position must fit completely inside the new picture."
   200 	@leave	"The method will leave if an error occurs. Typical error codes used:
   201 				- KErrNotSupported - The specified padding settings are not supported."
   202 	@pre	"This method can be called either before or after the hwdevice has been initialized with Initialize().
   203 			If called after initialization, the change must only be committed when CommitL() is called."
   204 	*/
   205 	virtual void SetOutputPadOptionsL(const TSize& aOutputSize, const TPoint& aPicturePos) = 0;
   206 
   207 	/**
   208 	Sets color enhancement pre-processing options.
   209 
   210 	@param	"aOptions"	"Color enchancement options."
   211 	@leave	"The method will leave if an error occurs. Typical error codes used:
   212 				- KErrNotSupported - The specified settings are not supported."
   213 	@pre	"This method can be called either before or after the hwdevice has been initialized with Initialize().
   214 			If called after initialization, the change must only be committed when CommitL() is called."
   215 	*/
   216 	virtual void SetColorEnhancementOptionsL(const TColorEnhancementOptions& aOptions) = 0;
   217 
   218 	/**
   219 	Sets frame stabilisation options.
   220 
   221 	@param	"aOutputSize"			"Output picture size. The output picture size must be smaller than 
   222 									or equal to the hardware device input picture size."
   223 	@param	"aFrameStabilisation"	"True if frame stabilisation should be used. By default stabilisation is 
   224 									not used."
   225 	@leave	"The method will leave if an error occurs. Typical error codes used:
   226 				- KErrNotSupported - The specified settings are not supported."
   227 	@pre	"This method can be called either before or after the hwdevice has been initialized with Initialize().
   228 			If called after initialization, the change must only be committed when CommitL() is called."
   229 	*/
   230 	virtual void SetFrameStabilisationOptionsL(const TSize& aOutputSize, TBool aFrameStabilisation) = 0;
   231 
   232 	/**
   233 	Sets custom implementation-specific pre-processing options.
   234 
   235 	@param	"aOptions"	"Post-processing options. The data format is implementation-specific."
   236 	@leave	"The method will leave if an error occurs. Typical error codes used:
   237 				- KErrNotSupported - The options are not supported."
   238 	@pre	"This method can be called either before or after the hwdevice has been initialized with Initialize().
   239 			If called after initialization, the change must only be committed when CommitL() is called."
   240 	*/
   241 	virtual void SetCustomPreProcessOptionsL(const TDesC8& aOptions) = 0;
   242 
   243 	/**
   244 	Initializes the device, and reserves hardware resources. If direct capture is used, this method also 
   245 	prepares the camera API for capture by calling PrepareVideoCaptureL(). This method is asynchronous, 
   246 	the device will call MMMFDevVideoRecordProxy::MdvrpInitializeComplete() after initialization has completed.
   247 	Video capturing and encoding can be started with Start() with a relatively low delay since the hardware
   248 	has already been set up.
   249 
   250 	Error handling: Errors are reported using the MdvrpInitializeComplete() callback method. Typical error 
   251 	codes used:
   252 		- KErrHardwareNotAvailable - Not enough free video processing hardware resources
   253 		- KErrNotSupported - The current configuration is not supported.
   254 	@pre	"This method can only be called before the hwdevice has been initialized."
   255 	*/
   256 	virtual void Initialize() = 0;
   257 
   258 	/**
   259 	Commit all changes since the last CommitL(), Revert() or Initialize()
   260 	to the hardware device.  This only applies to methods which can be called both
   261 	before AND after DevVideoPlay has been initialized.
   262 
   263 	@see	CMMFVideoEncodeHwDevice::SetOutputRectL
   264 	@see	CMMFVideoRecordHwDevice::SetPreProcessTypesL
   265 	@see	CMMFVideoRecordHwDevice::SetRotateOptionsL
   266 	@see	CMMFVideoRecordHwDevice::SetScaleOptionsL
   267 	@see	CMMFVideoRecordHwDevice::SetInputCropOptionsL
   268 	@see	CMMFVideoRecordHwDevice::SetOutputCropOptionsL
   269 	@see	CMMFVideoRecordHwDevice::SetOutputPadOptionsL
   270 	@see	CMMFVideoRecordHwDevice::SetColorEnhancementOptionsL
   271 	@see	CMMFVideoRecordHwDevice::SetFrameStabilisationOptionsL
   272 	@see	CMMFVideoRecordHwDevice::SetCustomPreProcessOptionsL
   273 	@see	CMMFVideoEncodeHwDevice::SetCodingStandardSpecificOptionsL
   274 	@see	CMMFVideoEncodeHwDevice::SetImplementationSpecificEncoderOptionsL
   275 
   276 	@leave  "The method will leave if an error occurs."
   277 	@pre	"This method can only be called after the hwdevice has been initialized with Initialize()."
   278 	*/
   279 	virtual void CommitL() = 0;
   280 
   281 	/**
   282 	Revert all changes since the last CommitL(), Revert() or Initialize()
   283 	back to their previous settings.  This only applies to methods which can 
   284 	be called both before AND after DevVideoPlay has been initialized.
   285 
   286 	@see	CMMFVideoEncodeHwDevice::SetOutputRectL
   287 	@see	CMMFVideoRecordHwDevice::SetPreProcessTypesL
   288 	@see	CMMFVideoRecordHwDevice::SetRotateOptionsL
   289 	@see	CMMFVideoRecordHwDevice::SetScaleOptionsL
   290 	@see	CMMFVideoRecordHwDevice::SetInputCropOptionsL
   291 	@see	CMMFVideoRecordHwDevice::SetOutputCropOptionsL
   292 	@see	CMMFVideoRecordHwDevice::SetOutputPadOptionsL
   293 	@see	CMMFVideoRecordHwDevice::SetColorEnhancementOptionsL
   294 	@see	CMMFVideoRecordHwDevice::SetFrameStabilisationOptionsL
   295 	@see	CMMFVideoRecordHwDevice::SetCustomPreProcessOptionsL
   296 	@see	CMMFVideoEncodeHwDevice::SetCodingStandardSpecificOptionsL
   297 	@see	CMMFVideoEncodeHwDevice::SetImplementationSpecificEncoderOptionsL
   298 
   299 	@pre	"This method can only be called after the hwdevice has been initialized with Initialize()."
   300 	*/
   301 	virtual void Revert() = 0;
   302 
   303 	/**
   304 	Writes an uncompressed input picture. When the picture has been used, it must be returned to the client
   305 	with MMMFDevVideoRecordProxy::MdvrpReturnPicture(). This method must not be called if direct capture is 
   306 	used.
   307 
   308 	@param	"aPicture"	"The picture to write."
   309 	@leave	"The method will leave if an error occurs."
   310 	@pre	"This method can only be called after the hwdevice has been initialized with Initialize()."
   311 	*/
   312 	virtual void WritePictureL(TVideoPicture* aPicture) = 0;
   313 
   314 	/**
   315 	Notifies the hardware device that the end of input data has been reached and no more input pictures
   316 	will be written. The hardware device can use this signal to ensure that the remaining data gets 
   317 	processed, without waiting for new data. After the remaining data has been processed, the hardware
   318 	device must call the proxy callback MdvrpStreamEnd().
   319 	@pre	"This method can only be called after the hwdevice has been initialized with Initialize()."
   320 	*/
   321 	virtual void InputEnd() = 0;
   322 
   323 	/**
   324 	Starts recording video. This includes capturing pictures from the camera (if direct capture is used), 
   325 	pre-processing and encoding. Recording will proceed until it is stopped or paused. Initally recording 
   326 	is stopped.
   327 	@pre	"This method can only be called after the hwdevice has been initialized with Initialize()."
   328 	*/
   329 	virtual void Start() = 0;
   330 
   331 	/**
   332 	Stops recording video. No new pictures will be captured, pre-processed, or encoded. If input pictures
   333 	are written while recording is stopped, they will be returned immediately.
   334 	@pre	"This method can only be called after the hwdevice has been initialized with Initialize()."
   335 	*/
   336 	virtual void Stop() = 0;
   337 
   338 	/**
   339 	Pauses video recording. Recording can be resumed using Resume().
   340 	@pre	"This method can only be called after the hwdevice has been initialized with Initialize()."
   341 	*/
   342 	virtual void Pause() = 0;
   343 
   344 	/**
   345 	Resumes video recording after a pause.
   346 	@pre	"This method can only be called after the hwdevice has been initialized with Initialize()."
   347 	*/
   348 	virtual void Resume() = 0;
   349 
   350 	/**
   351 	Freezes the input picture. Normal encoding can be continued using ReleaseFreeze().
   352 	@pre	"This method can only be called after the hwdevice has been initialized with Initialize()."
   353 	*/
   354 	virtual void Freeze() = 0;
   355 
   356 	/**
   357 	Releases a frozen input picture. Video capturing and encoding continues normally.
   358 	@pre	"This method can only be called after the hwdevice has been initialized with Initialize()."
   359 	*/
   360 	virtual void ReleaseFreeze() = 0;
   361 
   362 	/**
   363 	Returns the current recording position. The position is the capture timestamp from the latest input 
   364 	picture, or the capture timestamp for the latest picture captured from the camera when direct capture
   365 	is used.
   366 
   367 	@return	"The current recording position."
   368 	@pre	"This method can only be called after the hwdevice has been initialized with Initialize()."
   369 	*/
   370 	virtual TTimeIntervalMicroSeconds RecordingPosition() = 0;
   371 
   372 	/**
   373 	Reads various counters related to processed video pictures. See the definition of TPictureCounters
   374 	for a description of the counters. The counters are reset when Initialize() or this method is called,
   375 	and thus they only include pictures processed since the last call.
   376 
   377 	@param	"aCounters"	"The counter structure to fill."
   378 	@pre	"This method can only be called after the hwdevice has been initialized with Initialize()."
   379 	*/
   380 	virtual void GetPictureCounters(CMMFDevVideoRecord::TPictureCounters& aCounters) = 0;
   381 
   382 	/**
   383 	Reads the frame stabilisation output picture position. This information can be used for positioning the
   384 	viewfinder. The position returned is the stabilisation result for the most recent input picture.
   385 
   386 	@param	""aRect	"The position of the stabilisation output picture inside the input picture. If frame 
   387 					stabilisation is not used, the rectangle is set to cover the entire input picture."
   388 	@pre	"This method can only be called after the hwdevice has been initialized with Initialize()."
   389 	*/
   390 	virtual void GetFrameStabilisationOutput(TRect& aRect) = 0;
   391 
   392 	/**
   393 	Retrieves the number of complexity control levels available for this hardware device. Devices can 
   394 	support processing the same input data with different computational complexity levels. The complexity
   395 	level can affect, for example, the motion vector search range used in an encoder.
   396 
   397 	@return	"The number of complexity control levels available, one if multiple levels are not supported."
   398 	@pre	"This method can only be called after the hwdevice has been initialized with Initialize()."
   399 	*/
   400 	virtual TUint NumComplexityLevels() = 0;
   401 
   402 	/**
   403 	Sets the complexity level to use for video processing in a hardware device. The level can be changed 
   404 	at any time.
   405 
   406 	@param	"aLevel"	"The computational complexity level to use. Level zero (0) is the most complex one, 
   407 						with the highest quality. Higher level numbers require less processing and may have
   408 						lower quality."
   409 	@pre	"This method can only be called after the hwdevice has been initialized with Initialize()."
   410 	*/
   411 	virtual void SetComplexityLevel(TUint aLevel) = 0;
   412 	};
   413 
   414 
   415 /**
   416 CMMFVideoEncodeHwDevice is the MSL video encoder hardware device interface. All video encoders must 
   417 implement this interface.
   418 @publishedAll
   419 @released
   420 */
   421 class CMMFVideoEncodeHwDevice : public CMMFVideoRecordHwDevice
   422 	{
   423 public:
   424 	/**
   425 	Creates a new video encoder hardware device object, based on the implementation UID.
   426 
   427 	@param	"aUid"		"Encoder implementation UID."
   428 	@param	"aProxy"	"The proxy implementation to use."
   429 	@return	"A new CMMFVideoEncodeHwDevice object."
   430 	@leave	"This method will leave if an error occurs."
   431 	*/
   432 	IMPORT_C static CMMFVideoEncodeHwDevice* NewL(TUid aUid, MMMFDevVideoRecordProxy& aProxy);
   433 
   434 	/**
   435 	Creates a new video encoder hardware device adapter object, based on the Interface Implementation of a Processing Unit.
   436 
   437 	@param	"aImplInfo"	"The registration data relating to the Interface Implementation of the Processing Unit."
   438 	@param	"aProxy"	"The proxy implementation to use."
   439 	@return	"A new CMMFVideoEncodeHwDevice object."
   440 	@leave	"This method will leave if an error occurs."
   441 	*/
   442 	IMPORT_C static CMMFVideoEncodeHwDevice* NewPuAdapterL(const CImplementationInformation& aImplInfo, MMMFDevVideoRecordProxy& aProxy);
   443 
   444 	/**
   445 	Destructor.
   446 	*/
   447 	IMPORT_C virtual ~CMMFVideoEncodeHwDevice();
   448 
   449 	/**
   450 	Retrieves information about the video encoder.
   451 
   452 	@return	"Encoder information as a CVideoEncoderInfo object. The object is pushed to the cleanup stack,
   453 			and must be deallocated by the caller."
   454 	@leave	"This method will leave if an error occurs."
   455 	*/
   456 	virtual CVideoEncoderInfo* VideoEncoderInfoLC() = 0;
   457 
   458 	/**
   459 	Sets the encoder output format. The picture size depends on the input data format and possible 
   460 	scaling performed.
   461 
   462 	@param	"aFormat"				"The video format to use."
   463 	@param	"aDataUnitType"			"The type of output coded data units."
   464 	@param	"aDataEncapsulation"	"Data encapsulation type for output encoded data units."
   465 	@param	"aSegmentationAllowed"	"True if a coded data unit can be segmented into multiple output buffers
   466 									if a single buffer is not large enough."
   467 	@leave	"The method will leave if an error occurs. Typical error codes used:
   468 				- KErrNotSupported - The format specified is not supported."
   469 	@pre	"This method may only be called before the hwdevice has been initialized using Initialize()."
   470 	*/
   471 	virtual void SetOutputFormatL(const CCompressedVideoFormat& aFormat, 
   472 								  TVideoDataUnitType aDataUnitType, 
   473 								  TVideoDataUnitEncapsulation aDataEncapsulation,
   474 								  TBool aSegmentationAllowed=EFalse) = 0;
   475 
   476 	/**
   477 	Sets the pre-processor device that will write data to this encoder. Uncompressed pictures will be 
   478 	written with WritePictureL() or through a custom interface. After pictures have been processed, 
   479 	they must be returned to the pre-processor using ReturnPicture().
   480 
   481 	@param	"aDevice"	"The input pre-processor device to use."
   482 	@pre	"This method may only be called before the hwdevice has been initialized using Initialize()."
   483 	*/
   484 	virtual void SetInputDevice(CMMFVideoPreProcHwDevice* aDevice) = 0;
   485 
   486 	/**
   487 	Sets the number of bit-rate scalability layers to use. Set to 1 to disable layered scalability. 
   488 
   489 	Bit-rate scalability refers to the ability of a coded stream to be decoded at different bit-rates. 
   490 	Scalable video is typically ordered into hierarchical layers of data. A base layer contains an 
   491 	individual representation of a video stream and enhancement layers contain refinement data in addition
   492 	to the base layer. The quality of the decoded video stream progressively improves as enhancement layers
   493 	are added to the base layer.
   494 
   495 	@param	"aNumLayers"	"The number of bit-rate scalability layers to use, set to 1 to disable 
   496 							scalability."
   497 	@leave	"The method will leave if an error occurs. Typical error codes used:
   498 				- KErrNotSupported - The scalability layers are not supported or too many layers specified."
   499 	@pre	"This method may only be called before the hwdevice has been initialized using Initialize()."
   500 	*/
   501 	virtual void SetNumBitrateLayersL(TUint aNumLayers) = 0;
   502 
   503 	/**
   504 	Sets the scalability type for a bit-rate scalability layer.
   505 
   506 	@param	"aLayer"			"Layer number. Layers are numbered [0...n-1], where n is the number of layers
   507 	available. The				first layer is the base layer, it can be decoded independently from the other
   508 								layers, and it has the lowest total bitrate."
   509 	@param	"aScalabilityType"	"Layer scalability type."
   510 	@leave	" The method will leave if an error occurs. Typical error codes used:
   511 				- KErrNotSupported - The scalability layers or the specified scalability type are not 
   512 									 supported."
   513 	@pre	"This method may only be called before the hwdevice has been initialized using Initialize()."
   514 	*/
   515 	virtual void SetScalabilityLayerTypeL(TUint aLayer, TScalabilityType aScalabilityType) = 0;
   516 
   517 	/**
   518 	Sets the reference picture options to be used for all scalability layers. The settings can be overridden
   519 	for an individual scalability layer by using SetLayerReferenceOptions().
   520 
   521 	@param	"aMaxReferencePictures"	"The maximum number of reference pictures to be used. More than one 
   522 									reference frame can be used in the H.264 | MPEG-4 AVC and in some 
   523 									advanced profiles of MPEG-4 Part 2 and H.263. The minimum value is one."
   524 	@param	"aMaxPictureOrderDelay"	"The maximum picture order delay, in number of pictures. This specifies
   525 									the maximum amount of  pictures that precede any picture in the sequence
   526 									in decoding order and follow the picture in presentation order. Pictures
   527 									may be coded/decoded in different order from their capture/display order.
   528 									Thus, decoded pictures have to be buffered to order them in correct 
   529 									display order. For example, if one conventional B picture is coded 
   530 									between P pictures, a one-picture display ordering delay has to be 
   531 									applied in the decoder. The minimum value is zero, which indicates 
   532 									that pictures must be coded in capture/display order."
   533 	@pre	"This method may only be called before the hwdevice has been initialized using Initialize()."
   534 	*/
   535 	virtual void SetGlobalReferenceOptions(TUint aMaxReferencePictures, TUint aMaxPictureOrderDelay) = 0;
   536 
   537 	/**
   538 	Sets the reference picture options to be used for a single scalability layer. These settings override 
   539 	those set with SetGlobalReferenceOptions().
   540 
   541 	@param	"aLayer"				"Layer number."
   542 	@param	"aMaxReferencePictures"	"The maximum number of reference pictures to be used."
   543 	@param	"aMaxPictureOrderDelay"	"The maximum picture order delay, in number of pictures."
   544 	@pre	"This method may only be called before the hwdevice has been initialized using Initialize()."
   545 	*/
   546 	virtual void SetLayerReferenceOptions(TUint aLayer, TUint aMaxReferencePictures, TUint aMaxPictureOrderDelay) = 0;
   547 
   548 	/**
   549 	Sets encoder buffering options.
   550 
   551 	@param	"aOptions"	"The buffering options."
   552 	@leave	"The method will leave if an error occurs. Typical error codes used:
   553 				- KErrNotSupported - The specified settings are not supported."
   554 	@pre	"This method may only be called before the hwdevice has been initialized using Initialize()."
   555 	*/
   556 	virtual void SetBufferOptionsL(const TEncoderBufferOptions& aOptions) = 0;
   557 
   558 	/**
   559 	Sets the encoder output rectangle. This rectangle specifies the part of the input and output pictures 
   560 	which is displayed after encoding. Many video codecs process data in 16x16 pixel units but enable 
   561 	specifying and coding the encoder output rectangle for image sizes that are not multiple of 16 pixels 
   562 	(e.g 160x120).
   563 
   564 	@param	"aRect"	"The encoder output rectangle."
   565 	@leave	"The method will leave if an error occurs."
   566 	@pre	"This method can be called either before or after the hwdevice has been initialized with Initialize().
   567 			If called after initialization, the change must only be committed when CommitL() is called."
   568 	*/
   569 	virtual void SetOutputRectL(const TRect& aRect) = 0;
   570 
   571 	/**
   572 	Sets whether bit errors or packets losses can be expected in the video transmission. The video encoder 
   573 	can use this information to optimize the bitstream.
   574 
   575 	@param	"aBitErrors"	"True if bit errors can be expected."
   576 	@param	"aPacketLosses"	"True if packet losses can be expected."
   577 	@pre	"This method can be called either before or after the hwdevice has been initialized with Initialize().
   578 			If called after initialization, the change must only be committed when CommitL() is called."
   579 	*/
   580 	virtual void SetErrorsExpected(TBool aBitErrors, TBool aPacketLosses) = 0;
   581 
   582 	/**
   583 	Sets the minimum frequency (in time) for instantaneous random access points in the bitstream. An 
   584 	instantaneous random access point is such where the decoder can achieve a full output picture 
   585 	immediately by decoding data starting from the random access point. The random access point frequency 
   586 	may be higher than signalled, if the sequence contains scene cuts which typically cause a coding 
   587 	of a random access point.
   588 
   589 	@param	"aRate"	"Random access point rate, in pictures per second. For example, to request a random 
   590 					access point every ten seconds, set the value to 0.1."
   591 	@pre	"This method can be called either before or after the hwdevice has been initialized with Initialize().
   592 			If called after initialization, the change must only be committed when CommitL() is called."
   593 	*/
   594 	virtual void SetMinRandomAccessRate(TReal aRate) = 0;
   595 
   596 	/**
   597 	Sets coding-standard specific encoder options.
   598 
   599 	@param	"aOptions"	"The options to use. The data format for the options is coding-standard specific, 
   600 						and defined separately."
   601 	@leave	"The method will leave if an error occurs. Typical error codes used:
   602 				- KErrNotSupported - The specified settings are not supported."
   603 	@pre	"This method can be called either before or after the hwdevice has been initialized with Initialize().
   604 			If called after initialization, the change must only be committed when CommitL() is called."
   605 	*/
   606 	virtual void SetCodingStandardSpecificOptionsL(const TDesC8& aOptions) = 0;
   607 
   608 	/**
   609 	Sets implementation-specific encoder options.
   610 
   611 	@param	"aOptions"	"The options to use. The data format for the options is specific to the encoder 
   612 						implementation, and defined separately by the encoder implementer."
   613 	@leave	"The method will leave if an error occurs. Typical error codes used:
   614 				- KErrNotSupported - The specified settings are not supported."
   615 	@pre	"This method can be called either before or after the hwdevice has been initialized with Initialize().
   616 			If called after initialization, the change must only be committed when CommitL() is called."
   617 	*/
   618 	virtual void SetImplementationSpecificEncoderOptionsL(const TDesC8& aOptions) = 0;
   619 
   620 	/**
   621 	Returns coding-standard specific initialization output from the encoder. The information can contain, 
   622 	for example, the MPEG-4 VOL header. This method can be called after Initialize() has been called.
   623 
   624 	@return	"Coding-standard specific initialization output. The data format is coding-standard specific 
   625 			and defined separately. The buffer is pushed to the cleanup stack, and the caller is responsible
   626 			for deallocating it."
   627 	@leave	"The method will leave if an error occurs."
   628 	@pre	"This method can only be called after the hwdevice has been initialized with Initialize()."
   629 	*/
   630 	virtual HBufC8* CodingStandardSpecificInitOutputLC() = 0;
   631 
   632 	/**
   633 	Returns implementation-specific initialization output from the encoder. This method can be called after
   634 	Initialize() has been called.
   635 
   636 	@return	"Implementation-specific initialization output. The data format is specific to the encoder 
   637 			implementation, and defined by the encoder supplier. The buffer is pushed to the cleanup stack,
   638 			and the caller is responsible for deallocating it."
   639 	@leave	"The method will leave if an error occurs."
   640 	@pre	"This method can only be called after the hwdevice has been initialized with Initialize()."
   641 	*/
   642 	virtual HBufC8* ImplementationSpecificInitOutputLC() = 0;
   643 
   644 	/**
   645 	Sets the number of unequal error protection levels. By default unequal error protection is not used.
   646 
   647 	@param	"aNumLevels"		"The number of unequal error protection levels. To disable unequal error
   648 								protection, set this value to one"
   649 	@param	"aSeparateBuffers"	"True if each unequal error protection level of a coded data unit shall be
   650 								encapsulated in its own output buffer. Ignored if unequal error protection
   651 								is not used."
   652 	@leave	"The method will leave if an error occurs. Typical error codes used:
   653 				- KErrNotSupported - Unequal error protection is not supported."
   654 	@pre	"This method can only be called after the hwdevice has been initialized with Initialize()."
   655 	*/
   656 	virtual void SetErrorProtectionLevelsL(TUint aNumLevels, TBool aSeparateBuffers) = 0;
   657 
   658 	/**
   659 	Sets up an unequal error protection level. If unequal error protection is not used, this method can be
   660 	used to control settings for the whole encoded bitstream.
   661 
   662 	@param	"aLevel"	"Error protection level number. This argument is ignored if unequal error protection
   663 						is not in use."
   664 	@param	"aBitrate"	"Target bit-rate for this error protection level."
   665 	@param	"aStrength"	"Forward error control strength for this error protection level. The strength
   666 						can be specified using values from TErrorControlStrength (EFecStrengthNone, 
   667 						EFecStrengthLow, EFecStrengthNormal, EFecStrengthHigh), or with intermediate 
   668 						values between those constants."
   669 	@leave	"The method will leave if an error occurs. Typical error codes used:
   670 				- KErrNotSupported - The specified bit-rate cannot be supported. "
   671 	@pre	"This method can only be called after the hwdevice has been initialized with Initialize()."
   672 	*/
   673 	virtual void SetErrorProtectionLevelL(TUint aLevel, TUint aBitrate, TUint aStrength) = 0;
   674 
   675 	/**
   676 	Sets the expected or prevailing channel conditions for an unequal error protection level, in terms of 
   677 	expected packet loss rate. The video encoder can use this information to optimize the generated bitstream.
   678 
   679 	@param	"aLevel"			"Error protection level number. This argument is ignored if unequal error 
   680 								protection is not in use."
   681 	@param	"aLossRate"			"Packet loss rate, in number of packets lost per second. Set to 0.0 if
   682 								packet losses are not expected."
   683 	@param	"aLossBurstLength"	"Expected average packet loss burst length. Set to zero if the information is 
   684 								not available."
   685 	@pre	"This method can only be called after the hwdevice has been initialized with Initialize()."
   686 	*/
   687 	virtual void SetChannelPacketLossRate(TUint aLevel, 
   688 										  TReal aLossRate, 
   689 										  TTimeIntervalMicroSeconds32 aLossBurstLength) = 0;
   690 
   691 	/**
   692 	Sets the expected or prevailing channel conditions for an unequal error protection level, in terms of 
   693 	expected bit error rate. The video encoder can use this information to optimize the generated bitstream.
   694 
   695 	@param	"aLevel"		"Error protection level number. This argument is ignored if unequal error 
   696 							protection is not in use."
   697 	@param	"aErrorRate"	"Expected bit error rate, as a fraction of the total bits transmitted. Set 
   698 							to 0.0 if bit errors are not expected."
   699 	@param	"aStdDeviation"	"Expected bit error rate standard deviation."
   700 	@pre	"This method can only be called after the hwdevice has been initialized with Initialize()."
   701 	*/
   702 	virtual void SetChannelBitErrorRate(TUint aLevel, TReal aErrorRate, TReal aStdDeviation) = 0;
   703 
   704 	/**
   705 	Sets the target size of each coded video segment. The segment target size can be specified in terms of 
   706 	number of bytes per segment, number of macroblocks per segment, or both.
   707 
   708 	@param	"aLayer"			"Layer number. Layers are numbered [0...n-1], where n is the number of 
   709 								layers available. Use zero if layered bit-rate scalability is not used."
   710 	@param	"aSizeBytes"		"Segment target size in bytes. Set to zero to use unlimited segment size. The
   711 								segment size in bytes should include all data that is typically stored or
   712 								transmitted for each segment in the format currently in use. This includes all
   713 								related headers."
   714 	@param	"aSizeMacroblocks"	"Segment target size in number of macroblocks per segment. Set to zero to
   715 								use unlimited segment size."
   716 	@pre	"This method can only be called after the hwdevice has been initialized with Initialize()."
   717 	*/
   718 	virtual void SetSegmentTargetSize(TUint aLayer, TUint aSizeBytes, TUint aSizeMacroblocks) = 0;
   719 
   720 	/**
   721 	Sets the bit-rate control options for a layer. If layered bit-rate scalability is not used, the options
   722 	are set for the whole bitstream.
   723 
   724 	@param	"aLayer"	"Layer number. Layers are numbered [0...n-1], where n is the number of layers 
   725 						available. Use zero if layered bit-rate scalability is not used."
   726 	@param	"aOptions"	"Bit-rate control options."
   727 	@pre	"This method can only be called after the hwdevice has been initialized with Initialize()."
   728 	*/
   729 	virtual void SetRateControlOptions(TUint aLayer, const TRateControlOptions& aOptions) = 0;
   730 
   731 	/**
   732 	Sets in-layer scalability options for a layer. In-layer bit-rate scalability refers to techniques where
   733 	a specific part of a single-layer coded stream can be decoded correctly without decoding the leftover 
   734 	part. For example, B-pictures can be used for this. By default in-layer scalability is not used.
   735 
   736 	@param	"aLayer"			"Layer number. Layers are numbered [0…n-1], where n is the number of layers
   737 								available. Use zero if layered bit-rate scalability is not used."
   738 	@param	"aNumSteps"			"The number of in-layer scalability steps to use. Set to one to disable 
   739 								in-layer scalability."
   740 	@param	"aScalabilityType"	"The scalability type to use."
   741 	@param	"aBitrateShare"		"Bit-rate share for each scalability step. The bit-rate shares are defined 
   742 								as fractions of total layer bit-rate, with the share for one layer being 
   743 								aBitrateShare[i]/sum(aBitrateShare). For example, to use 2/3 of the total
   744 								bitrate for the first layer and the remaining 1/3 for the second, the array
   745 								contents would be {2,1}."
   746 	@param	"aPictureShare"		"Picture rate share for each scalability step. The picture rate shares are 
   747 								defined similarly to the bit-rate shares. For example, a client wishing to
   748 								use two B-pictures between each pair of reference pictures should set the 
   749 								array contents to {1,2}."
   750 	@leave	"The method will leave if an error occurs. Typical error codes used:
   751 				- KErrNotSupported	- In-layer scalability is not supported.
   752 				- KErrArgument		- Some of the arguments are out of range. For example, it is not
   753 									  possible to use the specified in-layer scalability setup due to other 
   754 									  constraints (such as the maximum picture order delay)."
   755 	@pre	"This method can only be called after the hwdevice has been initialized with Initialize()."
   756 	*/
   757 	virtual void SetInLayerScalabilityL(TUint aLayer, 
   758 										TUint aNumSteps,
   759 										TInLayerScalabilityType aScalabilityType,
   760 										const TArray<TUint>& aBitrateShare,
   761 										const TArray<TUint>& aPictureShare) = 0;
   762 
   763 	/**
   764 	Sets the period for layer promotions points for a scalability layer. A layer promotion point is a 
   765 	picture where it is possible to start decoding this enhancement layer if only the lower layers were 
   766 	decoded earlier.
   767 
   768 	@param	"aLayer"	"Layer number."
   769 	@param	"aPeriod"	"Layer promotion point period. A value of one signals that each picture should be a
   770 						layer promotion point, value two that there is one picture between each promotion
   771 						point etc."
   772 	@pre	"This method can only be called after the hwdevice has been initialized with Initialize()."
   773 	*/
   774 	virtual void SetLayerPromotionPointPeriod(TUint aLayer, TUint aPeriod) = 0;
   775 
   776 	/**
   777 	Returns coding-standard specific settings output from the encoder. The information can contain, for 
   778 	example, some bitstream headers that can change based on settings modified while encoding is in progress.
   779 
   780 	@return	"Coding-standard specific initialization output. The data format is coding-standard specific 
   781 			and defined separately. The buffer is pushed to the cleanup stack, and the caller is responsible 
   782 			for deallocating it."
   783 	@leave	"The method will leave if an error occurs."
   784 	@pre	"This method can only be called after the hwdevice has been initialized with Initialize()."
   785 	*/
   786 	virtual HBufC8* CodingStandardSpecificSettingsOutputLC() = 0;
   787 
   788 	/**
   789 	Returns implementation-specific settings output from the encoder. The information can contain, for
   790 	example, some bitstream headers that can change based on settings modified while encoding is in progress.
   791 
   792 	@return	"Implementation-specific initialization output. The data format is implementation-specific and 
   793 			defined separately by the encoder supplier. The buffer is pushed to the cleanup stack, and the
   794 			caller is responsible for deallocating it."
   795 	@leave	"The method will leave if an error occurs."
   796 	@pre	"This method can only be called after the hwdevice has been initialized with Initialize()."
   797 	*/
   798 	virtual HBufC8* ImplementationSpecificSettingsOutputLC() = 0;
   799 
   800 	/**
   801 	Requests the encoder to sends supplemental information in the bitstream. The information data format is 
   802 	coding-standard dependent. Only one supplemental information send request can be active at a time. This
   803 	variant encodes the information to the next possible picture.
   804 
   805 	The client must be notified after then information has been sent by calling 
   806 	MMMFDevVideoRecordProxy::MdvrpSupplementalInfoSent().
   807 
   808 	@param	"aData"	"Supplemental information data to send."
   809 	@leave	"The method will leave if an error occurs. Typical error codes used:
   810 				- KErrNotSupported - Supplemental information is not supported"
   811 	@pre	"This method can only be called after the hwdevice has been initialized with Initialize()."
   812 	*/
   813 	virtual void SendSupplementalInfoL(const TDesC8& aData) = 0;
   814 
   815 	/**
   816 	Requests the encoder to sends supplemental information in the bitstream. The information data format is
   817 	coding-standard dependent. Only one supplemental information send request can be active at a time. This
   818 	variant encodes the information to the picture specified.
   819 
   820 	@param	"aData"			"Supplemental information data to send."
   821 	@param	"aTimestamp"	"Timestamp for the picture in which the supplemental information should be 
   822 							included. If a picture with the matching timestamp is never encoded, or the
   823 							timestamp is in the past, the supplemental information will not be sent."
   824 	@leave	"The method will leave if an error occurs. Typical error codes used:
   825 				- KErrNotSupported - Supplemental information is not supported"
   826 	@pre	"This method can only be called after the hwdevice has been initialized with Initialize()."
   827 	*/
   828 	virtual void SendSupplementalInfoL(const TDesC8& aData, const TTimeIntervalMicroSeconds& aTimestamp) = 0;
   829 
   830 	/**
   831 	Cancels the current supplemental information send request. The memory buffer reserved for supplemental 
   832 	information data can be reused or deallocated after the method returns.
   833 	@pre	"This method can only be called after the hwdevice has been initialized with Initialize()."
   834 	*/
   835 	virtual void CancelSupplementalInfo() = 0;
   836 
   837 	/**
   838 	Gets the current output buffer status. The information includes the number of free output buffers and 
   839 	the total size of free buffers in bytes.
   840 
   841 	@param	"aNumFreeBuffers"	"Target for the number of free output buffers."
   842 	@param	"aTotalFreeBytes"	"Target for the total free buffer size in bytes."
   843 	@pre	"This method can only be called after the hwdevice has been initialized with Initialize()."
   844 	*/
   845 	virtual void GetOutputBufferStatus(TUint& aNumFreeBuffers, TUint& aTotalFreeBytes) = 0;
   846 
   847 	/**
   848 	Returns a used output buffer back to the encoder. The buffer can be reused or deallocated.
   849 
   850 	@param	"aBuffer"	"The buffer to return."
   851 	@pre	"This method can only be called after the hwdevice has been initialized with Initialize()."
   852 	*/
   853 	virtual void ReturnBuffer(TVideoOutputBuffer* aBuffer) = 0;
   854 
   855 	/**
   856 	Indicates a picture loss to the encoder, without specifying the lost picture. The encoder can react 
   857 	to this by transmitting an intra-picture.
   858 	@pre	"This method can only be called after the hwdevice has been initialized with Initialize()."
   859 	*/
   860 	virtual void PictureLoss() = 0;
   861 
   862 	/**
   863 	Indicates to the encoder the pictures that have been lost. The encoder can react to this by
   864 	transmitting an intra-picture.
   865 	@param	"aPictures"	"Picture identifiers for the lost pictures."
   866 	@pre	"This method can only be called after the hwdevice has been initialized with Initialize()."
   867 	*/
   868 	virtual void PictureLoss(const TArray<TPictureId>& aPictures) = 0;
   869 
   870 	/**
   871 	Indicates a slice loss to the encoder.
   872 
   873 	@param	"aFirstMacroblock"	"The first lost macroblock. The macroblocks are numbered such
   874 								that the macroblock in the upper left corner of the picture is considered 
   875 								macroblock number 1 and the number for each macroblock increases from left
   876 								to right and then from top to bottom in raster-scan order."
   877 	@param	"aNumMacroblocks"	"The number of macroblocks in the lost slice."
   878 	@param	"aPicture"			"The picture identified for the picture where the slice was lost. If the 
   879 								picture is not known, aPicture.iIdType is set to ENone."
   880 	@pre	"This method can only be called after the hwdevice has been initialized with Initialize()."
   881 	*/
   882 	virtual void SliceLoss(TUint aFirstMacroblock, TUint aNumMacroblocks, const TPictureId& aPicture) = 0;
   883 
   884 	/**
   885 	Sends a reference picture selection request to the encoder. The request is delivered as a 
   886 	coding-standard specific binary message. Reference picture selection can be used to select a previous
   887 	correctly transmitted picture to use as a reference in case later pictures have been lost.
   888 
   889 	@param	"aSelectionData"	"The reference picture selection request message. The message format is 
   890 								coding-standard specific, and defined separately."
   891 	@pre	"This method can only be called after the hwdevice has been initialized with Initialize()."
   892 	*/
   893 	virtual void ReferencePictureSelection(const TDesC8& aSelectionData) = 0;
   894 
   895 protected:
   896 	/**
   897 	Constructor.
   898 	*/
   899 	IMPORT_C CMMFVideoEncodeHwDevice();
   900 
   901 	/**
   902 	Set the proxy implementation to be used. Called just after the object is constructed.
   903 	@param	"aProxy"	"The proxy to use."
   904 	*/
   905 	virtual void SetProxy(MMMFDevVideoRecordProxy& aProxy) = 0;
   906 private:
   907 	TUid iDtor_ID_Key;
   908 	};
   909 
   910 
   911 /**
   912 CMMFVideoPreProcHwDevice is the MSL video pre-processor plug-in interface. All MSL video pre-processors 
   913 must implement this interface.
   914 @publishedAll
   915 @released
   916 */
   917 class CMMFVideoPreProcHwDevice : public CMMFVideoRecordHwDevice
   918 	{
   919 public:
   920 	/**
   921 	Creates a new video pre-processor hardware device object, based on the implementation UID.
   922 	@param	"aUid"		"Pre-processor implementation UID."
   923 	@param	"aProxy"	"The proxy implementation to use."
   924 	@return	"A new CMMFVideoPreProcHwDevice object."
   925 	@leave	"This method will leave if an error occurs."
   926 	*/
   927 	IMPORT_C static CMMFVideoPreProcHwDevice* NewL(TUid aUid, MMMFDevVideoRecordProxy& aProxy);
   928 
   929 	/**
   930 	Destructor.
   931 	*/
   932 	IMPORT_C virtual ~CMMFVideoPreProcHwDevice();
   933 
   934 	/**
   935 	Sets the device output format. The picture size depends on the input data format and possible 
   936 	scaling performed.
   937 
   938 	@param	"aFormat"	"The video format to use."
   939 	@leave	" The method will leave if an error occurs. Typical error codes used:
   940 				- KErrNotSupported - The format specified is not supported."
   941 	@pre	"This method can only be called before the hwdevice has been initialized with Initialize()."
   942 	*/
   943 	virtual void SetOutputFormatL(const TUncompressedVideoFormat& aFormat) = 0;
   944 
   945 	/**
   946 	Sets the video encoder device that will receive data from this pre-processor. Pre-processed pictures 
   947 	will be written with WritePictureL() or through a custom interface, and the encoder will return used 
   948 	pictures using ReturnPicture().
   949 
   950 	@param	"aDevice"	"The output encoder device to use."
   951 	@pre	"This method can only be called before the hwdevice has been initialized with Initialize()."
   952 	*/
   953 	virtual void SetOutputDevice(CMMFVideoEncodeHwDevice* aDevice) = 0;
   954 
   955 	/**
   956 	Returns a used picture back to the pre-processor. Called by an encoder device when used as output 
   957 	device from a pre-processor.
   958 
   959 	@param	"aPicture"	"The picture to return."
   960 	@pre	"This method can only be called after the hwdevice has been initialized with Initialize()."
   961 	*/
   962 	virtual void ReturnPicture(TVideoPicture* aPicture) = 0;
   963 
   964 protected:
   965 	/**
   966 	Constructor.
   967 	*/
   968 	IMPORT_C CMMFVideoPreProcHwDevice();
   969 
   970 	/**
   971 	Set the proxy implementation to be used. Called just after the object is constructed.
   972 	@param	"aProxy"	"The proxy to use."
   973 	*/
   974 	virtual void SetProxy(MMMFDevVideoRecordProxy& aProxy) = 0;
   975 private:
   976 	TUid iDtor_ID_Key;
   977 	};
   978 
   979 #endif