epoc32/include/icl/imageconversionextension.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) 2007-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 IMAGECONVERSIONEXTENSION_H
    17 #define IMAGECONVERSIONEXTENSION_H
    18 
    19 #include <e32base.h>
    20 class MImageConvExtension;
    21 class MImageConvOperation;
    22 class MImageConvScaler;
    23 class MImageConvStreamedDecode;
    24 class MImageConvStreamedEncode;
    25 class TFrameLayout;
    26 class CImageFrame;
    27 class CFrameImageData;
    28 
    29 /**
    30 @file
    31 @publishedAll
    32 @released
    33 */
    34 
    35 /**
    36  Image Conversion Library extensions. When applied together there is an implicit order for operations:
    37  	1. Crop or clip.
    38  	2. Scale
    39  	3. Rotate / mirror over axis.
    40  */
    41  
    42 /**
    43 Operation extension for Image Conversion Library. Allows rotation and mirror over axis.
    44 */
    45 class TImageConvOperation
    46 	{
    47 friend class CImageDecoder;
    48 friend class CImageEncoder;
    49 
    50 public:
    51 
    52 
    53 	/**
    54 	Operations or transforms on an image.
    55 	*/
    56 	enum TOperation
    57 		{
    58 		/** Rotate source 90 degrees clockwise.
    59 		*/
    60 		ERotation90DegreesClockwise		= 0x01,
    61 		/** Rotate source 180 degrees clockwise.
    62 		*/
    63 		ERotation180DegreesClockwise 	= 0x02,
    64 		/** Rotate source 270 degrees clockwise.
    65 		*/
    66 		ERotation270DegreesClockwise	= 0x04,
    67 		/** Mirror source about the horizontal axis.
    68 		*/
    69 		EMirrorHorizontalAxis			= 0x08,
    70 		/** Mirror source about the vertical axis.
    71 		*/
    72 		EMirrorVerticalAxis 			= 0x10
    73 		};
    74 
    75 	/**
    76 	Get the codec plugin's capabilities.
    77 	
    78 	@return Bitmask combination of TOperation. Bit is set if decoder plugin supports the operation.
    79 	*/
    80 	IMPORT_C TUint Capabilities() const;
    81 	
    82 	/**
    83 	Set up an operation be applied to the source. May be called more than once 
    84 	to set up a stack of operations, but it is not possible to add more than one
    85 	operation in a single call.
    86 	The operations are applied to the image in the same order as they are added.
    87 	
    88 	@param aOperation The operation to add to the current stack of operations.
    89 		
    90 	@leave if more than one TOperation enum is passed for each individual call
    91 	*/
    92 	IMPORT_C void AddOperationL(TOperation aOperation);
    93 	
    94 	/**
    95 	Remove all operations previously set. 
    96 	*/
    97 	IMPORT_C void ClearOperationStack();
    98 	
    99 private:
   100 
   101 	IMPORT_C TImageConvOperation();  
   102 	void SetExtension(MImageConvExtension* aExtension);
   103 	
   104 private:
   105 	MImageConvOperation* iExtension;
   106 	TInt iReserved; // future proof
   107 	};
   108 
   109 
   110 /**
   111 Represents scaling capabilities of the code plugin.
   112 */
   113 class TScalerCaps
   114 	{
   115 public:
   116 	/**
   117 	Constructor
   118 	*/
   119 	IMPORT_C TScalerCaps();
   120 
   121 	/**
   122 	Constructor
   123 	
   124 	@param aMaxUpscaleLimit Maximum upscaling possible.
   125 	@param aMaxDownscaleLimit Maximum downscaling possible.
   126 	@param aPreserveAspectRatioIsNeeded ETrue if only support preservation of aspect ratio.
   127 	*/
   128 	IMPORT_C TScalerCaps(TInt aMaxUpscaleLimit,TInt aMaxDownscaleLimit,TBool aPreserveAspectRatioIsNeeded);
   129 
   130 	/**
   131 	Maximum upscaling possible.
   132 	@return value >= 1 : 1 means cannot upscale, 2 means twice original size
   133 	*/
   134 	IMPORT_C TInt MaxUpscaleLimit() const;
   135 	
   136 	/**
   137 	Maximum downscaling possible.
   138 	@return value <= -1 : -1 means cannot downscale, -2 means half original size
   139 	*/
   140 	IMPORT_C TInt MaxDownscaleLimit() const;
   141 	
   142 	/**
   143 	Type of scaling which is supported.
   144 
   145 	@return ETrue if can only do 1/2, 1/4, 1/8 etc downscale (limit depends on iMaxDownscaleLimit)
   146 	     2, 4, 8 etc upscale (limit depends on iMaxUpscaleLimit)
   147 	     EFalse if can do arbitrary scaling between iMaxDownscaleLimit and iMaxUpscaleLimit
   148 	*/
   149 	IMPORT_C TBool PowerOfTwoScalingOnly() const;
   150 	
   151 	/**
   152 	Returns ETrue if the codec must preserve aspect ratio during scaling.
   153 	
   154 	@return ETrue if scaling is only possible if preservation of aspect ratio is requested.
   155 		    EFalse if scaling without preserving aspect ratio is possible.
   156 	*/
   157 	IMPORT_C TBool MustPreserveAspectRatio() const;
   158 	
   159 	/**
   160 	Compatibility - internal use only
   161 	@internalComponent
   162 	*/
   163 	IMPORT_C TUint Size() const;
   164 
   165 	/**
   166 	Compatibility - internal use only
   167 	@internalComponent
   168 	*/
   169 	IMPORT_C TUint Version() const;
   170 	
   171 private:
   172 	TInt  iMaxUpscaleLimit;   // >= 1 : 2 means twice original size
   173 	TBool iMustPreserveAspectRatio;  // If ETrue then can only do scaling whilst preserving aspect ratio
   174 	TInt  iMaxDownscaleLimit; // <= -1 : -2 means 1/2 original size
   175 	TBool iPowerOfTwoScalingOnly;
   176 	TUint iSizeVersion; // bits 31 to 8 size, 7 to 0 contain version
   177 	TInt  iReserved; // future proof
   178 	};
   179 
   180 
   181 /**
   182 Scaling extension for Image Conversion Library. Supports both arbitrary or 'power of two' 1/2, 1/4, 1/8 scaling
   183 */
   184 class TImageConvScaler
   185 	{
   186 friend class CImageDecoder;
   187 
   188 public:
   189 
   190 	/** 
   191 	Quality used during scaling.
   192 	*/
   193 	enum TScalerQuality
   194 		{
   195 		EMinimumQuality, // = 0
   196 		EMediumQuality,
   197 		EMaximumQuality
   198 		};
   199 
   200 	/**
   201 	Get the codec plugin's capabilities.
   202 
   203 	@param aCaps Returns scaling capabilities of the codec plugin.
   204 	*/
   205 	IMPORT_C void GetCapabilities(TScalerCaps& aCaps) const;
   206 
   207     /**
   208     Request scaling to the desired size using the quality specified and specifying if the aspect ratio is to
   209 	be preserved. 
   210 	Ensure that CImageDecoder::GetDestinationSize is used to obtain the size of destination bitmap passed
   211 	to CImageDecoder::Convert if scaling is set up by calling this method.
   212 	
   213 	@param aDesiredSize  Proposed size of the scaled image. Note that this may not necessarily be the size
   214 	returned by a subsequent call to CImageDecoder::GetDestinationSize and is dependant upon the operations 
   215 	(such as scaling, cropping and rotation) requested and also the capabilities of the plugin (which can be
   216 	queried using TImageConvScaler::GetCapabilities).
   217 	
   218 	Example: If a plugin is only capable of power of two scaling, with an original image size of 600x400,
   219 	then calling this SetScalingL function with a desired size of 500x300 will result in a subsequent call to 
   220 	CImageDecoder::GetDestinationSize returning a size of 300x200 (that is, a scaling coefficient of -2).
   221 	
   222 	@param aQuality Desired quality of the image. Allows codec to lower quality targets to
   223 	improve performance.
   224 	
   225 	@param aLockAspectRatio Set to ETrue if the aspect ratio of the original image is to be preserved.
   226 	
   227 	@leave KErrNotSupported if an invalid size is passed.
   228 	@leave KErrNotSupported if aLockAspectRatio is EFalse and codec only supports preservation of aspect ratio.
   229 
   230 	@see CImageDecoder::Convert
   231 	@see CImageDecoder::GetDestinationSize
   232 	@see TImageConvScaler::GetCapabilities
   233 	*/ 
   234 	IMPORT_C void SetScalingL(const TSize& aDesiredSize, TImageConvScaler::TScalerQuality aQuality, TBool aLockAspectRatio);
   235 
   236 	/**
   237 	Define the scaling to be applied to the image according to the given coefficient at the requested quality.
   238 	Ensure that CImageDecoder::GetDestinationSize is used to obtain the size of destination bitmap to be passed
   239 	to CImageDecoder::Convert.
   240 	
   241 	@param aScalingCoeff Scale to apply to the source. 2 means twice the original size, -2 half the size. 
   242 	Do not confuse this with ReductionFactor where 2 indicates 1/2 size.
   243 	
   244 	@param aScalingQuality Desired quality of the image. Allows codec to lower quality targets to
   245 	improve performance.
   246 	
   247 	@leave KErrNotSupported if codec cannot perform the requested scale.
   248 	
   249 	@see CImageDecoder::Convert
   250 	*/
   251 	IMPORT_C void SetScalingL(TInt aScalingCoeff, TImageConvScaler::TScalerQuality aScalingQuality);
   252 	
   253 private:
   254 	IMPORT_C TImageConvScaler(); 
   255 	void SetExtension(MImageConvExtension* aExtension);
   256 
   257 private:
   258 	MImageConvScaler* iExtension;
   259 	TInt iReserved; // future proof
   260 	};
   261 
   262 /** 
   263 'Block' streaming extension capabilities.
   264 */
   265 class TDecodeStreamCaps
   266 	{
   267 public:
   268 	/** Navigation possibilities within stream. 
   269 	 */
   270 	enum TNavigation
   271 		{
   272 		/** Blocks are returned from first to last */
   273 		ENavigationSequentialForward = 0x01,
   274 		
   275 		/** Blocks are returned in a random order but moving only from first to last e.g. 1, 5, 18...*/
   276 		ENavigationRandomForward     = 0x02,
   277 
   278 		/** Blocks are returned in a random order but moving only from last to first e.g. 18, 5, 1...*/
   279 		ENavigationRandomBackwards   = 0x04,
   280 
   281 		/** Blocks are returned randomly e.g. 18, 5, 20, ...*/
   282 		ENavigationRandom = 0x08,
   283 
   284 		/** Blocks are returned from last to first  */
   285 		ENavigationSequentialBackwards = 0x10
   286 		};
   287 		
   288 	/**
   289 	Constructor.
   290 	*/
   291 	IMPORT_C TDecodeStreamCaps();
   292 	
   293 	/**
   294 	Constructor.
   295 	
   296 	@param aMaxBlocksPerRequest Maximum number of blocks that can be returned from the stream to client in a
   297 	single request.
   298 	@param aMinBlockSizeInPixels Minimum size in pixels of a block returned from the stream to the client in
   299 	a single request.
   300 	@param aOptimalBlocksPerRequest Optimum number of blocks returned from the stream to the client in
   301 	a single request to get maximum performance benefit.
   302 	@param aStreamSizeInBlocks Number of blocks of size MinBlockSizeInPixels() in the stream.
   303 	@param aNavigation Navigation capabilities.
   304 	*/
   305 	IMPORT_C TDecodeStreamCaps(TInt aMaxBlocksPerRequest, const TSize& aMinBlockSizeInPixels, 
   306 							TInt aOptimalBlocksPerRequest, TInt aStreamSizeInBlocks,
   307 							TDecodeStreamCaps::TNavigation aNavigation);
   308 	 
   309     /**
   310     The maximum number of blocks that can be returned from the stream to client in a
   311 	single request.
   312 	
   313 	@return Maximum number of blocks that can be returned from the stream to client in a
   314 	single request.
   315 	*/ 
   316 	IMPORT_C TInt MaxBlocksPerRequest() const;
   317 	
   318 	/** 
   319 	The Minimum size in pixels of a block returned from the stream to the client in
   320 	a single request.
   321 	
   322 	@return Minimum size in pixels of a block returned from the stream to the client in
   323 	a single request. Sequence numbers and StreamSizeInBlocks() refer to this size of block.
   324 	*/
   325 	IMPORT_C const TSize& MinBlockSizeInPixels() const;
   326 	
   327 	/** 
   328 	Optimum number of blocks returned from the stream to the client in
   329 	a single request to get maximum performance benefit.
   330 	
   331 	@return Optimum number of blocks returned from the stream to the client in
   332 	a single request to get maximum performance benefit.
   333 	This can be used to determine the optimum value of the number of blocks of min block size per request.
   334 	*/
   335 	IMPORT_C TInt OptimalBlocksPerRequest() const;
   336 
   337 	/** 
   338 	Number of blocks of size MinBlockSizeInPixels() in the stream.
   339 	
   340 	@return Number of blocks of size MinBlockSizeInPixels() in the stream.
   341 	*/
   342 	IMPORT_C TInt StreamSizeInBlocks() const;
   343 	
   344 	/**
   345 	Navigation capabilities.
   346 	
   347 	@return Navigation capabilities.
   348 
   349 	Full random access to the stream if Navigation() returns 
   350 	ENavigationSequentialForward | ENavigationRandomForward | ENavigationRandomBackwards
   351 	*/
   352 	IMPORT_C TDecodeStreamCaps::TNavigation Navigation() const;
   353 	
   354 	/**
   355 	Compatibility - internal use only
   356 	@internalComponent
   357 	*/
   358 	IMPORT_C TUint Size() const;
   359 
   360 	/**
   361 	Compatibility - internal use only
   362 	@internalComponent
   363 	*/
   364 	IMPORT_C TUint Version() const;
   365 	
   366 private:
   367 	TInt  iMaxBlocksPerRequest;
   368 	TSize iMinBlockSizeInPixels;
   369 	TInt iOptimalBlocksPerRequest;
   370 	TInt  iStreamSizeInBlocks;
   371 	TNavigation iNavigation;
   372 	TUint  iSizeVersion;  // bits 31 to 8 size, 7 to 0 contain version
   373 	TInt  iReserved; // future proof
   374 	};		
   375 
   376 /**
   377  'Block' streaming extension for Image Conversion Library decoder.
   378  */
   379 class TImageConvStreamedDecode
   380 	{
   381 friend class CImageDecoder;
   382 	
   383 public:
   384     /**
   385 	Returns a list of supported formats and the optimal format to be used. @see imageframeconst.h
   386 	for a list of format uids.
   387 	@param aFormats Returns an array of format uids 
   388 	@param aOptimalFormat The 'best' uid to use. 
   389 	*/
   390 	IMPORT_C void GetSupportedFormatsL(RArray<TUid>& aFormats, TUid& aOptimalFormat) const;
   391 
   392 	/**
   393 	Returns the capabilities of the codec plugin for a specific format and for a specific frame.
   394 	@param aFormat The format.
   395 	@param aFrameNumber frame to stream
   396 	@param aCaps The capabilities for the format given.
   397 	*/     
   398 	IMPORT_C void GetCapabilities(TUid aFormat, TInt aFrameNumber, TDecodeStreamCaps& aCaps) const;
   399 	
   400 	/**
   401 	Get the size of the memory buffer to hold the returned data.
   402 
   403 	@param aFormat the required format
   404 	@param aBlockSizeInPixels returns the size in pixels of the block returned from the stream when aNumBlocks of minimum block size are requested.
   405 	@param aNumBlocks the number of blocks of size TDecodeStreamCaps::MinBlockSizeInPixels() to be returned by one request
   406 
   407 	@return The memory buffer size in bytes to hold the requested blocks. System wide error if for example 
   408 	the format is not supported.
   409 	*/
   410 	IMPORT_C TInt GetBufferSize(TUid aFormat, TSize& aBlockSizeInPixels, TInt aNumBlocks)  const;
   411 
   412 
   413 	/**
   414 	Initialise the stream.
   415 	
   416 	@param aFormat the format to use
   417 	@param aFrameNumber frame to stream
   418 	@param aNavigation indication to stream of the way that the stream will be navigated. Allows 
   419 	codec to optimise it's behaviour.
   420 	@leave System wide error if for example the format is not supported.
   421 
   422 	@note must call InitFrameL before GetBlocks or GetNextBlocks. Failure to do so completes request with
   423 	KErrNotReady
   424 	*/
   425 	IMPORT_C void InitFrameL(TUid aFormat, TInt aFrameNumber, TDecodeStreamCaps::TNavigation aNavigation);
   426 
   427 	/**
   428 	Start asynchronous call to return random blocks from the stream
   429 
   430 	@param aStatus request status
   431 	@param aFrame An image frame wrapper a memory buffer to hold the returned block(s) of 
   432 	pixel data. This can be 'uninitialised' or given specific format which must match that
   433 	specified in the InitFrameL call.
   434 	@param aSeqPosition block number starting at top left 0 ... TDecodeStreamCaps::StreamSizeInBlocks()
   435 	@param aNumBlocksToGet number of blocks requested
   436 	@param aNumBlocksRead number of blocks which will be returned when the request completes
   437 
   438 	@note use CImageDecoder::Cancel() to cancel this request.
   439 	*/
   440 	IMPORT_C void GetBlocks(TRequestStatus& aStatus, CImageFrame& aFrame, TInt aSeqPosition, TInt aNumBlocksToGet, TInt& aNumBlocksRead);
   441 
   442 	/**
   443 	Start asynchronous call to return blocks sequentially from the stream. Blocks are returned 
   444 	from the first block until the last in the stream.
   445 
   446 	@param aStatus request status
   447 	@param aFrame An image frame wrapper a memory buffer to hold the returned block(s) of 
   448 	pixel data. This can be 'uninitialised' or given specific format which must match that
   449 	specified in the InitFrameL call.
   450 	@param aNumBlocksToGet number of blocks requested
   451 	@param aNumBlocksRead number of blocks which will be returned when the request completes
   452 
   453 	@note use CImageDecoder::Cancel() to cancel this request.
   454 	*/
   455 	IMPORT_C void GetNextBlocks(TRequestStatus& aStatus, CImageFrame& aFrame, TInt aNumBlocksToGet, TInt& aNumBlocksRead, TBool& aHaveMoreBlocks);
   456 
   457 private:
   458 	IMPORT_C TImageConvStreamedDecode(); 
   459 	void SetExtension(MImageConvExtension* aExtension);
   460 
   461 private:
   462 	MImageConvStreamedDecode* iExtension;
   463 	TInt iReserved; // future proof
   464 	};
   465 
   466 /**
   467  'Block' streaming extension for Image Conversion Library encoder.
   468  */
   469 /**
   470  'Block' streaming extension for Image Conversion Library encoder.
   471  */
   472 class TEncodeStreamCaps
   473 	{
   474 public:
   475 	/** Navigation possibilities within the stream. 
   476 	 */
   477 	enum TNavigation
   478 		{
   479 		/** Blocks can be returned from first to last */
   480 		ENavigationSequentialForward = 0x01,
   481 		
   482 		/** Blocks can be returned in a random order but moving only from first to last e.g. 1, 5, 18...*/
   483 		ENavigationRandomForward     = 0x02,
   484 
   485 		/** Blocks can be returned in a random order but moving only from last to first e.g. 1, 5, 18...*/
   486 		ENavigationRandomBackwards   = 0x04     
   487 		};
   488 
   489 	/**
   490 	Constructor.
   491 	*/
   492 	IMPORT_C TEncodeStreamCaps();
   493 	
   494 	/**
   495 	Constructor.
   496 	
   497 	@param aMaxBlocksPerRequest Maximum number of blocks that can be sent from the stream to client in a
   498 	single request.
   499 	@param aMinBlockSizeInPixels Minimum size in pixels of a block sent to the stream from the client in
   500 	a single request.
   501 	@param aOptimalBlocksPerRequest Optimum number of blocks sent to the stream from the client in
   502 	a single request to get maximum performance benefit.
   503 	@param aNavigation Navigation capabilities.
   504 	*/
   505 	IMPORT_C TEncodeStreamCaps(TInt aMaxBlocksPerRequest, const TSize& aMinBlockSizeInPixels,
   506 					  			TInt aOptimalBlocksPerRequest,
   507 					  			TEncodeStreamCaps::TNavigation aNavigation);
   508     /**
   509 	Maximum number of blocks that can be sent from the stream to client in a
   510 	single request.
   511 	
   512 	@return Maximum number of blocks that can be sent from the stream to client in a
   513 	single request.
   514 	*/ 
   515 	IMPORT_C TInt MaxBlocksPerRequest() const;
   516 
   517 	/** 
   518 	Minimum size in pixels of a block sent to the stream from the client in
   519 	a single request.
   520 	
   521 	@return Minimum size in pixels of a block sent to the stream from the client in
   522 	a single request.
   523 	*/
   524 	IMPORT_C const TSize& MinBlockSizeInPixels() const;
   525 
   526 	/** 
   527 	Optimum number of blocks sent to the stream from the client in
   528 	a single request to get maximum performance benefit.
   529 	
   530 	@return Optimum number of blocks sent to the stream from the client in
   531 	a single request to get maximum performance benefit.
   532 	*/
   533 	IMPORT_C TInt OptimalBlocksPerRequest() const;
   534 
   535 
   536 	/**
   537 	Navigation capabilities.
   538 	
   539 	@return navigation capabilities.
   540 
   541 	Full random access to the stream if Navigation() returns 
   542 	ENavigationSequentialForward | ENavigationRandomForward |ENavigationRandomBackwards
   543 	*/
   544 	IMPORT_C TEncodeStreamCaps::TNavigation Navigation() const;
   545 	
   546 	/**
   547 	Compatibility - internal use only
   548 	@internalComponent
   549 	*/
   550 	IMPORT_C TUint Size() const;
   551 
   552 	/**
   553 	Compatibility - internal use only
   554 	@internalComponent
   555 	*/
   556 	IMPORT_C TUint Version() const;
   557 
   558 private:
   559 	TInt  iMaxBlocksPerRequest;
   560 	TSize iMinBlockSizeInPixels;
   561 	TInt iOptimalBlocksPerRequest;
   562 	TNavigation iNavigation;
   563 	TUint  iSizeVersion;  // bits 31 to 8 size, 7 to 0 contain version
   564 	TInt  iReserved; // future proof
   565 	};
   566 
   567 class TImageConvStreamedEncode
   568 	{
   569 friend class CImageEncoder;	
   570 	
   571 public:
   572     /**
   573 	Returns a list of supported formats and the optimal format to be used. @see imageframeconst.h
   574 	for a list of format uids.
   575 	@param aFormats Returns an array of format uids 
   576 	@param aOptimalFormat The 'best' uid to use. 
   577 	*/
   578 	IMPORT_C void GetSupportedFormatsL(RArray<TUid>& aFormats, TUid& aOptimalFormat) const;
   579 
   580 	/**
   581 	Returns the capabilities of the codec plugin for a specific format.
   582 	@param aFormat The format.
   583 	@param aCaps The capabilities for the format given.
   584 	*/     
   585 	IMPORT_C void GetCapabilities(TUid aFormat, TEncodeStreamCaps& aCaps) const;
   586 
   587 	/**
   588 	Initialise the stream.
   589 	
   590 	@param aFormat the format to use
   591 	@param aFrameNumber frame to stream
   592 	@param aFrameSizeInPixels Size of this frame in pixels
   593 	@param aBlockSizeInPixels Size of block to be added / appended.
   594 	@param aNavigation indication to stream of the way that the stream will be navigated. Allows 
   595 	codec to optimise it's behaviour.
   596 	@param aFrameImageData The frame image data (optional pass NULL if not required).
   597 	There are format-specific image data variants that are used by encoders to obtain image specific 
   598 	data. This behaviour is invoked by specifying aFrameImageData. Otherwise, encoder specific defaults 
   599 	are invoked. @see TJpegImageData
   600 
   601 	@leave System wide error if for example the format is not supported.
   602 	
   603 	@note must call InitFrameL before AppendBlocks or AddBlocks. Failure to do so completes request with
   604 	KErrNotReady
   605 
   606 	@note can either specify format through aFormat or aImageFrameData. Conflicts cause a leave with KErrArgument. 
   607 	*/
   608 	IMPORT_C void InitFrameL(TUid aFormat, TInt aFrameNumber, const TSize& aFrameSizeInPixels, const TSize& aBlockSizeInPixels, TEncodeStreamCaps::TNavigation aNavigation, const CFrameImageData* aFrameImageData);
   609 	
   610 	/**
   611 	Append blocks to the stream.
   612 	@param aStatus request status	
   613 	@param aBlocks wraps a memory buffer containing the pixel data to be added to the stream
   614 	@param aNumBlocksToAdd number of blocks of size TEncodeStreamCaps::MinBlockSizeInPixels to add to the stream
   615 	*/
   616 	IMPORT_C void AppendBlocks(TRequestStatus& aStatus, const CImageFrame& aBlocks, TInt aNumBlocksToAdd);
   617 	
   618 	/**
   619 	Add blocks to the stream at a random position.
   620 	@param aStatus request status	
   621 	@param aBlocks wraps a memory buffer containing the pixel data to be added to the stream
   622 	@param aSeqPosition position of block in stream starting at 0
   623 	*/
   624 	IMPORT_C void AddBlocks(TRequestStatus& aStatus, const CImageFrame& aBlocks, const TInt& aSeqPosition);
   625 
   626 	/**
   627 	Signal completion of writing the stream
   628 	@param aStatus request status	
   629 	*/
   630 	IMPORT_C void Complete(TRequestStatus& aStatus); 
   631 
   632 private:
   633 
   634 	IMPORT_C TImageConvStreamedEncode();
   635 	void SetExtension(MImageConvExtension* aExtension);
   636 
   637 	MImageConvStreamedEncode* iExtension;
   638 	TInt iReserved; // future proof
   639 	};
   640 
   641 #endif // IMAGECONVERSIONEXTENSION_H