os/mm/imagingandcamerafws/camerafw/source/ecamcapturecontrol.cpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/mm/imagingandcamerafws/camerafw/source/ecamcapturecontrol.cpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,2182 @@
     1.4 +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +#include <ecam/ecamcapturecontrolintf.h>
    1.20 +#include <ecam/implementationfactoryintf.h>
    1.21 +#include <ecamimageprocessing.h>
    1.22 +#include <ecam/camerahistogram.h>
    1.23 +#include "ecamversion.h"
    1.24 +
    1.25 +#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
    1.26 +#include <ecamcapturecontrolconst.h>
    1.27 +#endif
    1.28 +const TInt KECamVideoCaptureBit0 = 0x00;
    1.29 +const TInt KECamClientVideoCaptureBit1 = 0x01;
    1.30 +const TInt KECamDirectVideoCaptureBit2 = 0x02;
    1.31 +
    1.32 +/**
    1.33 +Factory function for creating the CCameraPreImageCaptureControl object.
    1.34 +
    1.35 +@param aCamera 
    1.36 +	   a reference to a CCamera object providing the settings.
    1.37 +	   
    1.38 +@param aPreImageCaptureControlObserver
    1.39 +	   Reference to the pre image capture control observer.
    1.40 +
    1.41 +@return a pointer to a fully constructed CCameraPreImageCaptureControl object.
    1.42 +
    1.43 +@leave KErrNoMemory Out of memory Or any other system-wide error code.
    1.44 +
    1.45 +@leave KErrExtensionNotSupported When NewL/NewDuplicateL used instead of New2L/NewDuplicate2L.
    1.46 +*/
    1.47 +EXPORT_C CCamera::CCameraPreImageCaptureControl* CCamera::CCameraPreImageCaptureControl::NewL(CCamera& aCamera, MPreImageCaptureControlObserver& aPreImageCaptureControlObserver)
    1.48 +	{
    1.49 + 	if(aCamera.CameraVersion() == KCameraDefaultVersion)
    1.50 + 		{
    1.51 + 		User::Leave(KErrExtensionNotSupported);
    1.52 + 		}
    1.53 + 		
    1.54 +	CCamera::CCameraPreImageCaptureControl* self = new (ELeave)CCamera::CCameraPreImageCaptureControl(aCamera); 
    1.55 +	CleanupStack::PushL(self);
    1.56 +	self->ConstructL(aPreImageCaptureControlObserver);
    1.57 +	CleanupStack::Pop(self);
    1.58 +	
    1.59 +	return self; 
    1.60 +	}
    1.61 +	
    1.62 +/**	
    1.63 +CCameraPreImageCaptureControl Constructor.
    1.64 +
    1.65 +@param aOwner
    1.66 +       a reference to a CCamera object. 
    1.67 +*/
    1.68 +CCamera::CCameraPreImageCaptureControl::CCameraPreImageCaptureControl(CCamera& aOwner):iOwner(aOwner), iImpl(NULL)
    1.69 +	{
    1.70 +	}
    1.71 +
    1.72 +/**
    1.73 +CCameraPreImageCaptureControl second phase constructor. 
    1.74 +
    1.75 +Function used to initialise internal state of the object. Uses reference to the camera to retrieve 
    1.76 +PreImageCaptureControl interface pointer.
    1.77 +
    1.78 +@param aPreImageCaptureControlObserver
    1.79 +	   Reference to the pre image capture control observer.
    1.80 +
    1.81 +@leave KErrNoMemory Out of memory Or any other system-wide error code.
    1.82 +*/ 
    1.83 +void CCamera::CCameraPreImageCaptureControl::ConstructL(MPreImageCaptureControlObserver& aPreImageCaptureControlObserver) 
    1.84 +	{
    1.85 +	iImpl = static_cast<MCameraPreImageCaptureControl*>(iOwner.CustomInterface(KECamMCameraPreImageCaptureControlUid));
    1.86 +
    1.87 +	if (iImpl == NULL)
    1.88 +		{
    1.89 +		User::Leave(KErrNotSupported);
    1.90 +		}
    1.91 +		
    1.92 +	iImpl->SetPreImageCaptureControlObserver(aPreImageCaptureControlObserver);
    1.93 +	}
    1.94 +
    1.95 +/**
    1.96 +Destructor
    1.97 +*/	
    1.98 +EXPORT_C CCamera::CCameraPreImageCaptureControl::~CCameraPreImageCaptureControl()
    1.99 +	{
   1.100 +	if (iImpl != NULL)
   1.101 +		{
   1.102 +		iImpl->Release();	
   1.103 +		}
   1.104 +	}	
   1.105 +	
   1.106 +/**
   1.107 +Retrieves information regarding the direct snapshot feature support. Direct Snapshot, if supported, can be created
   1.108 +out of version2 direct viewfinder object only.
   1.109 +
   1.110 +@param  aDirectSnapshotSupportInfo
   1.111 +		This is a bit field providing supported direct snapshot of type TDirectSnapshotType
   1.112 +
   1.113 +@leave  May leave with any error code.
   1.114 +*/
   1.115 +EXPORT_C void CCamera::CCameraPreImageCaptureControl::GetDirectSnapshotSupportInfoL(TUint& aDirectSnapshotSupportInfo) const
   1.116 +	{
   1.117 +	iImpl->GetDirectSnapshotSupportInfoL(aDirectSnapshotSupportInfo);	
   1.118 +	}
   1.119 +	
   1.120 +/**
   1.121 +Retrieves the settings supported for embedded still captures. Possibilty exists that not all the settings supported for
   1.122 +normal still image captures are supported for embedded still captures as well.
   1.123 +
   1.124 +@param  aSupportedEmbeddedStillCaptureSettings
   1.125 +		Array of TUid which retrieves the supported embedded still captures. Empty list indicated that no settings are
   1.126 +		supported for embedded still captures.
   1.127 +		
   1.128 +@leave  May leave with any error code.
   1.129 +*/
   1.130 +EXPORT_C void CCamera::CCameraPreImageCaptureControl::GetSupportedEmbeddedStillCaptureSettingsL(RArray<TUid>& aSupportedEmbeddedStillCaptureSettings) const
   1.131 +	{
   1.132 +	iImpl->GetSupportedEmbeddedStillCaptureSettingsL(aSupportedEmbeddedStillCaptureSettings);	
   1.133 +	}
   1.134 +
   1.135 +/**
   1.136 +Retrieves information regarding the supported direct saving state. If used, still images are saved in files rather than 
   1.137 +providing clients the MCameraImageBuffer. Direct saving to file will continue even if the client application gets closed
   1.138 +for any reasons.
   1.139 +
   1.140 +@param  aSupportedDirectSavingType
   1.141 +		Retrieves the enum specifying supported TDirectSavingType.
   1.142 +		If EDirectSavingNotUsed, direct saving not supported. Images will be received in buffer MCameraImageBuffer.
   1.143 +		
   1.144 +		If EDirectSavingHighResolutionFileOnly, direct saving to file is supported. But no cut down version of the image 
   1.145 +		will be saved to file. Callback used is MCaptureImageObserver::ImageDirectSavingCompleted().
   1.146 +		
   1.147 +		If EDirectSavingWithLowerResolutionFile, Direct saving to file is supported. Also, a cut down version of the image 
   1.148 +		will be saved to another specified file. Callbacks used are MCaptureImageObserver::ImageDirectSavingCompleted() for 
   1.149 +		actual image and MCaptureImageObserver::CutDownImageDirectSavingCompleted() for lower resolution image.
   1.150 +
   1.151 +@leave  May leave with any error code.	
   1.152 +*/
   1.153 +EXPORT_C void CCamera::CCameraPreImageCaptureControl::GetSupportedDirectSavingTypeL(CCamera::CCameraPreImageCaptureControl
   1.154 +															::TDirectSavingType& aSupportedDirectSavingType) const
   1.155 +	{
   1.156 +	iImpl->GetSupportedDirectSavingTypeL(aSupportedDirectSavingType);	
   1.157 +	}
   1.158 +
   1.159 +/**
   1.160 +Provides the base name for file used to save images. If there are sequential images, files will be created by 
   1.161 +implementation with names appearing as base name and appended by increasing integers which would start from 
   1.162 +aStartingSequenceNumber. This is used for the original image only, but not for the cut down version of the original
   1.163 +image.
   1.164 +
   1.165 +@param  aFilename
   1.166 +		A const TDesC8&: Base name for files which ECam implementation needs to create in order to collect every sequential
   1.167 +		image.
   1.168 +		
   1.169 +@param  aStartingSequenceNumber
   1.170 +		The starting sequence number which will be appended to the base name 'aFilename'. The sequence number will keep
   1.171 +		on increasing for every individual still image capture.
   1.172 +		
   1.173 +@leave  May leave with any error code.
   1.174 +
   1.175 +@note   It is upto the implementation how many digits it uses for sequence number. Accordingly, padding will be done with 
   1.176 +		zeroes.
   1.177 +*/
   1.178 +EXPORT_C void CCamera::CCameraPreImageCaptureControl::SetSequentialImageFilenameL(const TDesC8& aFilename, TInt aStartingSequenceNumber)
   1.179 +	{
   1.180 +	iImpl->SetSequentialImageFilenameL(aFilename, aStartingSequenceNumber);
   1.181 +	}
   1.182 +	
   1.183 +/**
   1.184 +Provides the base name for file used to save cut down version of the original images. If there are sequential images, 
   1.185 +files will be created by implementation with names appearing as base name and appended by increasing integers which would 
   1.186 +start from aStartingSequenceNumber. This is used for the cut down version of the original image.
   1.187 +
   1.188 +@param  aLowerResolutionFilename
   1.189 +		A const TDesC8&: Base name for files which ECam implementation needs to create in order to collect the cut down version
   1.190 +		of every sequential image.
   1.191 +		
   1.192 +@param  aStartingSequenceNumber
   1.193 +		The starting sequence number which will be appended to the base name 'aFilename'. The sequence number will keep
   1.194 +		on increasing for every individual still image capture.
   1.195 +		
   1.196 +@leave  May leave with any error code.
   1.197 +
   1.198 +@note   It is upto the implementation how many digits it uses for sequence number. Accordingly, padding will be done with 
   1.199 +		zeroes.
   1.200 +*/
   1.201 +EXPORT_C void CCamera::CCameraPreImageCaptureControl::SetLowerResolutionSequentialImageFilenameL(const TDesC8& aLowerResolutionFilename, 
   1.202 +																							TInt aStartingSequenceNumber)
   1.203 +	{
   1.204 +	iImpl->SetLowerResolutionSequentialImageFilenameL(aLowerResolutionFilename, aStartingSequenceNumber);
   1.205 +	}
   1.206 +
   1.207 +/**
   1.208 +Retrieves the type of direct saving currently used. This will be represented as a direct saving state as given by 
   1.209 +TDirectSavingType. 
   1.210 +
   1.211 +Whether or not the direct saving option is used, client will receive the MCaptureImageObserver::ImageCaptureComplete() 
   1.212 +callback to mark the completion of the image capture operation.
   1.213 +
   1.214 +@param  aDirectSavingType
   1.215 +		Current type of the direct saving. 
   1.216 +		
   1.217 +		If EDirectSavingNotUsed, direct saving is not used. Images will be received in buffer MCameraImageBuffer through
   1.218 +		callback MCaptureImageObserver::ImageBufferReady().
   1.219 +		
   1.220 +		If EDirectSavingHighResolutionFileOnly, direct saving to file option is currently used. But no cut down version of
   1.221 +		the image will be saved to file. Callback used is MCaptureImageObserver::ImageDirectSavingCompleted().
   1.222 +		
   1.223 +		If EDirectSavingWithLowerResolutionFile, apart from direct saving to file option for the actual image, a cut down 
   1.224 +		version of the image will be saved to another specified file. Callbacks used are MCaptureImageObserver::
   1.225 +		ImageDirectSavingCompleted() for actual image and MCaptureImageObserver::CutDownImageDirectSavingCompleted() for 
   1.226 +		lower resolution image.
   1.227 +		
   1.228 +@leave  May leave with any error code.
   1.229 +
   1.230 +@note   Direct saving to file will continue even if the client application gets closed for any reasons.
   1.231 +*/
   1.232 +EXPORT_C void CCamera::CCameraPreImageCaptureControl::GetDirectSavingTypeL(CCamera::CCameraPreImageCaptureControl::
   1.233 +																			TDirectSavingType& aDirectSavingType) const
   1.234 +	{
   1.235 +	iImpl->GetDirectSavingTypeL(aDirectSavingType);	
   1.236 +	}			
   1.237 +
   1.238 +/**
   1.239 +Instructs the ECam implementation to use the desired type of direct saving option as specifed by its state.
   1.240 +
   1.241 +Whether or not the direct saving option is used, client will receive the MCaptureImageObserver::ImageCaptureComplete() 
   1.242 +callback to mark the completion of the image capture operation.
   1.243 +
   1.244 +@param  aDirectSavingType
   1.245 +		The desired type of the direct saving. 
   1.246 +		
   1.247 +		If EDirectSavingNotUsed, direct saving will not be used. Images will be received in buffer MCameraImageBuffer 
   1.248 +		through	callback MCaptureImageObserver::ImageBufferReady().
   1.249 +		
   1.250 +		If EDirectSavingHighResolutionFileOnly, direct saving to file option will be used. But no cut down version of
   1.251 +		the image will be saved to file. Callback to be used is MCaptureImageObserver::ImageDirectSavingCompleted().
   1.252 +		
   1.253 +		If EDirectSavingWithLowerResolutionFile, apart from direct saving to file option for the actual image, a cut down 
   1.254 +		version of the image will be saved to another specified file. Callbacks to be used are MCaptureImageObserver::
   1.255 +		ImageDirectSavingCompleted() for actual image and MCaptureImageObserver::CutDownImageDirectSavingCompleted() for 
   1.256 +		lower resolution image.
   1.257 +		
   1.258 +@leave  May leave with any error code.
   1.259 +
   1.260 +@note   Clients need to provide the filename before capturing still images under direct saving option. Callback 
   1.261 +		MCaptureImageObserver::ImageDirectSavingCompleted() may provide error KErrNotReady if filenames are not 
   1.262 +		provided before images are captured for direct saving. Similarly, if cut down version of image is also to be saved
   1.263 +		to file, MCaptureImageObserver::CutDownImageDirectSavingCompleted() may provide error KErrNotReady if filenames are 
   1.264 +		not provided before hand. 
   1.265 +				
   1.266 +@note   Direct saving to file will continue even if the client application gets closed for any reasons.
   1.267 +*/
   1.268 +EXPORT_C void CCamera::CCameraPreImageCaptureControl::SetDirectSavingTypeL(CCamera::CCameraPreImageCaptureControl::
   1.269 +															TDirectSavingType aDirectSavingType)
   1.270 +	{
   1.271 +	iImpl->SetDirectSavingTypeL(aDirectSavingType);
   1.272 +	}
   1.273 +
   1.274 +/**
   1.275 +Retrieves whether the camera device is capable of providing capture event notification to the client. Client may take
   1.276 +the responsibility of playing the capture sound after receiving the notification. 
   1.277 +
   1.278 +@param  aSupportedDriveModes
   1.279 +		A reference to bit-field of TUint which indicates the drive modes in which the capture event notification is
   1.280 +		supported. If aSupportedDriveModes =0, capture event notification is not supported.
   1.281 +		
   1.282 +@note   If capture event notification is supported, ECam implementation will use KUidECamEventImageCaptureEvent to notify 
   1.283 +		clients that the image has been exposed to the camera sensor. Clients may play capture sound if they desire to do so.
   1.284 +
   1.285 +@leave  May leave with any error code.	
   1.286 +
   1.287 +@see    CCamera::CCameraAdvancedSettings::TDriveMode
   1.288 +*/
   1.289 +EXPORT_C void CCamera::CCameraPreImageCaptureControl::GetCaptureEventSupportInfoL(TUint& aSupportedDriveModes) const
   1.290 +	{
   1.291 +	iImpl->GetCaptureEventSupportInfoL(aSupportedDriveModes);	
   1.292 +	}
   1.293 +
   1.294 +/**
   1.295 +Retrieves the supported image formats for a given resolution.
   1.296 +
   1.297 +@param  aImageFormatsSupported
   1.298 +		A bit field which retrieves the supported image formats for a given resolution.
   1.299 +		Formats have been defined as CCamera::TFormat
   1.300 +		
   1.301 +@param  aSize
   1.302 +		The resolution (or size) for which the total number of supported image formats have to be retrieved.
   1.303 +
   1.304 +@leave  May leave with any error code.
   1.305 +*/
   1.306 +EXPORT_C void CCamera::CCameraPreImageCaptureControl::GetImageFormatsSupportedL(TUint& aImageFormatsSupported, const TSize& aSize) const
   1.307 +	{
   1.308 +	iImpl->GetImageFormatsSupportedL(aImageFormatsSupported, aSize);		
   1.309 +	}
   1.310 +
   1.311 +/**
   1.312 +Retrieves the supported pixel aspect ratio for a given resolution in case of still image.
   1.313 +
   1.314 +@param  aPixelAspectsSupported
   1.315 +		A bit field which retrieves the supported pixel aspect ratio for a given resolution.
   1.316 +		Pixel aspect ratio have been defined as CCamera::CCameraAdvancedSettings::TPixelAspectRatio
   1.317 +		
   1.318 +@param  aImageFormat
   1.319 +		The image format for which the supported pixel aspect ratio have to be retrieved.
   1.320 +
   1.321 +@param  aSize
   1.322 +		The resolution (or size) for which the supported pixel aspect ratio have to be retrieved.
   1.323 +
   1.324 +@leave  May leave with any error code.
   1.325 +*/
   1.326 +EXPORT_C void CCamera::CCameraPreImageCaptureControl::GetPixelAspectsSupportedL(TUint& aPixelAspectsSupported, CCamera::TFormat aImageFormat, const TSize& aSize) const
   1.327 +	{
   1.328 +	iImpl->GetPixelAspectsSupportedL(aPixelAspectsSupported, aImageFormat, aSize);		
   1.329 +	}
   1.330 +
   1.331 +/**
   1.332 +Performs setup and allocation of memory for image capture operation. Implementation creates a new CCameraImageCapture*
   1.333 +object which reflects the prepare image parameters passed by the client. The callback MPreImageCaptureControlObserver::
   1.334 +PrepareImageComplete() passes the ownership of the CCameraImageCapture* object to the client.
   1.335 +
   1.336 +This needs to be called every time client wishes to change prepare image parameters or if the client wishes to create
   1.337 +a new CCameraImageCapture* object. 
   1.338 +
   1.339 +@param  aPrepareImageParameters 
   1.340 +        The desired image parameters to be used for capturing still images using the CCameraImageCapture instance
   1.341 +        which would be passed by the implementation.
   1.342 +        
   1.343 +@param  aCaptureImageObserver
   1.344 +		The Capture image observer which is needed by the implementation in order to pass it to the CCameraImageCapture 
   1.345 +		while creating it.
   1.346 +
   1.347 +@note 	Next PrepareImageCapture can be called only after receiving the notification KUidECamEventReadyForNextPrepare.
   1.348 +
   1.349 +@note	If drive mode is EDriveModeTimeNudgeCapture, when the client initiates image capture the total amount of images
   1.350 +		requested by the client	(specified in TDriveModeDependentAttributes) will be returned to the client
   1.351 +		(via MCaptureImageObserver::ImageBufferReady())	or saved to file. No other instance of CCameraImageCapture can be
   1.352 +		created whilst using this drive mode until the first instance is destroyed.
   1.353 +
   1.354 +@see 	CCamera::PrepareImageCaptureL(TFormat aImageFormat,TInt aSizeIndex)
   1.355 +*/
   1.356 +EXPORT_C void CCamera::CCameraPreImageCaptureControl::PrepareImageCapture(const CCamera::CCameraPreImageCaptureControl::
   1.357 +			TPrepareImageParameters& aPrepareImageParameters, MCaptureImageObserver& aCaptureImageObserver)
   1.358 +	{
   1.359 +	// MCameraPreImageCaptureControl concrete implementation will call CCameraImageCapture::CreateL(CCamera& aCamera, 
   1.360 +	// MCaptureImageObserver& aCaptureImageObserver) method and pass the CCameraImageCapture* to the client through 
   1.361 +	// the MPreImageCaptureControlObserver::PrepareImageComplete() callback.
   1.362 +	iImpl->PrepareImageCapture(aPrepareImageParameters, aCaptureImageObserver);	
   1.363 +	}
   1.364 +
   1.365 +/**
   1.366 +Informs whether or not the setting of maximum memory size when encoding to the current format is supported.
   1.367 +
   1.368 +@param  aIsImageMaxMemorySizeSettingSupported
   1.369 +		ETrue indicates that setting of maximum memory size is supported.
   1.370 +		EFalse indicates that setting of maximum memory size is not supported.
   1.371 +
   1.372 +@leave  May leave with any error code.
   1.373 +*/
   1.374 +EXPORT_C void CCamera::CCameraPreImageCaptureControl::GetImageMaxMemorySizeSettingSupportInfoL(TBool& aIsImageMaxMemorySizeSettingSupported) const
   1.375 +	{
   1.376 +	iImpl->GetImageMaxMemorySizeSettingSupportInfoL(aIsImageMaxMemorySizeSettingSupported);	
   1.377 +	}
   1.378 +
   1.379 +/**
   1.380 +Get the maximum memory size in kilo bytes when encoding to the current format.
   1.381 +
   1.382 +@param  aMemorySize
   1.383 +		Retrieves the maximum memory size in kilo bytes.
   1.384 +
   1.385 +@note   In case of JPEG, the maximum memory size will take preference over JPEG quality if the maximum memory size is 
   1.386 +		not sufficient to achieve the desired quality. Refer CCamera::JpegQuality()
   1.387 +		
   1.388 +@leave  May leave with any error code.
   1.389 +*/
   1.390 +EXPORT_C void CCamera::CCameraPreImageCaptureControl::GetImageMaxMemorySizeL(TUint& aMemorySize) const
   1.391 +	{
   1.392 +	iImpl->GetImageMaxMemorySizeL(aMemorySize);
   1.393 +	}
   1.394 +
   1.395 +/**
   1.396 +Retrieves the supported processing options.
   1.397 +
   1.398 +@param  aEcamProcessingOptionsSupported
   1.399 +		Bitfield containing the available processing options.
   1.400 +
   1.401 +@leave May leave with any error code.
   1.402 +*/
   1.403 +EXPORT_C void CCamera::CCameraPreImageCaptureControl::GetSupportedProcessingOptionsL(TUint& aECamProcessingOptionsSupported) const
   1.404 +	{
   1.405 +	iImpl->GetSupportedProcessingOptionsL(aECamProcessingOptionsSupported);
   1.406 +	}
   1.407 +
   1.408 +/**
   1.409 +Constructor for the TPrepareImageParameters class.
   1.410 +Sets the size and version of this class.
   1.411 +*/
   1.412 +EXPORT_C CCamera::CCameraPreImageCaptureControl::TPrepareImageParameters::TPrepareImageParameters()
   1.413 +	{
   1.414 +	iSize = sizeof(CCamera::CCameraPreImageCaptureControl::TPrepareImageParameters);
   1.415 +	iVersion = KECamPrepareImageParametersCurrentVersion;
   1.416 +	
   1.417 +	iImageMaxMemorySize = KECamNoSpecificMaxMemorySize;
   1.418 +	iImageProcessingOptions = 0;
   1.419 +	}
   1.420 +
   1.421 +/**	
   1.422 +Returns the size of the class. Used for extensibility by deriving from this base class and adding new member variables.
   1.423 +Intended to be used for implementation of methods where this class reference is passed as function arguments. 
   1.424 +Implementation of such methods can find out the whether the actual class passed is base or the derived one. So, if a new application 
   1.425 +is made to run on an old implementation, an error may occur in such cases after the old implementation detects this by getting 
   1.426 +the size information of the T class passed. Also, if old application is made to run on a new implementation, this could be 
   1.427 +properly handled if the derived class variables handling is done in a proper 'if-else' statement.
   1.428 +
   1.429 +@return The size of this class.
   1.430 +
   1.431 +@note The size will be modified when the T-class gets updated.
   1.432 +*/
   1.433 +EXPORT_C TUint CCamera::CCameraPreImageCaptureControl::TPrepareImageParameters::Size() const
   1.434 +	{
   1.435 +	return iSize;
   1.436 +	}
   1.437 +	
   1.438 +/**	
   1.439 +Returns the version of the class. Used for extensibility specially when the class members are not added but the Reserved 
   1.440 +members get used at a later stage.
   1.441 +
   1.442 +@return The version of this class.
   1.443 +
   1.444 +@note The version will be modified when the T-class gets updated.
   1.445 +*/
   1.446 +EXPORT_C TUint CCamera::CCameraPreImageCaptureControl::TPrepareImageParameters::Version() const
   1.447 +	{
   1.448 +	return iVersion;
   1.449 +	}
   1.450 +
   1.451 +/**
   1.452 +Sets the image processing options to be used during image capture.
   1.453 +
   1.454 +@param  aImageProcessingOptions
   1.455 +	     Bitfield of image processing options to be used during image capture.
   1.456 +*/
   1.457 +EXPORT_C void CCamera::CCameraPreImageCaptureControl::TPrepareImageParameters::SetImageProcessingOptions(TUint aImageProcessingOptions)
   1.458 +	{
   1.459 +	iImageProcessingOptions = aImageProcessingOptions;
   1.460 +	}
   1.461 +
   1.462 +/**
   1.463 +Gets the current image processing options to be used during image capture.
   1.464 +
   1.465 +@param  aImageProcessingOptions
   1.466 +	     Bitfield of current image processing options to be used during image capture.
   1.467 +*/
   1.468 +EXPORT_C void CCamera::CCameraPreImageCaptureControl::TPrepareImageParameters::GetImageProcessingOptions(TUint& aImageProcessingOptions) const
   1.469 +	{
   1.470 +	aImageProcessingOptions = iImageProcessingOptions;
   1.471 +	}
   1.472 +
   1.473 +/**
   1.474 +Constructor for the TDriveModeDependentAttributes class.
   1.475 +Sets the size and version of this class.
   1.476 +*/
   1.477 +EXPORT_C CCamera::CCameraPreImageCaptureControl::TDriveModeDependentAttributes::TDriveModeDependentAttributes()
   1.478 +	{
   1.479 +	iSize = sizeof(CCamera::CCameraPreImageCaptureControl::TDriveModeDependentAttributes);
   1.480 +	iVersion = KECamDriveModeDependentAttributesCurrentVersion;
   1.481 +	iParam1 = -1;
   1.482 +	iParam2 = -1;
   1.483 +	}
   1.484 +
   1.485 +/**	
   1.486 +Returns the size of the class. Used for extensibility by deriving from this base class and adding new member variables.
   1.487 +Intended to be used for implementation of methods where this class reference is passed as function arguments. 
   1.488 +Implementation of such methods can find out the whether the actual class passed is base or the derived one. So, if a new application 
   1.489 +is made to run on an old implementation, an error may occur in such cases after the old implementation detects this by getting 
   1.490 +the size information of the T class passed. Also, if old application is made to run on a new implementation, this could be 
   1.491 +properly handled if the derived class variables handling is done in a proper 'if-else' statement.
   1.492 +
   1.493 +@return The size of this class.
   1.494 +
   1.495 +@note The size will be modified when the T-class gets updated.
   1.496 +*/
   1.497 +EXPORT_C TUint CCamera::CCameraPreImageCaptureControl::TDriveModeDependentAttributes::Size() const
   1.498 +	{
   1.499 +	return iSize;
   1.500 +	}
   1.501 +
   1.502 +/**	
   1.503 +Returns the version of the class. Used for extensibility specially when the class members are not added but the Reserved 
   1.504 +members get used at a later stage.
   1.505 +
   1.506 +@return The version of this class.
   1.507 +
   1.508 +@note The version will be modified when the T-class gets updated.
   1.509 +*/
   1.510 +EXPORT_C TUint CCamera::CCameraPreImageCaptureControl::TDriveModeDependentAttributes::Version() const
   1.511 +	{
   1.512 +	return iVersion;
   1.513 +	}
   1.514 +
   1.515 +/**
   1.516 +Constructor for the TImageBufferInfo class.
   1.517 +Sets the size and version of this class.
   1.518 +*/
   1.519 +EXPORT_C CCamera::CCameraPreImageCaptureControl::TImageBufferInfo::TImageBufferInfo()
   1.520 +	{
   1.521 +	iSize = sizeof(CCamera::CCameraPreImageCaptureControl::TImageBufferInfo);
   1.522 +	iVersion = KECamImageBufferInfoCurrentVersion;
   1.523 +	}
   1.524 +
   1.525 +/**	
   1.526 +Returns the size of the class. Used for extensibility by deriving from this base class and adding new member variables.
   1.527 +Intended to be used for implementation of methods where this class reference is passed as function arguments. 
   1.528 +Implementation of such methods can find out the whether the actual class passed is base or the derived one. So, if a new application 
   1.529 +is made to run on an old implementation, an error may occur in such cases after the old implementation detects this by getting 
   1.530 +the size information of the T class passed. Also, if old application is made to run on a new implementation, this could be 
   1.531 +properly handled if the derived class variables handling is done in a proper 'if-else' statement.
   1.532 +
   1.533 +@return The size of this class.
   1.534 +
   1.535 +@note The size will be modified when the T-class gets updated.
   1.536 +*/
   1.537 +EXPORT_C TUint CCamera::CCameraPreImageCaptureControl::TImageBufferInfo::Size() const
   1.538 +	{
   1.539 +	return iSize;
   1.540 +	}
   1.541 +	
   1.542 +/**	
   1.543 +Returns the version of the class. Used for extensibility specially when the class members are not added but the Reserved 
   1.544 +members get used at a later stage.
   1.545 +
   1.546 +@return The version of this class.
   1.547 +
   1.548 +@note The version will be modified when the T-class gets updated.
   1.549 +*/
   1.550 +EXPORT_C TUint CCamera::CCameraPreImageCaptureControl::TImageBufferInfo::Version() const
   1.551 +	{
   1.552 +	return iVersion;
   1.553 +	}
   1.554 +	
   1.555 +/** 
   1.556 +Indicates whether the streamed image scheme or sub-frame scheme is being used.
   1.557 +		
   1.558 +@return Whether the sub-frame scheme is being used or not.
   1.559 +
   1.560 +@see CCamera::CCameraPreImageCaptureControl::TImageBufferInfo::iIsSubFrameUsed
   1.561 +*/
   1.562 +EXPORT_C TBool CCamera::CCameraPreImageCaptureControl::TImageBufferInfo::IsSubFrameUsed() const
   1.563 +	{
   1.564 +	if (iIsSubFrameUsed)
   1.565 +		{
   1.566 +		return ETrue;
   1.567 +		}
   1.568 +	else
   1.569 +		{
   1.570 +		return EFalse;
   1.571 +		}
   1.572 +	}
   1.573 +		
   1.574 +/** 
   1.575 +Sets the state to inform whether the streamed image scheme or sub-frame scheme is being used.
   1.576 +
   1.577 +@param  aIsSubFrameUsed
   1.578 +		ETrue implies sub-frame scheme is being used.
   1.579 +		EFalse implies sub-frame scheme is not being used. 
   1.580 +		
   1.581 +@note   The set method will be used by the ECAM implementation in order to provide necessary information to the
   1.582 +		clients when they receive the image buffers.
   1.583 +		
   1.584 +@see CCamera::CCameraPreImageCaptureControl::TImageBufferInfo::iIsSubFrameUsed
   1.585 +*/
   1.586 +EXPORT_C void CCamera::CCameraPreImageCaptureControl::TImageBufferInfo::SetSubFrameState(TBool aIsSubFrameUsed)
   1.587 +	{
   1.588 +	iIsSubFrameUsed = static_cast<TUint>(aIsSubFrameUsed);
   1.589 +	}
   1.590 +		
   1.591 +/**
   1.592 +Indicates whether the parallel buffering is being used by the implementation in order to speed up the streamed 
   1.593 +image operation, as a whole.
   1.594 +
   1.595 +@return Whether the parallel buffer option is being used by the implementation under the sub-frame scheme.
   1.596 +
   1.597 +@note   Parallel buffering indicates that implementation is using more than one buffer to handle the various 
   1.598 +		sub-frames; hence speeding up the operation.
   1.599 +		
   1.600 +@see CCamera::CCameraPreImageCaptureControl::TImageBufferInfo::iIsParallelBufferUsed
   1.601 +*/
   1.602 +EXPORT_C TBool CCamera::CCameraPreImageCaptureControl::TImageBufferInfo::IsParallelStreamedBufferUsed() const
   1.603 +	{
   1.604 +	if (iIsParallelBufferUsed)
   1.605 +		{
   1.606 +		return ETrue;
   1.607 +		}
   1.608 +	else
   1.609 +		{
   1.610 +		return EFalse;
   1.611 +		}
   1.612 +	}
   1.613 +		
   1.614 +/** 
   1.615 +Sets the state to inform whether the parallel buffering is being used by the implementation in order to speed up 
   1.616 +the streamed image operation, as a whole.
   1.617 +
   1.618 +@param  aParallelStreamedBufferUsed
   1.619 +		ETrue implies sub-frame scheme is being used.
   1.620 +		EFalse implies sub-frame scheme is not being used. 
   1.621 +		
   1.622 +@note   The set method will be used by the ECAM implementation in order to provide necessary information to the
   1.623 +		clients when they receive the image buffers.
   1.624 +		
   1.625 +@see CCamera::CCameraPreImageCaptureControl::TImageBufferInfo::iIsParallelBufferUsed
   1.626 +*/
   1.627 +EXPORT_C void CCamera::CCameraPreImageCaptureControl::TImageBufferInfo::SetParallelStreamedBufferState(TBool aParallelStreamedBufferUsed)
   1.628 +	{
   1.629 +	iIsParallelBufferUsed = static_cast<TUint>(aParallelStreamedBufferUsed);
   1.630 +	}
   1.631 +		
   1.632 +/**
   1.633 +Sequence number of the sub-frame.
   1.634 +
   1.635 +@return Sequence number of the sub-frame.
   1.636 +
   1.637 +@see CCamera::CCameraPreImageCaptureControl::TImageBufferInfo::iSubFrameSequenceNumber
   1.638 +*/
   1.639 +EXPORT_C TUint CCamera::CCameraPreImageCaptureControl::TImageBufferInfo::SubFrameSequenceNumber() const
   1.640 +	{
   1.641 +	return iSubFrameSequenceNumber;
   1.642 +	}
   1.643 +		
   1.644 +/**
   1.645 +Sets the sequence number of the sub-frame.
   1.646 +
   1.647 +@param aSubFrameSequenceNumber
   1.648 +	   The sequence number of the sub-frame. 
   1.649 +	   
   1.650 +@return  The error code
   1.651 +
   1.652 +@note 	9 bits used for sequence no. assuming that KECamMaxTotalSubFrames sub-frames would be used at max. Sequence number for sub-frames 
   1.653 +        lies between 0 to KECamMaxTotalSubFrames-1 inclusive.
   1.654 +	   
   1.655 +@note   The set method will be used by the ECAM implementation in order to provide necessary information to the
   1.656 +		clients when they receive the image buffers.
   1.657 +
   1.658 +@see CCamera::CCameraPreImageCaptureControl::TImageBufferInfo::iSubFrameSequenceNumber
   1.659 +*/
   1.660 +EXPORT_C TInt CCamera::CCameraPreImageCaptureControl::TImageBufferInfo::SetSubFrameSequenceNumber(TUint aSubFrameSequenceNumber)
   1.661 +	{
   1.662 +	if (aSubFrameSequenceNumber > (KECamMaxTotalSubFrames-1) )
   1.663 +		{
   1.664 +		return KErrOverflow;	
   1.665 +		}
   1.666 +	else 
   1.667 +		{
   1.668 +		iSubFrameSequenceNumber = aSubFrameSequenceNumber;
   1.669 +		return KErrNone;
   1.670 +		}
   1.671 +	}
   1.672 +		
   1.673 +/**
   1.674 +Total number of sub-frames needed in order to properly reconstruct the actual image.
   1.675 +
   1.676 +@return Total number of sub-frames which can reconstruct the actual image.
   1.677 +
   1.678 +@note 	It does not give the number of outstanding sub-frames needed to reconstruct the image. 
   1.679 +		This value will be same for every sub-frames needed to re-construct the actual image. 
   1.680 +		Maximum no. of total sub-frames is KECamMaxTotalSubFrames.
   1.681 +
   1.682 +@see CCamera::CCameraPreImageCaptureControl::TImageBufferInfo::iTotalSubFrames
   1.683 +*/
   1.684 +EXPORT_C TUint CCamera::CCameraPreImageCaptureControl::TImageBufferInfo::TotalSubFrames() const
   1.685 +	{
   1.686 +	return iTotalSubFrames;
   1.687 +	}
   1.688 +		
   1.689 +/**
   1.690 +Sets the total number of sub-frames needed in order to properly reconstruct the actual image.
   1.691 +
   1.692 +@param  aTotalSubFrames
   1.693 +		Total number of sub-frames which can reconstruct the actual image.
   1.694 +		
   1.695 +@return error code
   1.696 +
   1.697 +@note 	It does not give the number of outstanding sub-frames needed to reconstruct the image. 
   1.698 +		This value will be same for every sub-frames needed to re-construct the actual image. 
   1.699 +		Maximum no. of total sub-frames is KECamMaxTotalSubFrames.
   1.700 +		
   1.701 +@note   The set method will be used by the ECAM implementation in order to provide necessary information to the
   1.702 +		clients when they receive the image buffers.
   1.703 +		
   1.704 +@see CCamera::CCameraPreImageCaptureControl::TImageBufferInfo::iTotalSubFrames
   1.705 +*/
   1.706 +EXPORT_C TInt CCamera::CCameraPreImageCaptureControl::TImageBufferInfo::SetTotalSubFrames(TUint aTotalSubFrames)
   1.707 +	{
   1.708 +	if (aTotalSubFrames > KECamMaxTotalSubFrames)
   1.709 +		{
   1.710 +		return KErrOverflow;	
   1.711 +		}
   1.712 +	else 
   1.713 +		{
   1.714 +		iTotalSubFrames = aTotalSubFrames;
   1.715 +		return KErrNone;
   1.716 +		}
   1.717 +	}
   1.718 +
   1.719 +/**
   1.720 +Retrieves the maximum number of spots present from where the camera hardware collects the focussing information.
   1.721 +
   1.722 +@param  aFocusMode
   1.723 +		The focus mode for which the number of spots have to be retrieved.
   1.724 +
   1.725 +@param  aMaximumSpots
   1.726 +		Retrieves the maximum number of spots for the given focus mode.
   1.727 +		
   1.728 +@leave  May leave with any error code.
   1.729 +		
   1.730 +@note   The maximum number of spots is supposed to be less than or equal to KMaxNumberOfFocusSpots.
   1.731 +
   1.732 +@see    CCameraViewFinder::GetSpotsPositionL
   1.733 +*/
   1.734 +void CCamera::CCameraPreImageCaptureControl::GetMaximumSpotsL(CCamera::CCameraAdvancedSettings::TFocusMode /*aFocusMode*/, TInt& /*aMaximumSpots*/) const
   1.735 +	{
   1.736 +	User::Leave(KErrNotSupported);
   1.737 +	}
   1.738 +
   1.739 +/**
   1.740 +Retrieves the supported spot combinations for the given focus mode.
   1.741 +
   1.742 +@param  aFocusMode
   1.743 +		The focus mode for which the supported spot combinations have to be retrieved.
   1.744 +
   1.745 +@param  aPossibleSpotCombinations
   1.746 +		Each member of this array is of type TUint and is a bit field where every bit represents presence or absence of
   1.747 +		a particular spot.
   1.748 +		
   1.749 +@leave  May leave with any error code.
   1.750 +	
   1.751 +@note   Since maximum number of spots can go up to KMaxNumberOfFocusSpots, it can be easily known which spots are present
   1.752 +		in a particular array entry (every array entry is a bit field and every bit represents presence or absence of a 
   1.753 +		particular spot). For example,if KMaxNumberOfFocusSpots is 32 and if a particular array entry is 0x07001000. This 
   1.754 +		means that spot number 13,25,26 and 27 are being represented. 
   1.755 +		
   1.756 +@see    CCameraViewFinder::GetSpotsPositionL
   1.757 +*/
   1.758 +void CCamera::CCameraPreImageCaptureControl::GetSupportedSpotsCombinationL(CCamera::CCameraAdvancedSettings::TFocusMode /*aFocusMode*/, RArray<TUint>& /*aPossibleSpotCombinations*/) const
   1.759 +	{
   1.760 +	User::Leave(KErrNotSupported);	
   1.761 +	}
   1.762 +
   1.763 +/**
   1.764 +Retrieves the focussing spot combination which is used to provide focussing feedback in a particular focussing mode.
   1.765 +
   1.766 +@param  aFocusMode
   1.767 +		The focussing mode in which the spot combination has to be used for retrieving feedback.
   1.768 +			
   1.769 +@param  aSpotsCombination
   1.770 +		The retrieved spot combination. It is a bitfield marking the presence or absence of spots.
   1.771 +		This is dependent on the focusssing mode.
   1.772 +	
   1.773 +@leave  May leave with any error code. 
   1.774 +
   1.775 +@see    CCameraViewFinder::GetSpotsPositionL
   1.776 +*/
   1.777 +void CCamera::CCameraPreImageCaptureControl::GetSpotsCombinationL(CCamera::CCameraAdvancedSettings::TFocusMode /*aFocusMode*/, TUint& /*aSpotsCombination*/) const
   1.778 +	{
   1.779 +	User::Leave(KErrNotSupported);
   1.780 +	}
   1.781 +
   1.782 +/**
   1.783 +Sets a particular spot combination which can be used to provide focussing feedback in a particular focussing mode.
   1.784 +
   1.785 +@param  aFocusMode
   1.786 +		The focussing mode in which the spot combination has to be used for retrieving feedback.
   1.787 +		
   1.788 +@param  aSpotsCombination
   1.789 +		The spot combination to be set. It is a bitfield marking the presence or absence of spots.
   1.790 +		
   1.791 +@note   Event KUidECamEvent2ImageCaptureControlSpotCombination is used to notify the requesting client about setting of a particular
   1.792 +		spot combination.
   1.793 +
   1.794 +@note   Event KUidECamEvent2ImageCaptureControlFocussingInformation is used to provide the focussing feedback, whenever applicable.
   1.795 +
   1.796 +@see    CCameraViewFinder::GetSpotsPositionL
   1.797 +*/
   1.798 +void CCamera::CCameraPreImageCaptureControl::SetSpotsCombination(CCamera::CCameraAdvancedSettings::TFocusMode /*aFocusMode*/, TUint /*aSpotsCombination*/)
   1.799 +	{
   1.800 +	return;	
   1.801 +	}
   1.802 +
   1.803 +/**
   1.804 +Retrieves whether the streamed image is supported or not. Sub-frames are used if streamed image output is used.
   1.805 +
   1.806 +@param  aIsStreamedImageSupported
   1.807 +		ETrue indicates that streamed image is supported.
   1.808 +		EFalse indicates that streamed image is not supported.
   1.809 +
   1.810 +@leave  May leave with any error code.	
   1.811 +*/
   1.812 +void CCamera::CCameraPreImageCaptureControl::GetStreamedImageSupportInfoL(TBool& /*aIsStreamedImageSupported*/) const
   1.813 +	{
   1.814 +	User::Leave(KErrNotSupported);	
   1.815 +	}
   1.816 +
   1.817 +/**
   1.818 +Enables the streamed image output and hence the use of sub-frames to collect image data. MCameraImageBuffer will be 
   1.819 +used in place of MCameraBuffer in order to provide sub-frames details. Every MCaptureImageObserver::ImageBufferReady() 
   1.820 +will retrieve only one sub-frame. Full image will be reconstructed after receiving all the sub-frames.
   1.821 +
   1.822 +@leave  May leave with any error code.
   1.823 +
   1.824 +@note   The corresponding image capture call is considered to be complete only when every sub-frame has been received.
   1.825 +*/
   1.826 +void CCamera::CCameraPreImageCaptureControl::EnableSubFramesL()
   1.827 +	{
   1.828 +	User::Leave(KErrNotSupported);	
   1.829 +	}
   1.830 +
   1.831 +/**
   1.832 +Disable the streamed image output and hence the use of sub-frames to collect image data. Every 
   1.833 +MCaptureImageObserver::ImageBufferReady() will retrieve one full still image.
   1.834 +
   1.835 +@leave  May leave with any error code.
   1.836 +*/
   1.837 +void CCamera::CCameraPreImageCaptureControl::DisableSubFramesL()
   1.838 +	{
   1.839 +	User::Leave(KErrNotSupported);
   1.840 +	}
   1.841 +
   1.842 +/**
   1.843 +Retrieves the current state about streamed image option or sub-frame usage.
   1.844 +
   1.845 +@param  iIsSubFrameEnabled
   1.846 +		ETrue indicates that streamed image option is currently being used. 
   1.847 +		EFalse indicates that streamed image option is currently not being used.
   1.848 +		
   1.849 +@leave  May leave with any error code.
   1.850 +*/	
   1.851 +void CCamera::CCameraPreImageCaptureControl::GetSubFramesStateL(TBool& /*aIsSubFrameEnabled*/) const
   1.852 +	{
   1.853 +	User::Leave(KErrNotSupported);
   1.854 +	}
   1.855 +
   1.856 +/**
   1.857 +Retrieves the list of transformations (image processing) available in case streamed image is used.
   1.858 +
   1.859 +@param  aStreamedImageSupportedTransformations
   1.860 +		Retrieves an array of uids which represents those image processing attributes which are supported for streamed 
   1.861 +		image.
   1.862 +		
   1.863 +@leave  May leave with any error code.
   1.864 +*/
   1.865 +void CCamera::CCameraPreImageCaptureControl::GetStreamedImageSupportedTransformationsL(RArray<TUid>& /*aStreamedImageSupportedTransformations*/) const
   1.866 +	{
   1.867 +	User::Leave(KErrNotSupported);	
   1.868 +	}
   1.869 +	
   1.870 +/**
   1.871 +Retrieves the panorama mode support.
   1.872 +
   1.873 +@param  aIsPanoModeSupported
   1.874 +		Informs whether the pano mode is supported or not.
   1.875 +
   1.876 +@param  aSupportedStitchingOption
   1.877 +		Retrieves the supported image stitching option available with the ECAM implementation for the images captured
   1.878 +		under panorama mode. It is a TInt represepesting bitfield for supported TStitchingOption 
   1.879 +		If pano mode is not supported, this has to be 0.
   1.880 +		
   1.881 +@leave  May leave with any error code.			
   1.882 +*/
   1.883 +void CCamera::CCameraPreImageCaptureControl::GetPanoModeSupportInfoL(TBool& /*aIsPanoModeSupported*/, TInt& /*aSupportedStitchingOption*/) const
   1.884 +	{
   1.885 +	User::Leave(KErrNotSupported);	
   1.886 +	}
   1.887 +
   1.888 +/**
   1.889 +Starts panning the viewfinder. Any image captured under pano mode gets overlaid on top of viewfinder and in a 
   1.890 +particular direction.
   1.891 +
   1.892 +This method starts panorama mode for every viewfinder screen.
   1.893 +
   1.894 +@param  aStitchingOption
   1.895 +		Enum value EStitchingOptionEnable instructs implementation to perform stitching of images captured under pano mode.
   1.896 +		So only one completion feedback will be given to the client regarding image being ready.(either through  
   1.897 +		MCaptureImageObserver::ImageBufferReady() or through MCaptureImageObserver::ImageDirectSavingCompleted())
   1.898 +		
   1.899 +		Enum value EStitchingOptionDisable instructs implemenation to provide the images unstitched.
   1.900 +		
   1.901 +		Enum value EStitchingOptionNone should be passed only when stitching option is not supported by the 
   1.902 +		implementation.
   1.903 +		
   1.904 +@note   Event KUidECamEventImageCaptureControlStartPanoMode is used to notify clients about the start of panorama mode.
   1.905 +		
   1.906 +@note   Calling the StartPanoMode twice and without stopping it will result in an error.
   1.907 +*/
   1.908 +void CCamera::CCameraPreImageCaptureControl::StartPanoMode(CCamera::CCameraPreImageCaptureControl::TStitchingOption /*aStitchingOption*/)
   1.909 +	{
   1.910 +	return;	
   1.911 +	}
   1.912 +
   1.913 +/**
   1.914 +Starts panning the viewfinder. Any image captured under pano mode gets overlaid on top of viewfinder and in a 
   1.915 +particular direction.
   1.916 +
   1.917 +This method starts panorama mode only on few specified viewfinder screens.
   1.918 +
   1.919 +@param  aStitchingOption
   1.920 +		Enum value EStitchingOptionEnable instructs implementation to perform stitching of images captured under pano mode. So 
   1.921 +		only one completion feedback will be given to the client regarding image being ready.(either through  
   1.922 +		MCaptureImageObserver::ImageBufferReady() or through MCaptureImageObserver::ImageDirectSavingCompleted())
   1.923 +		
   1.924 +		Enum value EStitchingOptionDisable instructs implemenation to provide the images unstitched.
   1.925 +		
   1.926 +		Enum value EStitchingOptionNone should be passed only when stitching option is not supported by the 
   1.927 +		implementation.
   1.928 +		
   1.929 +@param  aVFHandles
   1.930 +		The array of viewfinder handles on which the panorama will run. Every member of this array is a valid viewfinder 
   1.931 +		handle.
   1.932 +
   1.933 +@note   Event KUidECamEventImageCaptureControlStartPanoMode is used to notify clients about the start of panorama mode.		
   1.934 +
   1.935 +@note   Calling the StartPanoMode twice and without stopping it will result in an error.		
   1.936 +*/
   1.937 +void CCamera::CCameraPreImageCaptureControl::StartPanoMode(CCamera::CCameraPreImageCaptureControl::TStitchingOption /*aStitchingOption*/, const RArray<TInt>& /*aVFHandles*/)
   1.938 +	{
   1.939 +	return;
   1.940 +	}
   1.941 +	
   1.942 +/**
   1.943 +Retrieves the direction of panning.
   1.944 +
   1.945 +@param  aPanoDirection
   1.946 +		The currently used panning direction.
   1.947 +
   1.948 +@leave  May leave with any error code.
   1.949 +
   1.950 +@note   When the image is captured, the cropped version of the captured image covering a full rectangle is overlaid at 
   1.951 +		the left hand side of the display screen (if TPanoDirection is EPanoRight) and viewfinder runs below that. 	
   1.952 +		
   1.953 +@note   If the method leaves, the reference to CCamera::CCameraPreImageCaptureControl::TPanoDirection i.e. aPanoDirection is 
   1.954 +		not guaranteed to be valid.	
   1.955 +*/
   1.956 +void CCamera::CCameraPreImageCaptureControl::GetPanoDirectionL(CCamera::CCameraPreImageCaptureControl::TPanoDirection& /*aPanoDirection*/) const
   1.957 +	{
   1.958 +	User::Leave(KErrNotSupported);	
   1.959 +	}
   1.960 +
   1.961 +/**
   1.962 +Sets the direction of panning
   1.963 +
   1.964 +@param  aPanoDirection
   1.965 +		The desired panning direction. 
   1.966 +		
   1.967 +@note   Event KUidECamEventImageCaptureControlPanoDirection is used to notify the requesting client about setting of the 
   1.968 +		panning direction.
   1.969 +*/
   1.970 +void CCamera::CCameraPreImageCaptureControl::SetPanoDirection(CCamera::CCameraPreImageCaptureControl::TPanoDirection /*aPanoDirection*/)
   1.971 +	{
   1.972 +	return;	
   1.973 +	}
   1.974 +
   1.975 +/**
   1.976 +Stop the panorama mode.
   1.977 +
   1.978 +@param  aStitchedImageRetrieval
   1.979 +		Enum value EStitchedImageRetrieve indicates that images has to be stitched if initially image stitching was 
   1.980 +		enabled.
   1.981 +		
   1.982 +		Enum value EStitchedImageDiscard indicates that images should not be stitched (discarded) if initially image 
   1.983 +		stitching was enabled. No image ready notification returned to the client in this case. This may happen when 
   1.984 +		client is not happy with the panned images captured so far. 
   1.985 +
   1.986 +@leave  May leave with any error code. 
   1.987 +				
   1.988 +@note   If image stitching option was not enabled while starting the pano mode, the 'aStitchedImageRetrieval' parameter is 
   1.989 +		ignored by the implementation.
   1.990 +*/
   1.991 +void CCamera::CCameraPreImageCaptureControl::StopPanoModeL(CCamera::CCameraPreImageCaptureControl::TStitchedImageRetrieval /*aStitchedImageRetrieval*/)
   1.992 +	{
   1.993 +	User::Leave(KErrNotSupported);
   1.994 +	}
   1.995 +		
   1.996 +/**
   1.997 +Retrieves the supported color space.
   1.998 +
   1.999 +@param  aSupportedColorSpace
  1.1000 +		A bitfield representing the supported TColorSpace
  1.1001 +		
  1.1002 +@leave  May leave with any error code.
  1.1003 +*/
  1.1004 +void CCamera::CCameraPreImageCaptureControl::GetSupportedColorSpaceL(TUint& /*aSupportedColorSpace*/) const
  1.1005 +	{
  1.1006 +	User::Leave(KErrNotSupported);	
  1.1007 +	}
  1.1008 +
  1.1009 +/**
  1.1010 +Get the current color space being used.
  1.1011 +
  1.1012 +@param  aColorSpace
  1.1013 +		Currently used color space.
  1.1014 +					
  1.1015 +@leave  May leave with any error code. 
  1.1016 +*/
  1.1017 +void CCamera::CCameraPreImageCaptureControl::GetColorSpaceL(CCamera::CCameraPreImageCaptureControl::TColorSpace& /*aColorSpace*/) const
  1.1018 +	{
  1.1019 +	User::Leave(KErrNotSupported);	
  1.1020 +	}
  1.1021 +
  1.1022 +/**
  1.1023 +Set a particular color space.
  1.1024 +
  1.1025 +@param  aColorSpace
  1.1026 +		The color space value to be set.
  1.1027 +		
  1.1028 +@note   Event KUidECamEventImageCaptureControlColorSpace is used to notify clients about setting the color space.
  1.1029 +*/
  1.1030 +void CCamera::CCameraPreImageCaptureControl::SetColorSpace(CCamera::CCameraPreImageCaptureControl::TColorSpace /*aColorSpace*/)
  1.1031 +	{
  1.1032 +	return;	
  1.1033 +	}
  1.1034 +	
  1.1035 +/**
  1.1036 +Synchronous marker method in order to provide selective settings for embedded still captures only (not to video capture)
  1.1037 +
  1.1038 +@note   Any feature setting issued after calling this method gets saved on the implementation side and the actual 
  1.1039 +		setting performed before still images (embedded still captures) are taken.
  1.1040 +
  1.1041 +@note   Any getter method issued after calling this method gives feature value which would be used for still images 
  1.1042 +	    (embedded still captures). For example, if WhiteBalance set for 'Auto' for EmbeddedStillCapture but 'Cloudy' otherwise, then
  1.1043 +	    under the marker method, white balance will show 'Cloudy'.
  1.1044 +
  1.1045 +@note   Event KUidECamEventFailedEmbeddedStillCaptureSetting notified to the client if in case any embedded still capture
  1.1046 +		setting gets failed during the time they are actually set. After this notification, client can issue 
  1.1047 +		GetFailedEmbeddedStillCaptureSettingsL to retrieve the list of failed settings.
  1.1048 +
  1.1049 +@leave  May leave with any error code.
  1.1050 +*/	
  1.1051 +void CCamera::CCameraPreImageCaptureControl::StartEmbeddedStillCaptureSettingsL()
  1.1052 +	{
  1.1053 +	User::Leave(KErrNotSupported);	
  1.1054 +	}
  1.1055 +
  1.1056 +/**
  1.1057 +Marker method to mark end of providing selective settings for embedded still captures only (not to video capture)
  1.1058 +
  1.1059 +@note   Any feature setting issued after calling this method is treated as a normal setting operation. 	
  1.1060 +
  1.1061 +@note   Any getter method issued after calling this method gives feature value which would be used normally.
  1.1062 +
  1.1063 +@leave  May leave with any error code.
  1.1064 +*/
  1.1065 +void CCamera::CCameraPreImageCaptureControl::EndEmbeddedStillCaptureSettingsL()
  1.1066 +	{
  1.1067 +	User::Leave(KErrNotSupported);
  1.1068 +	}
  1.1069 +
  1.1070 +/**
  1.1071 +Retrieves the list of failed embedded still capture settings.
  1.1072 +
  1.1073 +@param  aFailedEmbeddedStillCaptureSettings
  1.1074 +		Array of uids which reflects the failed embedded still capture settings. 
  1.1075 +		
  1.1076 +@note   This method may be issued after receiving the notification KUidECamEventFailedEmbeddedStillCaptureSetting.
  1.1077 +*/	
  1.1078 +void CCamera::CCameraPreImageCaptureControl::GetFailedEmbeddedStillCaptureSettingsL(RArray<TUid>& /*aFailedEmbeddedStillCaptureSettings*/) const
  1.1079 +	{
  1.1080 +	User::Leave(KErrNotSupported);
  1.1081 +	}
  1.1082 +
  1.1083 +/**
  1.1084 +@publishedPartner
  1.1085 +Factory function for creating the CCameraImageCapture object. This will be called only by the concrete implementation
  1.1086 +of MCameraPreImageCaptureControl::PrepareImageCapture(const TPrepareImageParameters& aPrepareImageParameters, 
  1.1087 +MCaptureImageObserver& aCaptureImageObserver).
  1.1088 +
  1.1089 +@param aCamera 
  1.1090 +	   a reference to a CCamera object providing the settings.
  1.1091 +
  1.1092 +@param aPrepareImageParameters
  1.1093 +	   TPrepareImageParameters tied with this image capture class object.
  1.1094 +	   
  1.1095 +@param aCaptureImageObserver
  1.1096 +	   Reference to the capture image observer.
  1.1097 +	   
  1.1098 +@return a pointer to a fully constructed CCameraImageCapture object.
  1.1099 +
  1.1100 +@leave KErrNoMemory Out of memory Or any other system-wide error code.
  1.1101 +*/
  1.1102 +EXPORT_C CCamera::CCameraImageCapture* CCamera::CCameraImageCapture::CreateL(CCamera& aCamera, const CCamera::CCameraPreImageCaptureControl
  1.1103 +			::TPrepareImageParameters& aPrepareImageParameters, MCaptureImageObserver& aCaptureImageObserver)
  1.1104 +	{
  1.1105 +	CCamera::CCameraImageCapture* self = new (ELeave)CCamera::CCameraImageCapture(aCamera); 
  1.1106 +	CleanupStack::PushL(self);
  1.1107 +	self->ConstructL(aPrepareImageParameters, aCaptureImageObserver);
  1.1108 +	CleanupStack::Pop(self);
  1.1109 +	
  1.1110 +	return self; 
  1.1111 +	}
  1.1112 +	
  1.1113 +/**	
  1.1114 +CCameraImageCapture Constructor.
  1.1115 +
  1.1116 +@param aOwner
  1.1117 +       a reference to a CCamera object. 
  1.1118 +*/
  1.1119 +CCamera::CCameraImageCapture::CCameraImageCapture(CCamera& aOwner):
  1.1120 +				iOwner(aOwner), 
  1.1121 +				iImpl(NULL)
  1.1122 +	{
  1.1123 +	}
  1.1124 +	
  1.1125 +/**
  1.1126 +CCameraImageCapture second phase constructor. 
  1.1127 +
  1.1128 +Function used to initialise internal state of the object. Uses reference to the camera to retrieve 
  1.1129 +CameraImageCapture interface pointer.
  1.1130 +
  1.1131 +@param aPrepareImageParameters
  1.1132 +	   TPrepareImageParameters tied with this image capture class object.
  1.1133 +	   
  1.1134 +@param aCaptureImageObserver
  1.1135 +	   Reference to the capture image observer.
  1.1136 +	   
  1.1137 +@leave KErrNoMemory Out of memory or any other system-wide error code
  1.1138 +*/ 
  1.1139 +void CCamera::CCameraImageCapture::ConstructL(const CCamera::CCameraPreImageCaptureControl::TPrepareImageParameters& 
  1.1140 +												aPrepareImageParameters, MCaptureImageObserver& aCaptureImageObserver) 
  1.1141 +	{
  1.1142 +	iImpl = static_cast<MCameraImageCapture*>(iOwner.CustomInterface(KECamMCameraImageCaptureUid));
  1.1143 +
  1.1144 +	if (iImpl == NULL)
  1.1145 +		{
  1.1146 +		User::Leave(KErrNotSupported);
  1.1147 +		}
  1.1148 +		
  1.1149 +	iImpl->SetPrepareImageParameters(aPrepareImageParameters);
  1.1150 +	iImpl->SetCaptureImageObserver(aCaptureImageObserver);	
  1.1151 +	}
  1.1152 +	
  1.1153 +/**
  1.1154 +Returns the MCameraImageCapture* which will be used by the CCameraPostImageCaptureControl for the concrete 
  1.1155 +implementation. Both CCameraImageCapture and CCameraPostImageCaptureControl are made to use the same interface
  1.1156 +for implementation.
  1.1157 +
  1.1158 +@return  Pointer to the MCameraImageCapture class.
  1.1159 +*/
  1.1160 +MCameraImageCapture* CCamera::CCameraImageCapture::Impl() const
  1.1161 +	{
  1.1162 +	return iImpl;
  1.1163 +	}
  1.1164 +
  1.1165 +/**
  1.1166 +Destructor
  1.1167 +Destruction of this class is equivalent to releasing the resources owned in order to prepare and allocate memory for 
  1.1168 +capturing images.
  1.1169 +
  1.1170 +@note  The child objects created out of this image capture class object shall be delete beforehand. Various child objects 
  1.1171 +	   are snapshot, image processing and histograms.
  1.1172 +*/	
  1.1173 +EXPORT_C CCamera::CCameraImageCapture::~CCameraImageCapture()
  1.1174 +	{
  1.1175 +	if (iImpl != NULL)
  1.1176 +		{
  1.1177 +		//cancel any outstanding capture image operation at implementation level.
  1.1178 +		//destory every CCameraPostImageCaptureControl object created by the implementation.
  1.1179 +		iImpl->Release(this);	
  1.1180 +		}
  1.1181 +	}	
  1.1182 +
  1.1183 +/**
  1.1184 +Retrieve pointer to histogram API in order to use it specifically for a specific still image capture.
  1.1185 +
  1.1186 +@return Pointer to use histogram API specifically for the given still image capture.
  1.1187 +		
  1.1188 +@leave  May leave with any error code.
  1.1189 +
  1.1190 +@note   Different types of histogram may be used for a specific still image capture. Every time this method will be called
  1.1191 +		on the CCameraImageCapture class object, a new type of histogram will be created.
  1.1192 +*/	
  1.1193 +EXPORT_C CCamera::CCameraV2Histogram* CCamera::CCameraImageCapture::CreateHistogramHandleL() const
  1.1194 +	{
  1.1195 +	MImplementationFactory* implFactory = NULL;
  1.1196 +	
  1.1197 +	iImpl->CreateHistogramImplFactoryL(implFactory);
  1.1198 +	
  1.1199 +	CleanupReleasePushL(*implFactory);
  1.1200 +	CCamera::CCameraV2Histogram* histogram = CCamera::CCameraV2Histogram::CreateL(iOwner, *implFactory);
  1.1201 +	CleanupStack::Pop(implFactory);
  1.1202 +	
  1.1203 +	implFactory->Release();
  1.1204 +	return histogram;	
  1.1205 +	}
  1.1206 +	
  1.1207 +/**
  1.1208 +Retrieve pointer to snapshot API in order to use it specifically for a specific still image capture.
  1.1209 +
  1.1210 +@param aClientViewFinderId
  1.1211 +	   The client viewfinder on which this client snapshot will be displayed.
  1.1212 +
  1.1213 +@return Pointer to use snapshot API specifically for the given still image capture.
  1.1214 +		
  1.1215 +@leave  May leave with any error code.
  1.1216 +*/
  1.1217 +EXPORT_C CCamera::CCameraSnapshot* CCamera::CCameraImageCapture::GetSnapshotHandleL(TInt aClientViewFinderId) const
  1.1218 +	{
  1.1219 +	MImplementationFactory* implFactory = NULL;
  1.1220 +	
  1.1221 +	iImpl->GetSnapshotImplFactoryL(implFactory);
  1.1222 +	
  1.1223 +	CleanupReleasePushL(*implFactory);
  1.1224 +	CCamera::CCameraSnapshot* snapshot = CCamera::CCameraSnapshot::CreateL(iOwner, *implFactory, aClientViewFinderId);
  1.1225 +	CleanupStack::Pop(implFactory);
  1.1226 +	
  1.1227 +	implFactory->Release();
  1.1228 +	
  1.1229 +	return snapshot;	
  1.1230 +	}
  1.1231 +
  1.1232 +/**
  1.1233 +Retrieve pointer to image processing API in order to use it specifically for tha specific still image capture.
  1.1234 +
  1.1235 +@return Pointer to use image processing API specifically for the given still image capture.
  1.1236 +		
  1.1237 +@leave  May leave with any error code.
  1.1238 +*/
  1.1239 +EXPORT_C CCamera::CCameraImageProcessing* CCamera::CCameraImageCapture::GetTransformationHandleL() const
  1.1240 +	{
  1.1241 +	MImplementationFactory* implFactory = NULL;
  1.1242 +	
  1.1243 +	iImpl->GetImageProcessingImplFactoryL(implFactory);
  1.1244 +	
  1.1245 +	CleanupReleasePushL(*implFactory);
  1.1246 +	CCamera::CCameraImageProcessing* imgProc = CCamera::CCameraImageProcessing::CreateL(iOwner, *implFactory);
  1.1247 +	CleanupStack::Pop(implFactory);
  1.1248 +	
  1.1249 +	implFactory->Release();
  1.1250 +	return imgProc;	
  1.1251 +	}
  1.1252 +
  1.1253 +/**
  1.1254 +Retrieves the prepare image parameters tied with this image capture class object.
  1.1255 +
  1.1256 +@param aPrepareImageParameters
  1.1257 +	   TPrepareImageParameters tied with this image capture class object.
  1.1258 +	   
  1.1259 +@leave May leave with any error code
  1.1260 +*/
  1.1261 +EXPORT_C void CCamera::CCameraImageCapture::GetPrepareImageParametersL(CCamera::CCameraPreImageCaptureControl::TPrepareImageParameters& aPrepareImageParameters) const
  1.1262 +	{
  1.1263 +	iImpl->GetPrepareImageParametersL(aPrepareImageParameters);
  1.1264 +	}
  1.1265 +
  1.1266 +/**
  1.1267 +Performant image capture. This postpones the processing options involved with current image captured in order to 
  1.1268 +capture/prepare for next images. 
  1.1269 +
  1.1270 +Previously created CCameraPostImageCaptureControl objects for this CCameraImageCapture object will become unavailable 
  1.1271 +after this call.
  1.1272 +
  1.1273 +@note   Further images (either still or video) can be captured only after receiving the notification 
  1.1274 +		KUidECamEventReadyForNextCapture. Current image may be outstanding in order to undergo any processing options.
  1.1275 +
  1.1276 +@note   Callback MCaptureImageObserver::ImageCaptureComplete() informs the client that the image capture operation has 
  1.1277 +		been completed. The CCameraImageCapture& can be further used for next image captures.
  1.1278 +		In case of continuous drive modes, this callback will be received by the client only once in order to provide the 
  1.1279 +		result of the whole image capture operation. 
  1.1280 +		
  1.1281 +@note   Callback MCaptureImageObserver::ImageBufferReady() provides client the link to CCameraPostImageCaptureControl& 
  1.1282 +		which helps retrieving the image buffer. In case of continuous drive modes, this callback will be received by the
  1.1283 +		client for every individual image. In case of single shots, this will be received by the client only once in 
  1.1284 +		order to retrieve the image buffer.
  1.1285 +*/	
  1.1286 +EXPORT_C void CCamera::CCameraImageCapture::CaptureImage()
  1.1287 +	{
  1.1288 +	// MCameraImageCapture concrete implementation will use CCameraImageCapture& to pass in callbacks and to create 
  1.1289 +	// CCameraPostImageCaptureControl object for every image and pass it to the client.
  1.1290 +	// Previously created CCameraPostImageCaptureControl objects will become unavailable after this call.
  1.1291 + 	iImpl->CaptureImage(this);
  1.1292 +	}
  1.1293 +
  1.1294 +/**
  1.1295 +Cancels the outstanding Capture Image operation. This will also cancel any outstanding processing options associated with 
  1.1296 +the concerned Capture Image operation. This method is synchronous. Hence, no callback shall be received with respect
  1.1297 +to concerned capture image operation.
  1.1298 +*/	
  1.1299 +EXPORT_C void CCamera::CCameraImageCapture::CancelCaptureImage()
  1.1300 +	{
  1.1301 +	iImpl->CancelCaptureImage();
  1.1302 +	}
  1.1303 +
  1.1304 +/**
  1.1305 +Retrieves the number of images exposed to sensor with respect to a specific image capture command. Any processing options
  1.1306 +associated with these images may be pending.
  1.1307 +
  1.1308 +@param  aNumImagesExposed
  1.1309 +		Retrieves the number of images exposed to sensor till now. For single shot type of drive modes, this value will be
  1.1310 +		one after the image gets exposed to sensor. For multiple shot type of drive modes, this value will be the number of 
  1.1311 +		images exposed till now.
  1.1312 +		
  1.1313 +@note   May leave with any error code.
  1.1314 +*/
  1.1315 +EXPORT_C void CCamera::CCameraImageCapture::GetNumImagesExposedL(TUint& aNumImagesExposed) const
  1.1316 +	{
  1.1317 +	iImpl->GetNumImagesExposedL(aNumImagesExposed);	
  1.1318 +	}
  1.1319 +
  1.1320 +/**
  1.1321 +Retrieves the total number of images which is supposed to be captured with respect to a specific image capture command. 
  1.1322 +
  1.1323 +@param  aNumTotalImages
  1.1324 +		Retrieves the total number of images supposed to be captured. For single shot type of drive modes, this value will be
  1.1325 +		always be one. For multiple shot type of drive modes, this value will be greater than one.
  1.1326 +		
  1.1327 +@note   May leave with any error code.
  1.1328 +*/
  1.1329 +EXPORT_C void CCamera::CCameraImageCapture::GetNumTotalImagesL(TUint& aNumTotalImages) const
  1.1330 +	{
  1.1331 +	iImpl->GetNumTotalImagesL(aNumTotalImages);	
  1.1332 +	}
  1.1333 +
  1.1334 +/**
  1.1335 +Retrieves the post capture control handle based on the ID passed to it. Client may use this handle for post capture 
  1.1336 +operations of the image identified by the ID. The ID is received by the clients through MCaptureImageObserver callbacks.
  1.1337 +
  1.1338 +@param  aPostCaptureControlHandle
  1.1339 +		Retrieves pointer to the post capture control class object.
  1.1340 +		
  1.1341 +@param  aPostCaptureControlId
  1.1342 +		The ID used to retrieve the post capture control handle of the captured image.
  1.1343 +		
  1.1344 +@note   May leave with any error code.
  1.1345 +*/	
  1.1346 +EXPORT_C void CCamera::CCameraImageCapture::GetPostCaptureControlHandleL(CCamera::CCameraPostImageCaptureControl*& 
  1.1347 +															aPostCaptureControlHandle, TPostCaptureControlId aPostCaptureControlId) const
  1.1348 +	{
  1.1349 +	iImpl->GetPostCaptureControlHandleL(aPostCaptureControlHandle, aPostCaptureControlId);	
  1.1350 +	}													
  1.1351 +
  1.1352 +/**
  1.1353 +Prioritises the Capture Image operation. This implies that any processing options associated with the concerned Capture
  1.1354 +Image operation will be prioritised over other pending processing options.
  1.1355 +
  1.1356 +@param  aCaptureImagePriority
  1.1357 +		The desired level of priority.
  1.1358 +
  1.1359 +@leave  May leave with any error code.
  1.1360 +*/
  1.1361 +EXPORT_C void CCamera::CCameraImageCapture::SetCaptureImagePriorityL(TECamImagePriority aCaptureImagePriority)
  1.1362 +	{
  1.1363 +	iImpl->SetCaptureImagePriorityL(aCaptureImagePriority);
  1.1364 +	}
  1.1365 +	
  1.1366 +/**
  1.1367 +Retrieves the priority of the Capture Image operation.
  1.1368 +
  1.1369 +@param  aCaptureImagePriority
  1.1370 +		Retrieves the current level of priority.
  1.1371 +
  1.1372 +@leave  May leave with any error code.
  1.1373 +*/
  1.1374 +EXPORT_C void CCamera::CCameraImageCapture::GetCaptureImagePriorityL(TECamImagePriority& aCaptureImagePriority) const
  1.1375 +	{
  1.1376 +	iImpl->GetCaptureImagePriorityL(aCaptureImagePriority);
  1.1377 +	}
  1.1378 +
  1.1379 +/**
  1.1380 +Pauses processing options associated with the concerned Capture Image operation.
  1.1381 +
  1.1382 +@param  aProcessingTypes
  1.1383 +		The processing options which need to be paused.
  1.1384 +*/	
  1.1385 +EXPORT_C void CCamera::CCameraImageCapture::PauseProcessing(TUint aProcessingTypes)
  1.1386 +	{
  1.1387 +	iImpl->PauseProcessing(aProcessingTypes);
  1.1388 +	}
  1.1389 +
  1.1390 +/**
  1.1391 +Resumes processing options associated with the concerned Capture Image operation.
  1.1392 +
  1.1393 +@param  aProcessingTypes
  1.1394 +		The processing options which need to be resumed.
  1.1395 +
  1.1396 +@leave  May leave with any error code.
  1.1397 +*/	
  1.1398 +EXPORT_C void CCamera::CCameraImageCapture::ResumeProcessingL(TUint aProcessingTypes)
  1.1399 +	{
  1.1400 +	iImpl->ResumeProcessingL(aProcessingTypes);
  1.1401 +	}
  1.1402 +
  1.1403 +/**
  1.1404 +@publishedPartner
  1.1405 +
  1.1406 +Factory function for creating the CCameraPostImageCaptureControl object for every individual image to be captured.
  1.1407 +This method is supposed to be called only by concrete implementation of MCameraImageCapture. It will be the client's 
  1.1408 +responsibility to destroy it whenever it does not need it any more. (Possible milestone for deletion: Individual image cancellation completed, 
  1.1409 +individual image saved). Previously created CCameraPostImageCaptureControl objects for the CCameraImageCapture object will
  1.1410 +become unavailable if CaptureImage() is called while previous call on the same object is still outstanding.
  1.1411 +
  1.1412 +@param aCameraImageCapture 
  1.1413 +	   A pointer to the CCameraImageCapture which was used to issue the Capture Image call.
  1.1414 +	   
  1.1415 +@param aPostCaptureControlId
  1.1416 +	   The ID used for identification of the post capture control class object by the clients. The ID is passed by the
  1.1417 +	   implementation while creating this object.
  1.1418 +
  1.1419 +@return a pointer to a fully constructed CCameraPostImageCaptureControl object.
  1.1420 +
  1.1421 +@leave KErrNoMemory Out of memory Or any other system-wide error code.
  1.1422 +*/	
  1.1423 +EXPORT_C CCamera::CCameraPostImageCaptureControl* CCamera::CCameraPostImageCaptureControl::CreateL(CCameraImageCapture* aCameraImageCapture, TPostCaptureControlId aPostCaptureControlId)
  1.1424 +	{
  1.1425 +	CCamera::CCameraPostImageCaptureControl* self = new (ELeave)CCamera::CCameraPostImageCaptureControl(aCameraImageCapture, aPostCaptureControlId); 
  1.1426 +	CleanupStack::PushL(self);
  1.1427 +	self->ConstructL();
  1.1428 +	CleanupStack::Pop(self);
  1.1429 +	
  1.1430 +	return self;
  1.1431 +	}
  1.1432 +
  1.1433 +/**	
  1.1434 +CCameraPostImageCaptureControl Constructor.
  1.1435 +
  1.1436 +@param aOwner
  1.1437 +       a reference to a CCamera object. 
  1.1438 +
  1.1439 +@param aPostCaptureControlId
  1.1440 +	   The ID used for identification of the post capture control class object by the clients. The ID is passed by the
  1.1441 +	   implementation while creating this object.
  1.1442 +*/
  1.1443 +CCamera::CCameraPostImageCaptureControl::CCameraPostImageCaptureControl(CCamera::CCameraImageCapture* aCameraImageCapture, TInt aPostCaptureControlId):
  1.1444 + 																		iPostCaptureControlId(aPostCaptureControlId),
  1.1445 +																		iCameraImageCapture(aCameraImageCapture),
  1.1446 +																		iImpl(NULL)
  1.1447 +	{
  1.1448 +	}
  1.1449 +	
  1.1450 +/**
  1.1451 +CCameraPostImageCaptureControl second phase constructor. 
  1.1452 +
  1.1453 +Function used to initialise internal state of the object. Uses CCameraImageCapture* to retrieve 
  1.1454 +CCameraPostImageCaptureControl interface pointer. This interface pointer is provided by 'CCameraImageCapture interface'.
  1.1455 +
  1.1456 +@leave KErrNoMemory Out of memory or any other system-wide error code
  1.1457 +*/ 
  1.1458 +void CCamera::CCameraPostImageCaptureControl::ConstructL() 
  1.1459 +	{
  1.1460 +	iImpl = static_cast<MCameraPostImageCaptureControl*>(iCameraImageCapture->Impl()->CreatePostImageCaptureControlImpl(KECamMCameraPostImageCaptureControlUid, iPostCaptureControlId));
  1.1461 +
  1.1462 +	if (iImpl == NULL)
  1.1463 +		{
  1.1464 +		User::Leave(KErrNotSupported);
  1.1465 +		}
  1.1466 +	}
  1.1467 +
  1.1468 +/**
  1.1469 +Destructor
  1.1470 +*/		
  1.1471 +EXPORT_C CCamera::CCameraPostImageCaptureControl::~CCameraPostImageCaptureControl()
  1.1472 +	{
  1.1473 +	iCameraImageCapture = NULL;
  1.1474 +	if(iImpl != NULL)
  1.1475 +		{
  1.1476 +		//cancel any outstanding image at implementation level.
  1.1477 +		iImpl->Release(iPostCaptureControlId);
  1.1478 +		}
  1.1479 +	}
  1.1480 +
  1.1481 +/**
  1.1482 +Retrieves the ID which this class object represents. The ID is unique for this class object and is used for identification
  1.1483 +purpose.
  1.1484 +
  1.1485 +@param  aPostCaptureControlId
  1.1486 +		Reference to the post capture control ID.
  1.1487 +*/	
  1.1488 +EXPORT_C void CCamera::CCameraPostImageCaptureControl::GetPostCaptureControlId(TPostCaptureControlId& aPostCaptureControlId) const
  1.1489 +	{
  1.1490 +	aPostCaptureControlId = iPostCaptureControlId;
  1.1491 +	}
  1.1492 +	
  1.1493 +/**
  1.1494 +Retrieves the CCameraImageCapture* associated with the object of this class. This implies that the individual image, which
  1.1495 +the object of this class is referring to, belongs to the CaptureImage operation issued by CCameraImageCapture* object.
  1.1496 +
  1.1497 +@return Pointer to CCameraImageCapture associated with the object of this class.
  1.1498 +*/
  1.1499 +EXPORT_C CCamera::CCameraImageCapture* CCamera::CCameraPostImageCaptureControl::ImageCaptureHandle() const
  1.1500 +	{
  1.1501 +	return iCameraImageCapture;
  1.1502 +	}
  1.1503 +
  1.1504 +/**
  1.1505 +Retrieves the sequence number of the image being represented by this post capture control object. The sequence number
  1.1506 +specifies the index of the individual image if, in case, the multiple shot type of drive mode is being used. The first 
  1.1507 +individual image which is exposed to the sensor has a sequence number of zero. In case of single shot type of drive mode,
  1.1508 +the sequence number will be zero.
  1.1509 +
  1.1510 +@param  aSequenceNumber
  1.1511 +		Retrieves the sequence number of the image.
  1.1512 +
  1.1513 +@leave  May leave with any error code.
  1.1514 +*/
  1.1515 +EXPORT_C void CCamera::CCameraPostImageCaptureControl::GetImageSequenceNumberL(TUint& aSequenceNumber) const
  1.1516 +	{
  1.1517 +	iImpl->GetImageSequenceNumberL(aSequenceNumber);
  1.1518 +	}
  1.1519 +
  1.1520 +/**
  1.1521 +Cancels the outstanding individual image which the object of this class is referring to. This will also cancel any outstanding 
  1.1522 +processing options associated with this individual image. This method is synchronous. Hence, no callback shall be received
  1.1523 +for this individual image.
  1.1524 +*/
  1.1525 +EXPORT_C void CCamera::CCameraPostImageCaptureControl::CancelImage()
  1.1526 +	{
  1.1527 +	iImpl->CancelImage();
  1.1528 +	}
  1.1529 +
  1.1530 +/**
  1.1531 +Prioritises the individual image which the object of this class is referring to. This implies that any processing
  1.1532 +options associated with this individual image will be prioritised over other pending processing options.
  1.1533 +
  1.1534 +@param  aImagePriority
  1.1535 +		The desired level of priority.
  1.1536 +		
  1.1537 +@leave  May leave with any error code.
  1.1538 +*/
  1.1539 +EXPORT_C void CCamera::CCameraPostImageCaptureControl::SetImagePriorityL(TECamImagePriority aImagePriority)
  1.1540 +	{
  1.1541 +	iImpl->SetImagePriorityL(aImagePriority);	
  1.1542 +	}
  1.1543 +	
  1.1544 +/**
  1.1545 +Retrieves the priority of the individual image which the object of this class is referring to.
  1.1546 +
  1.1547 +@param  aImagePriority
  1.1548 +		The current level of priority.
  1.1549 +		
  1.1550 +@leave  May leave with any error code.
  1.1551 +*/
  1.1552 +EXPORT_C void CCamera::CCameraPostImageCaptureControl::GetImagePriorityL(TECamImagePriority& aImagePriority) const
  1.1553 +	{
  1.1554 +	iImpl->GetImagePriorityL(aImagePriority);	
  1.1555 +	}
  1.1556 +	
  1.1557 +/**
  1.1558 +Pauses processing options associated with the individual image which the object of this class is referring to.
  1.1559 +
  1.1560 +@param  aProcessingTypes
  1.1561 +		The processing options which need to be paused.
  1.1562 +*/	
  1.1563 +EXPORT_C void CCamera::CCameraPostImageCaptureControl::PauseProcessing(TUint aProcessingTypes)
  1.1564 +	{
  1.1565 +	iImpl->PauseProcessing(aProcessingTypes);
  1.1566 +	}
  1.1567 +
  1.1568 +/**
  1.1569 +Resumes processing options associated with the individual image which the object of this class is referring to.
  1.1570 +
  1.1571 +@param  aProcessingTypes
  1.1572 +		The processing options which need to be resumed.
  1.1573 +
  1.1574 +@leave  May leave with any error code.
  1.1575 +*/	
  1.1576 +EXPORT_C void CCamera::CCameraPostImageCaptureControl::ResumeProcessingL(TUint aProcessingTypes)
  1.1577 +	{
  1.1578 +	iImpl->ResumeProcessingL(aProcessingTypes);
  1.1579 +	}
  1.1580 +
  1.1581 +/**
  1.1582 +Retrieves the image buffer which contains the individual image captured. This method should be called by the client as a 
  1.1583 +result of receiving the callback MCaptureImageObserver::ImageBufferReady(), if the error information received is 
  1.1584 +satisfactory.
  1.1585 +
  1.1586 +@param  aCameraImageBuffer
  1.1587 +		A reference to an MCameraImageBuffer if successful, or NULL if not successful.
  1.1588 +
  1.1589 +@leave  May leave with any error code.
  1.1590 +*/
  1.1591 +EXPORT_C void CCamera::CCameraPostImageCaptureControl::GetImageBufferL(MCameraImageBuffer& aCameraImageBuffer) const
  1.1592 +	{
  1.1593 +	iImpl->GetImageBufferL(aCameraImageBuffer);
  1.1594 +	}
  1.1595 +
  1.1596 +/**
  1.1597 +Retrieves the state of the individual image which the object of this class is referring to.
  1.1598 +
  1.1599 +@param  aImageState
  1.1600 +		Retrieves the current state of the individual image.
  1.1601 +		
  1.1602 +@leave  May leave with any error code.
  1.1603 +*/	
  1.1604 +EXPORT_C void CCamera::CCameraPostImageCaptureControl::GetImageStateL(TImageState& aImageState) const
  1.1605 +	{
  1.1606 +	iImpl->GetImageStateL(aImageState);		
  1.1607 +	}
  1.1608 +	
  1.1609 +/**
  1.1610 +Retrieves the state of the individual image buffer.
  1.1611 +
  1.1612 +@param  aBufferState
  1.1613 +		Retrieves the current state of the individual image buffer.
  1.1614 +		
  1.1615 +@leave  May leave with any error code.
  1.1616 +*/	
  1.1617 +EXPORT_C void CCamera::CCameraPostImageCaptureControl::GetBufferStateL(TBufferState& aBufferState) const
  1.1618 +	{
  1.1619 +	iImpl->GetBufferStateL(aBufferState);		
  1.1620 +	}
  1.1621 +	
  1.1622 +/**
  1.1623 +Factory function for creating the CCameraVideoCaptureControl object.
  1.1624 +
  1.1625 +@param aCamera 
  1.1626 +	   A reference to a CCamera object providing the settings.
  1.1627 +	   
  1.1628 +@param aCaptureVideoObserver
  1.1629 +	   Reference to the capture video observer.
  1.1630 +
  1.1631 +@return a pointer to a fully constructed CCameraVideoCaptureControl object.
  1.1632 +
  1.1633 +@leave KErrNoMemory Out of memory Or any other system-wide error code.
  1.1634 +
  1.1635 +@leave KErrExtensionNotSupported When NewL/NewDuplicateL used instead of New2L/NewDuplicate2L.
  1.1636 +*/
  1.1637 +EXPORT_C CCamera::CCameraVideoCaptureControl* CCamera::CCameraVideoCaptureControl::NewL(CCamera& aCamera, MCaptureVideoObserver& aCaptureVideoObserver)
  1.1638 +	{
  1.1639 + 	if(aCamera.CameraVersion() == KCameraDefaultVersion)
  1.1640 + 		{
  1.1641 + 		User::Leave(KErrExtensionNotSupported);
  1.1642 + 		}
  1.1643 + 		
  1.1644 +	CCamera::CCameraVideoCaptureControl* self = new (ELeave)CCamera::CCameraVideoCaptureControl(aCamera); 
  1.1645 +	CleanupStack::PushL(self);
  1.1646 +	self->ConstructL(aCaptureVideoObserver);
  1.1647 +	CleanupStack::Pop(self);
  1.1648 +	
  1.1649 +	return self; 
  1.1650 +	}
  1.1651 +	
  1.1652 +/**	
  1.1653 +CCameraVideoCaptureControl Constructor.
  1.1654 +
  1.1655 +@param aOwner
  1.1656 +       a reference to a CCamera object. 
  1.1657 +*/
  1.1658 +CCamera::CCameraVideoCaptureControl::CCameraVideoCaptureControl(CCamera& aOwner):iOwner(aOwner), iImpl(NULL)
  1.1659 +	{
  1.1660 +	}
  1.1661 +
  1.1662 +/**
  1.1663 +CCameraVideoCaptureControl second phase constructor. 
  1.1664 +
  1.1665 +Function used to initialise internal state of the object. Uses reference to the camera to retrieve 
  1.1666 +Camera Video Capture Control interface pointer.
  1.1667 +
  1.1668 +@param aCaptureVideoObserver
  1.1669 +	   Reference to the capture video observer.
  1.1670 +
  1.1671 +@leave KErrNoMemory Out of memory. 
  1.1672 +*/ 
  1.1673 +void CCamera::CCameraVideoCaptureControl::ConstructL(MCaptureVideoObserver& aCaptureVideoObserver) 
  1.1674 +	{
  1.1675 +	iImpl = static_cast<MCameraVideoCaptureControl*>(iOwner.CustomInterface(KECamMCameraVideoCaptureControlUid));
  1.1676 +
  1.1677 +	if (iImpl == NULL)
  1.1678 +		{
  1.1679 +		User::Leave(KErrNotSupported);
  1.1680 +		}
  1.1681 +		
  1.1682 +	iImpl->SetCaptureVideoObserver(aCaptureVideoObserver);	
  1.1683 +	}
  1.1684 +
  1.1685 +/**
  1.1686 +Destructor
  1.1687 +
  1.1688 +@note  The child objects created out of this video capture control class object shall be delete beforehand. Various child 
  1.1689 +	   objects are snapshot, image processing and histograms.
  1.1690 +*/	
  1.1691 +EXPORT_C CCamera::CCameraVideoCaptureControl::~CCameraVideoCaptureControl()
  1.1692 +	{
  1.1693 +	if (iImpl != NULL)
  1.1694 +		{
  1.1695 +		iImpl->Release();	
  1.1696 +		}
  1.1697 +	}	
  1.1698 +
  1.1699 +/**
  1.1700 +Retrieve pointer to histogram API in order to use it specifically for the video capture.
  1.1701 +
  1.1702 +@return Pointer to use histogram API specifically for the video capture.
  1.1703 +		
  1.1704 +@leave  May leave with any error code.
  1.1705 +
  1.1706 +@note   Different types of histogram may be used for video capture. Every time this method will be called
  1.1707 +		on the CCameraVideoCaptureControl class object, a new type of histogram will be created.
  1.1708 +*/	
  1.1709 +EXPORT_C CCamera::CCameraV2Histogram* CCamera::CCameraVideoCaptureControl::CreateHistogramHandleL() const
  1.1710 +	{
  1.1711 +	MImplementationFactory* implFactory = NULL;
  1.1712 +	
  1.1713 +	iImpl->CreateHistogramImplFactoryL(implFactory);
  1.1714 +	
  1.1715 +	CleanupReleasePushL(*implFactory);
  1.1716 +	CCamera::CCameraV2Histogram* histogram = CCamera::CCameraV2Histogram::CreateL(iOwner, *implFactory);
  1.1717 +	CleanupStack::Pop(implFactory);
  1.1718 +	
  1.1719 +	implFactory->Release();
  1.1720 +	return histogram;	
  1.1721 +	}
  1.1722 +
  1.1723 +
  1.1724 +/**
  1.1725 +Retrieve pointer to snapshot API in order to use it specifically for the video capture.
  1.1726 +
  1.1727 +@param aClientViewFinderId
  1.1728 +	   The client viewfinder on which this client snapshot will be displayed.
  1.1729 +
  1.1730 +@return Pointer to use snapshot API specifically for the video capture.
  1.1731 +		
  1.1732 +@leave  May leave with any error code.
  1.1733 +*/
  1.1734 +EXPORT_C CCamera::CCameraSnapshot* CCamera::CCameraVideoCaptureControl::GetSnapshotHandleL(TInt aClientViewFinderId) const
  1.1735 +	{
  1.1736 +	MImplementationFactory* implFactory = NULL;
  1.1737 +	
  1.1738 +	iImpl->GetSnapshotImplFactoryL(implFactory);
  1.1739 +	
  1.1740 +	CleanupReleasePushL(*implFactory);
  1.1741 +	CCamera::CCameraSnapshot* snapshot = CCamera::CCameraSnapshot::CreateL(iOwner, *implFactory, aClientViewFinderId);
  1.1742 +	CleanupStack::Pop(implFactory);
  1.1743 +	
  1.1744 +	implFactory->Release();
  1.1745 +
  1.1746 +	return snapshot;	
  1.1747 +	}
  1.1748 +
  1.1749 +/**
  1.1750 +Retrieve pointer to image processing API in order to use it specifically for the video capture.
  1.1751 +
  1.1752 +@return Pointer to use image processing API specifically for the video capture.
  1.1753 +		
  1.1754 +@leave  May leave with any error code.
  1.1755 +*/
  1.1756 +EXPORT_C CCamera::CCameraImageProcessing* CCamera::CCameraVideoCaptureControl::GetTransformationHandleL() const
  1.1757 +	{
  1.1758 +	MImplementationFactory* implFactory = NULL;
  1.1759 +	
  1.1760 +	iImpl->GetImageProcessingImplFactoryL(implFactory);
  1.1761 +	
  1.1762 +	CleanupReleasePushL(*implFactory);
  1.1763 +	CCamera::CCameraImageProcessing* imgProc = CCamera::CCameraImageProcessing::CreateL(iOwner, *implFactory);
  1.1764 +	CleanupStack::Pop(implFactory);
  1.1765 +	
  1.1766 +	implFactory->Release();
  1.1767 +	return imgProc;	
  1.1768 +	}
  1.1769 +	
  1.1770 +/**
  1.1771 +Retrieves the supported video formats for a given resolution.
  1.1772 +
  1.1773 +@param  aVideoFormatsSupported
  1.1774 +		A bit field which retrieves the supported video formats for a given resolution.
  1.1775 +		Formats have been defined as CCamera::TFormat
  1.1776 +		
  1.1777 +@param  aSize
  1.1778 +		The resolution (or size) for which the total number of supported video formats have to be retrieved.
  1.1779 +
  1.1780 +@leave  May leave with any error code.
  1.1781 +*/
  1.1782 +EXPORT_C void CCamera::CCameraVideoCaptureControl::GetVideoFormatsSupportedL(TUint& aVideoFormatsSupported, const TSize& aSize) const
  1.1783 +	{
  1.1784 +	iImpl->GetVideoFormatsSupportedL(aVideoFormatsSupported, aSize);
  1.1785 +	}
  1.1786 +
  1.1787 +/**
  1.1788 +Retrieves the supported pixel aspect ratio for a given resolution in case of video.
  1.1789 +
  1.1790 +@param  aPixelAspectsSupported
  1.1791 +		A bit field which retrieves the supported pixel aspect ratio for a given resolution.
  1.1792 +		Pixel aspect ratio have been defined as CCamera::CCameraAdvancedSettings::TPixelAspectRatio
  1.1793 +		
  1.1794 +@param	aVideoFormat
  1.1795 +		The video format for which the supported pixel aspect ratio have to be retrieved.
  1.1796 +
  1.1797 +@param  aSize
  1.1798 +		The resolution (or size) for which the supported pixel aspect ratio have to be retrieved.
  1.1799 +
  1.1800 +@leave  May leave with any error code.
  1.1801 +*/
  1.1802 +EXPORT_C void CCamera::CCameraVideoCaptureControl::GetPixelAspectsSupportedL(TUint& aPixelAspectsSupported, CCamera::TFormat aVideoFormat, const TSize& aSize) const
  1.1803 +	{
  1.1804 +	iImpl->GetPixelAspectsSupportedL(aPixelAspectsSupported, aVideoFormat, aSize);
  1.1805 +	}
  1.1806 +
  1.1807 +/**
  1.1808 +Informs whether or not the 'embedded still capture' feature is supported. Allowing still image capture in between on-going
  1.1809 +video capture is referred to as embedded still capture.
  1.1810 +
  1.1811 +@param  aSupportedEmbeddedStillCaptureTypes
  1.1812 +		Retrieves the supported embedded still capture. The TInt is retrieved as a bit field of supported TEmbeddedStillCaptureTypes.
  1.1813 +		
  1.1814 +@leave  May leave with any error code.
  1.1815 +*/
  1.1816 +EXPORT_C void CCamera::CCameraVideoCaptureControl::GetEmbeddedStillCaptureSupportInfoL(TInt& aSupportedEmbeddedStillCaptureTypes) const
  1.1817 +	{
  1.1818 +	iImpl->GetEmbeddedStillCaptureSupportInfoL(aSupportedEmbeddedStillCaptureTypes);	
  1.1819 +	}
  1.1820 +
  1.1821 +/**
  1.1822 +Asynchronous method to prepare for video capture.
  1.1823 +
  1.1824 +Performs setup and allocation of memory prior to calling StartVideoCapture() to keep the latency of that function to a 
  1.1825 +minimum.
  1.1826 +
  1.1827 +@param  aPrepareVideoParameters 
  1.1828 + 		Parameters necessary to prepare for video capture.
  1.1829 + 		
  1.1830 +@note   Event KUidECamEventVideoCaptureControlPrepareComplete is used to notify clients about completing the preparation
  1.1831 +		for video capture.
  1.1832 +		
  1.1833 +@note 	Next PrepareVideoCapture can be called only after receiving the notification KUidECamEventReadyForNextPrepare.
  1.1834 +		
  1.1835 +@note   If some camera settings get affected because of desired video settings such as frame rate/frame size, 
  1.1836 +		specific notifications will be sent to the client about camera settings being affected.
  1.1837 +		
  1.1838 +@note	Event KUidECamEventVideoCaptureControlSettingsRangeChanged: informs that range of certain camera settings have been changed.
  1.1839 +		Client may call GetRangeAffectedSettingsL(RArray<TUid>& aRangeAffectedSettings) const to get the list of affected camera settings.
  1.1840 +
  1.1841 +@note	Event KUidECamEventVideoCaptureControlSettingsValueChanged: informs that value of certain camera settings have been changed. 
  1.1842 +		Client may call GetValueAffectedSettingsL(RArray<TUid>& aValueAffectedSettings) const to get the list of affected camera settings.
  1.1843 +
  1.1844 +@note	Event KUidECamEventVideoCaptureControlSettingsDisabled: informs that certain camera settings have been disabled. 
  1.1845 +		Client may call GetDisabledSettingsL(RArray<TUid>& aDisabledSettings) const to get the list of affected camera settings.
  1.1846 +
  1.1847 +@see 	CCamera::PrepareVideoCaptureL(TFormat aFormat,TInt aSizeIndex,TInt aRateIndex,TInt aBuffersToUse,TInt aFramesPerBuffer)
  1.1848 +
  1.1849 +@see    ReleaseVideoResource()
  1.1850 +*/
  1.1851 +EXPORT_C void CCamera::CCameraVideoCaptureControl::PrepareVideoCapture(const CCamera::CCameraVideoCaptureControl::TPrepareVideoParameters& aPrepareVideoParameters)
  1.1852 +	{
  1.1853 +	iImpl->PrepareVideoCapture(aPrepareVideoParameters);
  1.1854 +	}
  1.1855 +
  1.1856 +/**
  1.1857 +Retrieves the camera settings whose range got affected once the desired video settings (frame rate/frame size) are in place. 
  1.1858 +This method may be called by the client after receiving the notification KUidECamEventVideoCaptureControlSettingsRangeChanged.
  1.1859 +
  1.1860 +@param  aRangeAffectedSettings
  1.1861 +		Retrieves the list of range affected settings
  1.1862 +		
  1.1863 +@leave  May leave with any error code.  
  1.1864 +
  1.1865 +@see 	PrepareVideoCapture(const TPrepareVideoParameters& aPrepareVideoParameters)
  1.1866 +*/
  1.1867 +EXPORT_C void CCamera::CCameraVideoCaptureControl::GetRangeAffectedSettingsL(RArray<TUid>& aRangeAffectedSettings) const
  1.1868 +	{
  1.1869 +	iImpl->GetRangeAffectedSettingsL(aRangeAffectedSettings);	
  1.1870 +	}
  1.1871 +	
  1.1872 +/**
  1.1873 +Retrieves the camera settings whose value got affected once the desired video settings (frame rate/frame size) are in place. 
  1.1874 +This method may be called by the client after receiving the notification KUidECamEventVideoCaptureControlSettingsValueChanged.
  1.1875 +
  1.1876 +@param  aValueAffectedSettings
  1.1877 +		Retrieves the list of value affected settings
  1.1878 +
  1.1879 +@leave  May leave with any error code.
  1.1880 +
  1.1881 +@see 	PrepareVideoCapture(const TPrepareVideoParameters& aPrepareVideoParameters)
  1.1882 +*/
  1.1883 +EXPORT_C void CCamera::CCameraVideoCaptureControl::GetValueAffectedSettingsL(RArray<TUid>& aValueAffectedSettings) const
  1.1884 +	{
  1.1885 +	iImpl->GetValueAffectedSettingsL(aValueAffectedSettings);	
  1.1886 +	}
  1.1887 +	
  1.1888 +/**
  1.1889 +Retrieves the camera settings whose value got affected once the desired video settings (frame rate/frame size) are in place. 
  1.1890 +This method may be called by the client after receiving the notification KUidECamEventVideoCaptureControlSettingsDisabled.
  1.1891 +
  1.1892 +@param  aDisabledSettings
  1.1893 +		Retrieves the list of disabled settings
  1.1894 +
  1.1895 +@leave  May leave with any error code.
  1.1896 +
  1.1897 +@see 	PrepareVideoCapture(const TPrepareVideoParameters& aPrepareVideoParameters)
  1.1898 +*/
  1.1899 +EXPORT_C void CCamera::CCameraVideoCaptureControl::GetDisabledSettingsL(RArray<TUid>& aDisabledSettings) const
  1.1900 +	{
  1.1901 +	iImpl->GetDisabledSettingsL(aDisabledSettings);	
  1.1902 +	}
  1.1903 +
  1.1904 +/**
  1.1905 +Frees the video resources which were set up as a result of CCameraVideoCaptureControl::PrepareVideoCapture call.
  1.1906 +If this methid is called while PrepareVideoCapture call is outstanding, then this will be equivalent to cancelling the
  1.1907 +PrepareVideoCapture call and release any allocated resources.
  1.1908 +
  1.1909 +@see 	PrepareVideoCapture(const TPrepareVideoParameters& aPrepareVideoParameters)
  1.1910 +*/
  1.1911 +EXPORT_C void CCamera::CCameraVideoCaptureControl::ReleaseVideoResource()
  1.1912 +	{
  1.1913 +	iImpl->ReleaseVideoResource();
  1.1914 +	}
  1.1915 +
  1.1916 +/**
  1.1917 +Starts the video capture. This operation gives priority to the low latency aspects.
  1.1918 +
  1.1919 +Video frames are send to client via MCaptureVideoObserver::VideoBufferReady().
  1.1920 +
  1.1921 +@leave  May leave with any error code.
  1.1922 +
  1.1923 +@note	This method is recommended to be used rather than CCamera::StartVideoCaptureL().
  1.1924 +*/												
  1.1925 +EXPORT_C void CCamera::CCameraVideoCaptureControl::StartVideoCaptureL()
  1.1926 +	{
  1.1927 +	iImpl->StartVideoCaptureL();	
  1.1928 +	}
  1.1929 +
  1.1930 +/**
  1.1931 +Stops the video capture. This operation gives priority to the low latency aspects.
  1.1932 +
  1.1933 +@note	This method is recommended to be used rather than CCamera::StopVideoCapture().
  1.1934 +*/												
  1.1935 +EXPORT_C void CCamera::CCameraVideoCaptureControl::StopVideoCapture()
  1.1936 +	{
  1.1937 +	iImpl->StopVideoCapture();	
  1.1938 +	}
  1.1939 +
  1.1940 +/**
  1.1941 +Pauses the on-going video capture. MCaptureVideoObserver::VideoBufferReady() 
  1.1942 +callback will not be received by the client until the video capture is resumed.
  1.1943 +*/
  1.1944 +EXPORT_C void CCamera::CCameraVideoCaptureControl::PauseVideoCapture()
  1.1945 +	{
  1.1946 +	iImpl->PauseVideoCapture();	
  1.1947 +	}
  1.1948 +	
  1.1949 +/**
  1.1950 +Resumes the on-going video capture. MCaptureVideoObserver::VideoBufferReady() 
  1.1951 +callback will again be received by the client.
  1.1952 +
  1.1953 +@leave  May leave with any error code.
  1.1954 +*/
  1.1955 +EXPORT_C void CCamera::CCameraVideoCaptureControl::ResumeVideoCaptureL()
  1.1956 +	{
  1.1957 +	iImpl->ResumeVideoCaptureL();	
  1.1958 +	}
  1.1959 +
  1.1960 +/**
  1.1961 +Retrieves the fading effect state for video capture.
  1.1962 +
  1.1963 +@param  aFadingEffectState
  1.1964 +		Retrieves the current fading effect state for video capture.
  1.1965 +
  1.1966 +@leave  May leave with any error code.
  1.1967 +
  1.1968 +@internalTechnology
  1.1969 +*/
  1.1970 +EXPORT_C void CCamera::CCameraVideoCaptureControl::GetFadingEffectStateL(CCamera::CCameraVideoCaptureControl::TFadingEffectState& aFadingEffectState) const
  1.1971 +	{
  1.1972 +	iImpl->GetFadingEffectStateL(aFadingEffectState);	
  1.1973 +	}
  1.1974 +
  1.1975 +/**
  1.1976 +Sets the fading effect state for video capture.
  1.1977 +
  1.1978 +@param  aFadingEffectState
  1.1979 +		The desired fading effect state for video capture.
  1.1980 +		
  1.1981 +@note   Triggers a KUidECamEventVideoCaptureControlFadingEffect event notification.
  1.1982 +
  1.1983 +@internalTechnology
  1.1984 +*/	
  1.1985 +EXPORT_C void CCamera::CCameraVideoCaptureControl::SetFadingEffectState(CCamera::CCameraVideoCaptureControl::TFadingEffectState aFadingEffectState)
  1.1986 +	{
  1.1987 +	iImpl->SetFadingEffectState(aFadingEffectState);
  1.1988 +	}
  1.1989 +
  1.1990 +/**
  1.1991 +Retrieves the current video capture state.
  1.1992 +
  1.1993 +@param aVideoCaptureState
  1.1994 +	   Retrieves the current video capture state.
  1.1995 +
  1.1996 +@leave  May leave with any error code.
  1.1997 +*/
  1.1998 +EXPORT_C void CCamera::CCameraVideoCaptureControl::GetVideoCaptureStateL(CCamera::CCameraVideoCaptureControl::TVideoCaptureState& aVideoCaptureState) const
  1.1999 +	{
  1.2000 +	iImpl->GetVideoCaptureStateL(aVideoCaptureState);		
  1.2001 +	}
  1.2002 +
  1.2003 +/**
  1.2004 +Retrieves the various types of video capture supported. 
  1.2005 +@param  aSupportedVideoCaptureTypes
  1.2006 +		Retrieves the supported video capture type. The TInt is retrieved as a bit field of supported 
  1.2007 +		TVideoCaptureType.
  1.2008 +		
  1.2009 +@leave  May leave with any error code.
  1.2010 +*/	
  1.2011 +EXPORT_C void CCamera::CCameraVideoCaptureControl::GetVideoCaptureSupportInfoL(TInt& aSupportedVideoCaptureTypes) const
  1.2012 +	{
  1.2013 +	iImpl->GetVideoCaptureSupportInfoL(aSupportedVideoCaptureTypes);	
  1.2014 +	}
  1.2015 +	
  1.2016 +/*
  1.2017 +Retrieves the current prepare video parameters.
  1.2018 +
  1.2019 +@param aPrepareVideoParameters
  1.2020 +	   Retrieves the current prepare video parameters.
  1.2021 +	   	
  1.2022 +@leave  May leave with any error code.
  1.2023 +*/
  1.2024 +EXPORT_C void CCamera::CCameraVideoCaptureControl::GetPrepareVideoParametersL(CCamera::CCameraVideoCaptureControl::TPrepareVideoParameters& aPrepareVideoParameters) const
  1.2025 +	{
  1.2026 +	iImpl->GetPrepareVideoParametersL(aPrepareVideoParameters);	
  1.2027 +	}
  1.2028 +	
  1.2029 +/**
  1.2030 +Constructor for the TPrepareVideoParameters class.
  1.2031 +Sets the size and version of this class.
  1.2032 +*/
  1.2033 +EXPORT_C CCamera::CCameraVideoCaptureControl::TPrepareVideoParameters::TPrepareVideoParameters()
  1.2034 +	{
  1.2035 +	iSize = sizeof(CCamera::CCameraVideoCaptureControl::TPrepareVideoParameters);
  1.2036 +	iVersion = KECamPrepareVideoParametersCurrentVersion;
  1.2037 +	}
  1.2038 +
  1.2039 +/**	
  1.2040 +Returns the size of the class. Used for extensibility by deriving from this base class and adding new member variables.
  1.2041 +Intended to be used for implementation of methods where this class reference is passed as function arguments. 
  1.2042 +Implementation of such methods can find out the whether the actual class passed is base or the derived one. So, if a new application 
  1.2043 +is made to run on an old implementation, an error may occur in such cases after the old implementation detects this by getting 
  1.2044 +the size information of the T class passed. Also, if old application is made to run on a new implementation, this could be 
  1.2045 +properly handled if the derived class variables handling is done in a proper 'if-else' statement.
  1.2046 +
  1.2047 +@return The size of the class.
  1.2048 +
  1.2049 +@note The size will be modified when the T-class gets updated.
  1.2050 +*/
  1.2051 +EXPORT_C TUint CCamera::CCameraVideoCaptureControl::TPrepareVideoParameters::Size() const
  1.2052 +	{
  1.2053 +	return iSize;	
  1.2054 +	}
  1.2055 +
  1.2056 +/**	
  1.2057 +Returns the version of the class. Used for extensibility specially when the class members are not added but the Reserved 
  1.2058 +members get used at a later stage.
  1.2059 +
  1.2060 +@return The version of this class.
  1.2061 +
  1.2062 +@note The version will be modified when the T-class gets updated.
  1.2063 +*/
  1.2064 +EXPORT_C TUint CCamera::CCameraVideoCaptureControl::TPrepareVideoParameters::Version() const
  1.2065 +	{
  1.2066 +	return iVersion;	
  1.2067 +	}
  1.2068 +
  1.2069 +/** 
  1.2070 +Indicates whether or not the embedded still image capture state is enabled.
  1.2071 +		
  1.2072 +@return Whether or not the embedded still image capture state is enabled.
  1.2073 +
  1.2074 +@see CCamera::CCameraVideoCaptureControl::TPrepareVideoParameters::iIsEmbeddedStillCaptureEnabled
  1.2075 +*/		
  1.2076 +EXPORT_C TBool CCamera::CCameraVideoCaptureControl::TPrepareVideoParameters::IsEmbeddedStillCaptureEnabled() const
  1.2077 +	{
  1.2078 +	if (iIsEmbeddedStillCaptureEnabled)
  1.2079 +		{
  1.2080 +		return ETrue;
  1.2081 +		}
  1.2082 +	else
  1.2083 +		{
  1.2084 +		return EFalse;
  1.2085 +		}	
  1.2086 +	}
  1.2087 +	
  1.2088 +/** 
  1.2089 +Sets the state to inform whether or not the embedded still image capture state is enabled.
  1.2090 +
  1.2091 +@param  aIsEmbeddedStillCaptureEnabled
  1.2092 +		ETrue implies embedded still capture state is enabled.
  1.2093 +		EFalse implies embedded still capture state is disabled.
  1.2094 +		
  1.2095 +@see CCamera::CCameraVideoCaptureControl::TPrepareVideoParameters::iIsEmbeddedStillCaptureEnabled
  1.2096 +*/
  1.2097 +EXPORT_C void CCamera::CCameraVideoCaptureControl::TPrepareVideoParameters::SetEmbeddedStillCaptureState(TBool aIsEmbeddedStillCaptureEnabled)
  1.2098 +	{
  1.2099 +	iIsEmbeddedStillCaptureEnabled 	= static_cast<TUint>(aIsEmbeddedStillCaptureEnabled);
  1.2100 +	}
  1.2101 +
  1.2102 +/**
  1.2103 +Retrieves the current video capture type used.
  1.2104 +
  1.2105 +@param  aVideoCaptureType
  1.2106 +		Retrieves the current video capture type.
  1.2107 +		
  1.2108 +@see CCamera::CCameraVideoCaptureControl::TPrepareVideoParameters::iVideoCaptureType
  1.2109 +*/
  1.2110 +EXPORT_C CCamera::CCameraVideoCaptureControl::TVideoCaptureType CCamera::CCameraVideoCaptureControl::TPrepareVideoParameters::VideoCaptureType() const
  1.2111 +	{
  1.2112 +	switch(iVideoCaptureType)	
  1.2113 +		{
  1.2114 +		case KECamVideoCaptureBit0:
  1.2115 +			{
  1.2116 +			return CCamera::CCameraVideoCaptureControl::EVideoCaptureNotSupported;
  1.2117 +			}
  1.2118 +		case KECamClientVideoCaptureBit1:
  1.2119 +			{
  1.2120 +			return CCamera::CCameraVideoCaptureControl::EClientVideoCapture;
  1.2121 +			}
  1.2122 +		case KECamDirectVideoCaptureBit2:
  1.2123 +			{
  1.2124 +			return CCamera::CCameraVideoCaptureControl::EDirectVideoCapture;
  1.2125 +			}			
  1.2126 +		default:
  1.2127 +			{
  1.2128 +			return CCamera::CCameraVideoCaptureControl::EVideoCaptureNotSupported;	
  1.2129 +			}
  1.2130 +		}
  1.2131 +	}
  1.2132 +
  1.2133 +/**
  1.2134 +Sets the desired video capture type.
  1.2135 +
  1.2136 +@param  aVideoCaptureType
  1.2137 +		The desired video capture type.
  1.2138 +		
  1.2139 +@see CCamera::CCameraVideoCaptureControl::TPrepareVideoParameters::iVideoCaptureType
  1.2140 +*/
  1.2141 +EXPORT_C void CCamera::CCameraVideoCaptureControl::TPrepareVideoParameters::SetVideoCaptureType(CCamera::CCameraVideoCaptureControl::TVideoCaptureType aVideoCaptureType)
  1.2142 +	{
  1.2143 +	iVideoCaptureType = static_cast<TUint>(aVideoCaptureType);
  1.2144 +	}
  1.2145 +
  1.2146 +/**
  1.2147 +Retrieves the supported YUV conversion coefficient in case of video.
  1.2148 +
  1.2149 +@param  aSupportedConversionCoefficients
  1.2150 +		A bit field which retrieves the supported YUV conversion coefficient.
  1.2151 +		YUV conversion coefficients have been defined as TYuvCoefficients
  1.2152 +
  1.2153 +@leave  May leave with any error code.
  1.2154 +*/
  1.2155 +void CCamera::CCameraVideoCaptureControl::GetSupportedConversionCoefficientsL(TUint& /*aSupportedConversionCoefficients*/) const
  1.2156 +	{
  1.2157 +	User::Leave(KErrNotSupported);
  1.2158 +	}
  1.2159 +
  1.2160 +/**
  1.2161 +Retrieves the currently used YUV conversion coefficients.
  1.2162 +
  1.2163 +@param  aConversionCoefficients
  1.2164 +		Currently used TYuvCoefficients
  1.2165 +		
  1.2166 +@leave  May leave with any error code.
  1.2167 +*/
  1.2168 +void CCamera::CCameraVideoCaptureControl::GetConversionCoefficientL(TYuvCoefficients& /*aConversionCoefficients*/) const
  1.2169 +	{
  1.2170 +	User::Leave(KErrNotSupported);		
  1.2171 +	}
  1.2172 +
  1.2173 +/**
  1.2174 +Asynchronous method which sets the desired YUV conversion coefficients.
  1.2175 +
  1.2176 +@param  aConversionCoefficients
  1.2177 +		The desired TYuvCoefficients
  1.2178 +		
  1.2179 +@note   Event KUidECamEventVideoCaptureControlConversionCoefficient is used to notify clients about setting of desired YUV 
  1.2180 +		conversion coefficients.
  1.2181 +*/
  1.2182 +void CCamera::CCameraVideoCaptureControl::SetConversionCoefficient(TYuvCoefficients /*aConversionCoefficients*/)
  1.2183 +	{
  1.2184 +	return;	
  1.2185 +	}