|
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/ecamadvsettingsintf.h> |
|
17 #include "ecamversion.h" |
|
18 #include <ecam/ecamconstants.h> |
|
19 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
20 #include <ecamadvsettingsconst.h> |
|
21 #include <ecamadvsettingsdef.h> |
|
22 #endif |
|
23 #include <ecam/implementationfactoryintf.h> |
|
24 const TInt KBaselinedFocusRanges = 0x1F; |
|
25 const TInt KBaselinedWhiteBalanceModes = 0x01FF; |
|
26 const TUint KBaselinedPixelAspectsMask = (CCamera::CCameraAdvancedSettings::EEPixelAspect59To54 << 1) - 1; |
|
27 const TUint KBaselinedFlashModeMask = (CCamera::EFlashManual << 1) - 1; |
|
28 const TUint KBaselinedPreCaptureWarning = (CCamera::CCameraAdvancedSettings::EPCWGeneralWarning << 1) - 1; |
|
29 const TUint KBaselinedDriveMode = (CCamera::CCameraAdvancedSettings::EDriveModeBurst << 1) - 1; |
|
30 |
|
31 /** |
|
32 Factory function for creating the CCameraPresets object. |
|
33 |
|
34 @param aCamera |
|
35 a reference to a CCamera object providing the settings. |
|
36 |
|
37 @return a pointer to a fully constructed CCameraPresets object. |
|
38 |
|
39 @leave KErrNoMemory Out of memory Or any other system-wide error code. |
|
40 |
|
41 @note Clients using MCameraObserver are not recommended to use this extension class since they cannot handle events. |
|
42 */ |
|
43 EXPORT_C CCamera::CCameraPresets* CCamera::CCameraPresets::NewL(CCamera& aCamera) |
|
44 { |
|
45 CCamera::CCameraPresets* self = new (ELeave)CCamera::CCameraPresets(aCamera); |
|
46 CleanupStack::PushL(self); |
|
47 self->ConstructL(); |
|
48 CleanupStack::Pop(self); |
|
49 |
|
50 return self; |
|
51 } |
|
52 |
|
53 /** |
|
54 CCameraPresets Constructor. |
|
55 |
|
56 @param aOwner |
|
57 a reference to a CCamera object providing the settings. |
|
58 */ |
|
59 EXPORT_C CCamera::CCameraPresets::CCameraPresets(CCamera& aOwner):iOwner(aOwner), iImpl(NULL), iImpl2(NULL) |
|
60 { |
|
61 } |
|
62 |
|
63 /** |
|
64 CCameraPresets second phase constructor. |
|
65 |
|
66 Function used to initialise internal state of the object. Uses reference to the camera to retrieve |
|
67 Camera presets interface pointer. |
|
68 |
|
69 @leave KErrNoMemory Out of memory. |
|
70 */ |
|
71 EXPORT_C void CCamera::CCameraPresets::ConstructL() |
|
72 { |
|
73 iImpl = static_cast<MCameraPresets*>(iOwner.CustomInterface(KECamMCameraPresetsUid)); |
|
74 |
|
75 if (iImpl == NULL) |
|
76 { |
|
77 User::Leave(KErrNotSupported); |
|
78 } |
|
79 |
|
80 iImpl2 = static_cast<MCameraPresets2*>(iOwner.CustomInterface(KECamMCameraPresets2Uid)); |
|
81 } |
|
82 |
|
83 /** |
|
84 Destructor |
|
85 */ |
|
86 EXPORT_C CCamera::CCameraPresets::~CCameraPresets() |
|
87 { |
|
88 if (iImpl != NULL) |
|
89 { |
|
90 iImpl->Release(); |
|
91 } |
|
92 if (iImpl2 != NULL) |
|
93 { |
|
94 iImpl2->Release(); |
|
95 } |
|
96 } |
|
97 |
|
98 /** |
|
99 Gets the presets supported by the camera. These are identified by UIDs |
|
100 and relate to a known predefined outcome. |
|
101 The settings associated with a particular preset and their specific values |
|
102 and ranges are specific to each type of camera hardware and are therefore not defined by the API. |
|
103 |
|
104 @param aPresets |
|
105 An empty array of TUids which would be populated by the implementation with |
|
106 the specific supported values. If the array is empty on return, |
|
107 the camera does not support presets. |
|
108 |
|
109 @leave KErrNoMemory Out of memory. |
|
110 |
|
111 @note if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that |
|
112 application is not prepared to receive extra added uid values (new presets added). So, any extra uid value(unrecognised) |
|
113 passed from the implementation will be filtered at this point. |
|
114 To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() |
|
115 to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values. |
|
116 |
|
117 @note Any preset uid, if added in future, has to have a uid value greater than KUidECamPresetFactoryDefaultUidValue |
|
118 otherwise unrecognized preset uids could not be checked. |
|
119 */ |
|
120 EXPORT_C void CCamera::CCameraPresets::GetSupportedPresetsL(RArray<TUid>& aPresets) const |
|
121 { |
|
122 iImpl->GetSupportedPresetsL(aPresets); |
|
123 |
|
124 /* if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that |
|
125 application is not prepared to receive extra added uid values (new presets added). So, any extra uid value(unrecognised) |
|
126 passed from the implementation will be filtered at this point. |
|
127 To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() |
|
128 to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values */ |
|
129 FilterUnrecognisedUids(aPresets, KUidECamPresetFactoryDefaultUidValue); |
|
130 } |
|
131 |
|
132 /** |
|
133 Sets a specific preset supported by the device. |
|
134 All clients, implementing the MCameraObserver2 interface will receive a notification |
|
135 with the UID of the specific preset, signalling a new preset has been selected. |
|
136 |
|
137 @param aPreset |
|
138 The UID of the new requested preset. |
|
139 */ |
|
140 EXPORT_C void CCamera::CCameraPresets::SetPreset(TUid aPreset) |
|
141 { |
|
142 iImpl->SetPreset(aPreset); |
|
143 } |
|
144 |
|
145 /** |
|
146 Gets the current preset set on the camera. |
|
147 |
|
148 @return The UID of the current preset. If there is no active preset then the |
|
149 returned value is KNullUid. |
|
150 |
|
151 @note if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that application is not |
|
152 prepared to receive extra added uid values (new presets added). So, any extra uid(unrecognised) value received from the |
|
153 implementation will be mapped to KUidECamPresetFactoryDefault at this point. |
|
154 To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() |
|
155 to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values |
|
156 */ |
|
157 EXPORT_C TUid CCamera::CCameraPresets::Preset() const |
|
158 { |
|
159 TUid preset = iImpl->Preset(); |
|
160 |
|
161 /* if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that application is not |
|
162 prepared to receive extra added uid values (new presets added). So, any extra uid(unrecognised) value received from the |
|
163 implementation will be mapped to KUidECamPresetFactoryDefault at this point. |
|
164 To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() |
|
165 to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values */ |
|
166 if(iOwner.CameraVersion() == KCameraDefaultVersion) |
|
167 { |
|
168 if(preset.iUid > KUidECamPresetFactoryDefaultUidValue) |
|
169 { |
|
170 preset = KUidECamPresetFactoryDefault; |
|
171 } |
|
172 } |
|
173 |
|
174 return preset; |
|
175 } |
|
176 |
|
177 /** |
|
178 Get all settings affected by the current preset. This is to say that all settings which |
|
179 are related to the preset in question will be included in the list, even though the value might |
|
180 not have changed. |
|
181 |
|
182 @param aSettings |
|
183 An empty array of TUids which would be populated by the implementation with |
|
184 the specific settings. |
|
185 |
|
186 @leave KErrNoMemory Out of memory. |
|
187 |
|
188 @note if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that |
|
189 application is not prepared to receive extra added uid values (new settings added). So, any extra uid value passed |
|
190 from the implementation will be filtered at this point. |
|
191 To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() |
|
192 to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values |
|
193 */ |
|
194 EXPORT_C void CCamera::CCameraPresets::GetAffectedSettingsL(RArray<TUid>& aSettings) const |
|
195 { |
|
196 iImpl->GetAffectedSettingsL(aSettings); |
|
197 |
|
198 /* if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that |
|
199 application is not prepared to receive extra added uid values (new settings added). So, any extra uid value passed |
|
200 from the implementation will be filtered at this point. |
|
201 To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() |
|
202 to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values */ |
|
203 FilterUnrecognisedUids(aSettings, KUidECamEventCameraSettingAutoFocusType2UidValue); |
|
204 } |
|
205 |
|
206 /** |
|
207 Get all settings associated with a specific preset, identified by a UID. |
|
208 This function does not require a preset to have been set prior the call as in |
|
209 GetAffectedSettingsL() function. |
|
210 The returned array will contain the UIDs of all settings which are associated and |
|
211 potentially affected by that particular preset. |
|
212 |
|
213 @param aPreset |
|
214 the UID of the preset in question. |
|
215 |
|
216 @param aSettings |
|
217 An empty array of TUids which would be populated by the implementation with |
|
218 the UIDs of the settings associated with that preset. |
|
219 |
|
220 @leave KErrArgument If the provided preset UID is not recognised. |
|
221 @leave KErrNoMemory Out of memory. |
|
222 |
|
223 @note if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that |
|
224 application is not prepared to receive extra added uid values (new settings added). So, any extra uid value passed |
|
225 from the implementation will be filtered at this point. |
|
226 To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() |
|
227 to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values |
|
228 */ |
|
229 EXPORT_C void CCamera::CCameraPresets::GetAssociatedSettingsL(TUid aPreset, RArray<TUid>& aSettings) const |
|
230 { |
|
231 iImpl->GetAssociatedSettingsL(aPreset, aSettings); |
|
232 |
|
233 /* if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that |
|
234 application is not prepared to receive extra added uid values (new settings added). So, any extra uid value passed |
|
235 from the implementation will be filtered at this point. |
|
236 To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() |
|
237 to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values */ |
|
238 FilterUnrecognisedUids(aSettings, KUidECamEventCameraSettingAutoFocusType2UidValue); |
|
239 } |
|
240 |
|
241 void CCamera::CCameraPresets::FilterUnrecognisedUids(RArray<TUid>& aUids, const TInt aBaselineUid) const |
|
242 { |
|
243 if(iOwner.CameraVersion() == KCameraDefaultVersion) |
|
244 { |
|
245 for(TInt index =0; index < aUids.Count(); index++) |
|
246 { |
|
247 /** aBaselineUid is the baseline. Any uid with greater uid value means that it has |
|
248 been added in later versions */ |
|
249 if(aUids[index].iUid > aBaselineUid) |
|
250 { |
|
251 aUids.Remove(index); |
|
252 index--; |
|
253 } |
|
254 } |
|
255 } |
|
256 } |
|
257 |
|
258 /** |
|
259 Retrieves those settings for which ranges have been restricted in order to let the camera work in a given preset mode. |
|
260 The client will be notified of range restrictions through ECAM event KUidECamEventRangeRestricted. After receiving this |
|
261 notification, the client may use this method to retrieve those settings whose ranges have been restricted. |
|
262 |
|
263 @param aRangeRestrictedSettings |
|
264 An array of uids which represents those settings whose ranges have been restricted. These settings are ECam |
|
265 component wide. For each of the settings, the client can query about the restricted ranges in the usual way. |
|
266 Empty array indicates that there are no range restricted settings for the given preset. |
|
267 |
|
268 @leave May leave with any error code. |
|
269 |
|
270 @publishedPartner |
|
271 @prototype |
|
272 */ |
|
273 EXPORT_C void CCamera::CCameraPresets::GetRangeRestrictedSettingsL(RArray<TUid>& aRangeRestrictedSettings) const |
|
274 { |
|
275 if(iImpl2 != NULL) |
|
276 { |
|
277 iImpl2->GetRangeRestrictedSettingsL(aRangeRestrictedSettings); |
|
278 } |
|
279 else |
|
280 { |
|
281 User::Leave(KErrNotSupported); |
|
282 } |
|
283 } |
|
284 |
|
285 /** |
|
286 Retrieves those settings which have been restricted (settings no longer supported) in order to let the camera work in |
|
287 a given preset mode. |
|
288 The client will be notified of feature restrictions through ECAM event KUidECamEventFeatureRestricted. After receiving |
|
289 this notification, the client may use this method to retrieve these settings. |
|
290 |
|
291 @param aFeatureRestrictedSettings |
|
292 An array of uids which represents those settings which have been restricted. These settings are ECam |
|
293 component wide. Empty array indicates that there are no settings which have been been restricted for |
|
294 the given preset. |
|
295 |
|
296 @leave May leave with any error code. |
|
297 |
|
298 @publishedPartner |
|
299 @prototype |
|
300 */ |
|
301 EXPORT_C void CCamera::CCameraPresets::GetFeatureRestrictedSettingsL(RArray<TUid>& aFeatureRestrictedSettings) const |
|
302 { |
|
303 if(iImpl2 != NULL) |
|
304 { |
|
305 iImpl2->GetFeatureRestrictedSettingsL(aFeatureRestrictedSettings); |
|
306 } |
|
307 else |
|
308 { |
|
309 User::Leave(KErrNotSupported); |
|
310 } |
|
311 } |
|
312 |
|
313 /** |
|
314 Retrieves information about whether the preset unlock feature is supported or not. Unlocking the preset helps in making |
|
315 further setting changes after the camera works in a particular preset mode. |
|
316 |
|
317 @param aUnlockSupported |
|
318 ETrue indicates preset unlock feature is supported. |
|
319 EFalse indicates preset lock feature is not supported. |
|
320 |
|
321 @leave May leave with any error code. |
|
322 |
|
323 @publishedPartner |
|
324 @prototype |
|
325 */ |
|
326 EXPORT_C void CCamera::CCameraPresets::IsPresetUnlockSupportedL(TBool& aUnlockSupported) const |
|
327 { |
|
328 if(iImpl2 != NULL) |
|
329 { |
|
330 iImpl2->IsPresetUnlockSupportedL(aUnlockSupported); |
|
331 } |
|
332 else |
|
333 { |
|
334 User::Leave(KErrNotSupported); |
|
335 } |
|
336 } |
|
337 |
|
338 /** |
|
339 Locks the preset for any further setting changes. |
|
340 |
|
341 @note Event KUidECamEventPresetLocked is used to notify clients that the preset has been locked. |
|
342 |
|
343 @publishedPartner |
|
344 @prototype |
|
345 */ |
|
346 EXPORT_C void CCamera::CCameraPresets::LockPresetL() |
|
347 { |
|
348 if(iImpl2 != NULL) |
|
349 { |
|
350 iImpl2->LockPreset(); |
|
351 } |
|
352 else |
|
353 { |
|
354 User::Leave(KErrNotSupported); |
|
355 } |
|
356 } |
|
357 |
|
358 /** |
|
359 Unlocks the preset to apply further setting changes. |
|
360 |
|
361 @note Event KUidECamEventPresetUnlocked is used to notify clients that the preset has been unlocked. |
|
362 |
|
363 @publishedPartner |
|
364 @prototype |
|
365 */ |
|
366 EXPORT_C void CCamera::CCameraPresets::UnlockPresetL() |
|
367 { |
|
368 if(iImpl2 != NULL) |
|
369 { |
|
370 iImpl2->UnlockPreset(); |
|
371 } |
|
372 else |
|
373 { |
|
374 User::Leave(KErrNotSupported); |
|
375 } |
|
376 } |
|
377 |
|
378 /** |
|
379 Factory function for creating the CCameraAdvancedSettings object. |
|
380 |
|
381 @param aCamera |
|
382 a reference to a CCamera object providing the settings. |
|
383 |
|
384 @return a pointer to a fully constructed CCameraAdvancedSettings object. |
|
385 |
|
386 @leave KErrNoMemory Out of memory or any other system-wide error code. |
|
387 |
|
388 @note Clients using MCameraObserver are not recommended to use this extension class since they cannot handle events. |
|
389 */ |
|
390 EXPORT_C CCamera::CCameraAdvancedSettings* CCamera::CCameraAdvancedSettings::NewL(CCamera& aCamera) |
|
391 { |
|
392 CCamera::CCameraAdvancedSettings* self = new (ELeave)CCamera::CCameraAdvancedSettings(aCamera); |
|
393 CleanupStack::PushL(self); |
|
394 self->ConstructL(); |
|
395 CleanupStack::Pop(self); |
|
396 |
|
397 return self; |
|
398 } |
|
399 |
|
400 /** |
|
401 CCameraAdvancedSettings Constructor. |
|
402 |
|
403 @param aOwner |
|
404 a reference to a CCamera object providing the settings. |
|
405 */ |
|
406 EXPORT_C CCamera::CCameraAdvancedSettings::CCameraAdvancedSettings(CCamera& aOwner) : iOwner(aOwner), iImpl(NULL), iImpl2(NULL), iImpl3(NULL), iImpl4(NULL) |
|
407 { |
|
408 } |
|
409 |
|
410 /** |
|
411 CCameraAdvancedSettings second phase constructor. |
|
412 |
|
413 Function used to initialise internal state of the object. Uses reference to the camera to retrieve |
|
414 Camera advanced settings interface pointer. |
|
415 |
|
416 @leave KErrNoMemory Out of memory. |
|
417 */ |
|
418 EXPORT_C void CCamera::CCameraAdvancedSettings::ConstructL() |
|
419 { |
|
420 iImpl = static_cast<MCameraAdvancedSettings*>(iOwner.CustomInterface(KECamMCameraAdvancedSettingsUid)); |
|
421 if (iImpl == NULL) |
|
422 { |
|
423 User::Leave(KErrNotSupported); |
|
424 } |
|
425 iImpl2 = static_cast<MCameraAdvancedSettings2*>(iOwner.CustomInterface(KECamMCameraAdvancedSettings2Uid)); |
|
426 iImpl3 = static_cast<MCameraAdvancedSettings3*>(iOwner.CustomInterface(KECamMCameraAdvancedSettings3Uid)); |
|
427 iImpl4 = static_cast<MCameraAdvancedSettings4*>(iOwner.CustomInterface(KECamMCameraAdvancedSettings4Uid)); |
|
428 } |
|
429 |
|
430 /** |
|
431 Destructor |
|
432 */ |
|
433 EXPORT_C CCamera::CCameraAdvancedSettings::~CCameraAdvancedSettings() |
|
434 { |
|
435 if (iImpl != NULL) |
|
436 { |
|
437 iImpl->Release(); |
|
438 } |
|
439 if (iImpl2 != NULL) |
|
440 { |
|
441 iImpl2->Release(); |
|
442 } |
|
443 if (iImpl3 != NULL) |
|
444 { |
|
445 iImpl3->Release(); |
|
446 } |
|
447 if (iImpl4 != NULL) |
|
448 { |
|
449 iImpl4->Release(); |
|
450 } |
|
451 } |
|
452 |
|
453 /** |
|
454 Gets the type of this camera. |
|
455 @see TCameraType |
|
456 |
|
457 @return the type of this camera |
|
458 */ |
|
459 EXPORT_C CCamera::CCameraAdvancedSettings::TCameraType CCamera::CCameraAdvancedSettings::CameraType() const |
|
460 { |
|
461 return iImpl->CameraType(); |
|
462 } |
|
463 |
|
464 /** |
|
465 Get the type of a specific camera denoted by its index. A pluggable camera |
|
466 may not necessarily be physically present. The type denotes whether the slot allocated |
|
467 to that index is for pluggable or onboard camera. |
|
468 @see TCameraType |
|
469 |
|
470 @param aCameraIndex |
|
471 An integer in the range of [0: CCamera::CamerasAvailable()-1]. |
|
472 |
|
473 @return the TCameraType value for the specific camera. |
|
474 If the index is out of range, the return value is ECameraUnknown. |
|
475 */ |
|
476 EXPORT_C CCamera::CCameraAdvancedSettings::TCameraType CCamera::CCameraAdvancedSettings::CameraType(TInt aCameraIndex) |
|
477 { |
|
478 return iImpl->CameraType(aCameraIndex); |
|
479 } |
|
480 |
|
481 /** |
|
482 Checks whether the current camera is present. |
|
483 |
|
484 @return Whether the camera is currently present. |
|
485 ETrue if camera is present, EFalse otherwise. |
|
486 For example ECameraOnBoard (built-in) cameras are always present. |
|
487 */ |
|
488 EXPORT_C TBool CCamera::CCameraAdvancedSettings::IsCameraPresent() const |
|
489 { |
|
490 return iImpl->IsCameraPresent(); |
|
491 } |
|
492 |
|
493 /** |
|
494 Checks whether the camera, denoted by its index, is currently present. |
|
495 The index uniquely identifies the camera on the device. |
|
496 |
|
497 @param aCameraIndex |
|
498 An integer in the range of [0:CCamera::CamerasAvailable()-1] specifying the |
|
499 camera device to use |
|
500 |
|
501 @return Whether the camera is currently present. |
|
502 ETrue if camera is present, EFalse otherwise. |
|
503 For example built-in (ECameraOnBoard) cameras |
|
504 are always present. |
|
505 */ |
|
506 EXPORT_C TBool CCamera::CCameraAdvancedSettings::IsCameraPresent(TInt aCameraIndex) |
|
507 { |
|
508 return iImpl->IsCameraPresent(aCameraIndex); |
|
509 } |
|
510 |
|
511 /** |
|
512 Gets current camera index. The index uniquely identifies the camera on the device. |
|
513 |
|
514 @return camera index in the inclusive range of [0:CCamera::CamerasAvailable() - 1]. |
|
515 */ |
|
516 EXPORT_C TInt CCamera::CCameraAdvancedSettings::CameraIndex() const |
|
517 { |
|
518 return iImpl->CameraIndex(); |
|
519 } |
|
520 |
|
521 /** |
|
522 Gets all of the supported stabilization modes on the camera. The result is a bitfield |
|
523 of the valid TStabilizationMode flags. |
|
524 @see TStabilizationMode |
|
525 |
|
526 @return a bitfield of all supported stabilization modes. |
|
527 */ |
|
528 EXPORT_C TInt CCamera::CCameraAdvancedSettings::SupportedStabilizationModes() const |
|
529 { |
|
530 return iImpl->SupportedStabilizationModes(); |
|
531 } |
|
532 |
|
533 /** |
|
534 Gets current stabilization mode on the camera. |
|
535 The result is a valid TStabilizationMode value. |
|
536 |
|
537 @return current stabilization mode of type TStabilizationMode. |
|
538 */ |
|
539 EXPORT_C CCamera::CCameraAdvancedSettings::TStabilizationMode CCamera::CCameraAdvancedSettings::StabilizationMode() const |
|
540 { |
|
541 return iImpl->StabilizationMode(); |
|
542 } |
|
543 |
|
544 /** |
|
545 Sets a specific stabilization mode on the camera. |
|
546 |
|
547 Stabilization mode change fires a KUidECamEventCameraSettingStabilizationMode |
|
548 event to all MCameraObserver2 clients of this specific camera. |
|
549 |
|
550 @param aStabilizationMode |
|
551 new stabilization mode of TStabilizationMode type. |
|
552 */ |
|
553 EXPORT_C void CCamera::CCameraAdvancedSettings::SetStabilizationMode(CCamera::CCameraAdvancedSettings::TStabilizationMode aStabilizationMode) |
|
554 { |
|
555 iImpl->SetStabilizationMode(aStabilizationMode); |
|
556 } |
|
557 |
|
558 /** |
|
559 Gets all of the supported focus modes on the camera. The result is a bitfield |
|
560 of the valid TFocusMode flags. |
|
561 @see TFocusMode |
|
562 |
|
563 @return a bitfield of all supported focus modes. |
|
564 */ |
|
565 EXPORT_C TInt CCamera::CCameraAdvancedSettings::SupportedFocusModes() const |
|
566 { |
|
567 return iImpl->SupportedFocusModes(); |
|
568 } |
|
569 |
|
570 /** |
|
571 Gets current focus mode on the camera. |
|
572 The result is a valid TFocusMode value. |
|
573 |
|
574 @return current focus mode. |
|
575 */ |
|
576 EXPORT_C CCamera::CCameraAdvancedSettings::TFocusMode CCamera::CCameraAdvancedSettings::FocusMode() const |
|
577 { |
|
578 return iImpl->FocusMode(); |
|
579 } |
|
580 |
|
581 /** |
|
582 Sets a specific focus mode on the camera. |
|
583 Focus mode change fires a KUidECamEventCameraSettingFocusMode event |
|
584 to all MCameraObserver2 clients of the camera. |
|
585 |
|
586 @param aFocusMode |
|
587 new focus mode of TFocusMode type. |
|
588 */ |
|
589 EXPORT_C void CCamera::CCameraAdvancedSettings::SetFocusMode(CCamera::CCameraAdvancedSettings::TFocusMode aFocusMode) |
|
590 { |
|
591 iImpl->SetFocusMode(aFocusMode); |
|
592 } |
|
593 |
|
594 /** |
|
595 Gets all supported focus ranges on the camera. |
|
596 |
|
597 @return an integer - a bitfield of all supported TFocusRange values. |
|
598 |
|
599 @note if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that |
|
600 application is not prepared to receive extra added enum values. So, any extra enum value passed |
|
601 from the implementation will be filtered at this point. |
|
602 To receive extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() |
|
603 to create camera object. In this case, application is assumed to be prepared to receive unrecognised enum values |
|
604 */ |
|
605 EXPORT_C TInt CCamera::CCameraAdvancedSettings::SupportedFocusRanges() const |
|
606 { |
|
607 TInt supportedFocusRanges = iImpl->SupportedFocusRanges(); |
|
608 |
|
609 /* if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that |
|
610 application is not prepared to receive extra added enum values. So, any extra enum value passed |
|
611 from the implementation will be filtered at this point. |
|
612 To receive extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() |
|
613 to create camera object. In this case, application is assumed to be prepared to receive unrecognised enum values */ |
|
614 if(iOwner.CameraVersion() == KCameraDefaultVersion) |
|
615 { |
|
616 supportedFocusRanges &= KBaselinedFocusRanges; |
|
617 } |
|
618 |
|
619 return supportedFocusRanges; |
|
620 } |
|
621 |
|
622 /** |
|
623 Gets current focus range on the camera. |
|
624 |
|
625 @return the current TFocusRange value. |
|
626 |
|
627 @note if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that |
|
628 application is not prepared to receive extra added enum values. So, any extra enum value received |
|
629 from the implementation will be dropped and EFocusRangeAuto would be passed instead. |
|
630 To receive extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() |
|
631 to create camera object. In this case, application is assumed to be prepared to receive unrecognised enum values |
|
632 */ |
|
633 EXPORT_C CCamera::CCameraAdvancedSettings::TFocusRange CCamera::CCameraAdvancedSettings::FocusRange() const |
|
634 { |
|
635 CCamera::CCameraAdvancedSettings::TFocusRange focusRange = iImpl->FocusRange(); |
|
636 |
|
637 /* if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that |
|
638 application is not prepared to receive extra added enum values. So, any extra enum value received |
|
639 from the implementation will be dropped and EFocusRangeAuto would be passed instead. |
|
640 To receive extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() |
|
641 to create camera object. In this case, application is assumed to be prepared to receive unrecognised enum values */ |
|
642 if(iOwner.CameraVersion() == KCameraDefaultVersion) |
|
643 { |
|
644 if(static_cast<TInt>(focusRange) > KBaselinedFocusRanges) |
|
645 { |
|
646 focusRange = CCamera::CCameraAdvancedSettings::EFocusRangeAuto; |
|
647 } |
|
648 } |
|
649 |
|
650 return focusRange; |
|
651 } |
|
652 |
|
653 /** |
|
654 Sets a specific focus range on the camera. |
|
655 The focus range change fires both, KUidECamEventCameraSettingFocusRange and |
|
656 KUidECamEventCameraSettingFocusRange2 event to all MCameraObserver2 clients of the camera. |
|
657 @see KUidECamEventCameraSettingFocusRange |
|
658 |
|
659 @param aFocusRange |
|
660 newly selected focus range. |
|
661 */ |
|
662 EXPORT_C void CCamera::CCameraAdvancedSettings::SetFocusRange(CCamera::CCameraAdvancedSettings::TFocusRange aFocusRange) |
|
663 { |
|
664 iImpl->SetFocusRange(aFocusRange); |
|
665 } |
|
666 |
|
667 /** |
|
668 Gets all supported auto focus types on the camera. |
|
669 |
|
670 @return an integer - a bitfield of all supported TAutoFocusType values. |
|
671 */ |
|
672 EXPORT_C TInt CCamera::CCameraAdvancedSettings::SupportedAutoFocusTypes() const |
|
673 { |
|
674 return iImpl->SupportedAutoFocusTypes(); |
|
675 } |
|
676 |
|
677 /** |
|
678 Gets current auto focus type on the camera. |
|
679 @see TAutoFocusType |
|
680 |
|
681 @return a CCamera::TAutoFocusType value. |
|
682 */ |
|
683 EXPORT_C CCamera::CCameraAdvancedSettings::TAutoFocusType CCamera::CCameraAdvancedSettings::AutoFocusType() const |
|
684 { |
|
685 return iImpl->AutoFocusType(); |
|
686 } |
|
687 |
|
688 /** |
|
689 Sets a specific auto focus type on the camera. |
|
690 The focus type change fires both, KUidECamEventCameraSettingAutoFocusType and |
|
691 KUidECamEventCameraSettingAutoFocusType2 event to all MCameraObserver2 clients of the camera. |
|
692 @see KUidECamEventCameraSettingAutoFocusType |
|
693 |
|
694 @param aAutoFocusType |
|
695 Autofocus selection. |
|
696 */ |
|
697 EXPORT_C void CCamera::CCameraAdvancedSettings::SetAutoFocusType(CCamera::CCameraAdvancedSettings::TAutoFocusType aAutoFocusType) |
|
698 { |
|
699 iImpl->SetAutoFocusType(aAutoFocusType); |
|
700 } |
|
701 |
|
702 /** |
|
703 Gets all supported auto focus areas on the camera. |
|
704 |
|
705 @return an integer - a bitfield of al supported TAutoFocusArea values. |
|
706 */ |
|
707 EXPORT_C TInt CCamera::CCameraAdvancedSettings::SupportedAutoFocusAreas() const |
|
708 { |
|
709 return iImpl->SupportedAutoFocusAreas(); |
|
710 } |
|
711 |
|
712 /** |
|
713 Gets current chosen auto focus area on the camera. |
|
714 |
|
715 @return a CCamera::TAutoFocusArea value. |
|
716 */ |
|
717 EXPORT_C CCamera::CCameraAdvancedSettings::TAutoFocusArea CCamera::CCameraAdvancedSettings::AutoFocusArea() const |
|
718 { |
|
719 return iImpl->AutoFocusArea(); |
|
720 } |
|
721 |
|
722 /** |
|
723 Sets a specific auto focus area on the camera. |
|
724 Focus area change fires a KUidECamEventCameraSettingAutoFocusArea event |
|
725 to all MCameraObserver2 clients of the camera. |
|
726 |
|
727 @param aAutoFocusArea |
|
728 Autofocus area selection. |
|
729 */ |
|
730 EXPORT_C void CCamera::CCameraAdvancedSettings::SetAutoFocusArea(CCamera::CCameraAdvancedSettings::TAutoFocusArea aAutoFocusArea) |
|
731 { |
|
732 iImpl->SetAutoFocusArea(aAutoFocusArea); |
|
733 } |
|
734 |
|
735 /** |
|
736 Get focus distance in millimetres. |
|
737 |
|
738 @return the current focus distance in millimetres, directly from user setting of lenses. |
|
739 */ |
|
740 EXPORT_C TInt CCamera::CCameraAdvancedSettings::FocusDistance() const |
|
741 { |
|
742 return iImpl->FocusDistance(); |
|
743 } |
|
744 |
|
745 /** |
|
746 Set focus distance in millimetres. Focus distance change fires a KUidECamEventCameraSettingFocusDistance event |
|
747 to all MCameraObserver2 clients of the camera. |
|
748 |
|
749 @param aDistance |
|
750 the new distance value in millimetres. |
|
751 |
|
752 @note KUidECamEvent2CameraSettingFocusDistance may be used to provide the focussing feedback as well. This means that |
|
753 the feedback will state whether the proper focussing has been achieved after setting the given focus distance. |
|
754 */ |
|
755 EXPORT_C void CCamera::CCameraAdvancedSettings::SetFocusDistance(TInt aDistance) |
|
756 { |
|
757 iImpl->SetFocusDistance(aDistance); |
|
758 } |
|
759 |
|
760 /** |
|
761 Get minimum focus distance in millimetres |
|
762 |
|
763 @return the minimum (35 camera equivalent) focal length of a camera. |
|
764 @note Current Focal length is calculated as focalLength = opticalZoom * minFocalLength; |
|
765 */ |
|
766 EXPORT_C TInt CCamera::CCameraAdvancedSettings::GetMinFocalLength() const |
|
767 { |
|
768 return iImpl->GetMinFocalLength(); |
|
769 } |
|
770 |
|
771 /** |
|
772 Gets the set of camera supported ISO rates. |
|
773 |
|
774 @param aSupportedIsoRates |
|
775 an array of integers which gets filled with the supported ISO rates. |
|
776 |
|
777 @note When camera device is incapable of revealing the ISO rates supported, it has to be assumed that |
|
778 camera will work only on the permanently set value. If this value is not known, empty array may be |
|
779 returned; corresponding getter/setters for this feature should not be used in such a case. |
|
780 */ |
|
781 EXPORT_C void CCamera::CCameraAdvancedSettings::GetSupportedIsoRatesL(RArray<TInt>& aSupportedIsoRates) const |
|
782 { |
|
783 iImpl->GetSupportedIsoRatesL(aSupportedIsoRates); |
|
784 } |
|
785 |
|
786 /** |
|
787 Gets current ISO rate. |
|
788 |
|
789 @return current ISO rate as a TInt value. |
|
790 Negative value returned means error case (system wide error code) and positive value means current ISO rate. |
|
791 |
|
792 @note The returned value may be checked with the list of supported ISO rates. If value returned does not belong to |
|
793 this list, then it may be treated as an error case. |
|
794 */ |
|
795 EXPORT_C TInt CCamera::CCameraAdvancedSettings::IsoRate() const |
|
796 { |
|
797 return iImpl->IsoRate(); |
|
798 } |
|
799 |
|
800 /** |
|
801 Set current ISO rate for the camera. |
|
802 Triggers KUidECamEventCameraSettingIsoRate to all MCameraObserver2 clients of the camera. |
|
803 |
|
804 @param aRate |
|
805 required new ISO rate. |
|
806 */ |
|
807 EXPORT_C void CCamera::CCameraAdvancedSettings::SetIsoRate(TInt aRate) |
|
808 { |
|
809 iImpl->SetIsoRate(aRate); |
|
810 } |
|
811 |
|
812 /** |
|
813 Gets the current discrete aperture steps (F-stops) supported by the camera. |
|
814 |
|
815 @param aFStops |
|
816 A reference to an empty array of TInt which would be populated by the implementation with |
|
817 the specific supported values. If the array is empty on return, |
|
818 the camera supports all integer values in the aperture range. Each value is multiplied by |
|
819 a factor of KECamFineResolutionFactor. |
|
820 |
|
821 @param aInfo |
|
822 a reference to TValueInfo, which establishes the type of the returned data. |
|
823 |
|
824 @leave KErrNoMemory Out of memory. |
|
825 |
|
826 @note When camera device is incapable of revealing the aperture openings supported, it has to be assumed that |
|
827 camera will work only on the parmanently set value. If this value is not known, empty array may be |
|
828 returned and TValueInfo may be ENotActive; corresponding getter/setters for this feature should not be used in such a case. |
|
829 */ |
|
830 EXPORT_C void CCamera::CCameraAdvancedSettings::GetAperturesL(RArray<TInt>& aFStops, TValueInfo& aInfo) const |
|
831 { |
|
832 iImpl->GetAperturesL(aFStops, aInfo); |
|
833 } |
|
834 |
|
835 /** |
|
836 Get current aperture value. |
|
837 The default aperture value is ECAM implementation specific and could be either auto aperture or any other supported value. |
|
838 |
|
839 @return Current aperture value as an integer, multiplied by KECamFineResolutionFactor. |
|
840 For example the function will return 280 for the actual aperture of F2.8. |
|
841 Negative value returned means error case (system wide error code) and positive value means current aperture. |
|
842 */ |
|
843 EXPORT_C TInt CCamera::CCameraAdvancedSettings::Aperture() const |
|
844 { |
|
845 return iImpl->Aperture(); |
|
846 } |
|
847 |
|
848 /** |
|
849 Set a new aperture value. |
|
850 All MCameraObserver2 clients of the camera receive a KUidECamEventCameraSettingAperture |
|
851 event notification when aperture value is changed. |
|
852 |
|
853 @param aFStop |
|
854 a new aperture value in the supported by the camera range. |
|
855 |
|
856 @note The aperture parameter value is an integer, multiplied by KECamFineResolutionFactor. |
|
857 For example to set an aperture of F2.8, call SetAperture(280). |
|
858 |
|
859 */ |
|
860 EXPORT_C void CCamera::CCameraAdvancedSettings::SetAperture(TInt aFStop) |
|
861 { |
|
862 iImpl->SetAperture(aFStop); |
|
863 } |
|
864 |
|
865 /** |
|
866 Gets the set of supported shutter speeds. |
|
867 |
|
868 @param aShutterSpeeds |
|
869 a reference to an RArray of TInt representing the discrete shutter speeds supported |
|
870 currently by the camera. |
|
871 |
|
872 @param aInfo |
|
873 a reference to TValueInfo, which establishes the type of the returned data. |
|
874 |
|
875 @return the populated array with all shutter speeds in microseconds. |
|
876 |
|
877 @leave KErrNoMemory Out of memory. |
|
878 |
|
879 @note When camera device is incapable of revealing the shutter speeds supported, it has to be assumed that |
|
880 camera will work only on the parmanently set value. If this value is not known, empty array may be |
|
881 returned and TValueInfo may be ENotActive; corresponding getter/setters for this feature should not be used in such a case. |
|
882 */ |
|
883 EXPORT_C void CCamera::CCameraAdvancedSettings::GetShutterSpeedsL(RArray<TInt>& aShutterSpeeds, TValueInfo& aInfo) const |
|
884 { |
|
885 iImpl->GetShutterSpeedsL(aShutterSpeeds, aInfo); |
|
886 } |
|
887 |
|
888 /** |
|
889 Gets the current shutter speed |
|
890 |
|
891 @return the current shutter speed in microseconds. |
|
892 Negative value returned means error case (system wide error code) and positive value means current shutter speed. |
|
893 */ |
|
894 EXPORT_C TInt CCamera::CCameraAdvancedSettings::ShutterSpeed() const |
|
895 { |
|
896 return iImpl->ShutterSpeed(); |
|
897 } |
|
898 |
|
899 /** |
|
900 Sets the current shutter speed. When set, all MCameraObserver2 clients of the camera |
|
901 receive a KUidECamEventCameraSettingShutterSpeed event |
|
902 |
|
903 @param aShutterSpeed |
|
904 the required shutter speed in microseconds. |
|
905 */ |
|
906 EXPORT_C void CCamera::CCameraAdvancedSettings::SetShutterSpeed(TInt aShutterSpeed) |
|
907 { |
|
908 iImpl->SetShutterSpeed(aShutterSpeed); |
|
909 } |
|
910 |
|
911 /** |
|
912 Get all supported metering modes on this camera represented as bitfield of type TMeteringMode. |
|
913 |
|
914 @return the set of supported metering modes. |
|
915 */ |
|
916 EXPORT_C TInt CCamera::CCameraAdvancedSettings::SupportedMeteringModes() const |
|
917 { |
|
918 return iImpl->SupportedMeteringModes(); |
|
919 } |
|
920 |
|
921 /** |
|
922 Get current metering mode. |
|
923 |
|
924 @return a value of type TMeteringMode. |
|
925 */ |
|
926 EXPORT_C CCamera::CCameraAdvancedSettings::TMeteringMode CCamera::CCameraAdvancedSettings::MeteringMode() const |
|
927 { |
|
928 return iImpl->MeteringMode(); |
|
929 } |
|
930 |
|
931 /** |
|
932 Set the current metering mode. When set, all MCameraObserver2 clients are notified |
|
933 with a KUidECamEventCameraSettingMeteringMode event. |
|
934 |
|
935 @param aMeteringMode |
|
936 new selection for metering mode of type TMeteringMode. |
|
937 */ |
|
938 EXPORT_C void CCamera::CCameraAdvancedSettings::SetMeteringMode(CCamera::CCameraAdvancedSettings::TMeteringMode aMeteringMode) |
|
939 { |
|
940 iImpl->SetMeteringMode(aMeteringMode); |
|
941 } |
|
942 |
|
943 /** |
|
944 Get all supported drive modes as bitfields of TDriveMode type. |
|
945 |
|
946 @return the set of supported drive modes. |
|
947 */ |
|
948 EXPORT_C TInt CCamera::CCameraAdvancedSettings::SupportedDriveModes() const |
|
949 { |
|
950 TInt supportedDriveModes = iImpl->SupportedDriveModes(); |
|
951 |
|
952 /* if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that |
|
953 application is not prepared to receive extra added enum values. So, any extra enum value passed |
|
954 from the implementation will be filtered at this point. |
|
955 To receive extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() |
|
956 to create camera object. In this case, application is assumed to be prepared to receive unrecognised enum values */ |
|
957 if(iOwner.CameraVersion() == KCameraDefaultVersion) |
|
958 { |
|
959 supportedDriveModes &= KBaselinedDriveMode; |
|
960 } |
|
961 |
|
962 return supportedDriveModes; |
|
963 } |
|
964 |
|
965 /** |
|
966 Gets currently active drive mode. |
|
967 |
|
968 @return current drive mode. |
|
969 */ |
|
970 EXPORT_C CCamera::CCameraAdvancedSettings::TDriveMode CCamera::CCameraAdvancedSettings::DriveMode() const |
|
971 { |
|
972 CCamera::CCameraAdvancedSettings::TDriveMode driveMode = iImpl->DriveMode(); |
|
973 |
|
974 /* if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that |
|
975 application is not prepared to receive extra added enum values. So, any extra enum value received |
|
976 from the implementation will be dropped and EDriveModeAuto would be passed instead. |
|
977 To receive extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() |
|
978 to create camera object. In this case, application is assumed to be prepared to receive unrecognised enum values */ |
|
979 if(iOwner.CameraVersion() == KCameraDefaultVersion) |
|
980 { |
|
981 if(static_cast<TUint>(driveMode) > KBaselinedDriveMode) |
|
982 { |
|
983 driveMode = CCamera::CCameraAdvancedSettings::EDriveModeAuto; |
|
984 } |
|
985 } |
|
986 |
|
987 return driveMode; |
|
988 } |
|
989 |
|
990 /** |
|
991 Set the current metering mode. When set all MCameraObserver2 clients are notified with |
|
992 KUidECamEventCameraSettingDriveMode. |
|
993 |
|
994 @param aDriveMode |
|
995 new selection for drive mode value of type TDriveMode. |
|
996 |
|
997 @note Unless reduced Latency scheme is not used (ie CaptureImageL(TInt aSequenceNumber) or StartPerformantVideoCaptureL()) |
|
998 if an image/video capture is still outstanding, this method may report error KErrInUse. |
|
999 */ |
|
1000 EXPORT_C void CCamera::CCameraAdvancedSettings::SetDriveMode(CCamera::CCameraAdvancedSettings::TDriveMode aDriveMode) |
|
1001 { |
|
1002 iImpl->SetDriveMode(aDriveMode); |
|
1003 } |
|
1004 |
|
1005 /** |
|
1006 Get all supported bracket modes as bitfields. |
|
1007 |
|
1008 @return the set of all supported bracket modes as an integer. |
|
1009 */ |
|
1010 EXPORT_C TInt CCamera::CCameraAdvancedSettings::SupportedBracketModes() const |
|
1011 { |
|
1012 return iImpl->SupportedBracketModes(); |
|
1013 } |
|
1014 |
|
1015 /** |
|
1016 Get current bracket mode. |
|
1017 |
|
1018 @return the current bracket mode TBracketMode. |
|
1019 */ |
|
1020 EXPORT_C CCamera::CCameraAdvancedSettings::TBracketMode CCamera::CCameraAdvancedSettings::BracketMode() const |
|
1021 { |
|
1022 return iImpl->BracketMode(); |
|
1023 } |
|
1024 |
|
1025 /** |
|
1026 Set new bracket mode. All MCameraObserver2 clients are notified with |
|
1027 KUidECamEventCameraSettingBracketMode. |
|
1028 |
|
1029 @param aBracketMode |
|
1030 new selection for bracket mode of type TBracketMode. |
|
1031 */ |
|
1032 EXPORT_C void CCamera::CCameraAdvancedSettings::SetBracketMode(CCamera::CCameraAdvancedSettings::TBracketMode aBracketMode) |
|
1033 { |
|
1034 iImpl->SetBracketMode(aBracketMode); |
|
1035 } |
|
1036 |
|
1037 /** |
|
1038 Get all supported bracket parameters as bitfields. |
|
1039 |
|
1040 @return the set of all currently supported bracket modes. |
|
1041 */ |
|
1042 EXPORT_C TInt CCamera::CCameraAdvancedSettings::SupportedBracketParameters() const |
|
1043 { |
|
1044 return iImpl->SupportedBracketParameters(); |
|
1045 } |
|
1046 |
|
1047 /** |
|
1048 Get current bracket parameter. |
|
1049 |
|
1050 @return the current bracket mode TBracketParameter. |
|
1051 */ |
|
1052 EXPORT_C CCamera::CCameraAdvancedSettings::TBracketParameter CCamera::CCameraAdvancedSettings::BracketParameter() const |
|
1053 { |
|
1054 return iImpl->BracketParameter(); |
|
1055 } |
|
1056 |
|
1057 /** |
|
1058 Set new bracket parameter |
|
1059 When set all clients are notified with |
|
1060 KUidECamEventCameraSettingBracketParameter. |
|
1061 |
|
1062 @param aBracketParameter |
|
1063 new selection for parameter type of type TBracketParameter. |
|
1064 */ |
|
1065 EXPORT_C void CCamera::CCameraAdvancedSettings::SetBracketParameter(CCamera::CCameraAdvancedSettings::TBracketParameter aBracketParameter) |
|
1066 { |
|
1067 iImpl->SetBracketParameter(aBracketParameter); |
|
1068 } |
|
1069 |
|
1070 /** |
|
1071 Get all supported bracket steps as bitfields. |
|
1072 |
|
1073 @return the set of all supported bracket modes. |
|
1074 */ |
|
1075 EXPORT_C TInt CCamera::CCameraAdvancedSettings::SupportedBracketSteps() const |
|
1076 { |
|
1077 return iImpl->SupportedBracketSteps(); |
|
1078 } |
|
1079 |
|
1080 /** |
|
1081 Get current bracket step. |
|
1082 |
|
1083 @return the current bracket mode TBracketStep. |
|
1084 */ |
|
1085 EXPORT_C CCamera::CCameraAdvancedSettings::TBracketStep CCamera::CCameraAdvancedSettings::BracketStep() const |
|
1086 { |
|
1087 return iImpl->BracketStep(); |
|
1088 } |
|
1089 |
|
1090 /** |
|
1091 Set new bracket step. All MCameraObserver2 clients are notified with |
|
1092 KUidECamEventCameraSettingBracketStep. |
|
1093 |
|
1094 @param aBracketStep |
|
1095 new selection for step of type TBracketStep. |
|
1096 */ |
|
1097 EXPORT_C void CCamera::CCameraAdvancedSettings::SetBracketStep(CCamera::CCameraAdvancedSettings::TBracketStep aBracketStep) |
|
1098 { |
|
1099 iImpl->SetBracketStep(aBracketStep); |
|
1100 } |
|
1101 |
|
1102 /** |
|
1103 Gets the settings for which frames to merge. Valid only in EDriveModeBracketMerge mode. |
|
1104 @note there must be at least two images to merge. All are assumed to form a sequence and |
|
1105 are identified using the first frame index and number of frames e.g. to merge two frames - one |
|
1106 on and one +1, when in EBracketMode3Image, one sets the start index to 1 and frames to two. |
|
1107 @note It is very much TBracketMode setting dependent operation. |
|
1108 |
|
1109 @param aStartIndex |
|
1110 the index of the start frame, starts from 0. |
|
1111 |
|
1112 @param aFrames |
|
1113 the number of frames to be merged. |
|
1114 */ |
|
1115 EXPORT_C void CCamera::CCameraAdvancedSettings::GetBracketMerge(TInt& aStartIndex, TInt& aFrames) const |
|
1116 { |
|
1117 iImpl->GetBracketMerge(aStartIndex, aFrames); |
|
1118 } |
|
1119 |
|
1120 /** |
|
1121 Sets the settings for which frames to merge. Valid only in EDriveModeBracketMerge mode. |
|
1122 @note there must be at least two images to merge. All are assumed to form a sequence and |
|
1123 are identified using the first frame index and number of frames e.g. to merge two frames - one |
|
1124 on and one +1, when in EBracketMode3Image, one sets the start index to 1 and frames to 2. |
|
1125 MCameraObserver2 clients are notified with a KUidECamEventBracketMerge event. |
|
1126 |
|
1127 @note It is very TBracketMode setting dependent. |
|
1128 |
|
1129 @param aStartIndex |
|
1130 the index of the start frame, starts from 0. |
|
1131 |
|
1132 @param aFrames |
|
1133 the number of frames to be merged. |
|
1134 */ |
|
1135 EXPORT_C void CCamera::CCameraAdvancedSettings::SetBracketMerge(TInt aStartIndex, TInt aFrames) |
|
1136 { |
|
1137 iImpl->SetBracketMerge(aStartIndex, aFrames); |
|
1138 } |
|
1139 |
|
1140 /** |
|
1141 Get camera all supported flash modes CCamera::TFlash |
|
1142 |
|
1143 @return the set of all supported flash modes as bitfields in an integer. |
|
1144 @note Some of the flash modes are available only for clients using either CCamera::New2L() or CCamera::NewDuplicate2L() |
|
1145 @see CCamera::TFlash |
|
1146 */ |
|
1147 EXPORT_C TInt CCamera::CCameraAdvancedSettings::SupportedFlashModes() const |
|
1148 { |
|
1149 TInt modes = iImpl->SupportedFlashModes(); |
|
1150 if (iOwner.CameraVersion() == KCameraDefaultVersion) |
|
1151 { |
|
1152 modes &= KBaselinedFlashModeMask; |
|
1153 } |
|
1154 return modes; |
|
1155 } |
|
1156 |
|
1157 /** |
|
1158 Gets the currently set flash mode. |
|
1159 |
|
1160 @return The currently set flash mode. |
|
1161 @note Clients not using the CCamera::New2L() or CCamera::NewDuplicate2L() would be given CCamera::EFlashAuto |
|
1162 if current flash mode exceeds CCamera::EFlashManual |
|
1163 @see CCamera::TFlash |
|
1164 */ |
|
1165 EXPORT_C CCamera::TFlash CCamera::CCameraAdvancedSettings::FlashMode() const |
|
1166 { |
|
1167 TInt mode = iImpl->FlashMode(); |
|
1168 if (iOwner.CameraVersion() == KCameraDefaultVersion && mode > KBaselinedFlashModeMask) |
|
1169 { |
|
1170 mode = EFlashAuto; |
|
1171 } |
|
1172 return static_cast<CCamera::TFlash>(mode); |
|
1173 } |
|
1174 |
|
1175 /** |
|
1176 Sets the flash mode. |
|
1177 |
|
1178 Triggers a KUidECamEventCameraSettingFlashMode event to all camera |
|
1179 MCameraObserver2 clients. |
|
1180 |
|
1181 @param aMode |
|
1182 The required flash mode. |
|
1183 */ |
|
1184 EXPORT_C void CCamera::CCameraAdvancedSettings::SetFlashMode(CCamera::TFlash aMode) |
|
1185 { |
|
1186 iImpl->SetFlashMode(aMode); |
|
1187 } |
|
1188 |
|
1189 /** |
|
1190 Gets whether the flash red eye reduction is switched on. |
|
1191 |
|
1192 @return The present state - ETrue for switched on and EFalse for switched off. |
|
1193 */ |
|
1194 EXPORT_C TBool CCamera::CCameraAdvancedSettings::RedEyeReduceOn() const |
|
1195 { |
|
1196 return iImpl->RedEyeReduceOn(); |
|
1197 } |
|
1198 |
|
1199 /** |
|
1200 Sets the flash red eye reduction on or off. |
|
1201 |
|
1202 Triggers a KUidECamEventCameraSettingFlashRedEyeReduce event to all camera |
|
1203 MCameraObserver2 clients. |
|
1204 |
|
1205 @param aState |
|
1206 The required state ETrue for switching it on and EFalse for switching it off. |
|
1207 */ |
|
1208 EXPORT_C void CCamera::CCameraAdvancedSettings::SetRedEyeReduceOn(TBool aState) |
|
1209 { |
|
1210 iImpl->SetRedEyeReduceOn(aState); |
|
1211 } |
|
1212 |
|
1213 /** |
|
1214 Get flash compensation steps as integers multiplied by KECamFineResolutionFactor. |
|
1215 For example 0.5 EV is 50. |
|
1216 |
|
1217 @param aFlashCompensationSteps |
|
1218 an RArray of integers which is populated on return to reflect the supported |
|
1219 flash compensation steps, |
|
1220 |
|
1221 @param aInfo |
|
1222 an TValueInfo reference, which establishes the organization of |
|
1223 the returned data. |
|
1224 |
|
1225 @see TValueInfo |
|
1226 |
|
1227 @leave KErrNoMemory Out of memory. |
|
1228 |
|
1229 @note When camera device doesn't support this, empty array may be returned and TValueInfo may be ENotActive; |
|
1230 corresponding getter/setters for this feature should not be used in such a case. |
|
1231 |
|
1232 @note When camera device is incapable of revealing the flash compensation steps supported, |
|
1233 it has to be assumed that camera will work only on the parmanently set value. If this value is not known, empty |
|
1234 array may be returned and TValueInfo may be ENotActive; corresponding getter/setters for this feature should not be used in such a case. |
|
1235 */ |
|
1236 EXPORT_C void CCamera::CCameraAdvancedSettings::GetFlashCompensationStepsL(RArray<TInt>& aFlashCompensationSteps, TValueInfo& aInfo) const |
|
1237 { |
|
1238 iImpl->GetFlashCompensationStepsL(aFlashCompensationSteps, aInfo); |
|
1239 } |
|
1240 |
|
1241 /** |
|
1242 @deprecated Use TInt GetFlashCompensationStep(TInt& aFlashCompensationStep); |
|
1243 |
|
1244 Get current flash power compensation step. |
|
1245 |
|
1246 @return current flash compensation step. |
|
1247 */ |
|
1248 EXPORT_C TInt CCamera::CCameraAdvancedSettings::FlashCompensationStep() const |
|
1249 { |
|
1250 return iImpl->FlashCompensationStep(); |
|
1251 } |
|
1252 |
|
1253 /** |
|
1254 Get current flash power compensation step. |
|
1255 |
|
1256 @param aFlashCompensationStep |
|
1257 Reference to the current flash compensation step. |
|
1258 |
|
1259 @return system wide error code. |
|
1260 |
|
1261 @note Use this method in place of deprecated TInt FlashCompensationStep() |
|
1262 |
|
1263 */ |
|
1264 EXPORT_C TInt CCamera::CCameraAdvancedSettings::GetFlashCompensationStep(TInt& aFlashCompensationStep) const |
|
1265 { |
|
1266 return iImpl->GetFlashCompensationStep(aFlashCompensationStep); |
|
1267 } |
|
1268 |
|
1269 /** |
|
1270 Set current flash compensation step as an integer multiplied by KECamFineResolutionFactor. |
|
1271 For example to set a compensation of -0.3 EV, one should use a parameter with value -30. |
|
1272 All clients receive a KUidECamEventCameraSettingFlashCompensationStep event, when the value has changed. |
|
1273 |
|
1274 @param aFlashCompensationStep |
|
1275 a new value for the flash compensation step. |
|
1276 */ |
|
1277 EXPORT_C void CCamera::CCameraAdvancedSettings::SetFlashCompensationStep(TInt aFlashCompensationStep) |
|
1278 { |
|
1279 iImpl->SetFlashCompensationStep(aFlashCompensationStep); |
|
1280 } |
|
1281 |
|
1282 /** |
|
1283 Get current flash power compensation range measured in a already selected compensation step magnitude. |
|
1284 @note This range may change if a different compensation step is selected. |
|
1285 For example if flash compensation range is in the range -1EV 1.5EV and the selected flash compensation |
|
1286 step is selected to be 0.3 EV, the result of this call will be aNegativeCompensation = -3 and aPositiveCompensation = 5. |
|
1287 as there can be only three full steps for negative compensation (1/0.3) and five for flash power boost (1.5/0.3). |
|
1288 In this way developers, having pre-selected a step value from the supported set, would need to provide |
|
1289 just the multiplier (in steps) and the direction (the sign). Steps are always assumed integers. |
|
1290 |
|
1291 @param aNegativeCompensation |
|
1292 a reference to an integer returning the maximum number of steps available for negative compensation. |
|
1293 |
|
1294 @param aPositiveCompensation |
|
1295 a reference to an integer returning the maximum number of steps available for positive compensation. |
|
1296 */ |
|
1297 EXPORT_C void CCamera::CCameraAdvancedSettings::GetFlashCompensationRangeInSteps(TInt& aNegativeCompensation, TInt& aPositiveCompensation) const |
|
1298 { |
|
1299 iImpl->GetFlashCompensationRangeInSteps(aNegativeCompensation, aPositiveCompensation); |
|
1300 } |
|
1301 |
|
1302 /** |
|
1303 @deprecated Use TInt GetFlashCompensation(TInt& aFlashCompensation); |
|
1304 |
|
1305 Get the current flash compensation value as integer steps. Positive values boost flash power, |
|
1306 negative reduce flash power. The change is not cumulative i.e. the change is stateless. |
|
1307 Each call assumes no previous compensation has been performed i.e. that there is a zero compensation. |
|
1308 |
|
1309 @note if returned value is 2 (compensation steps) and the current flash compensation step is 0.3 EV, |
|
1310 then the actual compensation effect will be 0.6 EV. |
|
1311 |
|
1312 @return the current number of compensation steps as an integer. |
|
1313 */ |
|
1314 EXPORT_C TInt CCamera::CCameraAdvancedSettings::FlashCompensation() const |
|
1315 { |
|
1316 return iImpl->FlashCompensation(); |
|
1317 } |
|
1318 |
|
1319 /** |
|
1320 Get the current flash compensation value as integer steps. Positive values boost flash power, |
|
1321 negative reduce flash power. The change is not cumulative i.e. the change is stateless. |
|
1322 Each call assumes no previous compensation has been performed i.e. that there is a zero compensation. |
|
1323 |
|
1324 @note if retrieved value is 2 (compensation steps) and the current flash compensation step is 0.3 EV, |
|
1325 then the actual compensation effect will be 0.6 EV. |
|
1326 |
|
1327 @param aFlashCompensation |
|
1328 Reference to the current number of compensation steps as an integer. |
|
1329 |
|
1330 @return system wide error code. |
|
1331 |
|
1332 @note Use this method in place of deprecated TInt FlashCompensation() |
|
1333 |
|
1334 */ |
|
1335 EXPORT_C TInt CCamera::CCameraAdvancedSettings::GetFlashCompensation(TInt& aFlashCompensation) const |
|
1336 { |
|
1337 return iImpl->GetFlashCompensation(aFlashCompensation); |
|
1338 } |
|
1339 |
|
1340 /** |
|
1341 Set the current flash compensation value as integer steps. |
|
1342 Positive values increase power, negative reduce power. The change is not acumulative e.g. the change is stateless. |
|
1343 Each call assumes no previous compensation has been performed i.e. that there is a zero compensation. |
|
1344 Triggers a KUidECamEventCameraSettingFlashCompensation event. |
|
1345 |
|
1346 @param aFlashCompensationSteps |
|
1347 a required compensation steps - negative value reduce the flash power |
|
1348 positive boosts up the flash power. |
|
1349 */ |
|
1350 EXPORT_C void CCamera::CCameraAdvancedSettings::SetFlashCompensation(TInt aFlashCompensationSteps) |
|
1351 { |
|
1352 iImpl->SetFlashCompensation(aFlashCompensationSteps); |
|
1353 } |
|
1354 |
|
1355 /** |
|
1356 Check whether there is an external flash source. |
|
1357 |
|
1358 @return ETrue if an external flash source is present, EFalse otherwise |
|
1359 */ |
|
1360 EXPORT_C TBool CCamera::CCameraAdvancedSettings::IsExternalFlashPresent() const |
|
1361 { |
|
1362 return iImpl->IsExternalFlashPresent(); |
|
1363 } |
|
1364 |
|
1365 /** |
|
1366 Gets the current discrete manual flash power levels supported by the camera in range 0-100 |
|
1367 as a percentage of maximum power level. |
|
1368 |
|
1369 @param aManualFlashPowerLevels |
|
1370 An empty array of TInt which would be populated by the implementation with |
|
1371 the specific supported values. If the array is empty on return, |
|
1372 the camera does not support this functionality. |
|
1373 |
|
1374 @param aInfo |
|
1375 a reference to TValueInfo, which establishes the type of the returned data. |
|
1376 |
|
1377 @leave KErrNoMemory Out of memory. |
|
1378 |
|
1379 @note When camera device doesn't support this, empty array may be returned and TValueInfo may be ENotActive; |
|
1380 corresponding getter/setters for this feature should not be used in such a case. |
|
1381 When camera device is incapable of revealing the manual flash power levels supported, |
|
1382 it has to be assumed that camera will work only on the permanently set value. If this value is not known, empty |
|
1383 array may be returned and TValueInfo may be ENotActive; corresponding getter/setters for this feature should not be used in such a case. |
|
1384 */ |
|
1385 EXPORT_C void CCamera::CCameraAdvancedSettings::GetManualFlashPowerLevelsL(RArray<TInt>& aManualFlashPowerLevels, TValueInfo& aInfo) const |
|
1386 { |
|
1387 return iImpl->GetManualFlashPowerLevelsL(aManualFlashPowerLevels, aInfo); |
|
1388 } |
|
1389 |
|
1390 /** |
|
1391 Gets the current manual flash power level on the camera. |
|
1392 |
|
1393 @return the current manual flash power level as a value in the range [0:100]. |
|
1394 Negative value returned means error case (system wide error code) and positive value means current manual flash power level. |
|
1395 */ |
|
1396 EXPORT_C TInt CCamera::CCameraAdvancedSettings::ManualFlashPowerLevel() const |
|
1397 { |
|
1398 return iImpl->ManualFlashPowerLevel(); |
|
1399 } |
|
1400 |
|
1401 /** |
|
1402 Sets the current manual flash power level on the camera. |
|
1403 Triggers a KUidECamEventCameraSettingFlashManualPower event to all MCameraObserver2 clients. |
|
1404 |
|
1405 @param aManualFlashPowerLevel |
|
1406 one of the values returned in GetManualFlashPowerLevelsL(). |
|
1407 */ |
|
1408 EXPORT_C void CCamera::CCameraAdvancedSettings::SetManualFlashPowerLevel(TInt aManualFlashPowerLevel) |
|
1409 { |
|
1410 iImpl->SetManualFlashPowerLevel(aManualFlashPowerLevel); |
|
1411 } |
|
1412 |
|
1413 /** |
|
1414 Get Supported exposure modes - bitfields of CCamera::TExposure |
|
1415 |
|
1416 @return the set of supported exposure modes. |
|
1417 */ |
|
1418 EXPORT_C TInt CCamera::CCameraAdvancedSettings::SupportedExposureModes() const |
|
1419 { |
|
1420 return iImpl->SupportedExposureModes(); |
|
1421 } |
|
1422 |
|
1423 /** |
|
1424 Gets the currently set exposure setting value. |
|
1425 |
|
1426 @return The currently set exposure setting value. |
|
1427 */ |
|
1428 EXPORT_C CCamera::TExposure CCamera::CCameraAdvancedSettings::ExposureMode() const |
|
1429 { |
|
1430 return iImpl->ExposureMode(); |
|
1431 } |
|
1432 |
|
1433 /** |
|
1434 Sets the exposure mode of the camera. |
|
1435 Triggers a KUidECamEventCameraSettingExposureMode event to all MCameraObserver2 clients. |
|
1436 |
|
1437 @param aExposureMode |
|
1438 The required exposure adjustment. |
|
1439 */ |
|
1440 EXPORT_C void CCamera::CCameraAdvancedSettings::SetExposureMode(CCamera::TExposure aExposureMode) |
|
1441 { |
|
1442 iImpl->SetExposureMode(aExposureMode); |
|
1443 } |
|
1444 |
|
1445 /** |
|
1446 Get exposure compensation steps as integers multiplied by KECamFineResolutionFactor. |
|
1447 For example 0.3 EV is 30. |
|
1448 |
|
1449 @param aExposureCompensationSteps |
|
1450 an RArray of integers which is populated to reflect the supported |
|
1451 exposure compensation steps, all values have been multiplied by KECamFineResolutionFactor before |
|
1452 truncated to integers. |
|
1453 |
|
1454 @param aInfo |
|
1455 a reference to TValueInfo, which establishes the type of the returned data. |
|
1456 |
|
1457 @leave KErrNoMemory Out of memory. |
|
1458 |
|
1459 @note When camera device doesn't support this, empty array may be returned and TValueInfo may be ENotActive; |
|
1460 corresponding getter/setters for this feature should not be used in such a case. |
|
1461 When camera device is incapable of revealing the exposure compensation steps supported, |
|
1462 it has to be assumed that camera will work only on the permanently set value. If this value is not known, empty |
|
1463 array may be returned and TValueInfo may be ENotActive; corresponding getter/setters for this feature should not be used in such a case. |
|
1464 */ |
|
1465 EXPORT_C void CCamera::CCameraAdvancedSettings::GetExposureCompensationStepsL(RArray<TInt>& aExposureCompensationSteps, TValueInfo& aInfo) const |
|
1466 { |
|
1467 iImpl->GetExposureCompensationStepsL(aExposureCompensationSteps, aInfo); |
|
1468 } |
|
1469 |
|
1470 /** |
|
1471 @deprecated Use TInt GetExposureCompensationStep(TInt& aExposureCompensationStep); |
|
1472 |
|
1473 Get current exposure compensation step. |
|
1474 |
|
1475 @return the current exposure compensation step. |
|
1476 */ |
|
1477 EXPORT_C TInt CCamera::CCameraAdvancedSettings::ExposureCompensationStep() const |
|
1478 { |
|
1479 return iImpl->ExposureCompensationStep(); |
|
1480 } |
|
1481 |
|
1482 /** |
|
1483 Get current exposure compensation step. |
|
1484 |
|
1485 @param aExposureCompensationStep |
|
1486 Reference to the current exposure compensation step. |
|
1487 |
|
1488 @return system wide error code. |
|
1489 |
|
1490 @note Use this method in place of deprecated TInt ExposureCompensationStep() |
|
1491 |
|
1492 */ |
|
1493 EXPORT_C TInt CCamera::CCameraAdvancedSettings::GetExposureCompensationStep(TInt& aExposureCompensationStep) const |
|
1494 { |
|
1495 return iImpl->GetExposureCompensationStep(aExposureCompensationStep); |
|
1496 } |
|
1497 |
|
1498 /** |
|
1499 Set current exposure compensation step as an integer multiplied by KECamFineResolutionFactor. |
|
1500 All MCameraObserver2 clients receive a KUidECamEventCameraSettingExposureCompensationStep event, |
|
1501 when the value has changed. |
|
1502 |
|
1503 @param aExposureCompensationStep |
|
1504 a new value for the exposure compensation step. |
|
1505 */ |
|
1506 EXPORT_C void CCamera::CCameraAdvancedSettings::SetExposureCompensationStep(TInt aExposureCompensationStep) |
|
1507 { |
|
1508 iImpl->SetExposureCompensationStep(aExposureCompensationStep); |
|
1509 } |
|
1510 |
|
1511 /** |
|
1512 Get current exposure compensation range in steps. It depends on the previously |
|
1513 selected exposure compensation step. |
|
1514 |
|
1515 @see GetFlashCompensationRangeInSteps() |
|
1516 |
|
1517 @param aNegativeCompensation |
|
1518 reference to an integer returning the maximum number of steps |
|
1519 available for negative compensation, |
|
1520 |
|
1521 @param aPositiveCompensation |
|
1522 reference to an integer returning the maximum number of steps |
|
1523 available for positive compensation, |
|
1524 */ |
|
1525 EXPORT_C void CCamera::CCameraAdvancedSettings::GetExposureCompensationRangeInSteps(TInt& aNegativeCompensation, TInt& aPositiveCompensation) const |
|
1526 { |
|
1527 iImpl->GetExposureCompensationRangeInSteps(aNegativeCompensation, aPositiveCompensation); |
|
1528 } |
|
1529 |
|
1530 /** |
|
1531 @deprecated Use TInt GetExposureCompensation(TInt& aExposureCompensation); |
|
1532 |
|
1533 Get the current exposure compensation steps. Positive values increase exposure times, |
|
1534 negative reduce exposure times. The change is not cumulative i.e. the change is stateless. |
|
1535 Each call assumes no previous compensation has been performed i.e. that there is a zero compensation. |
|
1536 |
|
1537 @note if returned value is 2 (compensation steps) and the current exposure compensation step is 0.3 EV, |
|
1538 then the actual compensation effect will be 0.6 EV. |
|
1539 |
|
1540 @return current number of compensation steps as an integer. |
|
1541 */ |
|
1542 EXPORT_C TInt CCamera::CCameraAdvancedSettings::ExposureCompensation() const |
|
1543 { |
|
1544 return iImpl->ExposureCompensation(); |
|
1545 } |
|
1546 |
|
1547 /** |
|
1548 Get the current exposure compensation steps. Positive values increase exposure times, |
|
1549 negative reduce exposure times. The change is not cumulative i.e. the change is stateless. |
|
1550 Each call assumes no previous compensation has been performed i.e. that there is a zero compensation. |
|
1551 |
|
1552 @note if retrieved value is 2 (compensation steps) and the current exposure compensation step is 0.3 EV, |
|
1553 then the actual compensation effect will be 0.6 EV. |
|
1554 |
|
1555 @param aExposureCompensation |
|
1556 Reference to the current number of compensation steps as an integer. |
|
1557 |
|
1558 @return system wide error code. |
|
1559 |
|
1560 @note Use this method in place of deprecated TInt ExposureCompensation() |
|
1561 |
|
1562 */ |
|
1563 EXPORT_C TInt CCamera::CCameraAdvancedSettings::GetExposureCompensation(TInt& aExposureCompensation) const |
|
1564 { |
|
1565 return iImpl->GetExposureCompensation(aExposureCompensation); |
|
1566 } |
|
1567 |
|
1568 /** |
|
1569 Set the current exposure compensation value as integer steps. |
|
1570 Triggers a KUidECamEventCameraSettingExposureCompensation event to all MCameraObserver2 clients. |
|
1571 |
|
1572 @param aExposureCompensationSteps |
|
1573 a required number of compensation steps - negative value reduce the exposure time |
|
1574 positive increases the exposure time. |
|
1575 */ |
|
1576 EXPORT_C void CCamera::CCameraAdvancedSettings::SetExposureCompensation(TInt aExposureCompensationSteps) |
|
1577 { |
|
1578 iImpl->SetExposureCompensation(aExposureCompensationSteps); |
|
1579 } |
|
1580 |
|
1581 /** |
|
1582 Gets camera supported set of white balance adjustments. |
|
1583 |
|
1584 @return bitfield of all supported CCamera::TWhiteBalance values. |
|
1585 |
|
1586 @note if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that |
|
1587 application is not prepared to receive extra added enum values. So, any extra enum value(unrecognised) passed |
|
1588 from the implementation will be filtered at this point. |
|
1589 To receive extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() |
|
1590 to create camera object. In this case, application is assumed to be prepared to receive unrecognised enum values |
|
1591 */ |
|
1592 EXPORT_C TInt CCamera::CCameraAdvancedSettings::SupportedWhiteBalanceModes() const |
|
1593 { |
|
1594 TInt supportedWhiteBalanceModes = iImpl->SupportedWhiteBalanceModes(); |
|
1595 |
|
1596 /* if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that |
|
1597 application is not prepared to receive extra added enum values. So, any extra enum value(unrecognised) passed |
|
1598 from the implementation will be filtered at this point. |
|
1599 To receive extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() |
|
1600 to create camera object. In this case, application is assumed to be prepared to receive unrecognised enum values */ |
|
1601 if(iOwner.CameraVersion() == KCameraDefaultVersion) |
|
1602 { |
|
1603 supportedWhiteBalanceModes &= KBaselinedWhiteBalanceModes; |
|
1604 } |
|
1605 |
|
1606 return supportedWhiteBalanceModes; |
|
1607 } |
|
1608 |
|
1609 /** |
|
1610 Gets the current white balance value. |
|
1611 |
|
1612 @return The current white balance value. |
|
1613 |
|
1614 @note if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that |
|
1615 application is not prepared to receive extra added enum values. So, any extra enum value(unrecognised) received |
|
1616 from the implementation will be dropped and EWBAuto would be passed instead. |
|
1617 To receive extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() |
|
1618 to create camera object. In this case, application is assumed to be prepared to receive unrecognised enum values |
|
1619 */ |
|
1620 EXPORT_C CCamera::TWhiteBalance CCamera::CCameraAdvancedSettings::WhiteBalanceMode() const |
|
1621 { |
|
1622 CCamera::TWhiteBalance whiteBalance = iImpl->WhiteBalanceMode(); |
|
1623 |
|
1624 /* if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that |
|
1625 application is not prepared to receive extra added enum values. So, any extra enum value(unrecognised) received |
|
1626 from the implementation will be dropped and EWBAuto would be passed instead. |
|
1627 To receive extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() |
|
1628 to create camera object. In this case, application is assumed to be prepared to receive unrecognised enum values */ |
|
1629 if(iOwner.CameraVersion() == KCameraDefaultVersion) |
|
1630 { |
|
1631 if(static_cast<TInt>(whiteBalance) > KBaselinedWhiteBalanceModes) |
|
1632 { |
|
1633 whiteBalance = CCamera::EWBAuto; |
|
1634 } |
|
1635 } |
|
1636 |
|
1637 return whiteBalance; |
|
1638 } |
|
1639 |
|
1640 /** |
|
1641 Sets the white balance adjustment of the camera. |
|
1642 |
|
1643 No effect if this is not supported, see TCameraInfo::iWhiteBalanceModesSupported. |
|
1644 Triggers KUidECamEventCameraSettingWhiteBalanceMode event to all MCameraObserver2 clients. |
|
1645 |
|
1646 @param aWhiteBalanceMode |
|
1647 The required white balance mode. |
|
1648 */ |
|
1649 EXPORT_C void CCamera::CCameraAdvancedSettings::SetWhiteBalanceMode(CCamera::TWhiteBalance aWhiteBalanceMode) |
|
1650 { |
|
1651 iImpl->SetWhiteBalanceMode(aWhiteBalanceMode); |
|
1652 } |
|
1653 |
|
1654 /** |
|
1655 Gets the current state for aperture and exposure lock. |
|
1656 |
|
1657 @return ETrue if aperture and exposure values are locked together, |
|
1658 EFalse if these are not locked. |
|
1659 */ |
|
1660 EXPORT_C TBool CCamera::CCameraAdvancedSettings::ApertureExposureLockOn() const |
|
1661 { |
|
1662 return iImpl->ApertureExposureLockOn(); |
|
1663 } |
|
1664 |
|
1665 /** |
|
1666 Sets the current state for aperture and exposure lock. |
|
1667 Triggers a KUidECamEventAELock event to all MCameraObserver2 clients. |
|
1668 |
|
1669 @param aAELock |
|
1670 a value whether to lock exposure and aperture together. |
|
1671 */ |
|
1672 EXPORT_C void CCamera::CCameraAdvancedSettings::SetApertureExposureLockOn(TBool aAELock) |
|
1673 { |
|
1674 iImpl->SetApertureExposureLockOn(aAELock); |
|
1675 } |
|
1676 |
|
1677 /** |
|
1678 Gets the current state for button clicking sound effect. |
|
1679 |
|
1680 @return ETrue to switch clicking sound on, EFalse sound off |
|
1681 */ |
|
1682 EXPORT_C TBool CCamera::CCameraAdvancedSettings::ShootClickOn() const |
|
1683 { |
|
1684 return iImpl->ShootClickOn(); |
|
1685 } |
|
1686 |
|
1687 /** |
|
1688 Sets the button clicking sound on /off. Triggers a KUidECamEventSoundClick event |
|
1689 to all MCameraObserver2 clients. |
|
1690 |
|
1691 @param aShootClickOn |
|
1692 ETrue to switch clicking sound on, EFalse sound is switched off. |
|
1693 */ |
|
1694 EXPORT_C void CCamera::CCameraAdvancedSettings::SetShootClickOn(TBool aShootClickOn) |
|
1695 { |
|
1696 iImpl->SetShootClickOn(aShootClickOn); |
|
1697 } |
|
1698 |
|
1699 /** |
|
1700 Get camera supported timer values. Active only when drive mode EDriveModeTimed. |
|
1701 Time is in microseconds. As time interval is expected to be relatively short, |
|
1702 integer value is considered sufficient. |
|
1703 |
|
1704 @param aTimerIntervals |
|
1705 an RArray of integers which is populated to reflect the supported |
|
1706 timer interval steps. |
|
1707 |
|
1708 @param aInfo |
|
1709 an TValueInfo reference, which establishes the organization of |
|
1710 the returned data. |
|
1711 |
|
1712 @see TValueInfo |
|
1713 |
|
1714 @note When camera device doesn't support this, empty array may be returned and TValueInfo may be ENotActive; |
|
1715 corresponding getter/setters for this feature should not be used in such a case. |
|
1716 */ |
|
1717 EXPORT_C void CCamera::CCameraAdvancedSettings::GetTimerIntervalsL(RArray<TInt>& aTimerIntervals, TValueInfo& aInfo) const |
|
1718 { |
|
1719 iImpl->GetTimerIntervalsL(aTimerIntervals, aInfo); |
|
1720 } |
|
1721 |
|
1722 /** |
|
1723 Get current timer value. Active only when drive mode is EDriveModeTimed. |
|
1724 Timer resolution is in microseconds. |
|
1725 |
|
1726 @return current time interval value. |
|
1727 Negative value returned means error case (system wide error code) and positive value means current timer interval. |
|
1728 */ |
|
1729 EXPORT_C TInt CCamera::CCameraAdvancedSettings::TimerInterval() const |
|
1730 { |
|
1731 return iImpl->TimerInterval(); |
|
1732 } |
|
1733 |
|
1734 /** |
|
1735 Set current timer value. Active only when drive mode EDriveModeTimed. |
|
1736 This is the time interval (delay) in microseconds between user pressing the button and image is taken. |
|
1737 The setting of the value triggers a KUidECamEventCameraSettingTimerInterval event |
|
1738 to all MCameraObserver2 clients. |
|
1739 |
|
1740 @param aTimerInterval |
|
1741 The selected timer interval in microseconds. |
|
1742 */ |
|
1743 EXPORT_C void CCamera::CCameraAdvancedSettings::SetTimerInterval(TInt aTimerInterval) |
|
1744 { |
|
1745 iImpl->SetTimerInterval(aTimerInterval); |
|
1746 } |
|
1747 |
|
1748 /** |
|
1749 Get camera supported time lapse period range. Active only when drive mode EDriveModeTimeLapse. |
|
1750 The time lapse is denoted as the uniform time period between consecutive frames. |
|
1751 |
|
1752 @param aTimeLapseMin |
|
1753 The minimum time value. |
|
1754 |
|
1755 @param aTimeLapseMax |
|
1756 The maximum time value. |
|
1757 */ |
|
1758 EXPORT_C void CCamera::CCameraAdvancedSettings::GetTimeLapsePeriodRange(TTime& aTimeLapseMin, TTime& aTimeLapseMax) const |
|
1759 { |
|
1760 iImpl->GetTimeLapsePeriodRange(aTimeLapseMin, aTimeLapseMax); |
|
1761 } |
|
1762 |
|
1763 /** |
|
1764 Get current time lapse value. Active only when drive mode EDriveModeTimeLapse. |
|
1765 The time lapse is denoted as the uniform time period |
|
1766 between consecutive frames and operation is configurable by its start, end and a fixed interval. |
|
1767 |
|
1768 @param aStart |
|
1769 the start of the timelapse period. |
|
1770 |
|
1771 @param aEnd |
|
1772 the end of the timelapse period; start < end. |
|
1773 |
|
1774 @param aInterval |
|
1775 the set parameter between two successive snapshots. |
|
1776 */ |
|
1777 EXPORT_C void CCamera::CCameraAdvancedSettings::GetTimeLapse(TTime& aStart, TTime& aEnd, TTime& aInterval) const |
|
1778 { |
|
1779 iImpl->GetTimeLapse(aStart, aEnd, aInterval); |
|
1780 } |
|
1781 |
|
1782 /** |
|
1783 Set current time lapse value. Active only when drive mode EDriveModeTimeLapse. |
|
1784 The time lapse is denoted as the uniform time period between consecutive frames. |
|
1785 Setting triggers a KUidECamEventCameraSettingTimeLapse event to all MCameraObserver2 camera clients. |
|
1786 |
|
1787 @param aStart |
|
1788 the start of the timelapse period. |
|
1789 |
|
1790 @param aEnd |
|
1791 the end of the timelapse period; start < end. |
|
1792 |
|
1793 @param aInterval |
|
1794 the set parameter between two successive snapshots. |
|
1795 */ |
|
1796 EXPORT_C void CCamera::CCameraAdvancedSettings::SetTimeLapse(const TTime& aStart, const TTime& aEnd, const TTime& aInterval) |
|
1797 { |
|
1798 iImpl->SetTimeLapse(aStart, aEnd, aInterval); |
|
1799 } |
|
1800 |
|
1801 /** |
|
1802 Get current picture orientation |
|
1803 |
|
1804 @return a TPictureOrientation value. |
|
1805 */ |
|
1806 EXPORT_C CCamera::CCameraAdvancedSettings::TPictureOrientation CCamera::CCameraAdvancedSettings::PictureOrientation() const |
|
1807 { |
|
1808 return iImpl->PictureOrientation(); |
|
1809 } |
|
1810 |
|
1811 /** |
|
1812 Set a new picture orientation |
|
1813 This triggers a KUidECamEventCameraSettingPictureOrientation event to all MCameraObserver2 clients. |
|
1814 |
|
1815 @param aOrientation |
|
1816 a value of TPictureOrientation denoting the new orientation. |
|
1817 */ |
|
1818 EXPORT_C void CCamera::CCameraAdvancedSettings::SetPictureOrientation(CCamera::CCameraAdvancedSettings::TPictureOrientation aOrientation) |
|
1819 { |
|
1820 iImpl->SetPictureOrientation(aOrientation); |
|
1821 } |
|
1822 |
|
1823 /** |
|
1824 Get supported pixel aspect ratio. |
|
1825 |
|
1826 @return a bitfield of all supported TPixelAspectRatio values. |
|
1827 @note Some of the pixel aspect ratios are available only for clients using either CCamera::New2L() or CCamera::NewDuplicate2L() |
|
1828 */ |
|
1829 EXPORT_C TInt CCamera::CCameraAdvancedSettings::SupportedPixelAspectRatios() const |
|
1830 { |
|
1831 TInt supportedRatios = iImpl->SupportedPixelAspectRatios(); |
|
1832 /** |
|
1833 Mask out new features for old clients |
|
1834 */ |
|
1835 if (iOwner.CameraVersion() == KCameraDefaultVersion) |
|
1836 { |
|
1837 supportedRatios &= KBaselinedPixelAspectsMask; |
|
1838 } |
|
1839 return supportedRatios; |
|
1840 } |
|
1841 |
|
1842 /** |
|
1843 Get current pixel aspect ratio. |
|
1844 |
|
1845 @return a TPixelAspectRatio value. |
|
1846 @note Some of the pixel aspect ratios are available only for clients using either CCamera::New2L() or CCamera::NewDuplicate2L() |
|
1847 */ |
|
1848 EXPORT_C CCamera::CCameraAdvancedSettings::TPixelAspectRatio CCamera::CCameraAdvancedSettings::PixelAspectRatio() const |
|
1849 { |
|
1850 TInt ratio = iImpl->PixelAspectRatio(); |
|
1851 /** |
|
1852 Mask out new features for old clients |
|
1853 */ |
|
1854 if (iOwner.CameraVersion() == KCameraDefaultVersion) |
|
1855 { |
|
1856 ratio &= KBaselinedPixelAspectsMask; |
|
1857 } |
|
1858 return static_cast<CCamera::CCameraAdvancedSettings::TPixelAspectRatio>( ratio ); |
|
1859 } |
|
1860 |
|
1861 /** |
|
1862 Set a new pixel aspect ratio. |
|
1863 This triggers a KUidECamEventPixelAspectRatio event to all MCameraObserver2 clients. |
|
1864 |
|
1865 @param aPixelAspectRatio |
|
1866 a value of TPixelAspectRatio denoting the new pixel aspect ratio. |
|
1867 */ |
|
1868 EXPORT_C void CCamera::CCameraAdvancedSettings::SetPixelAspectRatio(CCamera::CCameraAdvancedSettings::TPixelAspectRatio aPixelAspectRatio) |
|
1869 { |
|
1870 iImpl->SetPixelAspectRatio(aPixelAspectRatio); |
|
1871 } |
|
1872 |
|
1873 /** |
|
1874 Get supported YUV ranges. |
|
1875 |
|
1876 @return a bitfileld of all supported TYuvRange values. |
|
1877 */ |
|
1878 EXPORT_C TInt CCamera::CCameraAdvancedSettings::SupportedYuvRanges() const |
|
1879 { |
|
1880 return iImpl->SupportedYuvRanges(); |
|
1881 } |
|
1882 |
|
1883 /** |
|
1884 Get current YUV range. |
|
1885 |
|
1886 @return a TYuvRange value. |
|
1887 */ |
|
1888 EXPORT_C CCamera::CCameraAdvancedSettings::TYuvRange CCamera::CCameraAdvancedSettings::YuvRange() const |
|
1889 { |
|
1890 return iImpl->YuvRange(); |
|
1891 } |
|
1892 |
|
1893 /** |
|
1894 Set a new YUV range. |
|
1895 This triggers a KUidECamEventYuvRange event to all MCameraObserver2 clients. |
|
1896 |
|
1897 @param aYuvRange |
|
1898 a value of TYuvRange denoting the new YUV range. |
|
1899 */ |
|
1900 EXPORT_C void CCamera::CCameraAdvancedSettings::SetYuvRange(CCamera::CCameraAdvancedSettings::TYuvRange aYuvRange) |
|
1901 { |
|
1902 iImpl->SetYuvRange(aYuvRange); |
|
1903 } |
|
1904 |
|
1905 /** |
|
1906 Get the number of images captured normally under EDriveModeBurst condition. |
|
1907 @note: due to memory or image size limitations the actual number may be less. |
|
1908 |
|
1909 @return the number of images set to capture in burst mode. |
|
1910 */ |
|
1911 EXPORT_C TInt CCamera::CCameraAdvancedSettings::BurstImages() const |
|
1912 { |
|
1913 return iImpl->BurstImages(); |
|
1914 } |
|
1915 |
|
1916 /** |
|
1917 Set the number of images captured normally under EDriveModeBurst condition. |
|
1918 Triggers a KUidECamEventBurstImages event to all MCameraObserver2 clients. |
|
1919 @note: due to memory or image size limitations the actual number may be less. |
|
1920 |
|
1921 @param aImages |
|
1922 the number of images set to capture in burst mode |
|
1923 |
|
1924 @note Unless reduced Latency scheme is not used (ie CaptureImageL(TInt aSequenceNumber) or StartPerformantVideoCaptureL()) |
|
1925 if an image/video capture is still outstanding, this method may report error KErrInUse. |
|
1926 */ |
|
1927 EXPORT_C void CCamera::CCameraAdvancedSettings::SetBurstImages(TInt aImages) |
|
1928 { |
|
1929 iImpl->SetBurstImages(aImages); |
|
1930 } |
|
1931 |
|
1932 /** |
|
1933 Gets the optical zoom levels. |
|
1934 |
|
1935 @param aOpticalZoomSteps |
|
1936 Array to hold optical zoom values multiplied by KECamFineResolutionFactor to retain precision. |
|
1937 So that if zoom is not supported the array will return a single element of value |
|
1938 KECamFineResolutionFactor. |
|
1939 |
|
1940 @param aInfo |
|
1941 a reference to TValueInfo, which establishes the type of the returned data. |
|
1942 |
|
1943 @note Such approach allows for support for both linear and non-linear zoom steps. |
|
1944 When camera device doesn't support this, empty array may be returned and TValueInfo may be ENotActive; |
|
1945 corresponding getter/setters for this feature should not be used in such a case. |
|
1946 |
|
1947 @leave KErrNoMemory Out of memory. |
|
1948 */ |
|
1949 EXPORT_C void CCamera::CCameraAdvancedSettings::GetOpticalZoomStepsL(RArray<TInt>& aOpticalZoomSteps, TValueInfo& aInfo) const |
|
1950 { |
|
1951 iImpl->GetOpticalZoomStepsL(aOpticalZoomSteps, aInfo); |
|
1952 } |
|
1953 |
|
1954 /** |
|
1955 Gets the currently set zoom value. |
|
1956 |
|
1957 @return The currently set optical zoom value. The value is multiplied by |
|
1958 KECamFineResolutionFactor to retain precision. |
|
1959 Negative value returned means error case (system wide error code) and positive value means current optical zoom. |
|
1960 */ |
|
1961 EXPORT_C TInt CCamera::CCameraAdvancedSettings::OpticalZoom() const |
|
1962 { |
|
1963 return iImpl->OpticalZoom(); |
|
1964 } |
|
1965 |
|
1966 /** |
|
1967 Sets the zoom using a specific value. Triggers a KUidECamEventCameraSettingOpticalZoom |
|
1968 event to all MCameraObserver2 clients. |
|
1969 |
|
1970 @param aOpticalZoom |
|
1971 Required zoom value. |
|
1972 */ |
|
1973 EXPORT_C void CCamera::CCameraAdvancedSettings::SetOpticalZoom(TInt aOpticalZoom) |
|
1974 { |
|
1975 iImpl->SetOpticalZoom(aOpticalZoom); |
|
1976 } |
|
1977 |
|
1978 /** |
|
1979 Gets the digital zoom levels. |
|
1980 |
|
1981 @param aDigitalZoomSteps |
|
1982 Array to hold digital zoom values multiplied by KECamFineResolutionFactor to retain precision. |
|
1983 So that if zoom is not supported the array will return a single element of value |
|
1984 KECamFineResolutionFactor. |
|
1985 |
|
1986 @param aInfo |
|
1987 a reference to TValueInfo, which establishes the type of the returned data. |
|
1988 |
|
1989 @note Such approach allows for support for both linear and non-linear zoom steps. |
|
1990 When camera device doesn't support this, empty array may be returned and TValueInfo may be ENotActive; |
|
1991 corresponding getter/setters for this feature should not be used in such a case. |
|
1992 |
|
1993 @leave KErrNoMemory Out of memory. |
|
1994 */ |
|
1995 EXPORT_C void CCamera::CCameraAdvancedSettings::GetDigitalZoomStepsL(RArray<TInt>& aDigitalZoomSteps, TValueInfo& aInfo) const |
|
1996 { |
|
1997 iImpl->GetDigitalZoomStepsL(aDigitalZoomSteps, aInfo); |
|
1998 } |
|
1999 |
|
2000 /** |
|
2001 Gets the currently set digital zoom value. |
|
2002 |
|
2003 @return The currently set digital zoom value. The value is multiplied by |
|
2004 KECamFineResolutionFactor to retain precision. |
|
2005 Negative value returned means error case (system wide error code) and positive value means current digital zoom. |
|
2006 */ |
|
2007 EXPORT_C TInt CCamera::CCameraAdvancedSettings::DigitalZoom() const |
|
2008 { |
|
2009 return iImpl->DigitalZoom(); |
|
2010 } |
|
2011 |
|
2012 /** |
|
2013 Sets the digital zoom value. Triggers a KUidECamEventCameraSettingDigitalZoom event |
|
2014 to all MCameraObserver2 clients. |
|
2015 |
|
2016 @param aDigitalZoom |
|
2017 Required zoom value. |
|
2018 */ |
|
2019 EXPORT_C void CCamera::CCameraAdvancedSettings::SetDigitalZoom(TInt aDigitalZoom) |
|
2020 { |
|
2021 iImpl->SetDigitalZoom(aDigitalZoom); |
|
2022 } |
|
2023 |
|
2024 /** |
|
2025 Checks whether exposure value is locked or not. |
|
2026 |
|
2027 @return whether exposure value is locked or not. |
|
2028 ETrue if locked, EFalse otherwise. |
|
2029 */ |
|
2030 EXPORT_C TBool CCamera::CCameraAdvancedSettings::ExposureLockOn() const |
|
2031 { |
|
2032 return iImpl->ExposureLockOn(); |
|
2033 } |
|
2034 |
|
2035 /** |
|
2036 Sets exposure lock state. Triggers a KUidECamEventCameraSettingExposureLock event |
|
2037 to all MCameraObserver2 clients. |
|
2038 |
|
2039 @param aState |
|
2040 Required new state. |
|
2041 */ |
|
2042 EXPORT_C void CCamera::CCameraAdvancedSettings::SetExposureLockOn(TBool aState) |
|
2043 { |
|
2044 iImpl->SetExposureLockOn(aState); |
|
2045 } |
|
2046 |
|
2047 /** |
|
2048 Checks whether AutoFocus value is locked or not. |
|
2049 |
|
2050 @return whether AutoFocus value is locked or not. |
|
2051 ETrue if locked, EFalse otherwise. |
|
2052 */ |
|
2053 EXPORT_C TBool CCamera::CCameraAdvancedSettings::AutoFocusLockOn() const |
|
2054 { |
|
2055 return iImpl->AutoFocusLockOn(); |
|
2056 } |
|
2057 |
|
2058 /** |
|
2059 Sets autofocus lock state. Triggers a KUidECamEventCameraSettingAutoFocusLock event |
|
2060 to all MCameraObserver2 clients. |
|
2061 |
|
2062 @param aState |
|
2063 Required new state. |
|
2064 */ |
|
2065 EXPORT_C void CCamera::CCameraAdvancedSettings::SetAutoFocusLockOn(TBool aState) |
|
2066 { |
|
2067 iImpl->SetAutoFocusLockOn(aState); |
|
2068 } |
|
2069 |
|
2070 /** |
|
2071 Gets an array of all the advanced settings parameters supported by the camera. |
|
2072 These are identified by UIDs and relate to the set or subset of it of all defined settings UIDs. |
|
2073 |
|
2074 @param aSettings |
|
2075 An empty array of TUids which would be populated by the implementation with |
|
2076 the UIDs of the supported parameters. If the array is empty on return, |
|
2077 the camera does not support any settings. |
|
2078 |
|
2079 @leave KErrNoMemory Out of memory. |
|
2080 |
|
2081 @note if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that |
|
2082 application is not prepared to receive extra added uid values (new settings added). So, any extra uid value passed |
|
2083 from the implementation will be filtered at this point. |
|
2084 To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() |
|
2085 to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values |
|
2086 */ |
|
2087 EXPORT_C void CCamera::CCameraAdvancedSettings::GetSupportedSettingsL(RArray<TUid>& aSettings) const |
|
2088 { |
|
2089 iImpl->GetSupportedSettingsL(aSettings); |
|
2090 |
|
2091 /* if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that |
|
2092 application is not prepared to receive extra added uid values (new settings added). So, any extra uid value passed |
|
2093 from the implementation will be filtered at this point. |
|
2094 To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() |
|
2095 to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values */ |
|
2096 if(iOwner.CameraVersion() == KCameraDefaultVersion) |
|
2097 { |
|
2098 for(TInt index =0; index < aSettings.Count(); index++) |
|
2099 { |
|
2100 /** KUidECamEventCameraSettingAutoFocusType2UidValue is the baseline. Any settings with greater uid value means that it has |
|
2101 been added in later versions */ |
|
2102 if(aSettings[index].iUid > KUidECamEventCameraSettingAutoFocusType2UidValue) |
|
2103 { |
|
2104 aSettings.Remove(index); |
|
2105 index--; |
|
2106 } |
|
2107 } |
|
2108 } |
|
2109 } |
|
2110 |
|
2111 /** |
|
2112 Gets an array of all the advanced settings parameters currently active on the camera. |
|
2113 These are identified by UIDs and relate to the set or subset of it of all supported |
|
2114 settings UIDs. |
|
2115 |
|
2116 @param aActiveSettings |
|
2117 An empty array of TUids which would be populated by the implementation with |
|
2118 the active setting UIDs. If the array is empty on return, |
|
2119 the camera does not support any settings. |
|
2120 |
|
2121 @leave KErrNoMemory Out of memory. |
|
2122 |
|
2123 @note if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that |
|
2124 application is not prepared to receive extra added uid values (new settings added). So, any extra uid value passed |
|
2125 from the implementation will be filtered at this point. |
|
2126 To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() |
|
2127 to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values |
|
2128 */ |
|
2129 EXPORT_C void CCamera::CCameraAdvancedSettings::GetActiveSettingsL(RArray<TUid>& aActiveSettings) const |
|
2130 { |
|
2131 iImpl->GetActiveSettingsL(aActiveSettings); |
|
2132 |
|
2133 /* if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that |
|
2134 application is not prepared to receive extra added uid values (new settings added). So, any extra uid value passed |
|
2135 from the implementation will be filtered at this point. |
|
2136 To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() |
|
2137 to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values */ |
|
2138 if(iOwner.CameraVersion() == KCameraDefaultVersion) |
|
2139 { |
|
2140 for(TInt index =0; index < aActiveSettings.Count(); index++) |
|
2141 { |
|
2142 /** KUidECamEventCameraSettingAutoFocusType2UidValue is the baseline. Any settings with greater uid value means that it has |
|
2143 been added in later versions */ |
|
2144 if(aActiveSettings[index].iUid > KUidECamEventCameraSettingAutoFocusType2UidValue) |
|
2145 { |
|
2146 aActiveSettings.Remove(index); |
|
2147 index--; |
|
2148 } |
|
2149 } |
|
2150 } |
|
2151 } |
|
2152 |
|
2153 /** |
|
2154 Gets an array of all the advanced settings parameters currently disabled on the camera. |
|
2155 These are identified by UIDs and relate to the set or subset of it of all supported |
|
2156 settings UIDs. |
|
2157 |
|
2158 @param aDisabledSettings |
|
2159 An empty array of TUids which would be populated by the implementation with |
|
2160 the disabled setting UIDs. If the array is empty on return, |
|
2161 the camera does not support any settings. |
|
2162 |
|
2163 @leave KErrNoMemory Out of memory. |
|
2164 |
|
2165 @note if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that |
|
2166 application is not prepared to receive extra added uid values (new settings added). So, any extra uid value passed |
|
2167 from the implementation will be filtered at this point. |
|
2168 To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() |
|
2169 to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values |
|
2170 */ |
|
2171 EXPORT_C void CCamera::CCameraAdvancedSettings::GetDisabledSettingsL(RArray<TUid>& aDisabledSettings) const |
|
2172 { |
|
2173 iImpl->GetDisabledSettingsL(aDisabledSettings); |
|
2174 |
|
2175 /* if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that |
|
2176 application is not prepared to receive extra added uid values (new settings added). So, any extra uid value passed |
|
2177 from the implementation will be filtered at this point. |
|
2178 To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() |
|
2179 to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values */ |
|
2180 if(iOwner.CameraVersion() == KCameraDefaultVersion) |
|
2181 { |
|
2182 for(TInt index =0; index < aDisabledSettings.Count(); index++) |
|
2183 { |
|
2184 /** KUidECamEventCameraSettingAutoFocusType2UidValue is the baseline. Any settings with greater uid value means that it has |
|
2185 been added in later versions */ |
|
2186 if(aDisabledSettings[index].iUid > KUidECamEventCameraSettingAutoFocusType2UidValue) |
|
2187 { |
|
2188 aDisabledSettings.Remove(index); |
|
2189 index--; |
|
2190 } |
|
2191 } |
|
2192 } |
|
2193 } |
|
2194 |
|
2195 /** |
|
2196 Retrieves the state for automatic size selection option. Default value is EFalse. |
|
2197 |
|
2198 @return ETrue if the automatic selection is switched on. Default value is EFalse. |
|
2199 */ |
|
2200 EXPORT_C TBool CCamera::CCameraAdvancedSettings::AutomaticSizeSelectionChangeOn() const |
|
2201 { |
|
2202 return iImpl->AutomaticSizeSelectionChangeOn(); |
|
2203 } |
|
2204 |
|
2205 /** |
|
2206 Allow camera to proactively change image size due external factors. |
|
2207 Default value is EFalse. Triggers a KUidECamEventCameraSettingAutomaticSizeSelection event notification. |
|
2208 |
|
2209 @param aSetOn |
|
2210 whether the option should be switched on |
|
2211 */ |
|
2212 EXPORT_C void CCamera::CCameraAdvancedSettings::SetAutomaticSizeSelectionChangeOn(TBool aSetOn) |
|
2213 { |
|
2214 iImpl->SetAutomaticSizeSelectionChangeOn(aSetOn); |
|
2215 } |
|
2216 |
|
2217 /** |
|
2218 Retrieves the timeout values camera supported by the camera when in continuous auto focus mode. |
|
2219 Timeouts are in microseconds. |
|
2220 |
|
2221 @param aTimeouts |
|
2222 An empty array to hold timeout values. |
|
2223 |
|
2224 @param aInfo |
|
2225 a reference to TValueInfo, which establishes the type of the returned data. |
|
2226 |
|
2227 @leave KErrNoMemory Out of memory. |
|
2228 |
|
2229 @note When camera device doesn't support this, empty array may be returned and TValueInfo may be ENotActive; |
|
2230 corresponding getter/setters for this feature should not be used in such a case. |
|
2231 */ |
|
2232 EXPORT_C void CCamera::CCameraAdvancedSettings::GetSupportedContinuousAutoFocusTimeoutsL(RArray<TInt>& aTimeouts, TValueInfo& aInfo) const |
|
2233 { |
|
2234 iImpl->GetSupportedContinuousAutoFocusTimeoutsL(aTimeouts, aInfo); |
|
2235 } |
|
2236 |
|
2237 /** |
|
2238 Gets the current value for continuous autofocus timeout. Timeouts are in microseconds. |
|
2239 |
|
2240 @return the timeout value in microseconds. |
|
2241 Negative value returned means error case (system wide error code) and positive value means current value for |
|
2242 continuous autofocus timeout. |
|
2243 */ |
|
2244 EXPORT_C TInt CCamera::CCameraAdvancedSettings::ContinuousAutoFocusTimeout() const |
|
2245 { |
|
2246 return iImpl->ContinuousAutoFocusTimeout(); |
|
2247 } |
|
2248 |
|
2249 /** |
|
2250 Sets the current value for continuous autofocus timeout. Timeouts are in microseconds. |
|
2251 All MCameraObserver2 clients of the camera receive a KUidECamEventCameraSettingsContinuousAutoFocusTimeout |
|
2252 event notification when timeout value is changed. |
|
2253 |
|
2254 @param aTimeout |
|
2255 the timeout value in microseconds. |
|
2256 */ |
|
2257 EXPORT_C void CCamera::CCameraAdvancedSettings::SetContinuousAutoFocusTimeout(TInt aTimeout) |
|
2258 { |
|
2259 iImpl->SetContinuousAutoFocusTimeout(aTimeout); |
|
2260 } |
|
2261 |
|
2262 /** |
|
2263 Gets all supported stabilization effects on the camera. |
|
2264 |
|
2265 @return an integer - a bitfield of all supported TStabilizationEffect values. |
|
2266 */ |
|
2267 EXPORT_C CCamera::CCameraAdvancedSettings::TStabilizationEffect CCamera::CCameraAdvancedSettings::StabilizationEffect() const |
|
2268 { |
|
2269 return iImpl->StabilizationEffect(); |
|
2270 } |
|
2271 |
|
2272 /** |
|
2273 Gets the current stabilization effect on the camera. |
|
2274 |
|
2275 @return a TStabilizationEffect value. |
|
2276 */ |
|
2277 EXPORT_C TInt CCamera::CCameraAdvancedSettings::SupportedStabilizationEffects() const |
|
2278 { |
|
2279 return iImpl->SupportedStabilizationEffects(); |
|
2280 } |
|
2281 |
|
2282 /** |
|
2283 Sets a specific stabilization effect on the camera. |
|
2284 When a value is set, MCameraObserver2 clients for that camera will receive a |
|
2285 KUidECamEventCameraSettingsStabilizationEffect event notification. |
|
2286 |
|
2287 @param aEffect |
|
2288 stabilization effect selection of type TStabilizationEffect. |
|
2289 */ |
|
2290 EXPORT_C void CCamera::CCameraAdvancedSettings::SetStabilizationEffect(CCamera::CCameraAdvancedSettings::TStabilizationEffect aEffect) |
|
2291 { |
|
2292 iImpl->SetStabilizationEffect(aEffect); |
|
2293 } |
|
2294 |
|
2295 /** |
|
2296 Gets all supported stabilization algorithm values on the camera. |
|
2297 |
|
2298 @return an integer - a bitfield of all supported TStabilizationAlgorithmComplexity values. |
|
2299 */ |
|
2300 |
|
2301 EXPORT_C TInt CCamera::CCameraAdvancedSettings::SupportedStabilizationComplexityValues() const |
|
2302 { |
|
2303 return iImpl->SupportedStabilizationComplexityValues(); |
|
2304 } |
|
2305 |
|
2306 /** |
|
2307 Gets current active stabilization algorithm selection on the camera. |
|
2308 |
|
2309 @return a TStabilizationAlgorithmComplexity value. |
|
2310 */ |
|
2311 EXPORT_C CCamera::CCameraAdvancedSettings::TStabilizationAlgorithmComplexity CCamera::CCameraAdvancedSettings::StabilizationComplexity() const |
|
2312 { |
|
2313 return iImpl->StabilizationComplexity(); |
|
2314 } |
|
2315 |
|
2316 /** |
|
2317 Sets a specific stabilization algorithm on the camera. |
|
2318 When a value is set, MCameraObserver2 clients for that camera will receive a |
|
2319 KUidECamEventSettingsStabilizationAlgorithmComplexity event notification. |
|
2320 |
|
2321 @param aComplexity |
|
2322 stabilization effect selection of type TStabilizationAlgorithmComplexity. |
|
2323 */ |
|
2324 EXPORT_C void CCamera::CCameraAdvancedSettings::SetStabilizationComplexity(CCamera::CCameraAdvancedSettings::TStabilizationAlgorithmComplexity aComplexity) |
|
2325 { |
|
2326 iImpl->SetStabilizationComplexity(aComplexity); |
|
2327 } |
|
2328 |
|
2329 /** |
|
2330 Gets the units in which the white balance is measured on the camera. |
|
2331 @note The methods used to get or set these differ depending on the supported unit type. |
|
2332 It is expected that a camera will support only a single type or none. |
|
2333 |
|
2334 @return a value of TWBUnits type. |
|
2335 */ |
|
2336 EXPORT_C CCamera::CCameraAdvancedSettings::TWBUnits CCamera::CCameraAdvancedSettings::SupportedWBUnits() const |
|
2337 { |
|
2338 return iImpl->SupportedWBUnits(); |
|
2339 } |
|
2340 |
|
2341 /** |
|
2342 Get white balance value represented as a RGB triplet. |
|
2343 |
|
2344 @see TRgb |
|
2345 |
|
2346 @param aValue |
|
2347 a reference to TRgb object which will contain the current white balance. |
|
2348 */ |
|
2349 EXPORT_C void CCamera::CCameraAdvancedSettings::GetWBRgbValue(TRgb& aValue) const |
|
2350 { |
|
2351 iImpl->GetWBRgbValue(aValue); |
|
2352 } |
|
2353 |
|
2354 /** |
|
2355 Set white balance value using a RGB triplet. |
|
2356 Change in value causes an event notification KUidECamEventCameraSettingsWBValue |
|
2357 to be sent to all MCameraObserver2 clients of this camera. |
|
2358 |
|
2359 @param aValue |
|
2360 a const reference to TRgb object, which contains the new white balance. |
|
2361 |
|
2362 @see TRgb |
|
2363 */ |
|
2364 EXPORT_C void CCamera::CCameraAdvancedSettings::SetWBRgbValue(const TRgb& aValue) |
|
2365 { |
|
2366 iImpl->SetWBRgbValue(aValue); |
|
2367 } |
|
2368 |
|
2369 /** |
|
2370 Get the white balance values, as temperature measured in Kelvin, supported on the camera. |
|
2371 |
|
2372 @param aWBColorTemperatures |
|
2373 A reference to an empty array of TInt which would be populated by the implementation with |
|
2374 the specific supported values. |
|
2375 |
|
2376 @param aInfo |
|
2377 a reference to TValueInfo, which establishes the type of the returned data. |
|
2378 |
|
2379 @note When camera device doesn't support this, empty array may be returned and TValueInfo may be ENotActive; |
|
2380 corresponding getter/setters for this feature should not be used in such a case. |
|
2381 */ |
|
2382 EXPORT_C void CCamera::CCameraAdvancedSettings::GetWBSupportedColorTemperaturesL(RArray<TInt>& aWBColorTemperatures, TValueInfo& aInfo) const |
|
2383 { |
|
2384 iImpl->GetWBSupportedColorTemperaturesL(aWBColorTemperatures, aInfo); |
|
2385 } |
|
2386 |
|
2387 /** |
|
2388 Get the white balance as a temperature in Kelvin |
|
2389 |
|
2390 @return current white balance value as a temperature in Kelvins. |
|
2391 Negative value returned means error case (system wide error code) and positive value means current value for |
|
2392 white balance as a temperature in Kelvin. |
|
2393 */ |
|
2394 EXPORT_C TInt CCamera::CCameraAdvancedSettings::WBColorTemperature() const |
|
2395 { |
|
2396 return iImpl->WBColorTemperature(); |
|
2397 } |
|
2398 |
|
2399 /** |
|
2400 Set the white balance as a temperature in Kelvin |
|
2401 |
|
2402 @param aColorTemperature |
|
2403 white balance value as a temperature in Kelvins. |
|
2404 */ |
|
2405 EXPORT_C void CCamera::CCameraAdvancedSettings::SetWBColorTemperature(TInt aColorTemperature) |
|
2406 { |
|
2407 iImpl->SetWBColorTemperature(aColorTemperature); |
|
2408 } |
|
2409 |
|
2410 /** |
|
2411 Checks whether the flash is ready. |
|
2412 |
|
2413 @param aReady |
|
2414 A reference to a boolean set by the implementation to ETrue if the flash is ready, |
|
2415 EFalse otherwise. |
|
2416 |
|
2417 @return KErrNotSupported if the implementation of this method is not supported. |
|
2418 */ |
|
2419 EXPORT_C TInt CCamera::CCameraAdvancedSettings::IsFlashReady(TBool& aReady) const |
|
2420 { |
|
2421 aReady = EFalse; |
|
2422 if(iImpl2 != NULL) |
|
2423 { |
|
2424 return iImpl2->IsFlashReady(aReady); |
|
2425 } |
|
2426 return KErrNotSupported; |
|
2427 } |
|
2428 |
|
2429 /** |
|
2430 Get the number of focus steps for current focus mode. |
|
2431 |
|
2432 @param aFocusModeSteps |
|
2433 A reference to an empty array of TInt which would be populated by the implementation with |
|
2434 the specific supported values. |
|
2435 |
|
2436 @param aInfo |
|
2437 a reference to TValueInfo, which establishes the type of the returned data. |
|
2438 |
|
2439 @leave KErrNotSupported if the implementation of this method is not supported. May also leave as a result of other system errors. |
|
2440 |
|
2441 @note When camera device doesn't support this, empty array may be returned and TValueInfo may be ENotActive; |
|
2442 corresponding getter/setters for this feature should not be used in such a case. |
|
2443 */ |
|
2444 EXPORT_C void CCamera::CCameraAdvancedSettings::GetCurrentFocusModeStepsL(RArray<TInt>& aFocusModeSteps, TValueInfo& aInfo) const |
|
2445 { |
|
2446 if(iImpl2 != NULL) |
|
2447 { |
|
2448 iImpl2->GetCurrentFocusModeStepsL(aFocusModeSteps, aInfo); |
|
2449 } |
|
2450 else |
|
2451 { |
|
2452 User::Leave(KErrNotSupported); |
|
2453 } |
|
2454 } |
|
2455 |
|
2456 /** |
|
2457 Gets all supported ISO types on the device. |
|
2458 |
|
2459 @param aSupportedISORateTypes |
|
2460 A reference to an integer which is a bitfield of all supported TISORateType values. EISONone means feature is not supported. |
|
2461 |
|
2462 @leave KErrNotSupported if the implementation of this method is not present. May leave as a result of some other error. |
|
2463 |
|
2464 @note When concrete implementation is provided, but camera device does not support this feature, then aSupportedISORateTypes retrieves EISONone. |
|
2465 |
|
2466 */ |
|
2467 EXPORT_C void CCamera::CCameraAdvancedSettings::GetSupportedISORateTypeL(TInt& aSupportedISORateTypes) const |
|
2468 { |
|
2469 if(iImpl3 != NULL) |
|
2470 { |
|
2471 iImpl3->GetSupportedISORateTypeL(aSupportedISORateTypes); |
|
2472 } |
|
2473 else |
|
2474 { |
|
2475 User::Leave(KErrNotSupported); |
|
2476 } |
|
2477 } |
|
2478 |
|
2479 /** |
|
2480 Set the type of ISO rate and the exposure parameter or value specified. |
|
2481 |
|
2482 @param aISORateType |
|
2483 The type of ISO rate to be set. |
|
2484 |
|
2485 @param aParam |
|
2486 Depending on the value of aISORateType, possible values of aParam are one of the following:- |
|
2487 The value of ISO rate to be used in case of manual type of ISO rate (EISOManual). |
|
2488 OR |
|
2489 Redundant parameter in case of unprioritised type of auto ISO (EISOAutoUnPrioritised). It is left to the camera hardware/firmware |
|
2490 to decide how the ISO rate is selected. No priority regarding exposure is specified. |
|
2491 OR |
|
2492 Highest ISO rate to be picked by the camera while deciding for the best exposure in case of ISO prioritised |
|
2493 type of auto ISO (EISOAutoISOPrioritised). ISO rate closest to this (and lower) may be used so that best possible exposure is achieved. |
|
2494 OR |
|
2495 Slowest shutter speed to be picked by the camera while deciding for the best exposure in case of shutter speed |
|
2496 prioritised type of auto ISO (EISOAutoShutterSpeedPrioritised). After using this shutter speed, ISO rate is chosen by the camera to achieve |
|
2497 proper exposure. Shutter speed closest to this (and faster) may be used so that best possible exposure is achieved. |
|
2498 OR |
|
2499 Minimum aperture opening (deepest depth of field) to be picked by the camera while deciding |
|
2500 for the best exposure in case of aperture prioritised type of auto ISO (EISOAutoAperturePrioritised). After using this aperture opening, ISO |
|
2501 rate is chosen by the camera to achieve proper exposure. Aperture opening closest to this (and wider) may be |
|
2502 used to achieve best possible exposure. |
|
2503 |
|
2504 @leave KErrNotSupported if the implementation of this method is not present. |
|
2505 |
|
2506 @note Triggers KUidECamEventCameraSettingIsoRateType to all MCameraObserver2 clients of the camera. |
|
2507 HandleEvent is used to report the result or any possible error. New setter functions leave only when |
|
2508 implementation is not there. |
|
2509 |
|
2510 */ |
|
2511 EXPORT_C void CCamera::CCameraAdvancedSettings::SetISORateL(CCamera::CCameraAdvancedSettings::TISORateType aISORateType, TInt aParam) |
|
2512 { |
|
2513 if(iImpl3 != NULL) |
|
2514 { |
|
2515 iImpl3->SetISORate(aISORateType, aParam); |
|
2516 } |
|
2517 else |
|
2518 { |
|
2519 User::Leave(KErrNotSupported); |
|
2520 } |
|
2521 } |
|
2522 |
|
2523 /** |
|
2524 Get the type of ISO rate, exposure parameter and value set. |
|
2525 |
|
2526 @param aISORateType |
|
2527 A reference to the type of ISO rate set. EISONone means feature is not supported. |
|
2528 |
|
2529 @param aParam |
|
2530 Depending on the value of aISORateType, possible values of aParam are one of the following:- |
|
2531 A reference to the redundant parameter in case of manual type of ISO rate(EISOManual) |
|
2532 OR |
|
2533 A reference to the redundant parameter in case of unprioritised type of auto ISO(EISOAutoUnPrioritised) |
|
2534 OR |
|
2535 A reference to the highest ISO rate that may be picked up in case of ISO prioritised type of auto ISO(EISOAutoISOPrioritised) |
|
2536 OR |
|
2537 A reference to the slowest shutter speed that may be picked up in case of shutter speed prioritised type of auto ISO(EISOAutoShutterSpeedPrioritised) |
|
2538 OR |
|
2539 A reference to the minimum aperture opening that may be picked up in case of aperture prioritised type of auto ISO(EISOAutoAperturePrioritised) |
|
2540 |
|
2541 @param aISORate |
|
2542 A reference to the value of ISO rate currently being used, if camera device is capable of doing that. |
|
2543 Otherwise KErrNotFound is retrieved indicating the incapability of camera. |
|
2544 |
|
2545 @leave KErrNotSupported if the implementation of this method is not present. |
|
2546 May leave as a result of some other error. |
|
2547 |
|
2548 @note When concrete implementation is provided, but camera device does not support this feature, then aISORateType retrieves EISONone. |
|
2549 |
|
2550 @note Since camera hardware may be incapable of providing the actual ISO value when one of the auto ISO type has |
|
2551 been set, then, in these cases, the 3rd argument is retrieved as KErrNotFound. |
|
2552 |
|
2553 */ |
|
2554 EXPORT_C void CCamera::CCameraAdvancedSettings::GetISORateL(CCamera::CCameraAdvancedSettings::TISORateType& aISORateType, TInt& aParam, TInt& aISORate) const |
|
2555 { |
|
2556 if(iImpl3 != NULL) |
|
2557 { |
|
2558 iImpl3->GetISORateL(aISORateType, aParam, aISORate); |
|
2559 } |
|
2560 else |
|
2561 { |
|
2562 User::Leave(KErrNotSupported); |
|
2563 } |
|
2564 } |
|
2565 |
|
2566 /** |
|
2567 Provide reference screen for orientation information. |
|
2568 |
|
2569 @param aScreenDevice |
|
2570 A reference to the screen device. |
|
2571 |
|
2572 @leave KErrNotSupported if the implementation of this method is not present. |
|
2573 |
|
2574 @note Triggers KUidECamEventCameraSettingReferenceScreen to all MCameraObserver2 clients of the camera. |
|
2575 HandleEvent is used to report the result or any possible error. New setter functions leave only when |
|
2576 implementation is not there. |
|
2577 |
|
2578 */ |
|
2579 EXPORT_C void CCamera::CCameraAdvancedSettings::SetReferenceScreenL(CWsScreenDevice& aScreenDevice) |
|
2580 { |
|
2581 if(iImpl3 != NULL) |
|
2582 { |
|
2583 iImpl3->SetReferenceScreen(aScreenDevice); |
|
2584 } |
|
2585 else |
|
2586 { |
|
2587 User::Leave(KErrNotSupported); |
|
2588 } |
|
2589 } |
|
2590 |
|
2591 /** |
|
2592 Get the digital zoom steps for the still image when a particular image format and size are specified. |
|
2593 |
|
2594 @param aDigitalZoomSteps |
|
2595 A reference to an empty array of TInt to hold digital zoom step values for still image and multiplied by |
|
2596 KECamFineResolutionFactor to retain precision. If list returned is empty, this means feature is not supported. |
|
2597 |
|
2598 @param aInfo |
|
2599 A reference to TValueInfo, which establishes the type of the returned data. |
|
2600 |
|
2601 @param aSizeIndex |
|
2602 A value providing the size index which must be in the range 0 to TCameraInfo::iNumImageSizesSupported-1 |
|
2603 inclusive. |
|
2604 |
|
2605 @param aFormat |
|
2606 A value providing the image format which must be one of the formats supported. (see |
|
2607 TCameraInfo::iImageFormatsSupported) |
|
2608 |
|
2609 @param aIsInfluencePossible |
|
2610 If True, signals that digital zoom step values may be influenced by some hardware factor like stabilization etc. |
|
2611 If False, no influence possible. |
|
2612 |
|
2613 @leave KErrNotSupported if the implementation of this method is not present. |
|
2614 KErrNoMemory if out of memory. May leave as a result of some other error. |
|
2615 |
|
2616 @note This method retrieves the supported digital zoom steps irrespective of any stabilization influence. |
|
2617 In case of stabilization etc. influence, the setting function should set the best possible digital zoom value |
|
2618 and return error KErrECamDigitalZoomLimited along with dedicated event. |
|
2619 |
|
2620 @note When concrete implementation is provided, but camera device does not support this feature, empty array may be returned and |
|
2621 TValueInfo may be ENotActive; corresponding getter/setters for this feature should not be used in such a case. |
|
2622 |
|
2623 */ |
|
2624 EXPORT_C void CCamera::CCameraAdvancedSettings::GetDigitalZoomStepsForStillL(RArray<TInt>& aDigitalZoomSteps, TValueInfo& aInfo, |
|
2625 TInt aSizeIndex, CCamera::TFormat aFormat, TBool& aIsInfluencePossible) const |
|
2626 { |
|
2627 if(iImpl3 != NULL) |
|
2628 { |
|
2629 iImpl3->GetDigitalZoomStepsForStillL(aDigitalZoomSteps, aInfo, aSizeIndex, aFormat, aIsInfluencePossible); |
|
2630 } |
|
2631 else |
|
2632 { |
|
2633 User::Leave(KErrNotSupported); |
|
2634 } |
|
2635 } |
|
2636 |
|
2637 /** |
|
2638 Get the digital zoom steps for the video when a particular video frame format, size and rate are specified. |
|
2639 |
|
2640 @param aDigitalZoomSteps |
|
2641 A reference to an empty array of TInt to hold digital zoom step values for video and multiplied by |
|
2642 KECamFineResolutionFactor to retain precision. If list returned is empty, this means feature is not supported. |
|
2643 |
|
2644 @param aInfo |
|
2645 A reference to TValueInfo, which establishes the type of the returned data. |
|
2646 |
|
2647 @param aFrameRateIndex |
|
2648 A value providing the rate index must be in the range 0 to TCameraInfo::iNumVideoFrameRatesSupported-1 |
|
2649 inclusive. |
|
2650 |
|
2651 @param aSizeIndex |
|
2652 A value providing the size index which must be in the range 0 to TCameraInfo::iNumVideoFrameSizesSupported-1 |
|
2653 inclusive. |
|
2654 |
|
2655 @param aFormat |
|
2656 A value providing the format which must be one of the video frame formats supported. (see |
|
2657 TCameraInfo::iVideoFrameFormatsSupported) |
|
2658 |
|
2659 @param aIsInfluencePossible |
|
2660 If True, signals that digital zoom step values may be influenced by some hardware factor like stabilization etc. |
|
2661 If False, no influence possible. |
|
2662 |
|
2663 @param aExposure |
|
2664 The exposure mode. |
|
2665 |
|
2666 @leave KErrNotSupported if the implementation of this method is not present. |
|
2667 KErrNoMemory if out of memory. May leave as a result of some other error. |
|
2668 |
|
2669 @note This method retrieves the supported digital zoom steps irrespective of any stabilization influence. |
|
2670 In case of stabilization etc. influence, the setting function should set the best possible digital zoom value |
|
2671 and return error KErrECamDigitalZoomLimited along with dedicated event. |
|
2672 |
|
2673 @note When concrete implementation is provided, but camera device does not support this feature, empty array may be returned and |
|
2674 TValueInfo may be ENotActive; corresponding getter/setters for this feature should not be used in such a case. |
|
2675 |
|
2676 */ |
|
2677 EXPORT_C void CCamera::CCameraAdvancedSettings::GetDigitalZoomStepsForVideoL(RArray<TInt>& aDigitalZoomSteps, TValueInfo& aInfo, |
|
2678 TInt aFrameRateIndex, TInt aSizeIndex, CCamera::TFormat aFormat, TBool& aIsInfluencePossible, |
|
2679 CCamera::TExposure aExposure) const |
|
2680 { |
|
2681 if(iImpl3 != NULL) |
|
2682 { |
|
2683 iImpl3->GetDigitalZoomStepsForVideoL(aDigitalZoomSteps, aInfo, aFrameRateIndex, aSizeIndex, aFormat, aIsInfluencePossible, aExposure); |
|
2684 } |
|
2685 else |
|
2686 { |
|
2687 User::Leave(KErrNotSupported); |
|
2688 } |
|
2689 } |
|
2690 |
|
2691 /** |
|
2692 Retrieves the pre capture warnings supported for a given camera mode |
|
2693 |
|
2694 @param aCameraMode |
|
2695 Desired camera mode for which the supported pre capture warnings may be retrieved. |
|
2696 |
|
2697 @param aPreCaptureWarningSupported |
|
2698 A bitfield of all supported TPreCaptureWarning to be issued in the given camera mode. |
|
2699 If no pre capture warning supported for the given camera mode, EPCWNone is retrieved. |
|
2700 |
|
2701 @leave May leave with any error. |
|
2702 |
|
2703 */ |
|
2704 EXPORT_C void CCamera::CCameraAdvancedSettings::GetPreCaptureWarningSupportedL(CCamera::CCameraAdvancedSettings::TCameraMode aCameraMode, TInt& aPreCaptureWarningSupported) const |
|
2705 { |
|
2706 if(iImpl3 != NULL) |
|
2707 { |
|
2708 iImpl3->GetPreCaptureWarningSupportedL(aCameraMode, aPreCaptureWarningSupported); |
|
2709 |
|
2710 /* if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that |
|
2711 application is not prepared to receive extra added enum values. So, any extra enum value passed |
|
2712 from the implementation will be filtered at this point. |
|
2713 To receive extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() |
|
2714 to create camera object. In this case, application is assumed to be prepared to receive unrecognised enum values */ |
|
2715 if(iOwner.CameraVersion() == KCameraDefaultVersion) |
|
2716 { |
|
2717 aPreCaptureWarningSupported &= KBaselinedPreCaptureWarning; |
|
2718 } |
|
2719 } |
|
2720 else |
|
2721 { |
|
2722 User::Leave(KErrNotSupported); |
|
2723 } |
|
2724 } |
|
2725 |
|
2726 /** |
|
2727 Subscribe in order to receive event which indicates warnings on occurrence of some specific unfavourable |
|
2728 conditions before image/video capture. |
|
2729 |
|
2730 @param aPreCaptureWarning |
|
2731 A bitfield specifying all the TPreCaptureWarning types to be subscribed for. |
|
2732 |
|
2733 @leave KErrNotSupported if the implementation of this method or the feature is not supported. |
|
2734 May also leave as a result of other errors. |
|
2735 |
|
2736 @note When any of the subscribed warnings (represented by aPreCaptureWarning) get generated by the camera device, |
|
2737 event KUidECamEventCameraSettingPreCaptureWarning is issued. TECAMEvent2 class should be used in order to |
|
2738 provide the status of every PreCaptureWarning. |
|
2739 |
|
2740 */ |
|
2741 EXPORT_C void CCamera::CCameraAdvancedSettings::SubscribeToPreCaptureWarningL(TInt aPreCaptureWarning) |
|
2742 { |
|
2743 if(iImpl3 != NULL) |
|
2744 { |
|
2745 iImpl3->SubscribeToPreCaptureWarningL(aPreCaptureWarning); |
|
2746 } |
|
2747 else |
|
2748 { |
|
2749 User::Leave(KErrNotSupported); |
|
2750 } |
|
2751 } |
|
2752 |
|
2753 /** |
|
2754 Unsubscribe so that further events are not received when warnings get issued. |
|
2755 |
|
2756 @leave KErrNotSupported if the implementation of this method or the feature is not supported. |
|
2757 May also leave as a result of other errors. |
|
2758 |
|
2759 */ |
|
2760 EXPORT_C void CCamera::CCameraAdvancedSettings::UnSubscribePreCaptureWarningL() |
|
2761 { |
|
2762 if(iImpl3 != NULL) |
|
2763 { |
|
2764 iImpl3->UnSubscribePreCaptureWarningL(); |
|
2765 } |
|
2766 else |
|
2767 { |
|
2768 User::Leave(KErrNotSupported); |
|
2769 } |
|
2770 } |
|
2771 |
|
2772 /** |
|
2773 Get the status of every warnings defined. |
|
2774 |
|
2775 @param aPreCaptureWarning |
|
2776 A reference to the integer - bitfield representing all the TPreCaptureWarning types issued. |
|
2777 |
|
2778 @leave KErrNotSupported if the implementation of this method or the feature is not supported. |
|
2779 May also leave as a result of other errors. |
|
2780 |
|
2781 @note This method may be called after receiving the event KUidECamEventCameraSettingPreCaptureWarning OR |
|
2782 user may also opt for polling on this. |
|
2783 |
|
2784 */ |
|
2785 EXPORT_C void CCamera::CCameraAdvancedSettings::GetPreCaptureWarningL(TInt& aPreCaptureWarning) const |
|
2786 { |
|
2787 if(iImpl3 != NULL) |
|
2788 { |
|
2789 iImpl3->GetPreCaptureWarningL(aPreCaptureWarning); |
|
2790 |
|
2791 /* if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that |
|
2792 application is not prepared to receive extra added enum values. So, any extra enum value passed |
|
2793 from the implementation will be filtered at this point. |
|
2794 To receive extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() |
|
2795 to create camera object. In this case, application is assumed to be prepared to receive unrecognised enum values */ |
|
2796 if(iOwner.CameraVersion() == KCameraDefaultVersion) |
|
2797 { |
|
2798 aPreCaptureWarning &= KBaselinedPreCaptureWarning; |
|
2799 } |
|
2800 } |
|
2801 else |
|
2802 { |
|
2803 User::Leave(KErrNotSupported); |
|
2804 } |
|
2805 } |
|
2806 |
|
2807 /** |
|
2808 Retrieve the different supported AF assistant light. |
|
2809 |
|
2810 @param aSupportedAFAssistantLight |
|
2811 A reference to integer - bitfield indicating the supported AF assistant light. |
|
2812 If EAFAssistantLightOff, this means AF assistant light is not supported. |
|
2813 If EAFAssistantLightManualOn, then manual AF assistant light is supported. |
|
2814 If EAFAssistantLightAuto, auto assistant light is supported. |
|
2815 If combination of EAFAssistantLightManualOn||EAFAssistantLightAuto , then both manual and Auto assistant light are supported. |
|
2816 |
|
2817 @leave KErrNotSupported if the implementation of this method is not supported. |
|
2818 May also leave as a result of other errors. |
|
2819 |
|
2820 @note When concrete implementation is provided, but camera device does not support this feature, |
|
2821 then aSupportedAFAssistantLight retrieves EAFAssistantLightOff. Corresponding getter/setters for this feature should not be called then. |
|
2822 |
|
2823 */ |
|
2824 EXPORT_C void CCamera::CCameraAdvancedSettings::GetSupportedAFAssistantLightL(TInt& aSupportedAFAssistantLight) const |
|
2825 { |
|
2826 if(iImpl3 != NULL) |
|
2827 { |
|
2828 iImpl3->GetSupportedAFAssistantLightL(aSupportedAFAssistantLight); |
|
2829 } |
|
2830 else |
|
2831 { |
|
2832 User::Leave(KErrNotSupported); |
|
2833 } |
|
2834 } |
|
2835 |
|
2836 /** |
|
2837 Get the type ( and state) of AF assistant light currently set. |
|
2838 |
|
2839 @param aAFAssistantLight |
|
2840 A reference to AF assistant light. |
|
2841 If EAFAssistantLightOff, then manual and auto assistant light are switched off. |
|
2842 If EAFAssistantLightManualOn, manual assistant light is switched on. |
|
2843 If EAFAssistantLightAuto, AF assistant light is set to auto. |
|
2844 |
|
2845 @leave KErrNotSupported if the implementation of this method or the feature is not supported. |
|
2846 May also leave as a result of other errors. |
|
2847 |
|
2848 */ |
|
2849 EXPORT_C void CCamera::CCameraAdvancedSettings::GetAFAssistantLightL(CCamera::CCameraAdvancedSettings::TAFAssistantLight& aAFAssistantLight) const |
|
2850 { |
|
2851 if(iImpl3 != NULL) |
|
2852 { |
|
2853 iImpl3->GetAFAssistantLightL(aAFAssistantLight); |
|
2854 } |
|
2855 else |
|
2856 { |
|
2857 User::Leave(KErrNotSupported); |
|
2858 } |
|
2859 } |
|
2860 |
|
2861 /** |
|
2862 Set a particular type ( and state) of AF assistant light. |
|
2863 |
|
2864 @param aAFAssistantLight |
|
2865 Type of AF assistant light to be set. |
|
2866 If EAFAssistantLightOff, switch off the manual or auto assistant light. |
|
2867 If EAFAssistantLightManualOn, manually switch on the assistant light. |
|
2868 If EAFAssistantLightAuto, camera will automatically switch it on/off as per the conditions. |
|
2869 |
|
2870 @leave KErrNotSupported if the implementation of this method is not present. |
|
2871 |
|
2872 @note Triggers KUidECamEventCameraSettingAFAssistantLight to all MCameraObserver2 clients of the camera. |
|
2873 HandleEvent is used to report the result or any possible error. New setter functions leave only when |
|
2874 implementation is not there. |
|
2875 |
|
2876 */ |
|
2877 EXPORT_C void CCamera::CCameraAdvancedSettings::SetAFAssistantLightL(CCamera::CCameraAdvancedSettings::TAFAssistantLight aAFAssistantLight) |
|
2878 { |
|
2879 if(iImpl3 != NULL) |
|
2880 { |
|
2881 iImpl3->SetAFAssistantLight(aAFAssistantLight); |
|
2882 } |
|
2883 else |
|
2884 { |
|
2885 User::Leave(KErrNotSupported); |
|
2886 } |
|
2887 } |
|
2888 |
|
2889 /** |
|
2890 Retrieves the supported continuous zoom types. |
|
2891 |
|
2892 @param aSupportedContinuousZoomType |
|
2893 Retrieves a bitfield of TUint which indicates the supported continuous zoom type as given by |
|
2894 CCamera::CCameraAdvancedSettings::TContinuousZoomType |
|
2895 |
|
2896 @leave May leave with any error code. |
|
2897 |
|
2898 @publishedPartner |
|
2899 @prototype |
|
2900 */ |
|
2901 EXPORT_C void CCamera::CCameraAdvancedSettings::GetSupportedContinuousZoomTypeL(TUint& aSupportedContinuousZoomType) const |
|
2902 { |
|
2903 if(iImpl4 != NULL) |
|
2904 { |
|
2905 iImpl4->GetSupportedContinuousZoomTypeL(aSupportedContinuousZoomType); |
|
2906 } |
|
2907 else |
|
2908 { |
|
2909 User::Leave(KErrNotSupported); |
|
2910 } |
|
2911 } |
|
2912 |
|
2913 /** |
|
2914 Retrieves the minimum, current and maximum focal length in millimeters. This information is useful to find out |
|
2915 which zoom directions can be used on the fly. |
|
2916 |
|
2917 @param aMinFocalLength |
|
2918 Minimum focal length if positive. |
|
2919 Error value if negative (for example, KErrNotFound if information not available). |
|
2920 |
|
2921 @param aCurrentFocalLength |
|
2922 Current focal length if positive. |
|
2923 Error value if negative (for example, KErrNotFound if information not available). |
|
2924 |
|
2925 @param aMaxFocalLength |
|
2926 Maximum focal length if positive. |
|
2927 Error value if negative (for example, KErrNotFound if information not available). |
|
2928 |
|
2929 @leave May leave with any error code. |
|
2930 |
|
2931 @publishedPartner |
|
2932 @prototype |
|
2933 */ |
|
2934 EXPORT_C void CCamera::CCameraAdvancedSettings::GetFocalLengthInfoL(TInt& aMinFocalLength, TInt& aCurrentFocalLength, TInt& aMaxFocalLength) const |
|
2935 { |
|
2936 if(iImpl4 != NULL) |
|
2937 { |
|
2938 iImpl4->GetFocalLengthInfoL(aMinFocalLength, aCurrentFocalLength, aMaxFocalLength); |
|
2939 } |
|
2940 else |
|
2941 { |
|
2942 User::Leave(KErrNotSupported); |
|
2943 } |
|
2944 } |
|
2945 |
|
2946 /** |
|
2947 Retrieves the total number of operation preferences supported by the implementation. Operation preferences are |
|
2948 specified in terms of performance vectors, that is, speed, quality, low memory consumption and low power consumption. |
|
2949 |
|
2950 @param aNumOperationPreferenceSupported |
|
2951 Retrieves the number of operation preferences supported. |
|
2952 |
|
2953 @leave May leave with any error code. |
|
2954 |
|
2955 @publishedPartner |
|
2956 @prototype |
|
2957 */ |
|
2958 EXPORT_C void CCamera::CCameraAdvancedSettings::GetNumOperationPreferenceL(TUint& aNumOperationPreferenceSupported) const |
|
2959 { |
|
2960 if(iImpl4 != NULL) |
|
2961 { |
|
2962 iImpl4->GetNumOperationPreferenceL(aNumOperationPreferenceSupported); |
|
2963 } |
|
2964 else |
|
2965 { |
|
2966 User::Leave(KErrNotSupported); |
|
2967 } |
|
2968 } |
|
2969 |
|
2970 /** |
|
2971 Enumerate the available operation preferences. |
|
2972 |
|
2973 @param aOperationPreferenceIndex |
|
2974 A particular index which represents an operation preference. The level of different performance vectors may be known |
|
2975 through other arguments. This varies from 0 to n-1, where n is given by GetNumOperationPreferenceL(n). |
|
2976 |
|
2977 @param aSpeedLevel |
|
2978 A TPerformanceLevel which specifies the speed level related to the index aOperationPreferenceIndex. |
|
2979 |
|
2980 @param aQualityLevel |
|
2981 A TPerformanceLevel which specifies the quality level related to the index aOperationPreferenceIndex. |
|
2982 |
|
2983 @param aLowMemoryConsumptionLevel |
|
2984 A TPerformanceLevel which specifies the low memory consumption level related to the index aOperationPreferenceIndex. |
|
2985 The lower the memory consumption, the higher the level. |
|
2986 |
|
2987 @param aLowPowerConsumptionLevel |
|
2988 A TPerformanceLevel which specifies the low power consumption level related to the index aOperationPreferenceIndex. |
|
2989 The lower the power consumption, the higher the level. |
|
2990 |
|
2991 @note It is up to the implementation how the performance levels are achieved. For example, shutter opening, JPEQ quality |
|
2992 and parallel buffering in case of streamed image output can be controlled in order to provide the desired |
|
2993 performance. |
|
2994 |
|
2995 @leave May leave with any error code. |
|
2996 |
|
2997 @publishedPartner |
|
2998 @prototype |
|
2999 */ |
|
3000 EXPORT_C void CCamera::CCameraAdvancedSettings::EnumerateOperationPreferenceL(TUint aOperationPreferenceIndex, CCamera:: |
|
3001 CCameraAdvancedSettings::TPerformanceLevel& aSpeedLevel, CCamera::CCameraAdvancedSettings:: |
|
3002 TPerformanceLevel& aQualityLevel, CCamera::CCameraAdvancedSettings::TPerformanceLevel& |
|
3003 aLowMemoryConsumptionLevel, CCamera::CCameraAdvancedSettings::TPerformanceLevel& aLowPowerConsumptionLevel) const |
|
3004 |
|
3005 { |
|
3006 if(iImpl4 != NULL) |
|
3007 { |
|
3008 iImpl4->EnumerateOperationPreferenceL(aOperationPreferenceIndex, aSpeedLevel, aQualityLevel, |
|
3009 aLowMemoryConsumptionLevel, aLowPowerConsumptionLevel); |
|
3010 } |
|
3011 else |
|
3012 { |
|
3013 User::Leave(KErrNotSupported); |
|
3014 } |
|
3015 } |
|
3016 |
|
3017 /** |
|
3018 Set a particular operation preference. |
|
3019 |
|
3020 @param aOperationPreferenceIndex |
|
3021 An index which reveals a set of levels to be used for performance vectors, that is, speed, quality, low memory |
|
3022 consumption and low power consumption. |
|
3023 |
|
3024 @leave KErrNotSupported If the implementation of this method is not present. |
|
3025 |
|
3026 @note Event KUidECamEventCameraSettingOperationPreference is used to notify clients about setting an operation preference. |
|
3027 |
|
3028 @publishedPartner |
|
3029 @prototype |
|
3030 */ |
|
3031 EXPORT_C void CCamera::CCameraAdvancedSettings::SetOperationPreferenceL(TUint aOperationPreferenceIndex) |
|
3032 { |
|
3033 if(iImpl4 != NULL) |
|
3034 { |
|
3035 iImpl4->SetOperationPreference(aOperationPreferenceIndex); |
|
3036 } |
|
3037 else |
|
3038 { |
|
3039 User::Leave(KErrNotSupported); |
|
3040 } |
|
3041 } |
|
3042 |
|
3043 /** |
|
3044 Get the current operation preference being used. |
|
3045 |
|
3046 @param aOperationPreferenceIndex |
|
3047 Currently used operation preference index. |
|
3048 |
|
3049 @leave May leave with any error code. |
|
3050 |
|
3051 @publishedPartner |
|
3052 @prototype |
|
3053 */ |
|
3054 EXPORT_C void CCamera::CCameraAdvancedSettings::GetOperationPreferenceL(TInt& aOperationPreferenceIndex) const |
|
3055 { |
|
3056 if(iImpl4 != NULL) |
|
3057 { |
|
3058 iImpl4->GetOperationPreferenceL(aOperationPreferenceIndex); |
|
3059 } |
|
3060 else |
|
3061 { |
|
3062 User::Leave(KErrNotSupported); |
|
3063 } |
|
3064 } |
|
3065 |
|
3066 /** |
|
3067 Retrieves the event uids which the underlying implementation supports. Client may use these event notifications as |
|
3068 milestones in their application. |
|
3069 |
|
3070 @param aSupportedEvents |
|
3071 Retrieves as array of TUid. Every member of the array represents a supported event uid. These events are ECAM |
|
3072 component wide. |
|
3073 |
|
3074 @leave May leave with any error code. |
|
3075 |
|
3076 @note This method may retrieve unrecognized events which may be introduced later on. |
|
3077 |
|
3078 @publishedPartner |
|
3079 @prototype |
|
3080 */ |
|
3081 EXPORT_C void CCamera::CCameraAdvancedSettings::GetSupportedEventsL(RArray<TUid>& aSupportedEvents) const |
|
3082 { |
|
3083 if(iImpl4 != NULL) |
|
3084 { |
|
3085 iImpl4->GetSupportedEventsL(aSupportedEvents); |
|
3086 } |
|
3087 else |
|
3088 { |
|
3089 User::Leave(KErrNotSupported); |
|
3090 } |
|
3091 } |
|
3092 |
|
3093 /** |
|
3094 Retrieves the indirect feature changes which occur because of a particular requested feature change. |
|
3095 Since the camera setting operation is asynchronous in nature, changing a particular camera feature, in certain cases, |
|
3096 involves indirectly changing another feature. In order to notify the ECam client about this indirect feature change, |
|
3097 event KUidECamEvent2IndirectFeatureChange is issued. After this notification, the client may use this method to retrieve |
|
3098 the full list of indirect feature changes. |
|
3099 |
|
3100 @param aRequestedSetting |
|
3101 The actual requested feature change. This uid is supposed to be ECAM component wide and not restricted to |
|
3102 advanced camera settings. |
|
3103 |
|
3104 @param aIndirectFeatureChanges |
|
3105 An array of uids which retrieves the indirect feature changes. These uids are supposed to be ECAM component wide |
|
3106 and not restricted to advanced camera settings. |
|
3107 |
|
3108 @leave May leave with any error code. |
|
3109 |
|
3110 @publishedPartner |
|
3111 @prototype |
|
3112 */ |
|
3113 EXPORT_C void CCamera::CCameraAdvancedSettings::GetIndirectFeatureChangesL(TUid aRequestedSetting, RArray<TUid>& aIndirectFeatureChanges) const |
|
3114 { |
|
3115 if(iImpl4 != NULL) |
|
3116 { |
|
3117 iImpl4->GetIndirectFeatureChangesL(aRequestedSetting, aIndirectFeatureChanges); |
|
3118 } |
|
3119 else |
|
3120 { |
|
3121 User::Leave(KErrNotSupported); |
|
3122 } |
|
3123 } |
|
3124 |
|
3125 /** |
|
3126 Creates an instance of a CCameraContinuousZoom object and returns it to the client. Ownership of the object is passed to the client. |
|
3127 |
|
3128 @param aObserver |
|
3129 Reference to a continuous zoom observer which will be used to issue callbacks to the client. |
|
3130 |
|
3131 @param aContinuousZoomType |
|
3132 The continuous zoom type with which the continuous zoom object will be initialised. |
|
3133 |
|
3134 @param aContinuousZoom |
|
3135 Retrieves pointer to the continuous zoom object. Client assumes ownership of the object. |
|
3136 |
|
3137 @note Client must not delete the continuous zoom object if CCameraContinuousZoom::StartContinuousZoomL() has been called as MContinuousZoomObserver callbacks |
|
3138 are still expected by the implementation. Clients should therefore only delete the object once the MContinuousZoomObserver::ContinuousZoomCompleted() |
|
3139 callback has been received or has explicitly stopped the continuous zoom via StopContinuousZoom(). |
|
3140 |
|
3141 @internalTechnology |
|
3142 @prototype |
|
3143 */ |
|
3144 EXPORT_C void CCamera::CCameraAdvancedSettings::CreateContinuousZoomL(MContinuousZoomObserver& aObserver, TContinuousZoomType aContinuousZoomType, CCameraContinuousZoom*& aContinuousZoom) |
|
3145 { |
|
3146 if(iImpl4 != NULL) |
|
3147 { |
|
3148 MImplementationFactory* implFactory = NULL; |
|
3149 |
|
3150 iImpl4->CreateContinuousZoomImplFactoryL(implFactory); |
|
3151 |
|
3152 CleanupReleasePushL(*implFactory); |
|
3153 CCameraContinuousZoom* zoom = CCameraContinuousZoom::CreateL(aObserver, aContinuousZoomType, *implFactory); |
|
3154 CleanupStack::Pop(implFactory); |
|
3155 |
|
3156 implFactory->Release(); |
|
3157 aContinuousZoom = zoom; |
|
3158 } |
|
3159 else |
|
3160 { |
|
3161 User::Leave(KErrNotSupported); |
|
3162 } |
|
3163 } |
|
3164 |
|
3165 /** |
|
3166 Register the ECAM component wide events in order to decide which events the client needs to be notified about. |
|
3167 Previously registered events will be overridden and not augmented. |
|
3168 |
|
3169 @param aEventFilter |
|
3170 This is of type TECAMEventFilterScheme. |
|
3171 If EECAMEventFilterSchemeBlackList, the client will not be notified only for the events packed in the array 'aEvents'. |
|
3172 If EECAMEventFilterSchemeWhiteList, the client will be notified only for the events packed in the array 'aEvents'. |
|
3173 |
|
3174 @param aEvents |
|
3175 An array of events provided by the client. Helps in filtering the events for notification purposes. An empty array |
|
3176 indicates that there are no events to register for a particular filtering scheme as given by aEventFilter. |
|
3177 |
|
3178 @leave May leave with any error code. |
|
3179 |
|
3180 @note Method RegisterEvents if called with EECAMEventFilterSchemeBlackList will wipe away any white listed events set |
|
3181 previously and make them inactive. |
|
3182 |
|
3183 @publishedPartner |
|
3184 @prototype |
|
3185 */ |
|
3186 void CCamera::CCameraAdvancedSettings::RegisterEventsL(TECAMEventFilterScheme /*aEventFilter*/, const RArray<TUid>& /*aEvents*/) |
|
3187 { |
|
3188 User::Leave(KErrNotSupported); |
|
3189 } |
|
3190 |
|
3191 /** |
|
3192 Retrieve the list of ECAM component wide events for a particular event filtering scheme. |
|
3193 |
|
3194 @param aEventFilter |
|
3195 This is of type TECAMEventFilterScheme. |
|
3196 If EECAMEventFilterSchemeBlackList, retrieve the events which are not supposed to be used for notification. |
|
3197 If EECAMEventFilterSchemeWhiteList, retrieve the events which are supposed to be used for notification. |
|
3198 |
|
3199 @param aEvents |
|
3200 An array of events given to the clients. Helps in filtering the events for notification purposes. An empty array |
|
3201 indicates that no events have been registered so far. |
|
3202 |
|
3203 @param aInfo |
|
3204 Retrieved TValueInfo. |
|
3205 This will be ENotActive if no event has been yet registered under the 'aEventFilter' filter scheme. |
|
3206 This will be EDiscreteSteps if some events have been registered under the 'aEventFilter' filter scheme. |
|
3207 |
|
3208 @leave May leave with any error code. |
|
3209 |
|
3210 @note There should be consistency in the information retrieved when GetRegisteredEvents is consecutively called, |
|
3211 first for blacklisted events and secondly, for white listed events. Only one of them should be used at a time and |
|
3212 hence, for the other one, aInfo will be ENotActive. |
|
3213 |
|
3214 @publishedPartner |
|
3215 @prototype |
|
3216 */ |
|
3217 void CCamera::CCameraAdvancedSettings::GetRegisterEventsL(TECAMEventFilterScheme /*aEventFilter*/, RArray<TUid>& /*aEvents*/, TValueInfo& /*aInfo*/) const |
|
3218 { |
|
3219 User::Leave(KErrNotSupported); |
|
3220 } |
|
3221 |
|
3222 /** |
|
3223 Retrieves the supported flicker removal values. |
|
3224 |
|
3225 @param aSupportedFlickerRemovalValue |
|
3226 A bitfield of all supported TFlickerRemoval to be provided to the client. |
|
3227 |
|
3228 @leave May leave with any error code. |
|
3229 |
|
3230 @publishedPartner |
|
3231 @prototype |
|
3232 */ |
|
3233 void CCamera::CCameraAdvancedSettings::GetSupportedFlickerRemovalValueL(TUint& /*aSupportedFlickerRemovalValue*/) const |
|
3234 { |
|
3235 User::Leave(KErrNotSupported); |
|
3236 } |
|
3237 |
|
3238 /** |
|
3239 Get the current flicker removal value being used. |
|
3240 |
|
3241 @param aFlickerRemovalValue |
|
3242 Currently used TFlickerRemoval value. |
|
3243 |
|
3244 @leave May leave with any error code. |
|
3245 |
|
3246 @publishedPartner |
|
3247 @prototype |
|
3248 */ |
|
3249 void CCamera::CCameraAdvancedSettings::GetFlickerRemovalValueL(CCamera::CCameraAdvancedSettings::TFlickerRemoval& /*aFlickerRemovalValue*/) const |
|
3250 { |
|
3251 User::Leave(KErrNotSupported); |
|
3252 } |
|
3253 |
|
3254 /** |
|
3255 Set the flicker removal value. |
|
3256 |
|
3257 @param aFlickerRemovalValue |
|
3258 The TFlickerRemoval value to be set. |
|
3259 |
|
3260 @leave KErrNotSupported If the implementation of this method is not present. |
|
3261 |
|
3262 @note Event KUidECamEventCameraSettingFlickerRemovalValue is used to notify clients about the flicker removal value |
|
3263 setting operation. |
|
3264 |
|
3265 @publishedPartner |
|
3266 @prototype |
|
3267 */ |
|
3268 void CCamera::CCameraAdvancedSettings::SetFlickerRemovalValueL(CCamera::CCameraAdvancedSettings::TFlickerRemoval /*aFlickerRemovalValue*/) |
|
3269 { |
|
3270 User::Leave(KErrNotSupported); |
|
3271 } |
|
3272 |
|
3273 /** |
|
3274 Retrieves the supported neutral density filter. |
|
3275 |
|
3276 @param aSupportedNDFilter |
|
3277 A bitfield of all supported TNDFilter to be provided to the client. |
|
3278 |
|
3279 @leave May leave with any error code. |
|
3280 |
|
3281 @publishedPartner |
|
3282 @prototype |
|
3283 */ |
|
3284 void CCamera::CCameraAdvancedSettings::GetSupportedNDFilterL(TUint& /*aSupportedNDFilter*/) const |
|
3285 { |
|
3286 User::Leave(KErrNotSupported); |
|
3287 } |
|
3288 |
|
3289 /** |
|
3290 Get the current neutral density filter being used. |
|
3291 |
|
3292 @param aNDFilter |
|
3293 Currently used TNDFilter. |
|
3294 |
|
3295 @leave May leave with any error code. |
|
3296 |
|
3297 @publishedPartner |
|
3298 @prototype |
|
3299 */ |
|
3300 void CCamera::CCameraAdvancedSettings::GetNDFilterL(CCamera::CCameraAdvancedSettings::TNDFilter& /*aNDFilter*/) const |
|
3301 { |
|
3302 User::Leave(KErrNotSupported); |
|
3303 } |
|
3304 |
|
3305 /** |
|
3306 Set the neutral density filter. |
|
3307 |
|
3308 @param aNDFilter |
|
3309 The TNDFilter value to be set. |
|
3310 |
|
3311 @leave KErrNotSupported If the implementation of this method is not present. |
|
3312 |
|
3313 @note Event KUidECamEventCameraSettingNDFilter is used to notify clients about the neutral density setting operation. |
|
3314 |
|
3315 @publishedPartner |
|
3316 @prototype |
|
3317 */ |
|
3318 void CCamera::CCameraAdvancedSettings::SetNDFilterL(CCamera::CCameraAdvancedSettings::TNDFilter /*aNDFilter*/) |
|
3319 { |
|
3320 User::Leave(KErrNotSupported); |
|
3321 } |
|
3322 |
|
3323 /** |
|
3324 Get the type of LED effect being used for a particular LED event. |
|
3325 |
|
3326 @param aLEDEvent |
|
3327 The TLEDEvent for which the current LED effect has to be retrieved. |
|
3328 |
|
3329 @param aLEDEffect |
|
3330 The TLEDEffect which is being used for the given LED event. |
|
3331 If this is TLEDEffectCustom, then a custom LED effect would have been separately specified by the client. |
|
3332 |
|
3333 @leave May leave with any error code. |
|
3334 |
|
3335 @publishedPartner |
|
3336 @prototype |
|
3337 */ |
|
3338 void CCamera::CCameraAdvancedSettings::GetLEDEffectL(CCamera::CCameraAdvancedSettings::TLEDEvent /*aLEDEvent*/, |
|
3339 CCamera::CCameraAdvancedSettings::TLEDEffect& /*aLEDEffect*/) const |
|
3340 { |
|
3341 User::Leave(KErrNotSupported); |
|
3342 } |
|
3343 |
|
3344 /** |
|
3345 Set the LED effect for a particular LED event. |
|
3346 |
|
3347 @param aLEDEvent |
|
3348 The TLEDEvent for which the LED effect has to be set. |
|
3349 |
|
3350 @param aLEDEffect |
|
3351 The TLEDEffect which has to be set for the given LED event. It should not be TLEDEffectCustom. |
|
3352 Use the method SetLEDCustomEffectL() to provide the custom LED effect. |
|
3353 |
|
3354 @leave KErrNotSupported If the implementation of this method is not present. |
|
3355 |
|
3356 @note Event KUidECamEventCameraSettingLEDEffect is used to notify clients about the LED effect setting operation. |
|
3357 |
|
3358 @note The event will provide error code KErrArgument if TLEDEffectCustom is used as the TLEDEffect. Use the method |
|
3359 SetLEDCustomEffectL() to provide the custom LED effect. |
|
3360 |
|
3361 @publishedPartner |
|
3362 @prototype |
|
3363 */ |
|
3364 void CCamera::CCameraAdvancedSettings::SetLEDEffectL(CCamera::CCameraAdvancedSettings::TLEDEvent /*aLEDEvent*/, |
|
3365 CCamera::CCameraAdvancedSettings::TLEDEffect /*aLEDEffect*/) |
|
3366 { |
|
3367 User::Leave(KErrNotSupported); |
|
3368 } |
|
3369 |
|
3370 /** |
|
3371 Set the custom LED effect for a particular LED event. |
|
3372 |
|
3373 @param aLEDEvent |
|
3374 The TLEDEvent for which the custom LED effect has to be set. |
|
3375 |
|
3376 @param aLEDSpecialEffectSteps |
|
3377 An array of custom LED special effect steps. Every member of this array is of type TECamLEDSpecialEffectStep. |
|
3378 The array as a whole constitues a custom LED effect. |
|
3379 |
|
3380 @leave KErrNotSupported If the implementation of this method is not present. |
|
3381 |
|
3382 @note Event KUidECamEventCameraSettingLEDCustomEffect is used to notify clients about the LED effect setting operation. |
|
3383 |
|
3384 @note Successful setting of a custom LED effect means that the GetLEDEffectL will retrieve TLEDEffectCustom for the |
|
3385 LEDEvent aLEDEvent. |
|
3386 |
|
3387 @publishedPartner |
|
3388 @prototype |
|
3389 */ |
|
3390 void CCamera::CCameraAdvancedSettings::SetLEDCustomEffectL(CCamera::CCameraAdvancedSettings::TLEDEvent /*aLEDEvent*/, |
|
3391 const RArray<CCamera::CCameraAdvancedSettings::TECamLEDSpecialEffectStep>& /*aLEDSpecialEffectSteps*/) |
|
3392 { |
|
3393 User::Leave(KErrNotSupported); |
|
3394 } |
|
3395 |
|
3396 /** |
|
3397 Reserve method which are less strict than existing Reserve methods and hence, expects implementation to be considerate towards camera access/control. |
|
3398 |
|
3399 @param aMaxTimeToWait |
|
3400 Maximum specified time for the client to hold the camera control before releasing (KUidECamEvent2CameraRequestTimedTakeOver) |
|
3401 or being forcefully overtaken (KUidECamEvent2CameraRequestForcedTimedTakeOver). |
|
3402 |
|
3403 @param aKickOut |
|
3404 ETrue indicates that if the requester's priority is greater than the current reserver's, then |
|
3405 KUidECamEvent2CameraRequestForcedTimedTakeOver will be issued to the current reserver. Otherwise, |
|
3406 KUidECamEvent2CameraRequestTimedTakeOver will be issued. |
|
3407 |
|
3408 EFalse indicates that KUidECamEvent2CameraRequestTimedTakeOver will be issued to the current reserver. |
|
3409 |
|
3410 @leave KErrNotSupported If the implementation of this method is not present. |
|
3411 |
|
3412 @note Event KUidECamEventNewReserveComplete notifies the client who made the new Reserve request. |
|
3413 Error value KErrECamHighPriorityReserveRequesterExists indicates another such reserve request is outstanding |
|
3414 and has higher priority than this one. |
|
3415 Error value KErrCancel indicates a new reserve requester with a higher priority than the current requester has |
|
3416 been made and that the current requester has been cancelled. |
|
3417 |
|
3418 @note Event KUidECamEvent2CameraRequestForcedTimedTakeOver notifies the current reserver client about its camera control |
|
3419 being forcefully overtaken after a specified time period. |
|
3420 |
|
3421 @note Event KUidECamEvent2CameraRequestTimedTakeOver notifies the current reserver client about a request to release its |
|
3422 camera control within a specified time period. |
|
3423 |
|
3424 @publishedPartner |
|
3425 @prototype |
|
3426 */ |
|
3427 void CCamera::CCameraAdvancedSettings::ReserveL(const TTimeIntervalMicroSeconds32& /*aMaxTimeToWait*/, TBool /*aKickOut*/) |
|
3428 { |
|
3429 User::Leave(KErrNotSupported); |
|
3430 } |
|
3431 |
|
3432 /** |
|
3433 Sets the priority of the client. The client issues this call when it receives the notification |
|
3434 KUidECamEvent2CameraSettingChangeClientPriority. The target priority is also supplied with this notification as iParam. |
|
3435 |
|
3436 @param aPriority |
|
3437 The target priority. |
|
3438 |
|
3439 @note For example, a higher priority client is currently holding the camera and a lower priority legacy |
|
3440 application is continuously requesting to get hold of it. After receiving a number of repeated requests by the |
|
3441 same legacy client, the supportive ECam implementation issues the notification |
|
3442 KUidECamEvent2CameraSettingChangeClientPriority. After receiving this notification, the client issues this method |
|
3443 SetClientPriorityL(TInt aPriority). |
|
3444 |
|
3445 @leave May leave with any error code. |
|
3446 |
|
3447 @publishedPartner |
|
3448 @prototype |
|
3449 */ |
|
3450 void CCamera::CCameraAdvancedSettings::SetClientPriorityL(TInt /*aPriority*/) |
|
3451 { |
|
3452 User::Leave(KErrNotSupported); |
|
3453 } |
|
3454 |
|
3455 /** |
|
3456 Restores the priority of the client. The client issues this call when it receives the notification |
|
3457 KUidECamEventCameraSettingRestoreClientPriority. ECam's responsibility is to save the original priority of the client. |
|
3458 |
|
3459 @note Once the legacy client has released the camera (after changing its priority), implementation will notify the |
|
3460 client to restore its priority by event KUidECamEventCameraSettingRestoreClientPriority. After receiving this |
|
3461 notification, the client issues this method RestoreClientPriorityL(). |
|
3462 |
|
3463 @leave May leave with any error code. |
|
3464 |
|
3465 @publishedPartner |
|
3466 @prototype |
|
3467 */ |
|
3468 void CCamera::CCameraAdvancedSettings::RestoreClientPriorityL() |
|
3469 { |
|
3470 User::Leave(KErrNotSupported); |
|
3471 } |
|
3472 |
|
3473 /** |
|
3474 Retrieves the supported manual gain for a particular color channel. |
|
3475 |
|
3476 @param aSupportedManualGain |
|
3477 An array of manual gain. The TInt represent the unit in 'db' and multiplied by KECamFineResolutionFactor. Empty |
|
3478 array indicates that feature is not supported. |
|
3479 |
|
3480 @param aColorChannel |
|
3481 The TColorChannel for which the supported manual gain values have to be retrieved. |
|
3482 |
|
3483 @leave May leave with any error code. |
|
3484 |
|
3485 @publishedPartner |
|
3486 @prototype |
|
3487 */ |
|
3488 void CCamera::CCameraAdvancedSettings::GetSupportedManualGainL(RArray<TInt>& /*aSupportedManualGain*/, |
|
3489 CCamera::CCameraAdvancedSettings::TColorChannel /*aColorChannel*/) const |
|
3490 { |
|
3491 User::Leave(KErrNotSupported); |
|
3492 } |
|
3493 |
|
3494 /** |
|
3495 Get the current manual gain value to be used for a particular color channel. |
|
3496 |
|
3497 @param aManualGain |
|
3498 Currently used manual gain value. The TInt represents the unit in 'db' and multiplied by KECamFineResolutionFactor. |
|
3499 |
|
3500 @param aColorChannel |
|
3501 The color channel for which the manual gain value has to be used. |
|
3502 |
|
3503 @leave May leave with any error code. |
|
3504 |
|
3505 @publishedPartner |
|
3506 @prototype |
|
3507 */ |
|
3508 void CCamera::CCameraAdvancedSettings::GetManualGainL(TInt& /*aManualGain*/, |
|
3509 CCamera::CCameraAdvancedSettings::TColorChannel /*aColorChannel*/) const |
|
3510 { |
|
3511 User::Leave(KErrNotSupported); |
|
3512 } |
|
3513 |
|
3514 /** |
|
3515 Set the manual gain value for a particular color channel. |
|
3516 |
|
3517 @param aManualGain |
|
3518 The manual gain value to be set. The TInt represents the unit in 'db' and multiplied by KECamFineResolutionFactor. |
|
3519 |
|
3520 @param aColorChannel |
|
3521 Represents the color channel for which the manual gain value has to be set. |
|
3522 |
|
3523 @leave KErrNotSupported if the implementation of this method is not present. |
|
3524 |
|
3525 @note Event KUidECamEvent2CameraSettingManualGain is used to notify clients about the manual gain setting operation. |
|
3526 |
|
3527 @note The client will be expected to use either RBG color channel or YUV color channel in order to apply manual gain. |
|
3528 If the client sets manual gain values for both the color space, it is up to the implementation to decide which |
|
3529 values to use. |
|
3530 |
|
3531 @publishedPartner |
|
3532 @prototype |
|
3533 */ |
|
3534 void CCamera::CCameraAdvancedSettings::SetManualGainL(TInt /*aManualGain*/, |
|
3535 CCamera::CCameraAdvancedSettings::TColorChannel /*aColorChannel*/) |
|
3536 { |
|
3537 User::Leave(KErrNotSupported); |
|
3538 } |
|
3539 |
|
3540 /** |
|
3541 Control the white balance lock. It can be either locked or unlocked. |
|
3542 The white balance can be locked after aiming at a white or grey card. This helps in using the same white balance |
|
3543 setting for the next image shots. |
|
3544 |
|
3545 @param aEnableLock |
|
3546 ETrue instructs to lock the white balance. |
|
3547 EFalse instructs to unlock the white balance. |
|
3548 |
|
3549 @leave KErrNotSupported If the implementation of this method is not present. |
|
3550 |
|
3551 @note Event KUidECamEventCameraSettingLockWhiteBalance is used to notify clients about setting the state |
|
3552 of white balance lock. |
|
3553 |
|
3554 @publishedPartner |
|
3555 @prototype |
|
3556 */ |
|
3557 void CCamera::CCameraAdvancedSettings::SetWhiteBalanceLockL(TBool /*aEnableLock*/) |
|
3558 { |
|
3559 User::Leave(KErrNotSupported); |
|
3560 } |
|
3561 |
|
3562 /** |
|
3563 Get the current state for the white balance lock. |
|
3564 |
|
3565 @param aIsLocked |
|
3566 A TBool specifies whether the white balance has been locked or unlocked. |
|
3567 ETrue indicates that the white balance has been locked. |
|
3568 EFalse indicates that the white balance has been unlocked. |
|
3569 |
|
3570 @leave May leave with any error code. |
|
3571 |
|
3572 @publishedPartner |
|
3573 @prototype |
|
3574 */ |
|
3575 void CCamera::CCameraAdvancedSettings::GetWhiteBalanceLockStateL(TBool& /*aIsLocked*/) const |
|
3576 { |
|
3577 User::Leave(KErrNotSupported); |
|
3578 } |
|
3579 |
|
3580 /** |
|
3581 Instructs the implementation to continuously save the current state before releasing the camera or being overtaken. |
|
3582 |
|
3583 @param aLatestCameraState |
|
3584 A RWriteStream reference which will be used by the implementation to continuously save the latest camera state. |
|
3585 |
|
3586 @note The RWriteStream gives the implementation the facility to seek and overwrite any incorrectly updated state (in |
|
3587 the event of power failure, for example). Given stream sink shall support repositioning. |
|
3588 |
|
3589 @note The ECam client should be careful not to use the saved state for a particular camera in order to restore a |
|
3590 different camera later on. Though the implementation will be expected to take care of such things since the |
|
3591 content of the files are only meaningful for the implementation. |
|
3592 |
|
3593 @note The RWriteStream reference is not valid across the process. |
|
3594 |
|
3595 @leave May leave with any error code. |
|
3596 |
|
3597 @publishedPartner |
|
3598 @prototype |
|
3599 */ |
|
3600 void CCamera::CCameraAdvancedSettings::EnableStateSavingL(RWriteStream& /*aLatestCameraState*/) |
|
3601 { |
|
3602 User::Leave(KErrNotSupported); |
|
3603 } |
|
3604 |
|
3605 /** |
|
3606 Instructs the implementation to stop saving the current state in the RWriteStream& as given by |
|
3607 EnableStateSavingL(RWriteStream& aLatestCameraState). |
|
3608 |
|
3609 @leave May leave with any error code. |
|
3610 |
|
3611 @publishedPartner |
|
3612 @prototype |
|
3613 */ |
|
3614 void CCamera::CCameraAdvancedSettings::DisableStateSavingL() |
|
3615 { |
|
3616 User::Leave(KErrNotSupported); |
|
3617 } |
|
3618 |
|
3619 /** |
|
3620 Instructs the implementation to resume from the last saved state. This may be used after reserving the camera. |
|
3621 |
|
3622 @param aLatestCameraState |
|
3623 A RReadStream reference which will be used by the implementation to restore the latest saved camera state information. |
|
3624 |
|
3625 @note The RReadStream gives the implementation the facility to seek and overwrite any incorrectly updated state (in |
|
3626 the event of power failure, for example). |
|
3627 |
|
3628 @note The ECam client should be careful not to use the saved state for a particular camera in order to restore a |
|
3629 different camera later on. Though the implementation will be expected to take care of such things since the |
|
3630 content of the files are only meaningful for the implementation. |
|
3631 |
|
3632 @note The RReadStream reference is not valid across the process. |
|
3633 |
|
3634 @leave May leave with any error code. |
|
3635 |
|
3636 @publishedPartner |
|
3637 @prototype |
|
3638 */ |
|
3639 void CCamera::CCameraAdvancedSettings::RestoreLatestStateL(RReadStream& /*aLatestCameraState*/) |
|
3640 { |
|
3641 User::Leave(KErrNotSupported); |
|
3642 } |
|
3643 |
|
3644 /** |
|
3645 Instructs the implementation to save the current state which will be used by the client as a custom user state. |
|
3646 The state saving will be done only once when this call is issued. Many such custom state could be created by the |
|
3647 clients. |
|
3648 |
|
3649 @param aCustomCameraState |
|
3650 A RWriteStream reference which will be used by the implementation to save the current camera state as a milestone. |
|
3651 |
|
3652 @note The ECam client should be careful not to use the saved state for a particular camera in order to restore a |
|
3653 different camera later on. Though the implementation will be expected to take care of such things since the |
|
3654 content of the files are only meaningful for the implementation. |
|
3655 |
|
3656 @note The RWriteStream reference is not valid across the process. |
|
3657 |
|
3658 @leave May leave with any error code. |
|
3659 |
|
3660 @publishedPartner |
|
3661 @prototype |
|
3662 */ |
|
3663 void CCamera::CCameraAdvancedSettings::SaveCameraStateL(RWriteStream& /*aCustomCameraState*/) |
|
3664 { |
|
3665 User::Leave(KErrNotSupported); |
|
3666 } |
|
3667 |
|
3668 /** |
|
3669 Instructs the implementation to stop saving the custom state in the RWriteStream& as given by |
|
3670 SaveCameraStateL(RWriteStream& aCustomCameraState). |
|
3671 |
|
3672 @leave May leave with any error code. |
|
3673 |
|
3674 @publishedPartner |
|
3675 @prototype |
|
3676 */ |
|
3677 void CCamera::CCameraAdvancedSettings::DisableCameraStateSavingL(RWriteStream& /*aCustomCameraState*/) |
|
3678 { |
|
3679 User::Leave(KErrNotSupported); |
|
3680 } |
|
3681 |
|
3682 /** |
|
3683 Instructs the implementation to restore a custom saved state. |
|
3684 The camera can be restored in any of the custom camera states saved earlier. |
|
3685 |
|
3686 @param aCustomCameraState |
|
3687 A RReadStream reference which will be used by the implementation to restore a custom camera state |
|
3688 which was saved earlier. |
|
3689 |
|
3690 @note The ECam client should be careful not to use the saved state for a particular camera in order to restore a |
|
3691 different camera later on. Though the implementation will be expected to take care of such things since the |
|
3692 content of the files are only meaningful for the implementation. |
|
3693 |
|
3694 @note The RReadStream reference is not valid across the process. |
|
3695 |
|
3696 @leave May leave with any error code. |
|
3697 |
|
3698 @publishedPartner |
|
3699 @prototype |
|
3700 */ |
|
3701 void CCamera::CCameraAdvancedSettings::RestoreCameraStateL(RReadStream& /*aCustomCameraState*/) |
|
3702 { |
|
3703 User::Leave(KErrNotSupported); |
|
3704 } |
|
3705 |
|
3706 /** |
|
3707 Constructor for the TECamLEDSpecialEffectStep class. |
|
3708 Sets the size and version of this class. |
|
3709 */ |
|
3710 CCamera::CCameraAdvancedSettings::TECamLEDSpecialEffectStep::TECamLEDSpecialEffectStep() |
|
3711 { |
|
3712 iSize = sizeof(CCamera::CCameraAdvancedSettings::TECamLEDSpecialEffectStep); |
|
3713 iVersion = KECamLEDSpecialEffectStepCurrentVersion; |
|
3714 iBlinkingFrequency = 0; |
|
3715 iIntensity = 0; |
|
3716 iFrequencyStep = 0; |
|
3717 iDuration = 0; |
|
3718 } |
|
3719 |
|
3720 /** |
|
3721 Returns the size of the class. Used for extensibility by deriving from this base class and adding new member variables. |
|
3722 Intended to be used for implementation of methods where this class reference is passed as function arguments. |
|
3723 Implementation of such methods can find out whether the actual class passed is the base or the derived one. For example, if a new application |
|
3724 is made to run on an old implementation, an error may occur once the old implementation detects this by getting |
|
3725 the size information of the T class passed. Also, if an old application is made to run on a new implementation, this can be |
|
3726 correctly handled if the derived class variables handling is done in a proper 'if-else' statement. |
|
3727 |
|
3728 @return The size of the class. |
|
3729 |
|
3730 @note The size will be modified when the T-class gets updated. |
|
3731 */ |
|
3732 TUint CCamera::CCameraAdvancedSettings::TECamLEDSpecialEffectStep::Size() const |
|
3733 { |
|
3734 return iSize; |
|
3735 } |
|
3736 |
|
3737 /** |
|
3738 Returns the version of the class. Used for extensibility specially when the class members are not added but the Reserved |
|
3739 members get used at a later stage. |
|
3740 |
|
3741 @return The version of the class. |
|
3742 |
|
3743 @note The version will be modified when the T-class gets updated. |
|
3744 */ |
|
3745 TUint CCamera::CCameraAdvancedSettings::TECamLEDSpecialEffectStep::Version() const |
|
3746 { |
|
3747 return iVersion; |
|
3748 } |
|
3749 |
|
3750 /** |
|
3751 Constructor for the TContinuousZoomSupportInfo class. |
|
3752 Sets the size and version of this class. |
|
3753 */ |
|
3754 EXPORT_C CCamera::CCameraAdvancedSettings::TContinuousZoomSupportInfo::TContinuousZoomSupportInfo() |
|
3755 { |
|
3756 iSize = sizeof(CCamera::CCameraAdvancedSettings::TContinuousZoomSupportInfo); |
|
3757 iVersion = KContinuousZoomSupportInfoCurrentVersion; |
|
3758 } |
|
3759 |
|
3760 /** |
|
3761 Returns the size of the class. Used for extensibility by deriving from this base class and adding new member variables. |
|
3762 Intended to be used for implementation of methods where this class reference is passed as function arguments. |
|
3763 Implementation of such methods can find out whether the actual class passed is the base or the derived one. For example, if a new application |
|
3764 is made to run on an old implementation, an error may occur once the old implementation detects this by getting |
|
3765 the size information of the T class passed. Also, if an old application is made to run on a new implementation, this can be |
|
3766 correctly handled if the derived class variables handling is done in a proper 'if-else' statement. |
|
3767 |
|
3768 @return The size of the class. |
|
3769 |
|
3770 @note The size will be modified when the T-class gets updated. |
|
3771 */ |
|
3772 EXPORT_C TUint CCamera::CCameraAdvancedSettings::TContinuousZoomSupportInfo::Size() const |
|
3773 { |
|
3774 return iSize; |
|
3775 } |
|
3776 |
|
3777 /** |
|
3778 Returns the version of the class. Used for extensibility specially when the class members are not added but the Reserved |
|
3779 members get used at a later stage. |
|
3780 |
|
3781 @return The version of the class. |
|
3782 |
|
3783 @note The version will be modified when the T-class gets updated. |
|
3784 */ |
|
3785 EXPORT_C TUint CCamera::CCameraAdvancedSettings::TContinuousZoomSupportInfo::Version() const |
|
3786 { |
|
3787 return iVersion; |
|
3788 } |
|
3789 |
|
3790 /** |
|
3791 Constructor for the TContinuousZoomParameters class. |
|
3792 Sets the size and version of this class. |
|
3793 */ |
|
3794 EXPORT_C CCamera::CCameraAdvancedSettings::TContinuousZoomParameters::TContinuousZoomParameters() |
|
3795 { |
|
3796 iSize = sizeof(CCamera::CCameraAdvancedSettings::TContinuousZoomParameters); |
|
3797 iVersion = KContinuousZoomParametersCurrentVersion; |
|
3798 } |
|
3799 |
|
3800 /** |
|
3801 Returns the size of the class. Used for extensibility by deriving from this base class and adding new member variables. |
|
3802 Intended to be used for implementation of methods where this class reference is passed as function arguments. |
|
3803 Implementation of such methods can find out whether the actual class passed is the base or the derived one. For example, if a new application |
|
3804 is made to run on an old implementation, an error may occur once the old implementation detects this by getting |
|
3805 the size information of the T class passed. Also, if an old application is made to run on a new implementation, this can be |
|
3806 correctly handled if the derived class variables handling is done in a proper 'if-else' statement. |
|
3807 |
|
3808 @return The size of the class. |
|
3809 |
|
3810 @note The size will be modified when the T-class gets updated. |
|
3811 */ |
|
3812 EXPORT_C TUint CCamera::CCameraAdvancedSettings::TContinuousZoomParameters::Size() const |
|
3813 { |
|
3814 return iSize; |
|
3815 } |
|
3816 |
|
3817 /** |
|
3818 Returns the version of the class. Used for extensibility specially when the class members are not added but the Reserved |
|
3819 members get used at a later stage. |
|
3820 |
|
3821 @return The version of the class. |
|
3822 |
|
3823 @note The version will be modified when the T-class gets updated. |
|
3824 */ |
|
3825 EXPORT_C TUint CCamera::CCameraAdvancedSettings::TContinuousZoomParameters::Version() const |
|
3826 { |
|
3827 return iVersion; |
|
3828 } |
|
3829 |
|
3830 |
|
3831 /** |
|
3832 Factory function that creates a new continuous zoom object. |
|
3833 |
|
3834 @param aObserver |
|
3835 Continuous zoom observer which is passed to the implementation so it can provide callbacks to the client. |
|
3836 |
|
3837 @param aContinuousZoomType |
|
3838 The continuous zoom type that the implementation will be initialised with. |
|
3839 |
|
3840 @param aImplFactory |
|
3841 A constant reference to the MImplementationFactory derived object. |
|
3842 |
|
3843 @leave KErrNoMemory if out of memory; also any system wide error. |
|
3844 |
|
3845 @return A pointer to a fully constructed continuous zoom object. |
|
3846 */ |
|
3847 CCamera::CCameraContinuousZoom* CCamera::CCameraContinuousZoom::CreateL(MContinuousZoomObserver& aObserver, CCamera::CCameraAdvancedSettings::TContinuousZoomType aContinuousZoomType, const MImplementationFactory& aImplFactory) |
|
3848 { |
|
3849 CCameraContinuousZoom* self = new (ELeave) CCameraContinuousZoom(); |
|
3850 CleanupStack::PushL(self); |
|
3851 self->ConstructL(aObserver, aContinuousZoomType, aImplFactory); |
|
3852 CleanupStack::Pop(self); |
|
3853 return self; |
|
3854 } |
|
3855 |
|
3856 /** |
|
3857 CCameraContinuousZoom Constructor. |
|
3858 */ |
|
3859 CCamera::CCameraContinuousZoom::CCameraContinuousZoom() |
|
3860 : iImpl(NULL) |
|
3861 { |
|
3862 } |
|
3863 |
|
3864 /** |
|
3865 CCameraContinuousZoom second phase constructor. |
|
3866 |
|
3867 Function used to initialise internal state of the object. |
|
3868 |
|
3869 @param aObserver |
|
3870 Continuous zoom observer which is passed to the implementation so it can provide callbacks to the client. |
|
3871 |
|
3872 @param aContinuousZoomType |
|
3873 The continuous zoom type that the implementation will be initialised with. |
|
3874 |
|
3875 @param aImplFactory |
|
3876 A constant reference to the MImplementationFactory derived object. |
|
3877 |
|
3878 @leave KErrNoMemory Out of memory. |
|
3879 */ |
|
3880 void CCamera::CCameraContinuousZoom::ConstructL(MContinuousZoomObserver& aObserver, CCamera::CCameraAdvancedSettings::TContinuousZoomType aContinuousZoomType, const MImplementationFactory& aImplFactory) |
|
3881 { |
|
3882 TAny* implPtr = NULL; |
|
3883 TInt zoomTypeValue = static_cast<TInt>(aContinuousZoomType); |
|
3884 TECamImplFactoryParam param(zoomTypeValue); |
|
3885 |
|
3886 User::LeaveIfError(aImplFactory.GetImpl1(implPtr, KECamMCameraContinuousZoomUid, param)); |
|
3887 |
|
3888 iImpl = static_cast<MCameraContinuousZoom*>(implPtr); |
|
3889 |
|
3890 iImpl->SetContinuousZoomObserverAndHandle(aObserver, this); |
|
3891 } |
|
3892 |
|
3893 /** |
|
3894 Destructor |
|
3895 */ |
|
3896 EXPORT_C CCamera::CCameraContinuousZoom::~CCameraContinuousZoom() |
|
3897 { |
|
3898 if(iImpl != NULL) |
|
3899 { |
|
3900 iImpl->Release(); |
|
3901 } |
|
3902 } |
|
3903 |
|
3904 /** |
|
3905 Starts the continuous zoom operation. Clients wil receive MContinuousZoomObserver::ContinuousZoomProgress() callback for intermediate |
|
3906 zoom factors achieved. Depending on the implementation, the client may or may not receive this callback for every intermediate zoom factor. |
|
3907 Upon completion, the client will receive MContinuousZoomObserver::ContinuousZoomComplete() callback. |
|
3908 |
|
3909 @param aContinuousZoomParameters |
|
3910 The desired parameters to be used for the continuous zoom operation. |
|
3911 |
|
3912 @note If the implementation does not support re-configuring of zoom parameters whilst an existing continuous zoom operation is active then |
|
3913 StartContinuousZoomL() will leave with KErrInUse. |
|
3914 |
|
3915 @note If client has selected EDirectionTele zoom direction and the current zoom factor is greater than the target zoom factor, StartContinuousZoomL() |
|
3916 will leave with KErrArgument. Similarly, StartContinuousZoomL() will also leave with KErrArgument if client has selected EDirectionWide zoom |
|
3917 direction and current zoom factor is less than target zoom factor. |
|
3918 |
|
3919 @leave May leave with any error code. |
|
3920 */ |
|
3921 EXPORT_C void CCamera::CCameraContinuousZoom::StartContinuousZoomL(CCamera::CCameraAdvancedSettings::TContinuousZoomParameters aContinuousZoomParameters) |
|
3922 { |
|
3923 iImpl->StartContinuousZoomL(aContinuousZoomParameters); |
|
3924 } |
|
3925 |
|
3926 /** |
|
3927 Stop any exisiting continuous zoom operation. |
|
3928 Since this method is synchronous, no callback shall be issued for the concerned continuous zoom operation. |
|
3929 */ |
|
3930 EXPORT_C void CCamera::CCameraContinuousZoom::StopContinuousZoom() |
|
3931 { |
|
3932 iImpl->StopContinuousZoom(); |
|
3933 } |
|
3934 |
|
3935 /** |
|
3936 Retrieves information about the supported settings related to continuous zoom support. |
|
3937 |
|
3938 @param aContinuousZoomInfo |
|
3939 The information of supported continuous zoom functionality. |
|
3940 |
|
3941 @leave May leave with any error code. |
|
3942 */ |
|
3943 EXPORT_C void CCamera::CCameraContinuousZoom::GetContinuousZoomSupportInfoL(CCamera::CCameraAdvancedSettings::TContinuousZoomSupportInfo& aContinuousZoomInfo) const |
|
3944 { |
|
3945 iImpl->GetContinuousZoomSupportInfoL(aContinuousZoomInfo); |
|
3946 } |
|
3947 |
|
3948 /** |
|
3949 Retrieves the unique id of the continuous zoom object. |
|
3950 This is used to identify the continuous zoom handle returned to clients via the MContinuousZoomObserver callback. |
|
3951 |
|
3952 @param aZoomId |
|
3953 The unique id of this Continuous Zoom object. |
|
3954 */ |
|
3955 EXPORT_C void CCamera::CCameraContinuousZoom::GetContinuousZoomId(TInt& aZoomId) const |
|
3956 { |
|
3957 iImpl->GetContinuousZoomId(aZoomId); |
|
3958 } |