|
1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #include <ecam/ecamcapturecontrolintf.h> |
|
17 #include <ecam/implementationfactoryintf.h> |
|
18 #include <ecamimageprocessing.h> |
|
19 #include <ecam/camerahistogram.h> |
|
20 #include "ecamversion.h" |
|
21 |
|
22 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
23 #include <ecamcapturecontrolconst.h> |
|
24 #endif |
|
25 const TInt KECamVideoCaptureBit0 = 0x00; |
|
26 const TInt KECamClientVideoCaptureBit1 = 0x01; |
|
27 const TInt KECamDirectVideoCaptureBit2 = 0x02; |
|
28 |
|
29 /** |
|
30 Factory function for creating the CCameraPreImageCaptureControl object. |
|
31 |
|
32 @param aCamera |
|
33 a reference to a CCamera object providing the settings. |
|
34 |
|
35 @param aPreImageCaptureControlObserver |
|
36 Reference to the pre image capture control observer. |
|
37 |
|
38 @return a pointer to a fully constructed CCameraPreImageCaptureControl object. |
|
39 |
|
40 @leave KErrNoMemory Out of memory Or any other system-wide error code. |
|
41 |
|
42 @leave KErrExtensionNotSupported When NewL/NewDuplicateL used instead of New2L/NewDuplicate2L. |
|
43 */ |
|
44 EXPORT_C CCamera::CCameraPreImageCaptureControl* CCamera::CCameraPreImageCaptureControl::NewL(CCamera& aCamera, MPreImageCaptureControlObserver& aPreImageCaptureControlObserver) |
|
45 { |
|
46 if(aCamera.CameraVersion() == KCameraDefaultVersion) |
|
47 { |
|
48 User::Leave(KErrExtensionNotSupported); |
|
49 } |
|
50 |
|
51 CCamera::CCameraPreImageCaptureControl* self = new (ELeave)CCamera::CCameraPreImageCaptureControl(aCamera); |
|
52 CleanupStack::PushL(self); |
|
53 self->ConstructL(aPreImageCaptureControlObserver); |
|
54 CleanupStack::Pop(self); |
|
55 |
|
56 return self; |
|
57 } |
|
58 |
|
59 /** |
|
60 CCameraPreImageCaptureControl Constructor. |
|
61 |
|
62 @param aOwner |
|
63 a reference to a CCamera object. |
|
64 */ |
|
65 CCamera::CCameraPreImageCaptureControl::CCameraPreImageCaptureControl(CCamera& aOwner):iOwner(aOwner), iImpl(NULL) |
|
66 { |
|
67 } |
|
68 |
|
69 /** |
|
70 CCameraPreImageCaptureControl second phase constructor. |
|
71 |
|
72 Function used to initialise internal state of the object. Uses reference to the camera to retrieve |
|
73 PreImageCaptureControl interface pointer. |
|
74 |
|
75 @param aPreImageCaptureControlObserver |
|
76 Reference to the pre image capture control observer. |
|
77 |
|
78 @leave KErrNoMemory Out of memory Or any other system-wide error code. |
|
79 */ |
|
80 void CCamera::CCameraPreImageCaptureControl::ConstructL(MPreImageCaptureControlObserver& aPreImageCaptureControlObserver) |
|
81 { |
|
82 iImpl = static_cast<MCameraPreImageCaptureControl*>(iOwner.CustomInterface(KECamMCameraPreImageCaptureControlUid)); |
|
83 |
|
84 if (iImpl == NULL) |
|
85 { |
|
86 User::Leave(KErrNotSupported); |
|
87 } |
|
88 |
|
89 iImpl->SetPreImageCaptureControlObserver(aPreImageCaptureControlObserver); |
|
90 } |
|
91 |
|
92 /** |
|
93 Destructor |
|
94 */ |
|
95 EXPORT_C CCamera::CCameraPreImageCaptureControl::~CCameraPreImageCaptureControl() |
|
96 { |
|
97 if (iImpl != NULL) |
|
98 { |
|
99 iImpl->Release(); |
|
100 } |
|
101 } |
|
102 |
|
103 /** |
|
104 Retrieves information regarding the direct snapshot feature support. Direct Snapshot, if supported, can be created |
|
105 out of version2 direct viewfinder object only. |
|
106 |
|
107 @param aDirectSnapshotSupportInfo |
|
108 This is a bit field providing supported direct snapshot of type TDirectSnapshotType |
|
109 |
|
110 @leave May leave with any error code. |
|
111 */ |
|
112 EXPORT_C void CCamera::CCameraPreImageCaptureControl::GetDirectSnapshotSupportInfoL(TUint& aDirectSnapshotSupportInfo) const |
|
113 { |
|
114 iImpl->GetDirectSnapshotSupportInfoL(aDirectSnapshotSupportInfo); |
|
115 } |
|
116 |
|
117 /** |
|
118 Retrieves the settings supported for embedded still captures. Possibilty exists that not all the settings supported for |
|
119 normal still image captures are supported for embedded still captures as well. |
|
120 |
|
121 @param aSupportedEmbeddedStillCaptureSettings |
|
122 Array of TUid which retrieves the supported embedded still captures. Empty list indicated that no settings are |
|
123 supported for embedded still captures. |
|
124 |
|
125 @leave May leave with any error code. |
|
126 */ |
|
127 EXPORT_C void CCamera::CCameraPreImageCaptureControl::GetSupportedEmbeddedStillCaptureSettingsL(RArray<TUid>& aSupportedEmbeddedStillCaptureSettings) const |
|
128 { |
|
129 iImpl->GetSupportedEmbeddedStillCaptureSettingsL(aSupportedEmbeddedStillCaptureSettings); |
|
130 } |
|
131 |
|
132 /** |
|
133 Retrieves information regarding the supported direct saving state. If used, still images are saved in files rather than |
|
134 providing clients the MCameraImageBuffer. Direct saving to file will continue even if the client application gets closed |
|
135 for any reasons. |
|
136 |
|
137 @param aSupportedDirectSavingType |
|
138 Retrieves the enum specifying supported TDirectSavingType. |
|
139 If EDirectSavingNotUsed, direct saving not supported. Images will be received in buffer MCameraImageBuffer. |
|
140 |
|
141 If EDirectSavingHighResolutionFileOnly, direct saving to file is supported. But no cut down version of the image |
|
142 will be saved to file. Callback used is MCaptureImageObserver::ImageDirectSavingCompleted(). |
|
143 |
|
144 If EDirectSavingWithLowerResolutionFile, Direct saving to file is supported. Also, a cut down version of the image |
|
145 will be saved to another specified file. Callbacks used are MCaptureImageObserver::ImageDirectSavingCompleted() for |
|
146 actual image and MCaptureImageObserver::CutDownImageDirectSavingCompleted() for lower resolution image. |
|
147 |
|
148 @leave May leave with any error code. |
|
149 */ |
|
150 EXPORT_C void CCamera::CCameraPreImageCaptureControl::GetSupportedDirectSavingTypeL(CCamera::CCameraPreImageCaptureControl |
|
151 ::TDirectSavingType& aSupportedDirectSavingType) const |
|
152 { |
|
153 iImpl->GetSupportedDirectSavingTypeL(aSupportedDirectSavingType); |
|
154 } |
|
155 |
|
156 /** |
|
157 Provides the base name for file used to save images. If there are sequential images, files will be created by |
|
158 implementation with names appearing as base name and appended by increasing integers which would start from |
|
159 aStartingSequenceNumber. This is used for the original image only, but not for the cut down version of the original |
|
160 image. |
|
161 |
|
162 @param aFilename |
|
163 A const TDesC8&: Base name for files which ECam implementation needs to create in order to collect every sequential |
|
164 image. |
|
165 |
|
166 @param aStartingSequenceNumber |
|
167 The starting sequence number which will be appended to the base name 'aFilename'. The sequence number will keep |
|
168 on increasing for every individual still image capture. |
|
169 |
|
170 @leave May leave with any error code. |
|
171 |
|
172 @note It is upto the implementation how many digits it uses for sequence number. Accordingly, padding will be done with |
|
173 zeroes. |
|
174 */ |
|
175 EXPORT_C void CCamera::CCameraPreImageCaptureControl::SetSequentialImageFilenameL(const TDesC8& aFilename, TInt aStartingSequenceNumber) |
|
176 { |
|
177 iImpl->SetSequentialImageFilenameL(aFilename, aStartingSequenceNumber); |
|
178 } |
|
179 |
|
180 /** |
|
181 Provides the base name for file used to save cut down version of the original images. If there are sequential images, |
|
182 files will be created by implementation with names appearing as base name and appended by increasing integers which would |
|
183 start from aStartingSequenceNumber. This is used for the cut down version of the original image. |
|
184 |
|
185 @param aLowerResolutionFilename |
|
186 A const TDesC8&: Base name for files which ECam implementation needs to create in order to collect the cut down version |
|
187 of every sequential image. |
|
188 |
|
189 @param aStartingSequenceNumber |
|
190 The starting sequence number which will be appended to the base name 'aFilename'. The sequence number will keep |
|
191 on increasing for every individual still image capture. |
|
192 |
|
193 @leave May leave with any error code. |
|
194 |
|
195 @note It is upto the implementation how many digits it uses for sequence number. Accordingly, padding will be done with |
|
196 zeroes. |
|
197 */ |
|
198 EXPORT_C void CCamera::CCameraPreImageCaptureControl::SetLowerResolutionSequentialImageFilenameL(const TDesC8& aLowerResolutionFilename, |
|
199 TInt aStartingSequenceNumber) |
|
200 { |
|
201 iImpl->SetLowerResolutionSequentialImageFilenameL(aLowerResolutionFilename, aStartingSequenceNumber); |
|
202 } |
|
203 |
|
204 /** |
|
205 Retrieves the type of direct saving currently used. This will be represented as a direct saving state as given by |
|
206 TDirectSavingType. |
|
207 |
|
208 Whether or not the direct saving option is used, client will receive the MCaptureImageObserver::ImageCaptureComplete() |
|
209 callback to mark the completion of the image capture operation. |
|
210 |
|
211 @param aDirectSavingType |
|
212 Current type of the direct saving. |
|
213 |
|
214 If EDirectSavingNotUsed, direct saving is not used. Images will be received in buffer MCameraImageBuffer through |
|
215 callback MCaptureImageObserver::ImageBufferReady(). |
|
216 |
|
217 If EDirectSavingHighResolutionFileOnly, direct saving to file option is currently used. But no cut down version of |
|
218 the image will be saved to file. Callback used is MCaptureImageObserver::ImageDirectSavingCompleted(). |
|
219 |
|
220 If EDirectSavingWithLowerResolutionFile, apart from direct saving to file option for the actual image, a cut down |
|
221 version of the image will be saved to another specified file. Callbacks used are MCaptureImageObserver:: |
|
222 ImageDirectSavingCompleted() for actual image and MCaptureImageObserver::CutDownImageDirectSavingCompleted() for |
|
223 lower resolution image. |
|
224 |
|
225 @leave May leave with any error code. |
|
226 |
|
227 @note Direct saving to file will continue even if the client application gets closed for any reasons. |
|
228 */ |
|
229 EXPORT_C void CCamera::CCameraPreImageCaptureControl::GetDirectSavingTypeL(CCamera::CCameraPreImageCaptureControl:: |
|
230 TDirectSavingType& aDirectSavingType) const |
|
231 { |
|
232 iImpl->GetDirectSavingTypeL(aDirectSavingType); |
|
233 } |
|
234 |
|
235 /** |
|
236 Instructs the ECam implementation to use the desired type of direct saving option as specifed by its state. |
|
237 |
|
238 Whether or not the direct saving option is used, client will receive the MCaptureImageObserver::ImageCaptureComplete() |
|
239 callback to mark the completion of the image capture operation. |
|
240 |
|
241 @param aDirectSavingType |
|
242 The desired type of the direct saving. |
|
243 |
|
244 If EDirectSavingNotUsed, direct saving will not be used. Images will be received in buffer MCameraImageBuffer |
|
245 through callback MCaptureImageObserver::ImageBufferReady(). |
|
246 |
|
247 If EDirectSavingHighResolutionFileOnly, direct saving to file option will be used. But no cut down version of |
|
248 the image will be saved to file. Callback to be used is MCaptureImageObserver::ImageDirectSavingCompleted(). |
|
249 |
|
250 If EDirectSavingWithLowerResolutionFile, apart from direct saving to file option for the actual image, a cut down |
|
251 version of the image will be saved to another specified file. Callbacks to be used are MCaptureImageObserver:: |
|
252 ImageDirectSavingCompleted() for actual image and MCaptureImageObserver::CutDownImageDirectSavingCompleted() for |
|
253 lower resolution image. |
|
254 |
|
255 @leave May leave with any error code. |
|
256 |
|
257 @note Clients need to provide the filename before capturing still images under direct saving option. Callback |
|
258 MCaptureImageObserver::ImageDirectSavingCompleted() may provide error KErrNotReady if filenames are not |
|
259 provided before images are captured for direct saving. Similarly, if cut down version of image is also to be saved |
|
260 to file, MCaptureImageObserver::CutDownImageDirectSavingCompleted() may provide error KErrNotReady if filenames are |
|
261 not provided before hand. |
|
262 |
|
263 @note Direct saving to file will continue even if the client application gets closed for any reasons. |
|
264 */ |
|
265 EXPORT_C void CCamera::CCameraPreImageCaptureControl::SetDirectSavingTypeL(CCamera::CCameraPreImageCaptureControl:: |
|
266 TDirectSavingType aDirectSavingType) |
|
267 { |
|
268 iImpl->SetDirectSavingTypeL(aDirectSavingType); |
|
269 } |
|
270 |
|
271 /** |
|
272 Retrieves whether the camera device is capable of providing capture event notification to the client. Client may take |
|
273 the responsibility of playing the capture sound after receiving the notification. |
|
274 |
|
275 @param aSupportedDriveModes |
|
276 A reference to bit-field of TUint which indicates the drive modes in which the capture event notification is |
|
277 supported. If aSupportedDriveModes =0, capture event notification is not supported. |
|
278 |
|
279 @note If capture event notification is supported, ECam implementation will use KUidECamEventImageCaptureEvent to notify |
|
280 clients that the image has been exposed to the camera sensor. Clients may play capture sound if they desire to do so. |
|
281 |
|
282 @leave May leave with any error code. |
|
283 |
|
284 @see CCamera::CCameraAdvancedSettings::TDriveMode |
|
285 */ |
|
286 EXPORT_C void CCamera::CCameraPreImageCaptureControl::GetCaptureEventSupportInfoL(TUint& aSupportedDriveModes) const |
|
287 { |
|
288 iImpl->GetCaptureEventSupportInfoL(aSupportedDriveModes); |
|
289 } |
|
290 |
|
291 /** |
|
292 Retrieves the supported image formats for a given resolution. |
|
293 |
|
294 @param aImageFormatsSupported |
|
295 A bit field which retrieves the supported image formats for a given resolution. |
|
296 Formats have been defined as CCamera::TFormat |
|
297 |
|
298 @param aSize |
|
299 The resolution (or size) for which the total number of supported image formats have to be retrieved. |
|
300 |
|
301 @leave May leave with any error code. |
|
302 */ |
|
303 EXPORT_C void CCamera::CCameraPreImageCaptureControl::GetImageFormatsSupportedL(TUint& aImageFormatsSupported, const TSize& aSize) const |
|
304 { |
|
305 iImpl->GetImageFormatsSupportedL(aImageFormatsSupported, aSize); |
|
306 } |
|
307 |
|
308 /** |
|
309 Retrieves the supported pixel aspect ratio for a given resolution in case of still image. |
|
310 |
|
311 @param aPixelAspectsSupported |
|
312 A bit field which retrieves the supported pixel aspect ratio for a given resolution. |
|
313 Pixel aspect ratio have been defined as CCamera::CCameraAdvancedSettings::TPixelAspectRatio |
|
314 |
|
315 @param aImageFormat |
|
316 The image format for which the supported pixel aspect ratio have to be retrieved. |
|
317 |
|
318 @param aSize |
|
319 The resolution (or size) for which the supported pixel aspect ratio have to be retrieved. |
|
320 |
|
321 @leave May leave with any error code. |
|
322 */ |
|
323 EXPORT_C void CCamera::CCameraPreImageCaptureControl::GetPixelAspectsSupportedL(TUint& aPixelAspectsSupported, CCamera::TFormat aImageFormat, const TSize& aSize) const |
|
324 { |
|
325 iImpl->GetPixelAspectsSupportedL(aPixelAspectsSupported, aImageFormat, aSize); |
|
326 } |
|
327 |
|
328 /** |
|
329 Performs setup and allocation of memory for image capture operation. Implementation creates a new CCameraImageCapture* |
|
330 object which reflects the prepare image parameters passed by the client. The callback MPreImageCaptureControlObserver:: |
|
331 PrepareImageComplete() passes the ownership of the CCameraImageCapture* object to the client. |
|
332 |
|
333 This needs to be called every time client wishes to change prepare image parameters or if the client wishes to create |
|
334 a new CCameraImageCapture* object. |
|
335 |
|
336 @param aPrepareImageParameters |
|
337 The desired image parameters to be used for capturing still images using the CCameraImageCapture instance |
|
338 which would be passed by the implementation. |
|
339 |
|
340 @param aCaptureImageObserver |
|
341 The Capture image observer which is needed by the implementation in order to pass it to the CCameraImageCapture |
|
342 while creating it. |
|
343 |
|
344 @note Next PrepareImageCapture can be called only after receiving the notification KUidECamEventReadyForNextPrepare. |
|
345 |
|
346 @note If drive mode is EDriveModeTimeNudgeCapture, when the client initiates image capture the total amount of images |
|
347 requested by the client (specified in TDriveModeDependentAttributes) will be returned to the client |
|
348 (via MCaptureImageObserver::ImageBufferReady()) or saved to file. No other instance of CCameraImageCapture can be |
|
349 created whilst using this drive mode until the first instance is destroyed. |
|
350 |
|
351 @see CCamera::PrepareImageCaptureL(TFormat aImageFormat,TInt aSizeIndex) |
|
352 */ |
|
353 EXPORT_C void CCamera::CCameraPreImageCaptureControl::PrepareImageCapture(const CCamera::CCameraPreImageCaptureControl:: |
|
354 TPrepareImageParameters& aPrepareImageParameters, MCaptureImageObserver& aCaptureImageObserver) |
|
355 { |
|
356 // MCameraPreImageCaptureControl concrete implementation will call CCameraImageCapture::CreateL(CCamera& aCamera, |
|
357 // MCaptureImageObserver& aCaptureImageObserver) method and pass the CCameraImageCapture* to the client through |
|
358 // the MPreImageCaptureControlObserver::PrepareImageComplete() callback. |
|
359 iImpl->PrepareImageCapture(aPrepareImageParameters, aCaptureImageObserver); |
|
360 } |
|
361 |
|
362 /** |
|
363 Informs whether or not the setting of maximum memory size when encoding to the current format is supported. |
|
364 |
|
365 @param aIsImageMaxMemorySizeSettingSupported |
|
366 ETrue indicates that setting of maximum memory size is supported. |
|
367 EFalse indicates that setting of maximum memory size is not supported. |
|
368 |
|
369 @leave May leave with any error code. |
|
370 */ |
|
371 EXPORT_C void CCamera::CCameraPreImageCaptureControl::GetImageMaxMemorySizeSettingSupportInfoL(TBool& aIsImageMaxMemorySizeSettingSupported) const |
|
372 { |
|
373 iImpl->GetImageMaxMemorySizeSettingSupportInfoL(aIsImageMaxMemorySizeSettingSupported); |
|
374 } |
|
375 |
|
376 /** |
|
377 Get the maximum memory size in kilo bytes when encoding to the current format. |
|
378 |
|
379 @param aMemorySize |
|
380 Retrieves the maximum memory size in kilo bytes. |
|
381 |
|
382 @note In case of JPEG, the maximum memory size will take preference over JPEG quality if the maximum memory size is |
|
383 not sufficient to achieve the desired quality. Refer CCamera::JpegQuality() |
|
384 |
|
385 @leave May leave with any error code. |
|
386 */ |
|
387 EXPORT_C void CCamera::CCameraPreImageCaptureControl::GetImageMaxMemorySizeL(TUint& aMemorySize) const |
|
388 { |
|
389 iImpl->GetImageMaxMemorySizeL(aMemorySize); |
|
390 } |
|
391 |
|
392 /** |
|
393 Retrieves the supported processing options. |
|
394 |
|
395 @param aEcamProcessingOptionsSupported |
|
396 Bitfield containing the available processing options. |
|
397 |
|
398 @leave May leave with any error code. |
|
399 */ |
|
400 EXPORT_C void CCamera::CCameraPreImageCaptureControl::GetSupportedProcessingOptionsL(TUint& aECamProcessingOptionsSupported) const |
|
401 { |
|
402 iImpl->GetSupportedProcessingOptionsL(aECamProcessingOptionsSupported); |
|
403 } |
|
404 |
|
405 /** |
|
406 Constructor for the TPrepareImageParameters class. |
|
407 Sets the size and version of this class. |
|
408 */ |
|
409 EXPORT_C CCamera::CCameraPreImageCaptureControl::TPrepareImageParameters::TPrepareImageParameters() |
|
410 { |
|
411 iSize = sizeof(CCamera::CCameraPreImageCaptureControl::TPrepareImageParameters); |
|
412 iVersion = KECamPrepareImageParametersCurrentVersion; |
|
413 |
|
414 iImageMaxMemorySize = KECamNoSpecificMaxMemorySize; |
|
415 iImageProcessingOptions = 0; |
|
416 } |
|
417 |
|
418 /** |
|
419 Returns the size of the class. Used for extensibility by deriving from this base class and adding new member variables. |
|
420 Intended to be used for implementation of methods where this class reference is passed as function arguments. |
|
421 Implementation of such methods can find out the whether the actual class passed is base or the derived one. So, if a new application |
|
422 is made to run on an old implementation, an error may occur in such cases after the old implementation detects this by getting |
|
423 the size information of the T class passed. Also, if old application is made to run on a new implementation, this could be |
|
424 properly handled if the derived class variables handling is done in a proper 'if-else' statement. |
|
425 |
|
426 @return The size of this class. |
|
427 |
|
428 @note The size will be modified when the T-class gets updated. |
|
429 */ |
|
430 EXPORT_C TUint CCamera::CCameraPreImageCaptureControl::TPrepareImageParameters::Size() const |
|
431 { |
|
432 return iSize; |
|
433 } |
|
434 |
|
435 /** |
|
436 Returns the version of the class. Used for extensibility specially when the class members are not added but the Reserved |
|
437 members get used at a later stage. |
|
438 |
|
439 @return The version of this class. |
|
440 |
|
441 @note The version will be modified when the T-class gets updated. |
|
442 */ |
|
443 EXPORT_C TUint CCamera::CCameraPreImageCaptureControl::TPrepareImageParameters::Version() const |
|
444 { |
|
445 return iVersion; |
|
446 } |
|
447 |
|
448 /** |
|
449 Sets the image processing options to be used during image capture. |
|
450 |
|
451 @param aImageProcessingOptions |
|
452 Bitfield of image processing options to be used during image capture. |
|
453 */ |
|
454 EXPORT_C void CCamera::CCameraPreImageCaptureControl::TPrepareImageParameters::SetImageProcessingOptions(TUint aImageProcessingOptions) |
|
455 { |
|
456 iImageProcessingOptions = aImageProcessingOptions; |
|
457 } |
|
458 |
|
459 /** |
|
460 Gets the current image processing options to be used during image capture. |
|
461 |
|
462 @param aImageProcessingOptions |
|
463 Bitfield of current image processing options to be used during image capture. |
|
464 */ |
|
465 EXPORT_C void CCamera::CCameraPreImageCaptureControl::TPrepareImageParameters::GetImageProcessingOptions(TUint& aImageProcessingOptions) const |
|
466 { |
|
467 aImageProcessingOptions = iImageProcessingOptions; |
|
468 } |
|
469 |
|
470 /** |
|
471 Constructor for the TDriveModeDependentAttributes class. |
|
472 Sets the size and version of this class. |
|
473 */ |
|
474 EXPORT_C CCamera::CCameraPreImageCaptureControl::TDriveModeDependentAttributes::TDriveModeDependentAttributes() |
|
475 { |
|
476 iSize = sizeof(CCamera::CCameraPreImageCaptureControl::TDriveModeDependentAttributes); |
|
477 iVersion = KECamDriveModeDependentAttributesCurrentVersion; |
|
478 iParam1 = -1; |
|
479 iParam2 = -1; |
|
480 } |
|
481 |
|
482 /** |
|
483 Returns the size of the class. Used for extensibility by deriving from this base class and adding new member variables. |
|
484 Intended to be used for implementation of methods where this class reference is passed as function arguments. |
|
485 Implementation of such methods can find out the whether the actual class passed is base or the derived one. So, if a new application |
|
486 is made to run on an old implementation, an error may occur in such cases after the old implementation detects this by getting |
|
487 the size information of the T class passed. Also, if old application is made to run on a new implementation, this could be |
|
488 properly handled if the derived class variables handling is done in a proper 'if-else' statement. |
|
489 |
|
490 @return The size of this class. |
|
491 |
|
492 @note The size will be modified when the T-class gets updated. |
|
493 */ |
|
494 EXPORT_C TUint CCamera::CCameraPreImageCaptureControl::TDriveModeDependentAttributes::Size() const |
|
495 { |
|
496 return iSize; |
|
497 } |
|
498 |
|
499 /** |
|
500 Returns the version of the class. Used for extensibility specially when the class members are not added but the Reserved |
|
501 members get used at a later stage. |
|
502 |
|
503 @return The version of this class. |
|
504 |
|
505 @note The version will be modified when the T-class gets updated. |
|
506 */ |
|
507 EXPORT_C TUint CCamera::CCameraPreImageCaptureControl::TDriveModeDependentAttributes::Version() const |
|
508 { |
|
509 return iVersion; |
|
510 } |
|
511 |
|
512 /** |
|
513 Constructor for the TImageBufferInfo class. |
|
514 Sets the size and version of this class. |
|
515 */ |
|
516 EXPORT_C CCamera::CCameraPreImageCaptureControl::TImageBufferInfo::TImageBufferInfo() |
|
517 { |
|
518 iSize = sizeof(CCamera::CCameraPreImageCaptureControl::TImageBufferInfo); |
|
519 iVersion = KECamImageBufferInfoCurrentVersion; |
|
520 } |
|
521 |
|
522 /** |
|
523 Returns the size of the class. Used for extensibility by deriving from this base class and adding new member variables. |
|
524 Intended to be used for implementation of methods where this class reference is passed as function arguments. |
|
525 Implementation of such methods can find out the whether the actual class passed is base or the derived one. So, if a new application |
|
526 is made to run on an old implementation, an error may occur in such cases after the old implementation detects this by getting |
|
527 the size information of the T class passed. Also, if old application is made to run on a new implementation, this could be |
|
528 properly handled if the derived class variables handling is done in a proper 'if-else' statement. |
|
529 |
|
530 @return The size of this class. |
|
531 |
|
532 @note The size will be modified when the T-class gets updated. |
|
533 */ |
|
534 EXPORT_C TUint CCamera::CCameraPreImageCaptureControl::TImageBufferInfo::Size() const |
|
535 { |
|
536 return iSize; |
|
537 } |
|
538 |
|
539 /** |
|
540 Returns the version of the class. Used for extensibility specially when the class members are not added but the Reserved |
|
541 members get used at a later stage. |
|
542 |
|
543 @return The version of this class. |
|
544 |
|
545 @note The version will be modified when the T-class gets updated. |
|
546 */ |
|
547 EXPORT_C TUint CCamera::CCameraPreImageCaptureControl::TImageBufferInfo::Version() const |
|
548 { |
|
549 return iVersion; |
|
550 } |
|
551 |
|
552 /** |
|
553 Indicates whether the streamed image scheme or sub-frame scheme is being used. |
|
554 |
|
555 @return Whether the sub-frame scheme is being used or not. |
|
556 |
|
557 @see CCamera::CCameraPreImageCaptureControl::TImageBufferInfo::iIsSubFrameUsed |
|
558 */ |
|
559 EXPORT_C TBool CCamera::CCameraPreImageCaptureControl::TImageBufferInfo::IsSubFrameUsed() const |
|
560 { |
|
561 if (iIsSubFrameUsed) |
|
562 { |
|
563 return ETrue; |
|
564 } |
|
565 else |
|
566 { |
|
567 return EFalse; |
|
568 } |
|
569 } |
|
570 |
|
571 /** |
|
572 Sets the state to inform whether the streamed image scheme or sub-frame scheme is being used. |
|
573 |
|
574 @param aIsSubFrameUsed |
|
575 ETrue implies sub-frame scheme is being used. |
|
576 EFalse implies sub-frame scheme is not being used. |
|
577 |
|
578 @note The set method will be used by the ECAM implementation in order to provide necessary information to the |
|
579 clients when they receive the image buffers. |
|
580 |
|
581 @see CCamera::CCameraPreImageCaptureControl::TImageBufferInfo::iIsSubFrameUsed |
|
582 */ |
|
583 EXPORT_C void CCamera::CCameraPreImageCaptureControl::TImageBufferInfo::SetSubFrameState(TBool aIsSubFrameUsed) |
|
584 { |
|
585 iIsSubFrameUsed = static_cast<TUint>(aIsSubFrameUsed); |
|
586 } |
|
587 |
|
588 /** |
|
589 Indicates whether the parallel buffering is being used by the implementation in order to speed up the streamed |
|
590 image operation, as a whole. |
|
591 |
|
592 @return Whether the parallel buffer option is being used by the implementation under the sub-frame scheme. |
|
593 |
|
594 @note Parallel buffering indicates that implementation is using more than one buffer to handle the various |
|
595 sub-frames; hence speeding up the operation. |
|
596 |
|
597 @see CCamera::CCameraPreImageCaptureControl::TImageBufferInfo::iIsParallelBufferUsed |
|
598 */ |
|
599 EXPORT_C TBool CCamera::CCameraPreImageCaptureControl::TImageBufferInfo::IsParallelStreamedBufferUsed() const |
|
600 { |
|
601 if (iIsParallelBufferUsed) |
|
602 { |
|
603 return ETrue; |
|
604 } |
|
605 else |
|
606 { |
|
607 return EFalse; |
|
608 } |
|
609 } |
|
610 |
|
611 /** |
|
612 Sets the state to inform whether the parallel buffering is being used by the implementation in order to speed up |
|
613 the streamed image operation, as a whole. |
|
614 |
|
615 @param aParallelStreamedBufferUsed |
|
616 ETrue implies sub-frame scheme is being used. |
|
617 EFalse implies sub-frame scheme is not being used. |
|
618 |
|
619 @note The set method will be used by the ECAM implementation in order to provide necessary information to the |
|
620 clients when they receive the image buffers. |
|
621 |
|
622 @see CCamera::CCameraPreImageCaptureControl::TImageBufferInfo::iIsParallelBufferUsed |
|
623 */ |
|
624 EXPORT_C void CCamera::CCameraPreImageCaptureControl::TImageBufferInfo::SetParallelStreamedBufferState(TBool aParallelStreamedBufferUsed) |
|
625 { |
|
626 iIsParallelBufferUsed = static_cast<TUint>(aParallelStreamedBufferUsed); |
|
627 } |
|
628 |
|
629 /** |
|
630 Sequence number of the sub-frame. |
|
631 |
|
632 @return Sequence number of the sub-frame. |
|
633 |
|
634 @see CCamera::CCameraPreImageCaptureControl::TImageBufferInfo::iSubFrameSequenceNumber |
|
635 */ |
|
636 EXPORT_C TUint CCamera::CCameraPreImageCaptureControl::TImageBufferInfo::SubFrameSequenceNumber() const |
|
637 { |
|
638 return iSubFrameSequenceNumber; |
|
639 } |
|
640 |
|
641 /** |
|
642 Sets the sequence number of the sub-frame. |
|
643 |
|
644 @param aSubFrameSequenceNumber |
|
645 The sequence number of the sub-frame. |
|
646 |
|
647 @return The error code |
|
648 |
|
649 @note 9 bits used for sequence no. assuming that KECamMaxTotalSubFrames sub-frames would be used at max. Sequence number for sub-frames |
|
650 lies between 0 to KECamMaxTotalSubFrames-1 inclusive. |
|
651 |
|
652 @note The set method will be used by the ECAM implementation in order to provide necessary information to the |
|
653 clients when they receive the image buffers. |
|
654 |
|
655 @see CCamera::CCameraPreImageCaptureControl::TImageBufferInfo::iSubFrameSequenceNumber |
|
656 */ |
|
657 EXPORT_C TInt CCamera::CCameraPreImageCaptureControl::TImageBufferInfo::SetSubFrameSequenceNumber(TUint aSubFrameSequenceNumber) |
|
658 { |
|
659 if (aSubFrameSequenceNumber > (KECamMaxTotalSubFrames-1) ) |
|
660 { |
|
661 return KErrOverflow; |
|
662 } |
|
663 else |
|
664 { |
|
665 iSubFrameSequenceNumber = aSubFrameSequenceNumber; |
|
666 return KErrNone; |
|
667 } |
|
668 } |
|
669 |
|
670 /** |
|
671 Total number of sub-frames needed in order to properly reconstruct the actual image. |
|
672 |
|
673 @return Total number of sub-frames which can reconstruct the actual image. |
|
674 |
|
675 @note It does not give the number of outstanding sub-frames needed to reconstruct the image. |
|
676 This value will be same for every sub-frames needed to re-construct the actual image. |
|
677 Maximum no. of total sub-frames is KECamMaxTotalSubFrames. |
|
678 |
|
679 @see CCamera::CCameraPreImageCaptureControl::TImageBufferInfo::iTotalSubFrames |
|
680 */ |
|
681 EXPORT_C TUint CCamera::CCameraPreImageCaptureControl::TImageBufferInfo::TotalSubFrames() const |
|
682 { |
|
683 return iTotalSubFrames; |
|
684 } |
|
685 |
|
686 /** |
|
687 Sets the total number of sub-frames needed in order to properly reconstruct the actual image. |
|
688 |
|
689 @param aTotalSubFrames |
|
690 Total number of sub-frames which can reconstruct the actual image. |
|
691 |
|
692 @return error code |
|
693 |
|
694 @note It does not give the number of outstanding sub-frames needed to reconstruct the image. |
|
695 This value will be same for every sub-frames needed to re-construct the actual image. |
|
696 Maximum no. of total sub-frames is KECamMaxTotalSubFrames. |
|
697 |
|
698 @note The set method will be used by the ECAM implementation in order to provide necessary information to the |
|
699 clients when they receive the image buffers. |
|
700 |
|
701 @see CCamera::CCameraPreImageCaptureControl::TImageBufferInfo::iTotalSubFrames |
|
702 */ |
|
703 EXPORT_C TInt CCamera::CCameraPreImageCaptureControl::TImageBufferInfo::SetTotalSubFrames(TUint aTotalSubFrames) |
|
704 { |
|
705 if (aTotalSubFrames > KECamMaxTotalSubFrames) |
|
706 { |
|
707 return KErrOverflow; |
|
708 } |
|
709 else |
|
710 { |
|
711 iTotalSubFrames = aTotalSubFrames; |
|
712 return KErrNone; |
|
713 } |
|
714 } |
|
715 |
|
716 /** |
|
717 Retrieves the maximum number of spots present from where the camera hardware collects the focussing information. |
|
718 |
|
719 @param aFocusMode |
|
720 The focus mode for which the number of spots have to be retrieved. |
|
721 |
|
722 @param aMaximumSpots |
|
723 Retrieves the maximum number of spots for the given focus mode. |
|
724 |
|
725 @leave May leave with any error code. |
|
726 |
|
727 @note The maximum number of spots is supposed to be less than or equal to KMaxNumberOfFocusSpots. |
|
728 |
|
729 @see CCameraViewFinder::GetSpotsPositionL |
|
730 */ |
|
731 void CCamera::CCameraPreImageCaptureControl::GetMaximumSpotsL(CCamera::CCameraAdvancedSettings::TFocusMode /*aFocusMode*/, TInt& /*aMaximumSpots*/) const |
|
732 { |
|
733 User::Leave(KErrNotSupported); |
|
734 } |
|
735 |
|
736 /** |
|
737 Retrieves the supported spot combinations for the given focus mode. |
|
738 |
|
739 @param aFocusMode |
|
740 The focus mode for which the supported spot combinations have to be retrieved. |
|
741 |
|
742 @param aPossibleSpotCombinations |
|
743 Each member of this array is of type TUint and is a bit field where every bit represents presence or absence of |
|
744 a particular spot. |
|
745 |
|
746 @leave May leave with any error code. |
|
747 |
|
748 @note Since maximum number of spots can go up to KMaxNumberOfFocusSpots, it can be easily known which spots are present |
|
749 in a particular array entry (every array entry is a bit field and every bit represents presence or absence of a |
|
750 particular spot). For example,if KMaxNumberOfFocusSpots is 32 and if a particular array entry is 0x07001000. This |
|
751 means that spot number 13,25,26 and 27 are being represented. |
|
752 |
|
753 @see CCameraViewFinder::GetSpotsPositionL |
|
754 */ |
|
755 void CCamera::CCameraPreImageCaptureControl::GetSupportedSpotsCombinationL(CCamera::CCameraAdvancedSettings::TFocusMode /*aFocusMode*/, RArray<TUint>& /*aPossibleSpotCombinations*/) const |
|
756 { |
|
757 User::Leave(KErrNotSupported); |
|
758 } |
|
759 |
|
760 /** |
|
761 Retrieves the focussing spot combination which is used to provide focussing feedback in a particular focussing mode. |
|
762 |
|
763 @param aFocusMode |
|
764 The focussing mode in which the spot combination has to be used for retrieving feedback. |
|
765 |
|
766 @param aSpotsCombination |
|
767 The retrieved spot combination. It is a bitfield marking the presence or absence of spots. |
|
768 This is dependent on the focusssing mode. |
|
769 |
|
770 @leave May leave with any error code. |
|
771 |
|
772 @see CCameraViewFinder::GetSpotsPositionL |
|
773 */ |
|
774 void CCamera::CCameraPreImageCaptureControl::GetSpotsCombinationL(CCamera::CCameraAdvancedSettings::TFocusMode /*aFocusMode*/, TUint& /*aSpotsCombination*/) const |
|
775 { |
|
776 User::Leave(KErrNotSupported); |
|
777 } |
|
778 |
|
779 /** |
|
780 Sets a particular spot combination which can be used to provide focussing feedback in a particular focussing mode. |
|
781 |
|
782 @param aFocusMode |
|
783 The focussing mode in which the spot combination has to be used for retrieving feedback. |
|
784 |
|
785 @param aSpotsCombination |
|
786 The spot combination to be set. It is a bitfield marking the presence or absence of spots. |
|
787 |
|
788 @note Event KUidECamEvent2ImageCaptureControlSpotCombination is used to notify the requesting client about setting of a particular |
|
789 spot combination. |
|
790 |
|
791 @note Event KUidECamEvent2ImageCaptureControlFocussingInformation is used to provide the focussing feedback, whenever applicable. |
|
792 |
|
793 @see CCameraViewFinder::GetSpotsPositionL |
|
794 */ |
|
795 void CCamera::CCameraPreImageCaptureControl::SetSpotsCombination(CCamera::CCameraAdvancedSettings::TFocusMode /*aFocusMode*/, TUint /*aSpotsCombination*/) |
|
796 { |
|
797 return; |
|
798 } |
|
799 |
|
800 /** |
|
801 Retrieves whether the streamed image is supported or not. Sub-frames are used if streamed image output is used. |
|
802 |
|
803 @param aIsStreamedImageSupported |
|
804 ETrue indicates that streamed image is supported. |
|
805 EFalse indicates that streamed image is not supported. |
|
806 |
|
807 @leave May leave with any error code. |
|
808 */ |
|
809 void CCamera::CCameraPreImageCaptureControl::GetStreamedImageSupportInfoL(TBool& /*aIsStreamedImageSupported*/) const |
|
810 { |
|
811 User::Leave(KErrNotSupported); |
|
812 } |
|
813 |
|
814 /** |
|
815 Enables the streamed image output and hence the use of sub-frames to collect image data. MCameraImageBuffer will be |
|
816 used in place of MCameraBuffer in order to provide sub-frames details. Every MCaptureImageObserver::ImageBufferReady() |
|
817 will retrieve only one sub-frame. Full image will be reconstructed after receiving all the sub-frames. |
|
818 |
|
819 @leave May leave with any error code. |
|
820 |
|
821 @note The corresponding image capture call is considered to be complete only when every sub-frame has been received. |
|
822 */ |
|
823 void CCamera::CCameraPreImageCaptureControl::EnableSubFramesL() |
|
824 { |
|
825 User::Leave(KErrNotSupported); |
|
826 } |
|
827 |
|
828 /** |
|
829 Disable the streamed image output and hence the use of sub-frames to collect image data. Every |
|
830 MCaptureImageObserver::ImageBufferReady() will retrieve one full still image. |
|
831 |
|
832 @leave May leave with any error code. |
|
833 */ |
|
834 void CCamera::CCameraPreImageCaptureControl::DisableSubFramesL() |
|
835 { |
|
836 User::Leave(KErrNotSupported); |
|
837 } |
|
838 |
|
839 /** |
|
840 Retrieves the current state about streamed image option or sub-frame usage. |
|
841 |
|
842 @param iIsSubFrameEnabled |
|
843 ETrue indicates that streamed image option is currently being used. |
|
844 EFalse indicates that streamed image option is currently not being used. |
|
845 |
|
846 @leave May leave with any error code. |
|
847 */ |
|
848 void CCamera::CCameraPreImageCaptureControl::GetSubFramesStateL(TBool& /*aIsSubFrameEnabled*/) const |
|
849 { |
|
850 User::Leave(KErrNotSupported); |
|
851 } |
|
852 |
|
853 /** |
|
854 Retrieves the list of transformations (image processing) available in case streamed image is used. |
|
855 |
|
856 @param aStreamedImageSupportedTransformations |
|
857 Retrieves an array of uids which represents those image processing attributes which are supported for streamed |
|
858 image. |
|
859 |
|
860 @leave May leave with any error code. |
|
861 */ |
|
862 void CCamera::CCameraPreImageCaptureControl::GetStreamedImageSupportedTransformationsL(RArray<TUid>& /*aStreamedImageSupportedTransformations*/) const |
|
863 { |
|
864 User::Leave(KErrNotSupported); |
|
865 } |
|
866 |
|
867 /** |
|
868 Retrieves the panorama mode support. |
|
869 |
|
870 @param aIsPanoModeSupported |
|
871 Informs whether the pano mode is supported or not. |
|
872 |
|
873 @param aSupportedStitchingOption |
|
874 Retrieves the supported image stitching option available with the ECAM implementation for the images captured |
|
875 under panorama mode. It is a TInt represepesting bitfield for supported TStitchingOption |
|
876 If pano mode is not supported, this has to be 0. |
|
877 |
|
878 @leave May leave with any error code. |
|
879 */ |
|
880 void CCamera::CCameraPreImageCaptureControl::GetPanoModeSupportInfoL(TBool& /*aIsPanoModeSupported*/, TInt& /*aSupportedStitchingOption*/) const |
|
881 { |
|
882 User::Leave(KErrNotSupported); |
|
883 } |
|
884 |
|
885 /** |
|
886 Starts panning the viewfinder. Any image captured under pano mode gets overlaid on top of viewfinder and in a |
|
887 particular direction. |
|
888 |
|
889 This method starts panorama mode for every viewfinder screen. |
|
890 |
|
891 @param aStitchingOption |
|
892 Enum value EStitchingOptionEnable instructs implementation to perform stitching of images captured under pano mode. |
|
893 So only one completion feedback will be given to the client regarding image being ready.(either through |
|
894 MCaptureImageObserver::ImageBufferReady() or through MCaptureImageObserver::ImageDirectSavingCompleted()) |
|
895 |
|
896 Enum value EStitchingOptionDisable instructs implemenation to provide the images unstitched. |
|
897 |
|
898 Enum value EStitchingOptionNone should be passed only when stitching option is not supported by the |
|
899 implementation. |
|
900 |
|
901 @note Event KUidECamEventImageCaptureControlStartPanoMode is used to notify clients about the start of panorama mode. |
|
902 |
|
903 @note Calling the StartPanoMode twice and without stopping it will result in an error. |
|
904 */ |
|
905 void CCamera::CCameraPreImageCaptureControl::StartPanoMode(CCamera::CCameraPreImageCaptureControl::TStitchingOption /*aStitchingOption*/) |
|
906 { |
|
907 return; |
|
908 } |
|
909 |
|
910 /** |
|
911 Starts panning the viewfinder. Any image captured under pano mode gets overlaid on top of viewfinder and in a |
|
912 particular direction. |
|
913 |
|
914 This method starts panorama mode only on few specified viewfinder screens. |
|
915 |
|
916 @param aStitchingOption |
|
917 Enum value EStitchingOptionEnable instructs implementation to perform stitching of images captured under pano mode. So |
|
918 only one completion feedback will be given to the client regarding image being ready.(either through |
|
919 MCaptureImageObserver::ImageBufferReady() or through MCaptureImageObserver::ImageDirectSavingCompleted()) |
|
920 |
|
921 Enum value EStitchingOptionDisable instructs implemenation to provide the images unstitched. |
|
922 |
|
923 Enum value EStitchingOptionNone should be passed only when stitching option is not supported by the |
|
924 implementation. |
|
925 |
|
926 @param aVFHandles |
|
927 The array of viewfinder handles on which the panorama will run. Every member of this array is a valid viewfinder |
|
928 handle. |
|
929 |
|
930 @note Event KUidECamEventImageCaptureControlStartPanoMode is used to notify clients about the start of panorama mode. |
|
931 |
|
932 @note Calling the StartPanoMode twice and without stopping it will result in an error. |
|
933 */ |
|
934 void CCamera::CCameraPreImageCaptureControl::StartPanoMode(CCamera::CCameraPreImageCaptureControl::TStitchingOption /*aStitchingOption*/, const RArray<TInt>& /*aVFHandles*/) |
|
935 { |
|
936 return; |
|
937 } |
|
938 |
|
939 /** |
|
940 Retrieves the direction of panning. |
|
941 |
|
942 @param aPanoDirection |
|
943 The currently used panning direction. |
|
944 |
|
945 @leave May leave with any error code. |
|
946 |
|
947 @note When the image is captured, the cropped version of the captured image covering a full rectangle is overlaid at |
|
948 the left hand side of the display screen (if TPanoDirection is EPanoRight) and viewfinder runs below that. |
|
949 |
|
950 @note If the method leaves, the reference to CCamera::CCameraPreImageCaptureControl::TPanoDirection i.e. aPanoDirection is |
|
951 not guaranteed to be valid. |
|
952 */ |
|
953 void CCamera::CCameraPreImageCaptureControl::GetPanoDirectionL(CCamera::CCameraPreImageCaptureControl::TPanoDirection& /*aPanoDirection*/) const |
|
954 { |
|
955 User::Leave(KErrNotSupported); |
|
956 } |
|
957 |
|
958 /** |
|
959 Sets the direction of panning |
|
960 |
|
961 @param aPanoDirection |
|
962 The desired panning direction. |
|
963 |
|
964 @note Event KUidECamEventImageCaptureControlPanoDirection is used to notify the requesting client about setting of the |
|
965 panning direction. |
|
966 */ |
|
967 void CCamera::CCameraPreImageCaptureControl::SetPanoDirection(CCamera::CCameraPreImageCaptureControl::TPanoDirection /*aPanoDirection*/) |
|
968 { |
|
969 return; |
|
970 } |
|
971 |
|
972 /** |
|
973 Stop the panorama mode. |
|
974 |
|
975 @param aStitchedImageRetrieval |
|
976 Enum value EStitchedImageRetrieve indicates that images has to be stitched if initially image stitching was |
|
977 enabled. |
|
978 |
|
979 Enum value EStitchedImageDiscard indicates that images should not be stitched (discarded) if initially image |
|
980 stitching was enabled. No image ready notification returned to the client in this case. This may happen when |
|
981 client is not happy with the panned images captured so far. |
|
982 |
|
983 @leave May leave with any error code. |
|
984 |
|
985 @note If image stitching option was not enabled while starting the pano mode, the 'aStitchedImageRetrieval' parameter is |
|
986 ignored by the implementation. |
|
987 */ |
|
988 void CCamera::CCameraPreImageCaptureControl::StopPanoModeL(CCamera::CCameraPreImageCaptureControl::TStitchedImageRetrieval /*aStitchedImageRetrieval*/) |
|
989 { |
|
990 User::Leave(KErrNotSupported); |
|
991 } |
|
992 |
|
993 /** |
|
994 Retrieves the supported color space. |
|
995 |
|
996 @param aSupportedColorSpace |
|
997 A bitfield representing the supported TColorSpace |
|
998 |
|
999 @leave May leave with any error code. |
|
1000 */ |
|
1001 void CCamera::CCameraPreImageCaptureControl::GetSupportedColorSpaceL(TUint& /*aSupportedColorSpace*/) const |
|
1002 { |
|
1003 User::Leave(KErrNotSupported); |
|
1004 } |
|
1005 |
|
1006 /** |
|
1007 Get the current color space being used. |
|
1008 |
|
1009 @param aColorSpace |
|
1010 Currently used color space. |
|
1011 |
|
1012 @leave May leave with any error code. |
|
1013 */ |
|
1014 void CCamera::CCameraPreImageCaptureControl::GetColorSpaceL(CCamera::CCameraPreImageCaptureControl::TColorSpace& /*aColorSpace*/) const |
|
1015 { |
|
1016 User::Leave(KErrNotSupported); |
|
1017 } |
|
1018 |
|
1019 /** |
|
1020 Set a particular color space. |
|
1021 |
|
1022 @param aColorSpace |
|
1023 The color space value to be set. |
|
1024 |
|
1025 @note Event KUidECamEventImageCaptureControlColorSpace is used to notify clients about setting the color space. |
|
1026 */ |
|
1027 void CCamera::CCameraPreImageCaptureControl::SetColorSpace(CCamera::CCameraPreImageCaptureControl::TColorSpace /*aColorSpace*/) |
|
1028 { |
|
1029 return; |
|
1030 } |
|
1031 |
|
1032 /** |
|
1033 Synchronous marker method in order to provide selective settings for embedded still captures only (not to video capture) |
|
1034 |
|
1035 @note Any feature setting issued after calling this method gets saved on the implementation side and the actual |
|
1036 setting performed before still images (embedded still captures) are taken. |
|
1037 |
|
1038 @note Any getter method issued after calling this method gives feature value which would be used for still images |
|
1039 (embedded still captures). For example, if WhiteBalance set for 'Auto' for EmbeddedStillCapture but 'Cloudy' otherwise, then |
|
1040 under the marker method, white balance will show 'Cloudy'. |
|
1041 |
|
1042 @note Event KUidECamEventFailedEmbeddedStillCaptureSetting notified to the client if in case any embedded still capture |
|
1043 setting gets failed during the time they are actually set. After this notification, client can issue |
|
1044 GetFailedEmbeddedStillCaptureSettingsL to retrieve the list of failed settings. |
|
1045 |
|
1046 @leave May leave with any error code. |
|
1047 */ |
|
1048 void CCamera::CCameraPreImageCaptureControl::StartEmbeddedStillCaptureSettingsL() |
|
1049 { |
|
1050 User::Leave(KErrNotSupported); |
|
1051 } |
|
1052 |
|
1053 /** |
|
1054 Marker method to mark end of providing selective settings for embedded still captures only (not to video capture) |
|
1055 |
|
1056 @note Any feature setting issued after calling this method is treated as a normal setting operation. |
|
1057 |
|
1058 @note Any getter method issued after calling this method gives feature value which would be used normally. |
|
1059 |
|
1060 @leave May leave with any error code. |
|
1061 */ |
|
1062 void CCamera::CCameraPreImageCaptureControl::EndEmbeddedStillCaptureSettingsL() |
|
1063 { |
|
1064 User::Leave(KErrNotSupported); |
|
1065 } |
|
1066 |
|
1067 /** |
|
1068 Retrieves the list of failed embedded still capture settings. |
|
1069 |
|
1070 @param aFailedEmbeddedStillCaptureSettings |
|
1071 Array of uids which reflects the failed embedded still capture settings. |
|
1072 |
|
1073 @note This method may be issued after receiving the notification KUidECamEventFailedEmbeddedStillCaptureSetting. |
|
1074 */ |
|
1075 void CCamera::CCameraPreImageCaptureControl::GetFailedEmbeddedStillCaptureSettingsL(RArray<TUid>& /*aFailedEmbeddedStillCaptureSettings*/) const |
|
1076 { |
|
1077 User::Leave(KErrNotSupported); |
|
1078 } |
|
1079 |
|
1080 /** |
|
1081 @publishedPartner |
|
1082 Factory function for creating the CCameraImageCapture object. This will be called only by the concrete implementation |
|
1083 of MCameraPreImageCaptureControl::PrepareImageCapture(const TPrepareImageParameters& aPrepareImageParameters, |
|
1084 MCaptureImageObserver& aCaptureImageObserver). |
|
1085 |
|
1086 @param aCamera |
|
1087 a reference to a CCamera object providing the settings. |
|
1088 |
|
1089 @param aPrepareImageParameters |
|
1090 TPrepareImageParameters tied with this image capture class object. |
|
1091 |
|
1092 @param aCaptureImageObserver |
|
1093 Reference to the capture image observer. |
|
1094 |
|
1095 @return a pointer to a fully constructed CCameraImageCapture object. |
|
1096 |
|
1097 @leave KErrNoMemory Out of memory Or any other system-wide error code. |
|
1098 */ |
|
1099 EXPORT_C CCamera::CCameraImageCapture* CCamera::CCameraImageCapture::CreateL(CCamera& aCamera, const CCamera::CCameraPreImageCaptureControl |
|
1100 ::TPrepareImageParameters& aPrepareImageParameters, MCaptureImageObserver& aCaptureImageObserver) |
|
1101 { |
|
1102 CCamera::CCameraImageCapture* self = new (ELeave)CCamera::CCameraImageCapture(aCamera); |
|
1103 CleanupStack::PushL(self); |
|
1104 self->ConstructL(aPrepareImageParameters, aCaptureImageObserver); |
|
1105 CleanupStack::Pop(self); |
|
1106 |
|
1107 return self; |
|
1108 } |
|
1109 |
|
1110 /** |
|
1111 CCameraImageCapture Constructor. |
|
1112 |
|
1113 @param aOwner |
|
1114 a reference to a CCamera object. |
|
1115 */ |
|
1116 CCamera::CCameraImageCapture::CCameraImageCapture(CCamera& aOwner): |
|
1117 iOwner(aOwner), |
|
1118 iImpl(NULL) |
|
1119 { |
|
1120 } |
|
1121 |
|
1122 /** |
|
1123 CCameraImageCapture second phase constructor. |
|
1124 |
|
1125 Function used to initialise internal state of the object. Uses reference to the camera to retrieve |
|
1126 CameraImageCapture interface pointer. |
|
1127 |
|
1128 @param aPrepareImageParameters |
|
1129 TPrepareImageParameters tied with this image capture class object. |
|
1130 |
|
1131 @param aCaptureImageObserver |
|
1132 Reference to the capture image observer. |
|
1133 |
|
1134 @leave KErrNoMemory Out of memory or any other system-wide error code |
|
1135 */ |
|
1136 void CCamera::CCameraImageCapture::ConstructL(const CCamera::CCameraPreImageCaptureControl::TPrepareImageParameters& |
|
1137 aPrepareImageParameters, MCaptureImageObserver& aCaptureImageObserver) |
|
1138 { |
|
1139 iImpl = static_cast<MCameraImageCapture*>(iOwner.CustomInterface(KECamMCameraImageCaptureUid)); |
|
1140 |
|
1141 if (iImpl == NULL) |
|
1142 { |
|
1143 User::Leave(KErrNotSupported); |
|
1144 } |
|
1145 |
|
1146 iImpl->SetPrepareImageParameters(aPrepareImageParameters); |
|
1147 iImpl->SetCaptureImageObserver(aCaptureImageObserver); |
|
1148 } |
|
1149 |
|
1150 /** |
|
1151 Returns the MCameraImageCapture* which will be used by the CCameraPostImageCaptureControl for the concrete |
|
1152 implementation. Both CCameraImageCapture and CCameraPostImageCaptureControl are made to use the same interface |
|
1153 for implementation. |
|
1154 |
|
1155 @return Pointer to the MCameraImageCapture class. |
|
1156 */ |
|
1157 MCameraImageCapture* CCamera::CCameraImageCapture::Impl() const |
|
1158 { |
|
1159 return iImpl; |
|
1160 } |
|
1161 |
|
1162 /** |
|
1163 Destructor |
|
1164 Destruction of this class is equivalent to releasing the resources owned in order to prepare and allocate memory for |
|
1165 capturing images. |
|
1166 |
|
1167 @note The child objects created out of this image capture class object shall be delete beforehand. Various child objects |
|
1168 are snapshot, image processing and histograms. |
|
1169 */ |
|
1170 EXPORT_C CCamera::CCameraImageCapture::~CCameraImageCapture() |
|
1171 { |
|
1172 if (iImpl != NULL) |
|
1173 { |
|
1174 //cancel any outstanding capture image operation at implementation level. |
|
1175 //destory every CCameraPostImageCaptureControl object created by the implementation. |
|
1176 iImpl->Release(this); |
|
1177 } |
|
1178 } |
|
1179 |
|
1180 /** |
|
1181 Retrieve pointer to histogram API in order to use it specifically for a specific still image capture. |
|
1182 |
|
1183 @return Pointer to use histogram API specifically for the given still image capture. |
|
1184 |
|
1185 @leave May leave with any error code. |
|
1186 |
|
1187 @note Different types of histogram may be used for a specific still image capture. Every time this method will be called |
|
1188 on the CCameraImageCapture class object, a new type of histogram will be created. |
|
1189 */ |
|
1190 EXPORT_C CCamera::CCameraV2Histogram* CCamera::CCameraImageCapture::CreateHistogramHandleL() const |
|
1191 { |
|
1192 MImplementationFactory* implFactory = NULL; |
|
1193 |
|
1194 iImpl->CreateHistogramImplFactoryL(implFactory); |
|
1195 |
|
1196 CleanupReleasePushL(*implFactory); |
|
1197 CCamera::CCameraV2Histogram* histogram = CCamera::CCameraV2Histogram::CreateL(iOwner, *implFactory); |
|
1198 CleanupStack::Pop(implFactory); |
|
1199 |
|
1200 implFactory->Release(); |
|
1201 return histogram; |
|
1202 } |
|
1203 |
|
1204 /** |
|
1205 Retrieve pointer to snapshot API in order to use it specifically for a specific still image capture. |
|
1206 |
|
1207 @param aClientViewFinderId |
|
1208 The client viewfinder on which this client snapshot will be displayed. |
|
1209 |
|
1210 @return Pointer to use snapshot API specifically for the given still image capture. |
|
1211 |
|
1212 @leave May leave with any error code. |
|
1213 */ |
|
1214 EXPORT_C CCamera::CCameraSnapshot* CCamera::CCameraImageCapture::GetSnapshotHandleL(TInt aClientViewFinderId) const |
|
1215 { |
|
1216 MImplementationFactory* implFactory = NULL; |
|
1217 |
|
1218 iImpl->GetSnapshotImplFactoryL(implFactory); |
|
1219 |
|
1220 CleanupReleasePushL(*implFactory); |
|
1221 CCamera::CCameraSnapshot* snapshot = CCamera::CCameraSnapshot::CreateL(iOwner, *implFactory, aClientViewFinderId); |
|
1222 CleanupStack::Pop(implFactory); |
|
1223 |
|
1224 implFactory->Release(); |
|
1225 |
|
1226 return snapshot; |
|
1227 } |
|
1228 |
|
1229 /** |
|
1230 Retrieve pointer to image processing API in order to use it specifically for tha specific still image capture. |
|
1231 |
|
1232 @return Pointer to use image processing API specifically for the given still image capture. |
|
1233 |
|
1234 @leave May leave with any error code. |
|
1235 */ |
|
1236 EXPORT_C CCamera::CCameraImageProcessing* CCamera::CCameraImageCapture::GetTransformationHandleL() const |
|
1237 { |
|
1238 MImplementationFactory* implFactory = NULL; |
|
1239 |
|
1240 iImpl->GetImageProcessingImplFactoryL(implFactory); |
|
1241 |
|
1242 CleanupReleasePushL(*implFactory); |
|
1243 CCamera::CCameraImageProcessing* imgProc = CCamera::CCameraImageProcessing::CreateL(iOwner, *implFactory); |
|
1244 CleanupStack::Pop(implFactory); |
|
1245 |
|
1246 implFactory->Release(); |
|
1247 return imgProc; |
|
1248 } |
|
1249 |
|
1250 /** |
|
1251 Retrieves the prepare image parameters tied with this image capture class object. |
|
1252 |
|
1253 @param aPrepareImageParameters |
|
1254 TPrepareImageParameters tied with this image capture class object. |
|
1255 |
|
1256 @leave May leave with any error code |
|
1257 */ |
|
1258 EXPORT_C void CCamera::CCameraImageCapture::GetPrepareImageParametersL(CCamera::CCameraPreImageCaptureControl::TPrepareImageParameters& aPrepareImageParameters) const |
|
1259 { |
|
1260 iImpl->GetPrepareImageParametersL(aPrepareImageParameters); |
|
1261 } |
|
1262 |
|
1263 /** |
|
1264 Performant image capture. This postpones the processing options involved with current image captured in order to |
|
1265 capture/prepare for next images. |
|
1266 |
|
1267 Previously created CCameraPostImageCaptureControl objects for this CCameraImageCapture object will become unavailable |
|
1268 after this call. |
|
1269 |
|
1270 @note Further images (either still or video) can be captured only after receiving the notification |
|
1271 KUidECamEventReadyForNextCapture. Current image may be outstanding in order to undergo any processing options. |
|
1272 |
|
1273 @note Callback MCaptureImageObserver::ImageCaptureComplete() informs the client that the image capture operation has |
|
1274 been completed. The CCameraImageCapture& can be further used for next image captures. |
|
1275 In case of continuous drive modes, this callback will be received by the client only once in order to provide the |
|
1276 result of the whole image capture operation. |
|
1277 |
|
1278 @note Callback MCaptureImageObserver::ImageBufferReady() provides client the link to CCameraPostImageCaptureControl& |
|
1279 which helps retrieving the image buffer. In case of continuous drive modes, this callback will be received by the |
|
1280 client for every individual image. In case of single shots, this will be received by the client only once in |
|
1281 order to retrieve the image buffer. |
|
1282 */ |
|
1283 EXPORT_C void CCamera::CCameraImageCapture::CaptureImage() |
|
1284 { |
|
1285 // MCameraImageCapture concrete implementation will use CCameraImageCapture& to pass in callbacks and to create |
|
1286 // CCameraPostImageCaptureControl object for every image and pass it to the client. |
|
1287 // Previously created CCameraPostImageCaptureControl objects will become unavailable after this call. |
|
1288 iImpl->CaptureImage(this); |
|
1289 } |
|
1290 |
|
1291 /** |
|
1292 Cancels the outstanding Capture Image operation. This will also cancel any outstanding processing options associated with |
|
1293 the concerned Capture Image operation. This method is synchronous. Hence, no callback shall be received with respect |
|
1294 to concerned capture image operation. |
|
1295 */ |
|
1296 EXPORT_C void CCamera::CCameraImageCapture::CancelCaptureImage() |
|
1297 { |
|
1298 iImpl->CancelCaptureImage(); |
|
1299 } |
|
1300 |
|
1301 /** |
|
1302 Retrieves the number of images exposed to sensor with respect to a specific image capture command. Any processing options |
|
1303 associated with these images may be pending. |
|
1304 |
|
1305 @param aNumImagesExposed |
|
1306 Retrieves the number of images exposed to sensor till now. For single shot type of drive modes, this value will be |
|
1307 one after the image gets exposed to sensor. For multiple shot type of drive modes, this value will be the number of |
|
1308 images exposed till now. |
|
1309 |
|
1310 @note May leave with any error code. |
|
1311 */ |
|
1312 EXPORT_C void CCamera::CCameraImageCapture::GetNumImagesExposedL(TUint& aNumImagesExposed) const |
|
1313 { |
|
1314 iImpl->GetNumImagesExposedL(aNumImagesExposed); |
|
1315 } |
|
1316 |
|
1317 /** |
|
1318 Retrieves the total number of images which is supposed to be captured with respect to a specific image capture command. |
|
1319 |
|
1320 @param aNumTotalImages |
|
1321 Retrieves the total number of images supposed to be captured. For single shot type of drive modes, this value will be |
|
1322 always be one. For multiple shot type of drive modes, this value will be greater than one. |
|
1323 |
|
1324 @note May leave with any error code. |
|
1325 */ |
|
1326 EXPORT_C void CCamera::CCameraImageCapture::GetNumTotalImagesL(TUint& aNumTotalImages) const |
|
1327 { |
|
1328 iImpl->GetNumTotalImagesL(aNumTotalImages); |
|
1329 } |
|
1330 |
|
1331 /** |
|
1332 Retrieves the post capture control handle based on the ID passed to it. Client may use this handle for post capture |
|
1333 operations of the image identified by the ID. The ID is received by the clients through MCaptureImageObserver callbacks. |
|
1334 |
|
1335 @param aPostCaptureControlHandle |
|
1336 Retrieves pointer to the post capture control class object. |
|
1337 |
|
1338 @param aPostCaptureControlId |
|
1339 The ID used to retrieve the post capture control handle of the captured image. |
|
1340 |
|
1341 @note May leave with any error code. |
|
1342 */ |
|
1343 EXPORT_C void CCamera::CCameraImageCapture::GetPostCaptureControlHandleL(CCamera::CCameraPostImageCaptureControl*& |
|
1344 aPostCaptureControlHandle, TPostCaptureControlId aPostCaptureControlId) const |
|
1345 { |
|
1346 iImpl->GetPostCaptureControlHandleL(aPostCaptureControlHandle, aPostCaptureControlId); |
|
1347 } |
|
1348 |
|
1349 /** |
|
1350 Prioritises the Capture Image operation. This implies that any processing options associated with the concerned Capture |
|
1351 Image operation will be prioritised over other pending processing options. |
|
1352 |
|
1353 @param aCaptureImagePriority |
|
1354 The desired level of priority. |
|
1355 |
|
1356 @leave May leave with any error code. |
|
1357 */ |
|
1358 EXPORT_C void CCamera::CCameraImageCapture::SetCaptureImagePriorityL(TECamImagePriority aCaptureImagePriority) |
|
1359 { |
|
1360 iImpl->SetCaptureImagePriorityL(aCaptureImagePriority); |
|
1361 } |
|
1362 |
|
1363 /** |
|
1364 Retrieves the priority of the Capture Image operation. |
|
1365 |
|
1366 @param aCaptureImagePriority |
|
1367 Retrieves the current level of priority. |
|
1368 |
|
1369 @leave May leave with any error code. |
|
1370 */ |
|
1371 EXPORT_C void CCamera::CCameraImageCapture::GetCaptureImagePriorityL(TECamImagePriority& aCaptureImagePriority) const |
|
1372 { |
|
1373 iImpl->GetCaptureImagePriorityL(aCaptureImagePriority); |
|
1374 } |
|
1375 |
|
1376 /** |
|
1377 Pauses processing options associated with the concerned Capture Image operation. |
|
1378 |
|
1379 @param aProcessingTypes |
|
1380 The processing options which need to be paused. |
|
1381 */ |
|
1382 EXPORT_C void CCamera::CCameraImageCapture::PauseProcessing(TUint aProcessingTypes) |
|
1383 { |
|
1384 iImpl->PauseProcessing(aProcessingTypes); |
|
1385 } |
|
1386 |
|
1387 /** |
|
1388 Resumes processing options associated with the concerned Capture Image operation. |
|
1389 |
|
1390 @param aProcessingTypes |
|
1391 The processing options which need to be resumed. |
|
1392 |
|
1393 @leave May leave with any error code. |
|
1394 */ |
|
1395 EXPORT_C void CCamera::CCameraImageCapture::ResumeProcessingL(TUint aProcessingTypes) |
|
1396 { |
|
1397 iImpl->ResumeProcessingL(aProcessingTypes); |
|
1398 } |
|
1399 |
|
1400 /** |
|
1401 @publishedPartner |
|
1402 |
|
1403 Factory function for creating the CCameraPostImageCaptureControl object for every individual image to be captured. |
|
1404 This method is supposed to be called only by concrete implementation of MCameraImageCapture. It will be the client's |
|
1405 responsibility to destroy it whenever it does not need it any more. (Possible milestone for deletion: Individual image cancellation completed, |
|
1406 individual image saved). Previously created CCameraPostImageCaptureControl objects for the CCameraImageCapture object will |
|
1407 become unavailable if CaptureImage() is called while previous call on the same object is still outstanding. |
|
1408 |
|
1409 @param aCameraImageCapture |
|
1410 A pointer to the CCameraImageCapture which was used to issue the Capture Image call. |
|
1411 |
|
1412 @param aPostCaptureControlId |
|
1413 The ID used for identification of the post capture control class object by the clients. The ID is passed by the |
|
1414 implementation while creating this object. |
|
1415 |
|
1416 @return a pointer to a fully constructed CCameraPostImageCaptureControl object. |
|
1417 |
|
1418 @leave KErrNoMemory Out of memory Or any other system-wide error code. |
|
1419 */ |
|
1420 EXPORT_C CCamera::CCameraPostImageCaptureControl* CCamera::CCameraPostImageCaptureControl::CreateL(CCameraImageCapture* aCameraImageCapture, TPostCaptureControlId aPostCaptureControlId) |
|
1421 { |
|
1422 CCamera::CCameraPostImageCaptureControl* self = new (ELeave)CCamera::CCameraPostImageCaptureControl(aCameraImageCapture, aPostCaptureControlId); |
|
1423 CleanupStack::PushL(self); |
|
1424 self->ConstructL(); |
|
1425 CleanupStack::Pop(self); |
|
1426 |
|
1427 return self; |
|
1428 } |
|
1429 |
|
1430 /** |
|
1431 CCameraPostImageCaptureControl Constructor. |
|
1432 |
|
1433 @param aOwner |
|
1434 a reference to a CCamera object. |
|
1435 |
|
1436 @param aPostCaptureControlId |
|
1437 The ID used for identification of the post capture control class object by the clients. The ID is passed by the |
|
1438 implementation while creating this object. |
|
1439 */ |
|
1440 CCamera::CCameraPostImageCaptureControl::CCameraPostImageCaptureControl(CCamera::CCameraImageCapture* aCameraImageCapture, TInt aPostCaptureControlId): |
|
1441 iPostCaptureControlId(aPostCaptureControlId), |
|
1442 iCameraImageCapture(aCameraImageCapture), |
|
1443 iImpl(NULL) |
|
1444 { |
|
1445 } |
|
1446 |
|
1447 /** |
|
1448 CCameraPostImageCaptureControl second phase constructor. |
|
1449 |
|
1450 Function used to initialise internal state of the object. Uses CCameraImageCapture* to retrieve |
|
1451 CCameraPostImageCaptureControl interface pointer. This interface pointer is provided by 'CCameraImageCapture interface'. |
|
1452 |
|
1453 @leave KErrNoMemory Out of memory or any other system-wide error code |
|
1454 */ |
|
1455 void CCamera::CCameraPostImageCaptureControl::ConstructL() |
|
1456 { |
|
1457 iImpl = static_cast<MCameraPostImageCaptureControl*>(iCameraImageCapture->Impl()->CreatePostImageCaptureControlImpl(KECamMCameraPostImageCaptureControlUid, iPostCaptureControlId)); |
|
1458 |
|
1459 if (iImpl == NULL) |
|
1460 { |
|
1461 User::Leave(KErrNotSupported); |
|
1462 } |
|
1463 } |
|
1464 |
|
1465 /** |
|
1466 Destructor |
|
1467 */ |
|
1468 EXPORT_C CCamera::CCameraPostImageCaptureControl::~CCameraPostImageCaptureControl() |
|
1469 { |
|
1470 iCameraImageCapture = NULL; |
|
1471 if(iImpl != NULL) |
|
1472 { |
|
1473 //cancel any outstanding image at implementation level. |
|
1474 iImpl->Release(iPostCaptureControlId); |
|
1475 } |
|
1476 } |
|
1477 |
|
1478 /** |
|
1479 Retrieves the ID which this class object represents. The ID is unique for this class object and is used for identification |
|
1480 purpose. |
|
1481 |
|
1482 @param aPostCaptureControlId |
|
1483 Reference to the post capture control ID. |
|
1484 */ |
|
1485 EXPORT_C void CCamera::CCameraPostImageCaptureControl::GetPostCaptureControlId(TPostCaptureControlId& aPostCaptureControlId) const |
|
1486 { |
|
1487 aPostCaptureControlId = iPostCaptureControlId; |
|
1488 } |
|
1489 |
|
1490 /** |
|
1491 Retrieves the CCameraImageCapture* associated with the object of this class. This implies that the individual image, which |
|
1492 the object of this class is referring to, belongs to the CaptureImage operation issued by CCameraImageCapture* object. |
|
1493 |
|
1494 @return Pointer to CCameraImageCapture associated with the object of this class. |
|
1495 */ |
|
1496 EXPORT_C CCamera::CCameraImageCapture* CCamera::CCameraPostImageCaptureControl::ImageCaptureHandle() const |
|
1497 { |
|
1498 return iCameraImageCapture; |
|
1499 } |
|
1500 |
|
1501 /** |
|
1502 Retrieves the sequence number of the image being represented by this post capture control object. The sequence number |
|
1503 specifies the index of the individual image if, in case, the multiple shot type of drive mode is being used. The first |
|
1504 individual image which is exposed to the sensor has a sequence number of zero. In case of single shot type of drive mode, |
|
1505 the sequence number will be zero. |
|
1506 |
|
1507 @param aSequenceNumber |
|
1508 Retrieves the sequence number of the image. |
|
1509 |
|
1510 @leave May leave with any error code. |
|
1511 */ |
|
1512 EXPORT_C void CCamera::CCameraPostImageCaptureControl::GetImageSequenceNumberL(TUint& aSequenceNumber) const |
|
1513 { |
|
1514 iImpl->GetImageSequenceNumberL(aSequenceNumber); |
|
1515 } |
|
1516 |
|
1517 /** |
|
1518 Cancels the outstanding individual image which the object of this class is referring to. This will also cancel any outstanding |
|
1519 processing options associated with this individual image. This method is synchronous. Hence, no callback shall be received |
|
1520 for this individual image. |
|
1521 */ |
|
1522 EXPORT_C void CCamera::CCameraPostImageCaptureControl::CancelImage() |
|
1523 { |
|
1524 iImpl->CancelImage(); |
|
1525 } |
|
1526 |
|
1527 /** |
|
1528 Prioritises the individual image which the object of this class is referring to. This implies that any processing |
|
1529 options associated with this individual image will be prioritised over other pending processing options. |
|
1530 |
|
1531 @param aImagePriority |
|
1532 The desired level of priority. |
|
1533 |
|
1534 @leave May leave with any error code. |
|
1535 */ |
|
1536 EXPORT_C void CCamera::CCameraPostImageCaptureControl::SetImagePriorityL(TECamImagePriority aImagePriority) |
|
1537 { |
|
1538 iImpl->SetImagePriorityL(aImagePriority); |
|
1539 } |
|
1540 |
|
1541 /** |
|
1542 Retrieves the priority of the individual image which the object of this class is referring to. |
|
1543 |
|
1544 @param aImagePriority |
|
1545 The current level of priority. |
|
1546 |
|
1547 @leave May leave with any error code. |
|
1548 */ |
|
1549 EXPORT_C void CCamera::CCameraPostImageCaptureControl::GetImagePriorityL(TECamImagePriority& aImagePriority) const |
|
1550 { |
|
1551 iImpl->GetImagePriorityL(aImagePriority); |
|
1552 } |
|
1553 |
|
1554 /** |
|
1555 Pauses processing options associated with the individual image which the object of this class is referring to. |
|
1556 |
|
1557 @param aProcessingTypes |
|
1558 The processing options which need to be paused. |
|
1559 */ |
|
1560 EXPORT_C void CCamera::CCameraPostImageCaptureControl::PauseProcessing(TUint aProcessingTypes) |
|
1561 { |
|
1562 iImpl->PauseProcessing(aProcessingTypes); |
|
1563 } |
|
1564 |
|
1565 /** |
|
1566 Resumes processing options associated with the individual image which the object of this class is referring to. |
|
1567 |
|
1568 @param aProcessingTypes |
|
1569 The processing options which need to be resumed. |
|
1570 |
|
1571 @leave May leave with any error code. |
|
1572 */ |
|
1573 EXPORT_C void CCamera::CCameraPostImageCaptureControl::ResumeProcessingL(TUint aProcessingTypes) |
|
1574 { |
|
1575 iImpl->ResumeProcessingL(aProcessingTypes); |
|
1576 } |
|
1577 |
|
1578 /** |
|
1579 Retrieves the image buffer which contains the individual image captured. This method should be called by the client as a |
|
1580 result of receiving the callback MCaptureImageObserver::ImageBufferReady(), if the error information received is |
|
1581 satisfactory. |
|
1582 |
|
1583 @param aCameraImageBuffer |
|
1584 A reference to an MCameraImageBuffer if successful, or NULL if not successful. |
|
1585 |
|
1586 @leave May leave with any error code. |
|
1587 */ |
|
1588 EXPORT_C void CCamera::CCameraPostImageCaptureControl::GetImageBufferL(MCameraImageBuffer& aCameraImageBuffer) const |
|
1589 { |
|
1590 iImpl->GetImageBufferL(aCameraImageBuffer); |
|
1591 } |
|
1592 |
|
1593 /** |
|
1594 Retrieves the state of the individual image which the object of this class is referring to. |
|
1595 |
|
1596 @param aImageState |
|
1597 Retrieves the current state of the individual image. |
|
1598 |
|
1599 @leave May leave with any error code. |
|
1600 */ |
|
1601 EXPORT_C void CCamera::CCameraPostImageCaptureControl::GetImageStateL(TImageState& aImageState) const |
|
1602 { |
|
1603 iImpl->GetImageStateL(aImageState); |
|
1604 } |
|
1605 |
|
1606 /** |
|
1607 Retrieves the state of the individual image buffer. |
|
1608 |
|
1609 @param aBufferState |
|
1610 Retrieves the current state of the individual image buffer. |
|
1611 |
|
1612 @leave May leave with any error code. |
|
1613 */ |
|
1614 EXPORT_C void CCamera::CCameraPostImageCaptureControl::GetBufferStateL(TBufferState& aBufferState) const |
|
1615 { |
|
1616 iImpl->GetBufferStateL(aBufferState); |
|
1617 } |
|
1618 |
|
1619 /** |
|
1620 Factory function for creating the CCameraVideoCaptureControl object. |
|
1621 |
|
1622 @param aCamera |
|
1623 A reference to a CCamera object providing the settings. |
|
1624 |
|
1625 @param aCaptureVideoObserver |
|
1626 Reference to the capture video observer. |
|
1627 |
|
1628 @return a pointer to a fully constructed CCameraVideoCaptureControl object. |
|
1629 |
|
1630 @leave KErrNoMemory Out of memory Or any other system-wide error code. |
|
1631 |
|
1632 @leave KErrExtensionNotSupported When NewL/NewDuplicateL used instead of New2L/NewDuplicate2L. |
|
1633 */ |
|
1634 EXPORT_C CCamera::CCameraVideoCaptureControl* CCamera::CCameraVideoCaptureControl::NewL(CCamera& aCamera, MCaptureVideoObserver& aCaptureVideoObserver) |
|
1635 { |
|
1636 if(aCamera.CameraVersion() == KCameraDefaultVersion) |
|
1637 { |
|
1638 User::Leave(KErrExtensionNotSupported); |
|
1639 } |
|
1640 |
|
1641 CCamera::CCameraVideoCaptureControl* self = new (ELeave)CCamera::CCameraVideoCaptureControl(aCamera); |
|
1642 CleanupStack::PushL(self); |
|
1643 self->ConstructL(aCaptureVideoObserver); |
|
1644 CleanupStack::Pop(self); |
|
1645 |
|
1646 return self; |
|
1647 } |
|
1648 |
|
1649 /** |
|
1650 CCameraVideoCaptureControl Constructor. |
|
1651 |
|
1652 @param aOwner |
|
1653 a reference to a CCamera object. |
|
1654 */ |
|
1655 CCamera::CCameraVideoCaptureControl::CCameraVideoCaptureControl(CCamera& aOwner):iOwner(aOwner), iImpl(NULL) |
|
1656 { |
|
1657 } |
|
1658 |
|
1659 /** |
|
1660 CCameraVideoCaptureControl second phase constructor. |
|
1661 |
|
1662 Function used to initialise internal state of the object. Uses reference to the camera to retrieve |
|
1663 Camera Video Capture Control interface pointer. |
|
1664 |
|
1665 @param aCaptureVideoObserver |
|
1666 Reference to the capture video observer. |
|
1667 |
|
1668 @leave KErrNoMemory Out of memory. |
|
1669 */ |
|
1670 void CCamera::CCameraVideoCaptureControl::ConstructL(MCaptureVideoObserver& aCaptureVideoObserver) |
|
1671 { |
|
1672 iImpl = static_cast<MCameraVideoCaptureControl*>(iOwner.CustomInterface(KECamMCameraVideoCaptureControlUid)); |
|
1673 |
|
1674 if (iImpl == NULL) |
|
1675 { |
|
1676 User::Leave(KErrNotSupported); |
|
1677 } |
|
1678 |
|
1679 iImpl->SetCaptureVideoObserver(aCaptureVideoObserver); |
|
1680 } |
|
1681 |
|
1682 /** |
|
1683 Destructor |
|
1684 |
|
1685 @note The child objects created out of this video capture control class object shall be delete beforehand. Various child |
|
1686 objects are snapshot, image processing and histograms. |
|
1687 */ |
|
1688 EXPORT_C CCamera::CCameraVideoCaptureControl::~CCameraVideoCaptureControl() |
|
1689 { |
|
1690 if (iImpl != NULL) |
|
1691 { |
|
1692 iImpl->Release(); |
|
1693 } |
|
1694 } |
|
1695 |
|
1696 /** |
|
1697 Retrieve pointer to histogram API in order to use it specifically for the video capture. |
|
1698 |
|
1699 @return Pointer to use histogram API specifically for the video capture. |
|
1700 |
|
1701 @leave May leave with any error code. |
|
1702 |
|
1703 @note Different types of histogram may be used for video capture. Every time this method will be called |
|
1704 on the CCameraVideoCaptureControl class object, a new type of histogram will be created. |
|
1705 */ |
|
1706 EXPORT_C CCamera::CCameraV2Histogram* CCamera::CCameraVideoCaptureControl::CreateHistogramHandleL() const |
|
1707 { |
|
1708 MImplementationFactory* implFactory = NULL; |
|
1709 |
|
1710 iImpl->CreateHistogramImplFactoryL(implFactory); |
|
1711 |
|
1712 CleanupReleasePushL(*implFactory); |
|
1713 CCamera::CCameraV2Histogram* histogram = CCamera::CCameraV2Histogram::CreateL(iOwner, *implFactory); |
|
1714 CleanupStack::Pop(implFactory); |
|
1715 |
|
1716 implFactory->Release(); |
|
1717 return histogram; |
|
1718 } |
|
1719 |
|
1720 |
|
1721 /** |
|
1722 Retrieve pointer to snapshot API in order to use it specifically for the video capture. |
|
1723 |
|
1724 @param aClientViewFinderId |
|
1725 The client viewfinder on which this client snapshot will be displayed. |
|
1726 |
|
1727 @return Pointer to use snapshot API specifically for the video capture. |
|
1728 |
|
1729 @leave May leave with any error code. |
|
1730 */ |
|
1731 EXPORT_C CCamera::CCameraSnapshot* CCamera::CCameraVideoCaptureControl::GetSnapshotHandleL(TInt aClientViewFinderId) const |
|
1732 { |
|
1733 MImplementationFactory* implFactory = NULL; |
|
1734 |
|
1735 iImpl->GetSnapshotImplFactoryL(implFactory); |
|
1736 |
|
1737 CleanupReleasePushL(*implFactory); |
|
1738 CCamera::CCameraSnapshot* snapshot = CCamera::CCameraSnapshot::CreateL(iOwner, *implFactory, aClientViewFinderId); |
|
1739 CleanupStack::Pop(implFactory); |
|
1740 |
|
1741 implFactory->Release(); |
|
1742 |
|
1743 return snapshot; |
|
1744 } |
|
1745 |
|
1746 /** |
|
1747 Retrieve pointer to image processing API in order to use it specifically for the video capture. |
|
1748 |
|
1749 @return Pointer to use image processing API specifically for the video capture. |
|
1750 |
|
1751 @leave May leave with any error code. |
|
1752 */ |
|
1753 EXPORT_C CCamera::CCameraImageProcessing* CCamera::CCameraVideoCaptureControl::GetTransformationHandleL() const |
|
1754 { |
|
1755 MImplementationFactory* implFactory = NULL; |
|
1756 |
|
1757 iImpl->GetImageProcessingImplFactoryL(implFactory); |
|
1758 |
|
1759 CleanupReleasePushL(*implFactory); |
|
1760 CCamera::CCameraImageProcessing* imgProc = CCamera::CCameraImageProcessing::CreateL(iOwner, *implFactory); |
|
1761 CleanupStack::Pop(implFactory); |
|
1762 |
|
1763 implFactory->Release(); |
|
1764 return imgProc; |
|
1765 } |
|
1766 |
|
1767 /** |
|
1768 Retrieves the supported video formats for a given resolution. |
|
1769 |
|
1770 @param aVideoFormatsSupported |
|
1771 A bit field which retrieves the supported video formats for a given resolution. |
|
1772 Formats have been defined as CCamera::TFormat |
|
1773 |
|
1774 @param aSize |
|
1775 The resolution (or size) for which the total number of supported video formats have to be retrieved. |
|
1776 |
|
1777 @leave May leave with any error code. |
|
1778 */ |
|
1779 EXPORT_C void CCamera::CCameraVideoCaptureControl::GetVideoFormatsSupportedL(TUint& aVideoFormatsSupported, const TSize& aSize) const |
|
1780 { |
|
1781 iImpl->GetVideoFormatsSupportedL(aVideoFormatsSupported, aSize); |
|
1782 } |
|
1783 |
|
1784 /** |
|
1785 Retrieves the supported pixel aspect ratio for a given resolution in case of video. |
|
1786 |
|
1787 @param aPixelAspectsSupported |
|
1788 A bit field which retrieves the supported pixel aspect ratio for a given resolution. |
|
1789 Pixel aspect ratio have been defined as CCamera::CCameraAdvancedSettings::TPixelAspectRatio |
|
1790 |
|
1791 @param aVideoFormat |
|
1792 The video format for which the supported pixel aspect ratio have to be retrieved. |
|
1793 |
|
1794 @param aSize |
|
1795 The resolution (or size) for which the supported pixel aspect ratio have to be retrieved. |
|
1796 |
|
1797 @leave May leave with any error code. |
|
1798 */ |
|
1799 EXPORT_C void CCamera::CCameraVideoCaptureControl::GetPixelAspectsSupportedL(TUint& aPixelAspectsSupported, CCamera::TFormat aVideoFormat, const TSize& aSize) const |
|
1800 { |
|
1801 iImpl->GetPixelAspectsSupportedL(aPixelAspectsSupported, aVideoFormat, aSize); |
|
1802 } |
|
1803 |
|
1804 /** |
|
1805 Informs whether or not the 'embedded still capture' feature is supported. Allowing still image capture in between on-going |
|
1806 video capture is referred to as embedded still capture. |
|
1807 |
|
1808 @param aSupportedEmbeddedStillCaptureTypes |
|
1809 Retrieves the supported embedded still capture. The TInt is retrieved as a bit field of supported TEmbeddedStillCaptureTypes. |
|
1810 |
|
1811 @leave May leave with any error code. |
|
1812 */ |
|
1813 EXPORT_C void CCamera::CCameraVideoCaptureControl::GetEmbeddedStillCaptureSupportInfoL(TInt& aSupportedEmbeddedStillCaptureTypes) const |
|
1814 { |
|
1815 iImpl->GetEmbeddedStillCaptureSupportInfoL(aSupportedEmbeddedStillCaptureTypes); |
|
1816 } |
|
1817 |
|
1818 /** |
|
1819 Asynchronous method to prepare for video capture. |
|
1820 |
|
1821 Performs setup and allocation of memory prior to calling StartVideoCapture() to keep the latency of that function to a |
|
1822 minimum. |
|
1823 |
|
1824 @param aPrepareVideoParameters |
|
1825 Parameters necessary to prepare for video capture. |
|
1826 |
|
1827 @note Event KUidECamEventVideoCaptureControlPrepareComplete is used to notify clients about completing the preparation |
|
1828 for video capture. |
|
1829 |
|
1830 @note Next PrepareVideoCapture can be called only after receiving the notification KUidECamEventReadyForNextPrepare. |
|
1831 |
|
1832 @note If some camera settings get affected because of desired video settings such as frame rate/frame size, |
|
1833 specific notifications will be sent to the client about camera settings being affected. |
|
1834 |
|
1835 @note Event KUidECamEventVideoCaptureControlSettingsRangeChanged: informs that range of certain camera settings have been changed. |
|
1836 Client may call GetRangeAffectedSettingsL(RArray<TUid>& aRangeAffectedSettings) const to get the list of affected camera settings. |
|
1837 |
|
1838 @note Event KUidECamEventVideoCaptureControlSettingsValueChanged: informs that value of certain camera settings have been changed. |
|
1839 Client may call GetValueAffectedSettingsL(RArray<TUid>& aValueAffectedSettings) const to get the list of affected camera settings. |
|
1840 |
|
1841 @note Event KUidECamEventVideoCaptureControlSettingsDisabled: informs that certain camera settings have been disabled. |
|
1842 Client may call GetDisabledSettingsL(RArray<TUid>& aDisabledSettings) const to get the list of affected camera settings. |
|
1843 |
|
1844 @see CCamera::PrepareVideoCaptureL(TFormat aFormat,TInt aSizeIndex,TInt aRateIndex,TInt aBuffersToUse,TInt aFramesPerBuffer) |
|
1845 |
|
1846 @see ReleaseVideoResource() |
|
1847 */ |
|
1848 EXPORT_C void CCamera::CCameraVideoCaptureControl::PrepareVideoCapture(const CCamera::CCameraVideoCaptureControl::TPrepareVideoParameters& aPrepareVideoParameters) |
|
1849 { |
|
1850 iImpl->PrepareVideoCapture(aPrepareVideoParameters); |
|
1851 } |
|
1852 |
|
1853 /** |
|
1854 Retrieves the camera settings whose range got affected once the desired video settings (frame rate/frame size) are in place. |
|
1855 This method may be called by the client after receiving the notification KUidECamEventVideoCaptureControlSettingsRangeChanged. |
|
1856 |
|
1857 @param aRangeAffectedSettings |
|
1858 Retrieves the list of range affected settings |
|
1859 |
|
1860 @leave May leave with any error code. |
|
1861 |
|
1862 @see PrepareVideoCapture(const TPrepareVideoParameters& aPrepareVideoParameters) |
|
1863 */ |
|
1864 EXPORT_C void CCamera::CCameraVideoCaptureControl::GetRangeAffectedSettingsL(RArray<TUid>& aRangeAffectedSettings) const |
|
1865 { |
|
1866 iImpl->GetRangeAffectedSettingsL(aRangeAffectedSettings); |
|
1867 } |
|
1868 |
|
1869 /** |
|
1870 Retrieves the camera settings whose value got affected once the desired video settings (frame rate/frame size) are in place. |
|
1871 This method may be called by the client after receiving the notification KUidECamEventVideoCaptureControlSettingsValueChanged. |
|
1872 |
|
1873 @param aValueAffectedSettings |
|
1874 Retrieves the list of value affected settings |
|
1875 |
|
1876 @leave May leave with any error code. |
|
1877 |
|
1878 @see PrepareVideoCapture(const TPrepareVideoParameters& aPrepareVideoParameters) |
|
1879 */ |
|
1880 EXPORT_C void CCamera::CCameraVideoCaptureControl::GetValueAffectedSettingsL(RArray<TUid>& aValueAffectedSettings) const |
|
1881 { |
|
1882 iImpl->GetValueAffectedSettingsL(aValueAffectedSettings); |
|
1883 } |
|
1884 |
|
1885 /** |
|
1886 Retrieves the camera settings whose value got affected once the desired video settings (frame rate/frame size) are in place. |
|
1887 This method may be called by the client after receiving the notification KUidECamEventVideoCaptureControlSettingsDisabled. |
|
1888 |
|
1889 @param aDisabledSettings |
|
1890 Retrieves the list of disabled settings |
|
1891 |
|
1892 @leave May leave with any error code. |
|
1893 |
|
1894 @see PrepareVideoCapture(const TPrepareVideoParameters& aPrepareVideoParameters) |
|
1895 */ |
|
1896 EXPORT_C void CCamera::CCameraVideoCaptureControl::GetDisabledSettingsL(RArray<TUid>& aDisabledSettings) const |
|
1897 { |
|
1898 iImpl->GetDisabledSettingsL(aDisabledSettings); |
|
1899 } |
|
1900 |
|
1901 /** |
|
1902 Frees the video resources which were set up as a result of CCameraVideoCaptureControl::PrepareVideoCapture call. |
|
1903 If this methid is called while PrepareVideoCapture call is outstanding, then this will be equivalent to cancelling the |
|
1904 PrepareVideoCapture call and release any allocated resources. |
|
1905 |
|
1906 @see PrepareVideoCapture(const TPrepareVideoParameters& aPrepareVideoParameters) |
|
1907 */ |
|
1908 EXPORT_C void CCamera::CCameraVideoCaptureControl::ReleaseVideoResource() |
|
1909 { |
|
1910 iImpl->ReleaseVideoResource(); |
|
1911 } |
|
1912 |
|
1913 /** |
|
1914 Starts the video capture. This operation gives priority to the low latency aspects. |
|
1915 |
|
1916 Video frames are send to client via MCaptureVideoObserver::VideoBufferReady(). |
|
1917 |
|
1918 @leave May leave with any error code. |
|
1919 |
|
1920 @note This method is recommended to be used rather than CCamera::StartVideoCaptureL(). |
|
1921 */ |
|
1922 EXPORT_C void CCamera::CCameraVideoCaptureControl::StartVideoCaptureL() |
|
1923 { |
|
1924 iImpl->StartVideoCaptureL(); |
|
1925 } |
|
1926 |
|
1927 /** |
|
1928 Stops the video capture. This operation gives priority to the low latency aspects. |
|
1929 |
|
1930 @note This method is recommended to be used rather than CCamera::StopVideoCapture(). |
|
1931 */ |
|
1932 EXPORT_C void CCamera::CCameraVideoCaptureControl::StopVideoCapture() |
|
1933 { |
|
1934 iImpl->StopVideoCapture(); |
|
1935 } |
|
1936 |
|
1937 /** |
|
1938 Pauses the on-going video capture. MCaptureVideoObserver::VideoBufferReady() |
|
1939 callback will not be received by the client until the video capture is resumed. |
|
1940 */ |
|
1941 EXPORT_C void CCamera::CCameraVideoCaptureControl::PauseVideoCapture() |
|
1942 { |
|
1943 iImpl->PauseVideoCapture(); |
|
1944 } |
|
1945 |
|
1946 /** |
|
1947 Resumes the on-going video capture. MCaptureVideoObserver::VideoBufferReady() |
|
1948 callback will again be received by the client. |
|
1949 |
|
1950 @leave May leave with any error code. |
|
1951 */ |
|
1952 EXPORT_C void CCamera::CCameraVideoCaptureControl::ResumeVideoCaptureL() |
|
1953 { |
|
1954 iImpl->ResumeVideoCaptureL(); |
|
1955 } |
|
1956 |
|
1957 /** |
|
1958 Retrieves the fading effect state for video capture. |
|
1959 |
|
1960 @param aFadingEffectState |
|
1961 Retrieves the current fading effect state for video capture. |
|
1962 |
|
1963 @leave May leave with any error code. |
|
1964 |
|
1965 @internalTechnology |
|
1966 */ |
|
1967 EXPORT_C void CCamera::CCameraVideoCaptureControl::GetFadingEffectStateL(CCamera::CCameraVideoCaptureControl::TFadingEffectState& aFadingEffectState) const |
|
1968 { |
|
1969 iImpl->GetFadingEffectStateL(aFadingEffectState); |
|
1970 } |
|
1971 |
|
1972 /** |
|
1973 Sets the fading effect state for video capture. |
|
1974 |
|
1975 @param aFadingEffectState |
|
1976 The desired fading effect state for video capture. |
|
1977 |
|
1978 @note Triggers a KUidECamEventVideoCaptureControlFadingEffect event notification. |
|
1979 |
|
1980 @internalTechnology |
|
1981 */ |
|
1982 EXPORT_C void CCamera::CCameraVideoCaptureControl::SetFadingEffectState(CCamera::CCameraVideoCaptureControl::TFadingEffectState aFadingEffectState) |
|
1983 { |
|
1984 iImpl->SetFadingEffectState(aFadingEffectState); |
|
1985 } |
|
1986 |
|
1987 /** |
|
1988 Retrieves the current video capture state. |
|
1989 |
|
1990 @param aVideoCaptureState |
|
1991 Retrieves the current video capture state. |
|
1992 |
|
1993 @leave May leave with any error code. |
|
1994 */ |
|
1995 EXPORT_C void CCamera::CCameraVideoCaptureControl::GetVideoCaptureStateL(CCamera::CCameraVideoCaptureControl::TVideoCaptureState& aVideoCaptureState) const |
|
1996 { |
|
1997 iImpl->GetVideoCaptureStateL(aVideoCaptureState); |
|
1998 } |
|
1999 |
|
2000 /** |
|
2001 Retrieves the various types of video capture supported. |
|
2002 @param aSupportedVideoCaptureTypes |
|
2003 Retrieves the supported video capture type. The TInt is retrieved as a bit field of supported |
|
2004 TVideoCaptureType. |
|
2005 |
|
2006 @leave May leave with any error code. |
|
2007 */ |
|
2008 EXPORT_C void CCamera::CCameraVideoCaptureControl::GetVideoCaptureSupportInfoL(TInt& aSupportedVideoCaptureTypes) const |
|
2009 { |
|
2010 iImpl->GetVideoCaptureSupportInfoL(aSupportedVideoCaptureTypes); |
|
2011 } |
|
2012 |
|
2013 /* |
|
2014 Retrieves the current prepare video parameters. |
|
2015 |
|
2016 @param aPrepareVideoParameters |
|
2017 Retrieves the current prepare video parameters. |
|
2018 |
|
2019 @leave May leave with any error code. |
|
2020 */ |
|
2021 EXPORT_C void CCamera::CCameraVideoCaptureControl::GetPrepareVideoParametersL(CCamera::CCameraVideoCaptureControl::TPrepareVideoParameters& aPrepareVideoParameters) const |
|
2022 { |
|
2023 iImpl->GetPrepareVideoParametersL(aPrepareVideoParameters); |
|
2024 } |
|
2025 |
|
2026 /** |
|
2027 Constructor for the TPrepareVideoParameters class. |
|
2028 Sets the size and version of this class. |
|
2029 */ |
|
2030 EXPORT_C CCamera::CCameraVideoCaptureControl::TPrepareVideoParameters::TPrepareVideoParameters() |
|
2031 { |
|
2032 iSize = sizeof(CCamera::CCameraVideoCaptureControl::TPrepareVideoParameters); |
|
2033 iVersion = KECamPrepareVideoParametersCurrentVersion; |
|
2034 } |
|
2035 |
|
2036 /** |
|
2037 Returns the size of the class. Used for extensibility by deriving from this base class and adding new member variables. |
|
2038 Intended to be used for implementation of methods where this class reference is passed as function arguments. |
|
2039 Implementation of such methods can find out the whether the actual class passed is base or the derived one. So, if a new application |
|
2040 is made to run on an old implementation, an error may occur in such cases after the old implementation detects this by getting |
|
2041 the size information of the T class passed. Also, if old application is made to run on a new implementation, this could be |
|
2042 properly handled if the derived class variables handling is done in a proper 'if-else' statement. |
|
2043 |
|
2044 @return The size of the class. |
|
2045 |
|
2046 @note The size will be modified when the T-class gets updated. |
|
2047 */ |
|
2048 EXPORT_C TUint CCamera::CCameraVideoCaptureControl::TPrepareVideoParameters::Size() const |
|
2049 { |
|
2050 return iSize; |
|
2051 } |
|
2052 |
|
2053 /** |
|
2054 Returns the version of the class. Used for extensibility specially when the class members are not added but the Reserved |
|
2055 members get used at a later stage. |
|
2056 |
|
2057 @return The version of this class. |
|
2058 |
|
2059 @note The version will be modified when the T-class gets updated. |
|
2060 */ |
|
2061 EXPORT_C TUint CCamera::CCameraVideoCaptureControl::TPrepareVideoParameters::Version() const |
|
2062 { |
|
2063 return iVersion; |
|
2064 } |
|
2065 |
|
2066 /** |
|
2067 Indicates whether or not the embedded still image capture state is enabled. |
|
2068 |
|
2069 @return Whether or not the embedded still image capture state is enabled. |
|
2070 |
|
2071 @see CCamera::CCameraVideoCaptureControl::TPrepareVideoParameters::iIsEmbeddedStillCaptureEnabled |
|
2072 */ |
|
2073 EXPORT_C TBool CCamera::CCameraVideoCaptureControl::TPrepareVideoParameters::IsEmbeddedStillCaptureEnabled() const |
|
2074 { |
|
2075 if (iIsEmbeddedStillCaptureEnabled) |
|
2076 { |
|
2077 return ETrue; |
|
2078 } |
|
2079 else |
|
2080 { |
|
2081 return EFalse; |
|
2082 } |
|
2083 } |
|
2084 |
|
2085 /** |
|
2086 Sets the state to inform whether or not the embedded still image capture state is enabled. |
|
2087 |
|
2088 @param aIsEmbeddedStillCaptureEnabled |
|
2089 ETrue implies embedded still capture state is enabled. |
|
2090 EFalse implies embedded still capture state is disabled. |
|
2091 |
|
2092 @see CCamera::CCameraVideoCaptureControl::TPrepareVideoParameters::iIsEmbeddedStillCaptureEnabled |
|
2093 */ |
|
2094 EXPORT_C void CCamera::CCameraVideoCaptureControl::TPrepareVideoParameters::SetEmbeddedStillCaptureState(TBool aIsEmbeddedStillCaptureEnabled) |
|
2095 { |
|
2096 iIsEmbeddedStillCaptureEnabled = static_cast<TUint>(aIsEmbeddedStillCaptureEnabled); |
|
2097 } |
|
2098 |
|
2099 /** |
|
2100 Retrieves the current video capture type used. |
|
2101 |
|
2102 @param aVideoCaptureType |
|
2103 Retrieves the current video capture type. |
|
2104 |
|
2105 @see CCamera::CCameraVideoCaptureControl::TPrepareVideoParameters::iVideoCaptureType |
|
2106 */ |
|
2107 EXPORT_C CCamera::CCameraVideoCaptureControl::TVideoCaptureType CCamera::CCameraVideoCaptureControl::TPrepareVideoParameters::VideoCaptureType() const |
|
2108 { |
|
2109 switch(iVideoCaptureType) |
|
2110 { |
|
2111 case KECamVideoCaptureBit0: |
|
2112 { |
|
2113 return CCamera::CCameraVideoCaptureControl::EVideoCaptureNotSupported; |
|
2114 } |
|
2115 case KECamClientVideoCaptureBit1: |
|
2116 { |
|
2117 return CCamera::CCameraVideoCaptureControl::EClientVideoCapture; |
|
2118 } |
|
2119 case KECamDirectVideoCaptureBit2: |
|
2120 { |
|
2121 return CCamera::CCameraVideoCaptureControl::EDirectVideoCapture; |
|
2122 } |
|
2123 default: |
|
2124 { |
|
2125 return CCamera::CCameraVideoCaptureControl::EVideoCaptureNotSupported; |
|
2126 } |
|
2127 } |
|
2128 } |
|
2129 |
|
2130 /** |
|
2131 Sets the desired video capture type. |
|
2132 |
|
2133 @param aVideoCaptureType |
|
2134 The desired video capture type. |
|
2135 |
|
2136 @see CCamera::CCameraVideoCaptureControl::TPrepareVideoParameters::iVideoCaptureType |
|
2137 */ |
|
2138 EXPORT_C void CCamera::CCameraVideoCaptureControl::TPrepareVideoParameters::SetVideoCaptureType(CCamera::CCameraVideoCaptureControl::TVideoCaptureType aVideoCaptureType) |
|
2139 { |
|
2140 iVideoCaptureType = static_cast<TUint>(aVideoCaptureType); |
|
2141 } |
|
2142 |
|
2143 /** |
|
2144 Retrieves the supported YUV conversion coefficient in case of video. |
|
2145 |
|
2146 @param aSupportedConversionCoefficients |
|
2147 A bit field which retrieves the supported YUV conversion coefficient. |
|
2148 YUV conversion coefficients have been defined as TYuvCoefficients |
|
2149 |
|
2150 @leave May leave with any error code. |
|
2151 */ |
|
2152 void CCamera::CCameraVideoCaptureControl::GetSupportedConversionCoefficientsL(TUint& /*aSupportedConversionCoefficients*/) const |
|
2153 { |
|
2154 User::Leave(KErrNotSupported); |
|
2155 } |
|
2156 |
|
2157 /** |
|
2158 Retrieves the currently used YUV conversion coefficients. |
|
2159 |
|
2160 @param aConversionCoefficients |
|
2161 Currently used TYuvCoefficients |
|
2162 |
|
2163 @leave May leave with any error code. |
|
2164 */ |
|
2165 void CCamera::CCameraVideoCaptureControl::GetConversionCoefficientL(TYuvCoefficients& /*aConversionCoefficients*/) const |
|
2166 { |
|
2167 User::Leave(KErrNotSupported); |
|
2168 } |
|
2169 |
|
2170 /** |
|
2171 Asynchronous method which sets the desired YUV conversion coefficients. |
|
2172 |
|
2173 @param aConversionCoefficients |
|
2174 The desired TYuvCoefficients |
|
2175 |
|
2176 @note Event KUidECamEventVideoCaptureControlConversionCoefficient is used to notify clients about setting of desired YUV |
|
2177 conversion coefficients. |
|
2178 */ |
|
2179 void CCamera::CCameraVideoCaptureControl::SetConversionCoefficient(TYuvCoefficients /*aConversionCoefficients*/) |
|
2180 { |
|
2181 return; |
|
2182 } |