imagingandcamerafws/camerafw/Include/ECam/ecamcapturecontrolintf.h
changeset 0 40261b775718
equal deleted inserted replaced
-1:000000000000 0:40261b775718
       
     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 "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 /**
       
    17  @file
       
    18  @publishedPartner
       
    19  @released
       
    20 */
       
    21 
       
    22 #ifndef  ECAMCAPTURECONTROLINTF_H
       
    23 #define  ECAMCAPTURECONTROLINTF_H
       
    24 
       
    25 #include <ecamcapturecontrol.h>
       
    26 #include <ecam/ecamadvsettingsintfuids.hrh>
       
    27 
       
    28 class MImplementationFactory;
       
    29 
       
    30 /** 
       
    31 This is the UID which is used to obtain the interface MCameraPreImageCaptureControl, via the 
       
    32 CCamera::CustomInterface() call, which provides implementation of the M-class interface.
       
    33  
       
    34 @publishedPartner
       
    35 @prototype
       
    36 */   
       
    37 static const TUid KECamMCameraPreImageCaptureControlUid		=  {KECamMCameraPreImageCaptureControlUidValue};
       
    38 
       
    39 /** 
       
    40 This is the UID which is used to obtain the interface MCameraImageCapture, via the 
       
    41 CCamera::CustomInterface() call, which provides implementation of the M-class interface.
       
    42  
       
    43 @publishedPartner
       
    44 @prototype
       
    45 */   
       
    46 static const TUid KECamMCameraImageCaptureUid		=  {KECamMCameraImageCaptureUidValue};
       
    47 
       
    48 /** 
       
    49 This is the UID which is used to obtain the interface MCameraPostImageCaptureControl, via the 
       
    50 CCamera::CustomInterface() call, which provides implementation of the M-class interface.
       
    51  
       
    52 @publishedPartner
       
    53 @prototype 
       
    54 */   
       
    55 static const TUid KECamMCameraPostImageCaptureControlUid	=  {KECamMCameraPostImageCaptureControlUidValue};
       
    56 
       
    57 /** 
       
    58 This is the UID which is used to obtain the interface MCameraVideoCaptureControl, via the 
       
    59 CCamera::CustomInterface() call, which provides implementation of the M-class interface. 
       
    60 @publishedPartner
       
    61 @prototype
       
    62 */   
       
    63 static const TUid KECamMCameraVideoCaptureControlUid 	=  {KECamMCameraVideoCaptureControlUidValue};
       
    64 
       
    65 /** 
       
    66 Mixin class for implementation by providers of the PreImageCaptureControl Camera Extension API.
       
    67 PreImageCaptureControl class exposes an API for controlling advanced still image related settings and control prior
       
    68 to capturing the images.
       
    69 
       
    70 @publishedPartner
       
    71 @prototype 
       
    72 */	
       
    73 class MCameraPreImageCaptureControl
       
    74 	{
       
    75 	
       
    76 public:
       
    77 	
       
    78 	/** 
       
    79 	Releases the interface. 
       
    80 	*/
       
    81 	virtual void Release()=0;
       
    82 	
       
    83 	/**
       
    84 	The observer for the pre image capture control is passed to the implementation for passing callbacks on it.
       
    85 	
       
    86 	@param  aPreImageCaptureControlObserver
       
    87 			The reference to the pre image capture control observer.
       
    88 	*/
       
    89 	virtual void SetPreImageCaptureControlObserver(MPreImageCaptureControlObserver& aPreImageCaptureControlObserver)=0;
       
    90 	
       
    91 	/**
       
    92 	Retrieves information regarding the direct snapshot feature support. Direct Snapshot, if supported, can be created
       
    93 	out of version2 direct viewfinder object only.
       
    94 
       
    95 	@param  aDirectSnapshotSupportInfo
       
    96 			This is a bit field providing supported direct snapshot of type TDirectSnapshotType
       
    97 
       
    98 	@leave  May leave with any error code.
       
    99 	*/
       
   100 	virtual void GetDirectSnapshotSupportInfoL(TUint& aDirectSnapshotSupportInfo) const=0;
       
   101 	
       
   102 	/**
       
   103 	Retrieves the settings supported for embedded still captures. Possibilty exists that not all the settings supported for
       
   104 	normal still image captures are supported for embedded still captures as well.
       
   105 
       
   106 	@param  aSupportedEmbeddedStillCaptureSettings
       
   107 			Array of TUid which retrieves the supported embedded still captures. Empty list indicated that no settings are
       
   108 			supported for embedded still captures.
       
   109 			
       
   110 	@leave  May leave with any error code.
       
   111 	*/
       
   112 	virtual void GetSupportedEmbeddedStillCaptureSettingsL(RArray<TUid>& aSupportedEmbeddedStillCaptureSettings) const=0;
       
   113 	
       
   114 	/**
       
   115 	Retrieves information regarding the supported direct saving state. If used, still images are saved in files rather than 
       
   116 	providing clients the MCameraImageBuffer. Direct saving to file will continue even if the client application gets closed
       
   117 	for any reasons.
       
   118 
       
   119 	@param  aSupportedDirectSavingType
       
   120 			Retrieves the enum specifying supported TDirectSavingType.
       
   121 			If EDirectSavingNotUsed, direct saving not supported. Images will be received in buffer MCameraImageBuffer.
       
   122 			
       
   123 			If EDirectSavingHighResolutionFileOnly, direct saving to file is supported. But no cut down version of the image 
       
   124 			will be saved to file. Callback used is MCaptureImageObserver::ImageDirectSavingCompleted().
       
   125 			
       
   126 			If EDirectSavingWithLowerResolutionFile, Direct saving to file is supported. Also, a cut down version of the image 
       
   127 			will be saved to another specified file. Callbacks used are MCaptureImageObserver::ImageDirectSavingCompleted()
       
   128 			for actual image and MCaptureImageObserver::CutDownImageDirectSavingCompleted() for lower resolution image.
       
   129 
       
   130 	@leave  May leave with any error code.	
       
   131 	*/
       
   132 	virtual void GetSupportedDirectSavingTypeL(CCamera::CCameraPreImageCaptureControl::TDirectSavingType& aSupportedDirectSavingType) const=0;
       
   133 
       
   134 	/**
       
   135 	Provides the base name for file used to save images. If there are sequential images, files will be created by 
       
   136 	implementation with names appearing as base name and appended by increasing integers which would start from 
       
   137 	aStartingSequenceNumber. This is used for the original image only, but not for the cut down version of the original
       
   138 	image.
       
   139 
       
   140 	@param  aFilename
       
   141 			A const TDesC8&: Base name for files which ECam implementation needs to create in order to collect every sequential
       
   142 			image.
       
   143 			
       
   144 	@param  aStartingSequenceNumber
       
   145 			The starting sequence number which will be appended to the base name 'aFilename'. The sequence number will keep
       
   146 			on increasing for every individual still image capture.
       
   147 			
       
   148 	@leave  May leave with any error code.
       
   149 
       
   150 	@note   It is upto the implementation how many digits it uses for sequence number. Accordingly, padding will be done with 
       
   151 			zeroes.
       
   152 	*/
       
   153 	virtual void SetSequentialImageFilenameL(const TDesC8& aFilename, TInt aStartingSequenceNumber)=0;
       
   154 	
       
   155 	/**
       
   156 	Provides the base name for file used to save cut down version of the original images. If there are sequential images, 
       
   157 	files will be created by implementation with names appearing as base name and appended by increasing integers which would 
       
   158 	start from aStartingSequenceNumber. This is used for the cut down version of the original image.
       
   159 
       
   160 	@param  aLowerResolutionFilename
       
   161 			A const TDesC8&: Base name for files which ECam implementation needs to create in order to collect the cut down version
       
   162 			of every sequential image.
       
   163 			
       
   164 	@param  aStartingSequenceNumber
       
   165 			The starting sequence number which will be appended to the base name 'aFilename'. The sequence number will keep
       
   166 			on increasing for every individual still image capture.
       
   167 			
       
   168 	@leave  May leave with any error code.
       
   169 
       
   170 	@note   It is upto the implementation how many digits it uses for sequence number. Accordingly, padding will be done with 
       
   171 			zeroes.
       
   172 	*/
       
   173 	virtual void SetLowerResolutionSequentialImageFilenameL(const TDesC8& aLowerResolutionFilename, TInt aStartingSequenceNumber)=0;
       
   174 
       
   175 	/**
       
   176 	Retrieves the type of direct saving currently used. This will be represented as a direct saving state as given by 
       
   177 	TDirectSavingType. 
       
   178 
       
   179 	Whether or not the direct saving option is used, client will receive the MCaptureImageObserver::ImageCaptureComplete() 
       
   180 	callback to mark the completion of the image capture operation.
       
   181 
       
   182 	@param  aDirectSavingType
       
   183 			Current type of the direct saving. 
       
   184 			
       
   185 			If EDirectSavingNotUsed, direct saving is not used. Images will be received in buffer MCameraImageBuffer through
       
   186 			callback MCaptureImageObserver::ImageBufferReady().
       
   187 			
       
   188 			If EDirectSavingHighResolutionFileOnly, direct saving to file option is currently used. But no cut down version of
       
   189 			the image will be saved to file. Callback used is MCaptureImageObserver::ImageDirectSavingCompleted().
       
   190 			
       
   191 			If EDirectSavingWithLowerResolutionFile, apart from direct saving to file option for the actual image, a cut down 
       
   192 			version of the image will be saved to another specified file. Callbacks used are MCaptureImageObserver::
       
   193 			ImageDirectSavingCompleted() for actual image and MCaptureImageObserver::CutDownImageDirectSavingCompleted() 
       
   194 			for lower resolution image.
       
   195 			
       
   196 	@leave  May leave with any error code.
       
   197 	
       
   198 	@note   Direct saving to file will continue even if the client application gets closed for any reasons.
       
   199 	*/
       
   200 	virtual void GetDirectSavingTypeL(CCamera::CCameraPreImageCaptureControl::TDirectSavingType& aDirectSavingType) const=0;
       
   201 
       
   202 	/**
       
   203 	Instructs the ECam implementation to use the desired type of direct saving option as specifed by its state.
       
   204 
       
   205 	Whether or not the direct saving option is used, client will receive the MCaptureImageObserver::ImageCaptureComplete() 
       
   206 	callback to mark the completion of the image capture operation.
       
   207 
       
   208 	@param  aDirectSavingType
       
   209 			The desired type of the direct saving. 
       
   210 			
       
   211 			If EDirectSavingNotUsed, direct saving will not be used. Images will be received in buffer MCameraImageBuffer 
       
   212 			through	callback MCaptureImageObserver::ImageBufferReady().
       
   213 			
       
   214 			If EDirectSavingHighResolutionFileOnly, direct saving to file option will be used. But no cut down version of
       
   215 			the image will be saved to file. Callback to be used is MCaptureImageObserver::ImageDirectSavingCompleted().
       
   216 			
       
   217 			If EDirectSavingWithLowerResolutionFile, apart from direct saving to file option for the actual image, a cut down 
       
   218 			version of the image will be saved to another specified file. Callbacks to be used are MCaptureImageObserver::
       
   219 			ImageDirectSavingCompleted() for actual image and MCaptureImageObserver::CutDownImageDirectSavingCompleted()
       
   220 			for lower resolution image.
       
   221 			
       
   222 	@leave  May leave with any error code.
       
   223 
       
   224 	@note   Clients need to provide the filename before capturing still images under direct saving option. Callback 
       
   225 			MCaptureImageObserver::ImageDirectSavingCompleted() may provide error KErrNotReady if filenames are not 
       
   226 			provided before images are captured for direct saving. Similarly, if cut down version of image is also to be 
       
   227 			saved to file, MCaptureImageObserver::CutDownImageDirectSavingCompleted() may provide error KErrNotReady if 
       
   228 			filenames are not provided before hand.
       
   229 			
       
   230 	@note   Direct saving to file will continue even if the client application gets closed for any reasons.
       
   231 	*/
       
   232 	virtual void SetDirectSavingTypeL(CCamera::CCameraPreImageCaptureControl::TDirectSavingType aDirectSavingType)=0;
       
   233     
       
   234  	/**
       
   235 	Retrieves whether the camera device is capable of providing capture event notification to the client. Client may take
       
   236 	the responsibility of playing the capture sound after receiving the notification. 
       
   237 
       
   238 	@param  aSupportedDriveModes
       
   239 			A reference to bit-field of TUint which indicates the drive modes in which the capture event notification is
       
   240 			supported. If aSupportedDriveModes =0, capture event notification is not supported.
       
   241 			
       
   242 	@note   If capture event notification is supported, ECam implementation will use KUidECamEventImageCaptureEvent to notify 
       
   243 			clients that the image has been exposed to the camera sensor. Clients may play capture sound if they desire to do so.
       
   244 
       
   245 	@leave  May leave with any error code.
       
   246 	
       
   247 	@see    CCamera::CCameraAdvancedSettings::TDriveMode	
       
   248 	*/
       
   249 	virtual void GetCaptureEventSupportInfoL(TUint& aSupportedDriveModes) const=0;
       
   250 	
       
   251 	/**
       
   252 	Retrieves the supported image formats for a given resolution.
       
   253 	
       
   254 	@param  aImageFormatsSupported
       
   255 			A bit field which retrieves the supported image formats for a given resolution.
       
   256 			Formats have been defined as CCamera::TFormat
       
   257 			
       
   258 	@param  aSize
       
   259 			The resolution (or size) for which the total number of supported image formats have to be retrieved.
       
   260 	
       
   261 	@leave  May leave with any error code.
       
   262 	*/
       
   263 	virtual void GetImageFormatsSupportedL(TUint& aImageFormatsSupported, const TSize& aSize) const=0;
       
   264 	
       
   265 	/**
       
   266 	Retrieves the supported pixel aspect ratio for a given resolution in case of still image.
       
   267 	
       
   268 	@param  aPixelAspectsSupported
       
   269 			A bit field which retrieves the supported pixel aspect ratio for a given resolution.
       
   270 			Pixel aspect ratio have been defined as CCamera::CCameraAdvancedSettings::TPixelAspectRatio
       
   271 	
       
   272 	@param  aImageFormat
       
   273 			The image format for which the supported pixel aspect ratio have to be retrieved.
       
   274 
       
   275 	@param  aSize
       
   276 			The resolution (or size) for which the supported pixel aspect ratio have to be retrieved.
       
   277 	
       
   278 	@leave  May leave with any error code.
       
   279 	*/
       
   280 	virtual void GetPixelAspectsSupportedL(TUint& aPixelAspectsSupported, CCamera::TFormat aImageFormat, const TSize& aSize) const=0;
       
   281 	
       
   282 	/**
       
   283 	Performs setup and allocation of memory for image capture operation. Implementation creates a new CCameraImageCapture*
       
   284 	object which reflects the prepare image parameters passed by the client. The callback MPreImageCaptureControlObserver::
       
   285 	PrepareImageComplete() passes the ownership of the CCameraImageCapture* object to the client.
       
   286 
       
   287 	This needs to be called every time client wishes to change prepare image parameters or if the client wishes to create
       
   288 	a new CCameraImageCapture* object. 
       
   289 
       
   290 	@param  aPrepareImageParameters 
       
   291 	        The desired image parameters to be used for capturing still images using the CCameraImageCapture instance
       
   292 	        which would be passed by the implementation.
       
   293 	        
       
   294 	@param  aCaptureImageObserver
       
   295 			The Capture image observer which is needed by the implementation in order to pass it to the 
       
   296 			CCameraImageCapture while creating it.
       
   297 
       
   298 	@note 	Next PrepareImageCapture can be called only after receiving the notification KUidECamEventReadyForNextPrepare.
       
   299 
       
   300 	@note   Implementation will call CCameraImageCapture::CreateL(CCamera& aCamera, MCaptureImageObserver& 
       
   301 			aCaptureImageObserver) method and pass the CCameraImageCapture* to the client through the 
       
   302 			MPreImageCaptureControlObserver::PrepareImageComplete() callback.
       
   303 
       
   304 	@note	If drive mode is EDriveModeTimeNudgeCapture the ECam implementation will immediately begin capturing images after
       
   305 			creating a new CCameraImageCapture object. Once the client initiates image capture, the total amount of images
       
   306 			requested by the client	(specified by the client in	TDriveModeDependentAttributes) will be returned to the client
       
   307 			(via MCaptureImageObserver::ImageBufferReady())	or saved to file. The implementation should not create another
       
   308 			instance of CCameraImageCapture whilst using this drive mode until the first instance is destroyed by the client.
       
   309 
       
   310 	@see 	CCamera::PrepareImageCaptureL(TFormat aImageFormat,TInt aSizeIndex)
       
   311 	*/
       
   312 	virtual void PrepareImageCapture(const CCamera::CCameraPreImageCaptureControl::TPrepareImageParameters& 
       
   313 											aPrepareImageParameters, MCaptureImageObserver& aCaptureImageObserver)=0;
       
   314 		
       
   315 	/**
       
   316 	Informs whether or not the setting of maximum memory size when encoding to the current format is supported.
       
   317 
       
   318 	@param  aIsImageMaxMemorySizeSettingSupported
       
   319 			ETrue indicates that setting of maximum memory size is supported.
       
   320 			EFalse indicates that setting of maximum memory size is not supported.
       
   321 
       
   322 	@leave  May leave with any error code.
       
   323 	*/
       
   324 	virtual void GetImageMaxMemorySizeSettingSupportInfoL(TBool& aIsImageMaxMemorySizeSettingSupported) const=0;
       
   325 
       
   326 	/**
       
   327 	Get the maximum memory size in kilo bytes when encoding to the current format.
       
   328 	
       
   329 	@param  aMemorySize
       
   330 			Retrieves the maximum memory size in kilo bytes.
       
   331 	
       
   332 	@note   In case of JPEG, the maximum memory size will take preference over JPEG quality if the maximum memory size is 
       
   333 			not sufficient to achieve the desired quality. Refer CCamera::JpegQuality()
       
   334 			
       
   335 	@leave  May leave with any error code.
       
   336 	*/
       
   337 	virtual void GetImageMaxMemorySizeL(TUint& aMemorySize) const=0;
       
   338 
       
   339 	/**
       
   340 	Retrieves the supported processing options.
       
   341 
       
   342 	@param  aEcamProcessingOptionsSupported
       
   343 			Bitfield containing the available processing options.
       
   344 
       
   345 	@leave  May leave with error code.
       
   346 	*/
       
   347 	virtual void GetSupportedProcessingOptionsL(TUint& aEcamProcessingOptionsSupported) const=0;
       
   348 	};
       
   349 
       
   350 /** 
       
   351 Mixin class for implementation by providers of the ImageCapture Camera Extension API. 
       
   352 CameraImageCapture class exposes an API for capturing the image and controlling the overall capture.
       
   353 
       
   354 This class also provides concrete implementation of API exposed by CCameraPostImageCaptureControl.
       
   355 CameraPostImageCaptureControl class exposes an API for retrieving the image data from individual images (in case 
       
   356 continuous drive mode is used for capturing the images) and also to apply control on the captured images individually.
       
   357 
       
   358 @publishedPartner
       
   359 @prototype 
       
   360 */	
       
   361 class MCameraImageCapture
       
   362 	{
       
   363 	
       
   364 public:
       
   365 	
       
   366 	/** 
       
   367 	Releases the interface. 
       
   368 	
       
   369 	@param  aCameraImageCapture
       
   370 			The pointer to the image capture class object which would be destroyed by the client.
       
   371 	*/
       
   372 	virtual void Release(CCamera::CCameraImageCapture* aCameraImageCapture)=0;
       
   373 	
       
   374 	/**
       
   375 	Retrieves the concrete factory handle for the histogram implementation in order to use it specifically for a
       
   376 	specific still image capture.
       
   377 		   
       
   378 	@param  aImplFactoryPtr
       
   379 		    The concrete factory handle for the histogram implementation specific to the still image capture.
       
   380 		   
       
   381 	@leave  May leave with any error code.
       
   382 	*/
       
   383 	virtual void CreateHistogramImplFactoryL(MImplementationFactory*& aImplFactoryPtr) const=0;
       
   384 	
       
   385 	/**
       
   386 	Retrieves the concrete factory handle for the snapshot implementation in order to 
       
   387 	use it specifically for a specific still image capture.
       
   388 		   
       
   389 	@param  aImplFactoryPtr
       
   390 		    The concrete factory handle for the snapshot implementation specific to the still image capture.
       
   391 		   
       
   392 	@leave  May leave with any error code.
       
   393 	*/
       
   394 	virtual void GetSnapshotImplFactoryL(MImplementationFactory*& aImplFactoryPtr) const=0;
       
   395 	
       
   396 	/**
       
   397 	Retrieves the concrete factory handle for the image processing implementation in order to use it specifically for 
       
   398 	a specific still image capture.
       
   399 		   
       
   400 	@param  aImplFactoryPtr
       
   401 		    The concrete factory handle for the image processing implementation specific to the still image capture.
       
   402 		   
       
   403 	@leave  May leave with any error code.
       
   404 	*/
       
   405 	virtual void GetImageProcessingImplFactoryL(MImplementationFactory*& aImplFactoryPtr) const=0;
       
   406 	
       
   407 	/**
       
   408 	The observer for the image capture is passed to the implementation for passing callbacks on it.
       
   409 	
       
   410 	@param  aCaptureImageObserver
       
   411 			The reference to the capture image observer.
       
   412 	*/
       
   413 	virtual void SetCaptureImageObserver(MCaptureImageObserver& aCaptureImageObserver)=0;	
       
   414 	
       
   415 	/**
       
   416 	Retrieves the prepare image parameters tied with this image capture class object.
       
   417 
       
   418 	@param aPrepareImageParameters
       
   419 		   TPrepareImageParameters tied with this image capture class object.
       
   420 		   
       
   421 	@leave May leave with any error code
       
   422 	*/
       
   423 	virtual void GetPrepareImageParametersL(CCamera::CCameraPreImageCaptureControl::TPrepareImageParameters& aPrepareImageParameters) const=0;
       
   424 	
       
   425 	/**
       
   426 	The prepare image parameters needed to capture images using the particular capture image class object.
       
   427 	
       
   428 	@param aPrepareImageParameters
       
   429 		   The prepare image parameters used to capture images.
       
   430 	*/
       
   431 	virtual void SetPrepareImageParameters(const CCamera::CCameraPreImageCaptureControl::TPrepareImageParameters& aPrepareImageParameters)=0;
       
   432 		
       
   433 	/**
       
   434 	Provides the interface pointers for the concrete implementation of CCameraPostImageCaptureControl.
       
   435 	Every time this method is called, a newly created interface is provided since it represents the individual image.
       
   436 	The ID maps the individual image with the CCameraPostImageCaptureControl instance and may also be stored by the 
       
   437 	concrete implementation of CCameraPostImageCaptureControl.	
       
   438 	
       
   439 	@param  aInterface
       
   440 			The uid representing the interface required.
       
   441 	
       
   442 	@param  aPostCaptureControlId
       
   443 			The ID which maps the individual image with the CCameraPostImageCaptureControl object. This may be stored
       
   444 			by the concrete implementation of CCameraPostImageCaptureControl.
       
   445 			
       
   446 	@return Interface pointer. 
       
   447 	
       
   448 	@note   It is this implementation which creates/owns CCameraPostImageCaptureControl class object after receiving image
       
   449 			capture	requests by the client. Implementation may store all such mappings between aPostCaptureControlId and 
       
   450 			CCameraPostImageCaptureControl* for a particular instance of CCameraImageCapture. 
       
   451 	*/
       
   452 	virtual TAny* CreatePostImageCaptureControlImpl(TUid aInterface, TPostCaptureControlId aPostCaptureControlId)=0;
       
   453 
       
   454 	/**
       
   455 	Performant image capture. This postpones the processing options involved with current image captured in order to 
       
   456 	capture/prepare for next images. 
       
   457 	
       
   458 	Previously created CCameraPostImageCaptureControl objects for this CCameraImageCapture object will become unavailable 
       
   459 	after this call.
       
   460 
       
   461 	@param  aCameraImageCapture
       
   462 			Pointer to aCameraImageCapture. This will be used by the implementation in order to pass in callbacks and to
       
   463 			create CCameraPostImageCaptureControl object for every image and pass it to the client. Implementation is not
       
   464 			supposed to not destroy this object.
       
   465 
       
   466 	@note   Further images (either still or video) can be captured only after receiving the notification 
       
   467 			KUidECamEventReadyForNextCapture. Current image may be outstanding in order to undergo any processing options.
       
   468 
       
   469 	@note   Callback MCaptureImageObserver::ImageCaptureComplete() informs the client that the image capture operation has 
       
   470 			been completed. The CCameraImageCapture& can be further used for next image captures.
       
   471 			In case of continuous drive modes, this callback will be received by the client only once in order to provide the 
       
   472 			result of the whole image capture operation. 
       
   473 			
       
   474 	@note   Callback MCaptureImageObserver::ImageBufferReady() provides client the link to CCameraPostImageCaptureControl& 
       
   475 			which helps retrieving the image buffer. In case of continuous drive modes, this callback will be received by the
       
   476 			client for every individual image. In case of single shots, this will be received by the client only once in 
       
   477 			order to retrieve the image buffer.
       
   478 	*/	
       
   479 	virtual void CaptureImage(CCamera::CCameraImageCapture* aCameraImageCapture)=0;
       
   480 	
       
   481 	/**
       
   482 	Cancels the outstanding Capture Image operation. This will also cancel any outstanding processing options associated
       
   483 	with the concerned Capture Image operation. This method is synchronous. Hence, no callback shall be issued for the 
       
   484 	concerned capture image operation.
       
   485 	*/
       
   486 	virtual void CancelCaptureImage()=0;
       
   487 	
       
   488 	/**
       
   489 	Retrieves the number of images exposed to sensor with respect to a specific image capture command. Any Processing
       
   490 	options associated with these images may be pending.
       
   491 
       
   492 	@param  aNumImagesExposed
       
   493 			Retrieves the number of images exposed to sensor till now. For single shot type of drive modes, this value will
       
   494 			be one after the image gets exposed to sensor. For multiple shot type of drive modes, this value will be the 
       
   495 			number of images exposed till now.
       
   496 			
       
   497 	@note   May leave with any error code.
       
   498 	*/
       
   499 	virtual void GetNumImagesExposedL(TUint& aNumImagesExposed) const=0;
       
   500 
       
   501 	/**
       
   502 	Retrieves the total number of images which is supposed to be captured with respect to a specific image capture command. 
       
   503 
       
   504 	@param  aNumTotalImages
       
   505 			Retrieves the total number of images supposed to be captured. For single shot type of drive modes, this value 
       
   506 			will be	always be one. For multiple shot type of drive modes, this value will be greater than one.
       
   507 			
       
   508 	@note   May leave with any error code.
       
   509 	*/
       
   510 	virtual void GetNumTotalImagesL(TUint& aNumTotalImages) const=0;
       
   511 
       
   512 	/**
       
   513 	Retrieves the post capture control handle based on the ID passed to it. Client may use this handle for post capture 
       
   514 	operations of the image identified by the ID. The ID is received by the clients through MCaptureImageObserver callbacks.
       
   515 
       
   516 	@param  aPostCaptureControlHandle
       
   517 			Retrieves pointer to the post capture control class object.
       
   518 			
       
   519 	@param  aPostCaptureControlId
       
   520 			The ID used to retrieve the post capture control handle of the captured image.
       
   521 			
       
   522 	@note   May leave with any error code.
       
   523 	
       
   524 	@note   It is this implementation which creates/owns CCameraPostImageCaptureControl class object after receiving image
       
   525 			capture	requests by the client. Implementation may store all such mappings between aPostCaptureControlId and 
       
   526 			CCameraPostImageCaptureControl* for a particular instance of CCameraImageCapture. 
       
   527 	*/	
       
   528 	virtual void GetPostCaptureControlHandleL(CCamera::CCameraPostImageCaptureControl*& aPostCaptureControlHandle, 
       
   529 																TPostCaptureControlId aPostCaptureControlId) const=0;
       
   530 	/**
       
   531 	Prioritises the Capture Image operation. This implies that the processing options associated with the concerned 
       
   532 	Capture	Image operation will be prioritised over other pending processing options.
       
   533 
       
   534 	@param  aCaptureImagePriority
       
   535 			The desired level of priority.
       
   536 
       
   537 	@leave  May leave with any error code.
       
   538 	*/
       
   539 	virtual void SetCaptureImagePriorityL(TECamImagePriority aCaptureImagePriority)=0;
       
   540 		
       
   541 	/**
       
   542 	Retrieves the priority of the Capture Image operation.
       
   543 
       
   544 	@param  aCaptureImagePriority
       
   545 			Retrieves the current level of priority.
       
   546 
       
   547 	@leave  May leave with any error code.
       
   548 	*/
       
   549 	virtual void GetCaptureImagePriorityL(TECamImagePriority& aCaptureImagePriority) const=0;
       
   550 
       
   551 	/**
       
   552 	Pauses processing options associated with the concerned Capture Image operation.
       
   553 
       
   554 	@param  aProcessingTypes
       
   555 			The processing options which need to be paused.
       
   556 	*/
       
   557 	virtual void PauseProcessing(TUint aProcessingTypes)=0;
       
   558 
       
   559 	/**
       
   560 	Resumes processing options associated with the concerned Capture Image operation.
       
   561 
       
   562 	@param  aProcessingTypes
       
   563 			The processing options which need to be resumed.
       
   564 
       
   565 	@leave May leave with any error code.
       
   566 	*/
       
   567 	virtual void ResumeProcessingL(TUint aProcessingTypes)=0;
       
   568 	};
       
   569 	
       
   570 /** 
       
   571 This mixin class provides concrete implementation of API exposed by CCameraPostImageCaptureControl.
       
   572 CameraPostImageCaptureControl class exposes an API for retrieving the image data from individual images (in case 
       
   573 continuous drive mode is used for capturing the images) and also to apply control on the captured images individually.
       
   574 
       
   575 @publishedPartner
       
   576 @prototype 
       
   577 */	
       
   578 class MCameraPostImageCaptureControl
       
   579 	{
       
   580 	
       
   581 public:
       
   582 	
       
   583 	/** 
       
   584 	Releases the interface. 
       
   585 	
       
   586 	@param  aPostCaptureControlId
       
   587 			The ID useful to indentify the post capture control handle of the captured image being deleted.
       
   588 	*/
       
   589 	virtual void Release(TPostCaptureControlId aPostCaptureControlId)=0;
       
   590 	
       
   591 	/**
       
   592 	Retrieves the sequence number of the image being represented by this post capture control object. The sequence number
       
   593 	specifies the index of the individual image if, in case, the multiple shot type of drive mode is being used. The first 
       
   594 	individual image which is exposed to the sensor has a sequence number of zero. In case of single shot type of drive mode,
       
   595 	the sequence number will be zero.
       
   596 
       
   597 	@param  aSequenceNumber
       
   598 			Retrieves the sequence number of the image.
       
   599 
       
   600 	@leave  May leave with any error code.
       
   601 	*/
       
   602 	virtual void GetImageSequenceNumberL(TUint& aSequenceNumber) const=0;
       
   603 	
       
   604 	/**
       
   605 	CCancels the outstanding individual image which the object of this class is referring to. This will also cancel any outstanding 
       
   606 	processing options associated with this individual image. This method is synchronous. Hence, no callback shall be 
       
   607 	issued for this individual image.
       
   608 	*/
       
   609 	virtual void CancelImage()=0;
       
   610 	
       
   611 	/**
       
   612 	Prioritises the individual image which the object of this class is referring to. This implies that any processing
       
   613 	options associated with this individual image will be prioritised over other pending processings options.
       
   614 
       
   615 	@param  aImagePriority
       
   616 			The desired level of priority.
       
   617 			
       
   618 	@leave  May leave with any error code.
       
   619 	*/
       
   620 	virtual void SetImagePriorityL(TECamImagePriority aImagePriority)=0;
       
   621 		
       
   622 	/**
       
   623 	Retrieves the priority of the individual image which the object of this class is referring to.
       
   624 
       
   625 	@param  aImagePriority
       
   626 			The current level of priority.
       
   627 			
       
   628 	@leave  May leave with any error code.
       
   629 	*/
       
   630 	virtual void GetImagePriorityL(TECamImagePriority& aImagePriority) const=0;
       
   631 	
       
   632 	/**
       
   633 	Pauses processing options associated with the concerned Capture Image operation.
       
   634 
       
   635 	@param  aProcessingTypes
       
   636 			The processing options which need to be paused.
       
   637 	*/
       
   638 	virtual void PauseProcessing(TUint aProcessingTypes)=0;
       
   639 
       
   640 	/**
       
   641 	Resumes processing options associated with the concerned Capture Image operation.
       
   642 
       
   643 	@param  aProcessingTypes
       
   644 			The processing options which need to be resumed.
       
   645 
       
   646 	@leave May leave with any error code.
       
   647 	*/
       
   648 	virtual void ResumeProcessingL(TUint aProcessingTypes)=0;
       
   649 	
       
   650 	/**
       
   651 	Retrieves the image buffer which contains the individual image captured. This method should be called by the client as a 
       
   652 	result of receiving the callback MCaptureImageObserver::ImageBufferReady(), if the 
       
   653 	error information received is satisfactory.
       
   654 
       
   655 	@param  aCameraImageBuffer
       
   656 			A reference to an MCameraImageBuffer if successful, or NULL if not successful.
       
   657 
       
   658 	@leave  May leave with any error code.
       
   659 	*/
       
   660 	virtual void GetImageBufferL(MCameraImageBuffer& aCameraImageBuffer) const=0;
       
   661 	
       
   662 	/**
       
   663 	Retrieves the state of the individual image which the object of this class is referring to.
       
   664 
       
   665 	@param  aImageState
       
   666 			Retrieves the current state of the individual image.
       
   667 			
       
   668 	@leave  May leave with any error code.
       
   669 	*/	
       
   670 	virtual void GetImageStateL(CCamera::CCameraPostImageCaptureControl::TImageState& aImageState) const=0;
       
   671 	
       
   672 	/**
       
   673 	Retrieves the state of the individual image buffer.
       
   674 
       
   675 	@param  aBufferState
       
   676 			Retrieves the current state of the individual image buffer.
       
   677 			
       
   678 	@leave  May leave with any error code.
       
   679 	*/	
       
   680 	virtual void GetBufferStateL(CCamera::CCameraPostImageCaptureControl::TBufferState& aBufferState) const=0;
       
   681 	};
       
   682 
       
   683 /** 
       
   684 Mixin class for implementation by providers of the Video Capture Control Camera Extension API.
       
   685 CCamera Video Capture Control class exposes an API for controlling advanced video capture related settings and control.
       
   686 
       
   687 @publishedPartner
       
   688 @prototype 	
       
   689 */	
       
   690 class MCameraVideoCaptureControl
       
   691 	{
       
   692 	
       
   693 public:
       
   694 	
       
   695 	/** 
       
   696 	Releases the interface. 
       
   697 	*/
       
   698 	virtual void Release()=0;
       
   699 	
       
   700 	/**
       
   701 	Retrieves the concrete factory handle for the histogram implementation in order to 
       
   702 	use it specifically for the video capture.
       
   703 		   
       
   704 	@param aImplFactoryPtr
       
   705 		   The concrete factory handle for the histogram implementation specific to the video capture.
       
   706 		   
       
   707 	@leave  May leave with any error code.
       
   708 	*/
       
   709 	virtual void CreateHistogramImplFactoryL(MImplementationFactory*& aImplFactoryPtr) const=0;
       
   710     	
       
   711 	/**
       
   712 	Retrieves the concrete factory handle for the snapshot implementation in order to 
       
   713 	use it specifically for the video capture.
       
   714 		   
       
   715 	@param  aImplFactoryPtr
       
   716 		    The concrete factory handle for the snapshot implementation specific to the video capture.
       
   717 		   
       
   718 	@leave  May leave with any error code.
       
   719 	*/
       
   720 	virtual void GetSnapshotImplFactoryL(MImplementationFactory*& aImplFactoryPtr) const=0;
       
   721 	
       
   722 	/**
       
   723 	Retrieves the concrete factory handle for the image processing implementation in order to 
       
   724 	use it specifically for the video capture.
       
   725 	
       
   726 	@param aImplFactoryPtr
       
   727 		   The concrete factory handle for the image processing implementation specific to the video capture.
       
   728 		   
       
   729 	@leave  May leave with any error code.
       
   730 	*/
       
   731 	virtual void GetImageProcessingImplFactoryL(MImplementationFactory*& aImplFactoryPtr) const=0;
       
   732 	
       
   733 	/**
       
   734 	The observer for the video capture is passed to the implementation for passing callbacks on it.
       
   735 	
       
   736 	@param  aCaptureVideoObserver
       
   737 			The reference to the capture video observer.
       
   738 	*/
       
   739 	virtual void SetCaptureVideoObserver(MCaptureVideoObserver& aCaptureVideoObserver)=0;
       
   740 	
       
   741     /**
       
   742 	Retrieves the supported video formats for a given resolution.
       
   743 	
       
   744 	@param  aVideoFormatsSupported
       
   745 			A bit field which retrieves the supported video formats for a given resolution.
       
   746 			Formats have been defined as CCamera::TFormat
       
   747 			
       
   748 	@param  aSize
       
   749 			The resolution (or size) for which the total number of supported video formats have to be retrieved.
       
   750 	
       
   751 	@leave  May leave with any error code.
       
   752 	*/
       
   753 	virtual void GetVideoFormatsSupportedL(TUint& aVideoFormatsSupported, const TSize& aSize) const=0;
       
   754 
       
   755 	/**
       
   756 	Retrieves the supported pixel aspect ratio for a given resolution in case of video.
       
   757 	
       
   758 	@param  aPixelAspectsSupported
       
   759 			A bit field which retrieves the supported pixel aspect ratio for a given resolution.
       
   760 			Pixel aspect ratio have been defined as CCamera::CCameraAdvancedSettings::TPixelAspectRatio
       
   761 	
       
   762 	@param	aVideoFormat
       
   763 			The video format for which the supported pixel aspect ratio have to be retrieved.
       
   764 		
       
   765 	@param  aSize
       
   766 			The resolution (or size) for which the supported pixel aspect ratio have to be retrieved.
       
   767 	
       
   768 	@leave  May leave with any error code.
       
   769 	*/
       
   770 	virtual void GetPixelAspectsSupportedL(TUint& aPixelAspectsSupported, CCamera::TFormat aVideoFormat, const TSize& aSize) const=0;
       
   771 
       
   772 	/**
       
   773 	Informs whether or not the 'embedded still capture' feature is supported. Allowing still image capture in between 
       
   774 	on-going video capture is referred to as embedded still capture.
       
   775 
       
   776 	@param  aSupportedEmbeddedStillCaptureTypes
       
   777 			Retrieves the supported embedded still capture. The TInt is retrieved as a bit field of supported 
       
   778 			TEmbeddedStillCaptureTypes.
       
   779 
       
   780 			
       
   781 	@leave  May leave with any error code.
       
   782 	*/
       
   783 	virtual void GetEmbeddedStillCaptureSupportInfoL(TInt& aSupportedEmbeddedStillCaptureTypes) const=0;
       
   784 
       
   785 	/**
       
   786 	Asynchronous method to prepare for video capture.
       
   787 
       
   788 	Performs setup and allocation of memory prior to calling StartVideoCapture()
       
   789 	to keep the latency of that function to a minimum.
       
   790 
       
   791 	@param  aPrepareVideoParameters 
       
   792 	 		Parameters necessary to prepare for video capture.
       
   793 	 		
       
   794 	@note   Event KUidECamEventVideoCaptureControlPrepareComplete is used to notify clients about completing the preparation
       
   795 			for video capture.
       
   796 			
       
   797 	@note 	Next PrepareVideoCapture can be called only after receiving the notification KUidECamEventReadyForNextPrepare.
       
   798 			
       
   799 	@note   If some camera settings get affected because of desired video settings such as frame rate/frame size, 
       
   800 			specific notifications will be sent to the client about camera settings being affected.
       
   801 			
       
   802 	@note	Event KUidECamEventVideoCaptureControlSettingsRangeChanged: informs that range of certain camera settings have been changed.
       
   803 			Client may call GetRangeAffectedSettingsL(RArray<TUid>& aRangeAffectedSettings) const to get the list of affected camera settings.
       
   804 
       
   805 	@note	Event KUidECamEventVideoCaptureControlSettingsValueChanged: informs that value of certain camera settings have been changed. 
       
   806 			Client may call GetValueAffectedSettingsL(RArray<TUid>& aValueAffectedSettings) const to get the list of affected camera settings.
       
   807 
       
   808 	@note	Event KUidECamEventVideoCaptureControlSettingsDisabled: informs that certain camera settings have been disabled. 
       
   809 			Client may call GetDisabledSettingsL(RArray<TUid>& aDisabledSettings) const to get the list of affected camera settings.
       
   810 
       
   811 	@see 	CCamera::PrepareVideoCaptureL(TFormat aFormat,TInt aSizeIndex,TInt aRateIndex,TInt aBuffersToUse,TInt aFramesPerBuffer)
       
   812 	
       
   813 	@see	ReleaseVideoResource()
       
   814 	*/
       
   815 	virtual void PrepareVideoCapture(const CCamera::CCameraVideoCaptureControl::TPrepareVideoParameters& aPrepareVideoParameters)=0;
       
   816 	
       
   817 	/**
       
   818 	Retrieves the camera settings whose range got affected once the desired video settings (frame rate/frame size) are in place. 
       
   819 	This method may be called by the client after receiving the notification KUidECamEventVideoCaptureControlSettingsRangeChanged.
       
   820 
       
   821 	@param  aRangeAffectedSettings
       
   822 			Retrieves the list of range affected settings
       
   823 			
       
   824 	@leave  May leave with any error code.  
       
   825 
       
   826 	@see 	PrepareVideoCapture(const TPrepareVideoParameters& aPrepareVideoParameters)
       
   827 	*/
       
   828 	virtual void GetRangeAffectedSettingsL(RArray<TUid>& aRangeAffectedSettings) const=0;
       
   829 	
       
   830 	/**
       
   831 	Retrieves the camera settings whose value got affected once the desired video settings (frame rate/frame size) are in place. 
       
   832 	This method may be called by the client after receiving the notification KUidECamEventVideoCaptureControlSettingsValueChanged.
       
   833 
       
   834 	@param  aValueAffectedSettings
       
   835 			Retrieves the list of value affected settings
       
   836 
       
   837 	@leave  May leave with any error code.
       
   838 
       
   839 	@see 	PrepareVideoCapture(const TPrepareVideoParameters& aPrepareVideoParameters)	
       
   840 	*/
       
   841 	virtual void GetValueAffectedSettingsL(RArray<TUid>& aValueAffectedSettings) const=0;
       
   842 	
       
   843 	/**
       
   844 	Retrieves the camera settings whose value got affected once the desired video settings (frame rate/frame size) are in place. 
       
   845 	This method may be called by the client after receiving the notification KUidECamEventVideoCaptureControlSettingsDisabled.
       
   846 
       
   847 	@param  aDisabledSettings
       
   848 			Retrieves the list of disabled settings
       
   849 
       
   850 	@leave  May leave with any error code.
       
   851 
       
   852 	@see 	PrepareVideoCapture(const TPrepareVideoParameters& aPrepareVideoParameters)
       
   853 	*/
       
   854 	virtual void GetDisabledSettingsL(RArray<TUid>& aDisabledSettings) const=0;
       
   855 	
       
   856 	/**
       
   857 	Frees the video resources which were set up as a result of CCameraVideoCaptureControl::PrepareVideoCapture call.
       
   858 	If this methid is called while PrepareVideoCapture call is outstanding, then this will be equivalent to cancelling the
       
   859 	PrepareVideoCapture call and release any allocated resources.
       
   860 	*/
       
   861 	virtual void ReleaseVideoResource()=0;
       
   862 	
       
   863 	/**
       
   864 	Starts the video capture. This operation gives priority to the low latency aspects.
       
   865 
       
   866 	Video frames are send to client via MCaptureVideoObserver::VideoBufferReady(MCameraBuffer2& aVideoBuffer, TInt aErrorCode).
       
   867 
       
   868 	@leave  May leave with any error code.
       
   869 
       
   870 	@note	This method is recommended to be used rather than CCamera::StartVideoCaptureL().
       
   871 	*/												
       
   872 	virtual void StartVideoCaptureL()=0;
       
   873 
       
   874 	/**
       
   875 	Stops the video capture. This operation gives priority to the low latency aspects.
       
   876 
       
   877 	@note	This method is recommended to be used rather than CCamera::StopVideoCapture().
       
   878 	*/												
       
   879 	virtual void StopVideoCapture()=0;
       
   880 	
       
   881 	/**
       
   882 	Pauses the on-going video capture. MCaptureVideoObserver::VideoBufferReady(MCameraBuffer2& aVideoBuffer, TInt aErrorCode) 
       
   883 	callback will not be received by the client until the video capture is resumed.
       
   884 	*/
       
   885 	virtual void PauseVideoCapture()=0;
       
   886 		
       
   887 	/**
       
   888 	Resumes the on-going video capture. MCaptureVideoObserver::VideoBufferReady(MCameraBuffer2& aVideoBuffer, TInt aErrorCode) 
       
   889 	callback will again be received by the client.
       
   890 
       
   891 	@leave  May leave with any error code.
       
   892 	*/
       
   893 	virtual void ResumeVideoCaptureL()=0;
       
   894 	
       
   895 	/**
       
   896 	Retrieves the fading effect state for video capture.
       
   897 
       
   898 	@param  aFadingEffectState
       
   899 			Retrieves the current fading effect state for video capture.
       
   900 
       
   901 	@leave  May leave with any error code.
       
   902 	
       
   903 	@internalTechnology
       
   904 	*/
       
   905 	virtual void GetFadingEffectStateL(CCamera::CCameraVideoCaptureControl::TFadingEffectState& aFadingEffectState) const=0;
       
   906 		
       
   907 	/**
       
   908 	Sets the fading effect state for video capture.
       
   909 
       
   910 	@param  aFadingEffectState
       
   911 			The desired fading effect state for video capture.
       
   912 			
       
   913 	@note   Triggers a KUidECamEventVideoCaptureControlFadingEffect event notification.
       
   914 	
       
   915 	@internalTechnology
       
   916 	*/	
       
   917 	virtual void SetFadingEffectState(CCamera::CCameraVideoCaptureControl::TFadingEffectState aFadingEffectState)=0;
       
   918 		
       
   919 	/**
       
   920 	Retrieves the current video capture state.
       
   921 	
       
   922 	@param aVideoCaptureState
       
   923 		   Retrieves the current video capture state.
       
   924 	
       
   925 	@leave  May leave with any error code.
       
   926 	*/
       
   927 	virtual void GetVideoCaptureStateL(CCamera::CCameraVideoCaptureControl::TVideoCaptureState& aVideoCaptureState) const=0;
       
   928 	
       
   929 	/**
       
   930 	Retrieves the various types of video capture supported. 
       
   931 	@param  aSupportedVideoCaptureTypes
       
   932 			Retrieves the supported video capture type. The TInt is retrieved as a bit field of supported 
       
   933 			TVideoCaptureType.
       
   934 			
       
   935 	@leave  May leave with any error code.
       
   936 	*/
       
   937 	virtual void GetVideoCaptureSupportInfoL(TInt& aSupportedVideoCaptureTypes) const=0;
       
   938 	
       
   939 	/**
       
   940 	Retrieves the current prepare video parameters.
       
   941 	
       
   942 	@param aPrepareVideoParameters
       
   943 		   Retrieves the current prepare video parameters.
       
   944 		   	
       
   945 	@leave  May leave with any error code.
       
   946 	*/
       
   947 	virtual void GetPrepareVideoParametersL(CCamera::CCameraVideoCaptureControl::TPrepareVideoParameters& aPrepareVideoParameters) const=0;
       
   948 	};
       
   949 	
       
   950 #endif // ECAMCAPTURECONTROLINTF_H