|
1 /* |
|
2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Class for managing intercommunication between Camcera UI* |
|
15 */ |
|
16 |
|
17 |
|
18 #ifndef CAMAPPCONTROLLER_H |
|
19 #define CAMAPPCONTROLLER_H |
|
20 |
|
21 |
|
22 // =========================================================================== |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <ProductVariant.hrh> |
|
26 |
|
27 #include <cflistener.h> // publish zoom state related |
|
28 #include <cfclient.h> |
|
29 |
|
30 #include <sensrvdatalistener.h> |
|
31 #include <sensrvchannel.h> |
|
32 #include <sensrvorientationsensor.h> |
|
33 |
|
34 #include "MCamAppController.h" |
|
35 #include "CamControllerObservers.h" |
|
36 #include "mcamsettingsmodelobserver.h" |
|
37 #include "CamSettings.hrh" |
|
38 #include "Cam.hrh" // TCamSoundId |
|
39 #include "CamSettingsInternal.hrh" |
|
40 |
|
41 #include "mcamplayerobserver.h" |
|
42 |
|
43 #include "CamImageSaveActive.h" |
|
44 #include "CamCallStateAo.h" |
|
45 #include "CamObserver.h" |
|
46 #include "CamBurstModeObserver.h" |
|
47 #include "CamPerformance.h" |
|
48 |
|
49 #ifndef __WINSCW__ |
|
50 #include <rlocationtrail.h> |
|
51 #endif |
|
52 |
|
53 #include "CamPropertyObserver.h" |
|
54 |
|
55 // <CAMERAAPP_CAPI_V2_MIGRATION> |
|
56 #include "mcamcameraobserver.h" |
|
57 #include "camcamerarequests.h" |
|
58 #include "camfolderutility.h" |
|
59 #include "camcameracontroller.h" |
|
60 #include "CamDriveChangeNotifier.h" |
|
61 #include "CamSyncRotatorAo.h" |
|
62 |
|
63 |
|
64 // =========================================================================== |
|
65 // CONSTANTS |
|
66 |
|
67 // !Do not change the order of these without careful consideration! |
|
68 // |
|
69 enum TCamCameraState |
|
70 { |
|
71 ECamCameraIdle = 0, |
|
72 ECamCameraReserved = 1 << 0, |
|
73 ECamCameraPowerOn = 1 << 1, |
|
74 ECamCameraPreparedImage = 1 << 2, |
|
75 ECamCameraPreparedVideo = 1 << 3, |
|
76 ECamCameraStateLast // Not valid state, only marker |
|
77 }; |
|
78 |
|
79 /** |
|
80 * Flags for ongoing operations |
|
81 */ |
|
82 enum TCamBusyFlags |
|
83 { |
|
84 EBusyNone = 0, |
|
85 EBusyRequest = 1<<0, |
|
86 EBusySequence = 1<<1, |
|
87 EBusySetting = 1<<2, |
|
88 EBusyLast // Marker |
|
89 }; |
|
90 |
|
91 |
|
92 // =========================================================================== |
|
93 // FORWARD DECLARATIONS |
|
94 class CRepository; |
|
95 //class CCamSettingsModelBase; |
|
96 class MCamAppController; |
|
97 class MCamSettingsModel; |
|
98 class MCamSettingPreviewHandler; // <CAMERAAPP_CAPI_V2_MIGRATION/> |
|
99 //class CCamConstantSettingProvider; // <CAMERAAPP_CAPI_V2_MIGRATION/> |
|
100 class CCamSettingProvider; // <CAMERAAPP_CAPI_V2_MIGRATION/> |
|
101 class CCamTimer; |
|
102 class CCamObserverHandler; |
|
103 class CCamBurstCaptureArray; |
|
104 class CCamAudioPlayerController; |
|
105 class MCamStaticSettings; |
|
106 class CCamGSInterface; |
|
107 class CCameraUiConfigManager; |
|
108 class CCamPropertyWatcher; |
|
109 |
|
110 |
|
111 |
|
112 class CCamFlashStatus; |
|
113 class CCamConfiguration; |
|
114 class CCFClient; |
|
115 |
|
116 // =========================================================================== |
|
117 // CLASS DECLARATION |
|
118 |
|
119 class TCamAppControllerInfo |
|
120 { |
|
121 public: |
|
122 TCamAppControllerInfo(); |
|
123 |
|
124 public: |
|
125 TCamActiveCamera iActiveCamera; |
|
126 |
|
127 TCamCameraMode iMode; |
|
128 TCamCameraMode iTargetMode; |
|
129 |
|
130 TCamImageCaptureMode iImageMode; // ECamImageCaptureNone in video controller mode |
|
131 TCamImageCaptureMode iTargetImageMode; |
|
132 |
|
133 TCamCaptureOperation iOperation; // Current operation |
|
134 |
|
135 // Target viewfinder state and mode |
|
136 TCamCameraTriState iTargetVfState; |
|
137 TBool iViewfinderMirror; // set when viewfinder initialized |
|
138 |
|
139 // Target image parameters |
|
140 TInt iTargetImageResolution; |
|
141 TInt iTargetImageQuality; |
|
142 |
|
143 // Target video parameters |
|
144 /** not supported yet */ |
|
145 |
|
146 // Request being handled |
|
147 TCamCameraRequestId iBusyRequestId; |
|
148 }; |
|
149 |
|
150 |
|
151 /** |
|
152 * Handle intercommunication between camcorder UI and engine. |
|
153 * |
|
154 * @since 2.8 |
|
155 */ |
|
156 class CCamAppController : public CBase, |
|
157 public MCamAppController, |
|
158 public MCamSettingsModelObserver, |
|
159 public MCamCameraObserver, |
|
160 public MCamImageSaveObserver, |
|
161 public MCamCallStateObserver, |
|
162 public MPropertyObserver, |
|
163 public MSensrvDataListener, |
|
164 public MCamPlayerObserver, |
|
165 public MCamObserver, |
|
166 public MCamBurstModeObserver, |
|
167 public MCFListener |
|
168 ,public MCamDriveChangeNotifierObserver |
|
169 ,public MBitmapRotationObserver |
|
170 |
|
171 { |
|
172 public: // Constructors and destructor |
|
173 |
|
174 /** |
|
175 * Two-phased constructor. |
|
176 * @since 2.8 |
|
177 * @return pointer to the created CCamAppController object |
|
178 */ |
|
179 static CCamAppController* NewL(); |
|
180 |
|
181 |
|
182 /** |
|
183 * Complete construction of the engine and issue notification requests. |
|
184 * The camera engine cannot be instantiated until the application |
|
185 * orientation has been set by the CCamAppUi. This does not |
|
186 * exist when the CCamAppController is constructed. CompleteConstructionL |
|
187 * must be called in the CCamAppUi::ConstructL() |
|
188 * @since 3.0 |
|
189 */ |
|
190 void CompleteConstructionL(); |
|
191 |
|
192 |
|
193 /** |
|
194 * Destructor. |
|
195 * @since 2.8 |
|
196 */ |
|
197 virtual ~CCamAppController(); |
|
198 |
|
199 public: |
|
200 /** |
|
201 * Calls CamSettingModel to save user defined FT setting |
|
202 * @since S60 5.0 |
|
203 * @param None |
|
204 * @return None |
|
205 */ |
|
206 void StoreFaceTrackingValue(); |
|
207 |
|
208 // ------------------------------------------------------- |
|
209 // From MCamCameraObserver |
|
210 public: |
|
211 |
|
212 virtual void HandleCameraEventL( TInt aStatus, |
|
213 TCamCameraEventId aEventId, |
|
214 TAny* aEventData /*= NULL*/ ); |
|
215 |
|
216 |
|
217 |
|
218 // ------------------------------------------------------- |
|
219 // from MCamSettingsModelObserver |
|
220 public: |
|
221 |
|
222 virtual void IntSettingChangedL( TCamSettingItemIds aSettingItem, |
|
223 TInt aSettingValue ); |
|
224 virtual void TextSettingChangedL( TCamSettingItemIds aSettingItem, |
|
225 const TDesC& aSettingValue ); |
|
226 |
|
227 |
|
228 // ------------------------------------------------------- |
|
229 // from MCamBurstModeObserver |
|
230 |
|
231 /** |
|
232 * Burst mode activation has changed |
|
233 * @since 2.8 |
|
234 * @param aActive whether or not burst mode is active |
|
235 * @param aStillModeActive whether or not still capture is active |
|
236 */ |
|
237 virtual void BurstModeActiveL( TBool aActive, TBool aStillModeActive ); |
|
238 |
|
239 // ------------------------------------------------------- |
|
240 // from MCamAudioPlayerObserver |
|
241 virtual void PlayComplete( TInt aStatus, TInt aSoundId ); |
|
242 |
|
243 |
|
244 // ------------------------------------------------------- |
|
245 public: |
|
246 // From MCFListener ( Context framework for publishing zoom state. |
|
247 /** |
|
248 * Indicates a change in context for subscribed clients. |
|
249 * If client has subscribed to partial context class path, |
|
250 * only the changed context will be indicated. |
|
251 * |
|
252 * @since S60 4.0 |
|
253 * @param aIndication: Context indication. |
|
254 * @return None |
|
255 */ |
|
256 inline void ContextIndicationL( |
|
257 const CCFContextIndication& /*aChangedContext*/ ) {}; |
|
258 |
|
259 /** |
|
260 * Indicates that specified action is needed to be executed. |
|
261 * When action indication is received certain rule has been triggered |
|
262 * and action is needed to be performed. |
|
263 * |
|
264 * @since S60 4.0 |
|
265 * @param aActionToExecute Action indication. |
|
266 * @return None |
|
267 */ |
|
268 inline void ActionIndicationL( |
|
269 const CCFActionIndication& /*aActionToExecute*/ ) {}; |
|
270 |
|
271 /** |
|
272 * Indicates that error has occured. |
|
273 * @since S60 4.0 |
|
274 * @param aError Error code. |
|
275 * @return None |
|
276 */ |
|
277 inline void HandleContextFrameworkError( TCFError /*aError*/, |
|
278 const TDesC& /*aSource*/, |
|
279 const TDesC& /*aType*/ ){}; |
|
280 |
|
281 /** |
|
282 * Returns an extension interface. |
|
283 * The extension interface is mapped with the extension UID. |
|
284 * |
|
285 * If the client does not support the requested interface, |
|
286 * client must return NULL. Otherwise client needs to return |
|
287 * the correct interface combined with the UID. |
|
288 * |
|
289 * @since S60 5.0 |
|
290 * @param aExtensionUid: The identifier of the extension. |
|
291 * @return Pointer to the extension. |
|
292 */ |
|
293 inline TAny* Extension( const TUid& /*aExtensionUid*/ ) const { return NULL; }; |
|
294 |
|
295 // New Function |
|
296 |
|
297 /* |
|
298 * Method to publish the zoom key and setting the |
|
299 * value or the state to enabled or disabled. |
|
300 * @Paran aEnabled used to set the the state of zoom key |
|
301 * to be enabled or disabled. |
|
302 */ |
|
303 void PublishZoomStateL( const TBool aEnabled ); |
|
304 |
|
305 public: |
|
306 |
|
307 /** |
|
308 * Returns whether or not the current profile is silent |
|
309 * @since 3.0 |
|
310 * @return ETrue if current profile is silent |
|
311 */ |
|
312 TBool IsProfileSilent(); |
|
313 |
|
314 /** |
|
315 * Returns whether or not we have touch screen support in the device |
|
316 * @return ETrue if device supports touch screen |
|
317 */ |
|
318 TBool IsTouchScreenSupported(); |
|
319 |
|
320 /** |
|
321 * Returns whether or not we have direct screen viewfinder support in the device |
|
322 * @return ETrue if device supports direct screen viewfinder |
|
323 */ |
|
324 TBool IsDirectScreenVFSupported( TBool aPrimaryCamera = ETrue ); |
|
325 |
|
326 // --------------------------------------------------------------------------- |
|
327 //Helper function for making notification about deleted files |
|
328 //Added this method to do notification if files have been |
|
329 //deleted outside camera application and then camera is |
|
330 //put back to foreground in postcapture view. |
|
331 //Security note. Contents of the files might have been |
|
332 //changed when camera was in background. |
|
333 // --------------------------------------------------------------------------- |
|
334 // |
|
335 void MediaFileChangedNotification(); |
|
336 |
|
337 TBool EngineRequestsPending() const; |
|
338 /** |
|
339 * Set settings restore to be done at earliest |
|
340 * convenient time. |
|
341 */ |
|
342 void SetSettingsRestoreNeeded(); |
|
343 |
|
344 /** |
|
345 * Set the flag to indicate that the original values |
|
346 * of remaining images is stored |
|
347 */ |
|
348 void SetRemainingImageStored(); |
|
349 |
|
350 /** |
|
351 * Returns the flag that indicates if the original value |
|
352 * of remaing images is stored or not. |
|
353 */ |
|
354 TBool IsRemainingImageStored() const; |
|
355 |
|
356 /** |
|
357 * Return whether saving is still in progress. |
|
358 */ |
|
359 TBool IsSavingInProgress() const; |
|
360 |
|
361 /** |
|
362 * Return if settings restore is set pending. |
|
363 */ |
|
364 TBool IsSettingsRestoreNeeded() const; |
|
365 |
|
366 |
|
367 void RestartTimeLapseTimerL(); |
|
368 |
|
369 |
|
370 static TInt CamerasAvailable(); |
|
371 |
|
372 /** |
|
373 * Is time lapse supported. |
|
374 * Value read from Central Repository. |
|
375 */ |
|
376 TBool TimeLapseSupported(); |
|
377 |
|
378 /** |
|
379 * Is time lapse supported. |
|
380 * Value read from Central Repository. |
|
381 */ |
|
382 TBool AlwaysOnSupported(); |
|
383 |
|
384 /** |
|
385 * Release version number. |
|
386 * Value read from Central Repository. |
|
387 */ |
|
388 const TVersion& Version(); |
|
389 |
|
390 /*** |
|
391 * Can a new request be made to controller or not. |
|
392 * Shutdown may be requested at any moment. |
|
393 */ |
|
394 TBool Busy() const; |
|
395 |
|
396 /** |
|
397 * Returns true if the last captured image was saved |
|
398 * @since 2.8 |
|
399 * @return ETrue if the last captured image has been saved. |
|
400 */ |
|
401 TBool SavedCurrentImage() const; |
|
402 |
|
403 /** |
|
404 * Rename image/video. |
|
405 * @since 2.8 |
|
406 * @param aNewName the new name for the current capture array file. |
|
407 * @param aMode the current capture mode. |
|
408 * @return ETrue if the file has been renamed successfully. |
|
409 */ |
|
410 TBool RenameCurrentFileL( const TDesC& aNewName, |
|
411 const TCamCameraMode& aMode ); |
|
412 |
|
413 /** |
|
414 * Add a controller observer. |
|
415 * @since 2.8 |
|
416 * @param aObserver Pointer to an object implementing |
|
417 * MCamControllerObserver |
|
418 * @return ?description |
|
419 */ |
|
420 void AddControllerObserverL( const MCamControllerObserver* aObserver ); |
|
421 |
|
422 /** |
|
423 * Remove a controller observer |
|
424 * @since 2.8 |
|
425 * @param aObserver Pointer to the observer to remove. The object |
|
426 * does not have to be added as an observer. |
|
427 */ |
|
428 void RemoveControllerObserver |
|
429 ( const MCamControllerObserver* aObserver ); |
|
430 |
|
431 /** |
|
432 * Add camera observer. |
|
433 * Forwards call to CCamCameraController. |
|
434 * @see CCamCameraController for more details. |
|
435 */ |
|
436 void AddCameraObserverL( const MCamCameraObserver* aObserver, |
|
437 const TUint& aEventInterest ); |
|
438 |
|
439 /** |
|
440 * Removes camera observer. |
|
441 * Forwards call to CCamCameraController. |
|
442 * @see CCamCameraController for more details. |
|
443 */ |
|
444 void RemoveCameraObserver( const MCamCameraObserver* aObserver ); |
|
445 |
|
446 void AddSettingsObserverL( const MCamSettingsModelObserver* aObserver ); |
|
447 void RemoveSettingsObserver( const MCamSettingsModelObserver* aObserver ); |
|
448 |
|
449 TBool CameraControllerBusy() const; |
|
450 TUint CameraControllerState() const; |
|
451 |
|
452 TCamCameraState CameraState() const; |
|
453 TCamCameraMode CurrentMode() const; |
|
454 TCamCameraMode TargetMode() const; |
|
455 TCamImageCaptureMode CurrentImageModeSetup() const; |
|
456 TCamCaptureOperation CurrentOperation() const; |
|
457 TCamCaptureOperation CurrentImageOperation() const; |
|
458 TCamCaptureOperation CurrentVideoOperation() const; |
|
459 TCamImageCaptureMode CurrentImageMode() const; |
|
460 |
|
461 |
|
462 TInt CaptureLimit() const; |
|
463 TInt CaptureLimitSetting() const; |
|
464 void SetCaptureLimitL( TInt aLimit ); |
|
465 |
|
466 /** |
|
467 * From MBitmapRotationObserver |
|
468 * Notification of bitmap rotation complete events |
|
469 * @param aErr KErrNone if successful |
|
470 */ |
|
471 void RotationCompleteL( TInt aErr ); |
|
472 |
|
473 private: |
|
474 void ReadVariantFlagsL(); |
|
475 |
|
476 |
|
477 void SetMode( const TCamCameraMode& aNewMode ); |
|
478 void SetTargetMode( const TCamCameraMode& aNewMode ); |
|
479 |
|
480 void SetImageMode( const TCamImageCaptureMode& aNewMode ); |
|
481 void SetTargetImageMode( const TCamImageCaptureMode& aNewMode ); |
|
482 |
|
483 void SetOperation( TCamCaptureOperation aNewOperation, |
|
484 TInt aError = KErrNone ); |
|
485 |
|
486 TCamCameraTriState ViewfinderTargetState() const; |
|
487 |
|
488 |
|
489 public: |
|
490 /* |
|
491 * Handle to Camera Ui Config Manager |
|
492 */ |
|
493 CCameraUiConfigManager* UiConfigManagerPtr(); |
|
494 |
|
495 /* |
|
496 * De-register harvester client events. |
|
497 */ |
|
498 void DeRegisterHarverterClientEvents(); |
|
499 |
|
500 /** |
|
501 * Return resource id for video viewfinder layout |
|
502 * @since 3.0 |
|
503 * @param aResolution for current resolution |
|
504 * @return Resource id for video viewfinder layout |
|
505 */ |
|
506 TInt VideoViewFinderResourceId( TCamVideoResolution aResolution ); |
|
507 |
|
508 /** |
|
509 * Start the viewfinder for the specified mode |
|
510 * as soon as the engine is intialised |
|
511 * @since 2.8 |
|
512 * @param aMode The viewfinder mode being entered |
|
513 */ |
|
514 void EnterViewfinderMode( const TCamCameraMode& aMode ); |
|
515 |
|
516 /** |
|
517 * ExitViewinderMode |
|
518 * @since 2.8 |
|
519 * @param aMode The viewfinder mode being exited |
|
520 */ |
|
521 void ExitViewfinderMode( const TCamCameraMode& aMode ); |
|
522 |
|
523 /** |
|
524 * FreezeViewFinder |
|
525 * @since 2.8 |
|
526 * @param aFreeze Whether or not the viewfinder is |
|
527 * being frozen after this frame |
|
528 */ |
|
529 void FreezeViewFinder( TBool aFreeze ); |
|
530 |
|
531 /** |
|
532 * Return number of images that can still be captured |
|
533 * @since 2.8 |
|
534 * @param aStorage storage location - defaults to current loation |
|
535 * @param aBurstActive - set to ETrue if burst mode is active |
|
536 * @return the number of images |
|
537 */ |
|
538 TInt ImagesRemaining( TCamMediaStorage aStorage, |
|
539 TBool aBurstActive ); |
|
540 |
|
541 /** |
|
542 * Return number of images that can still be captured for a particular |
|
543 * image quality |
|
544 * @since 2.8 |
|
545 * @param aStorage storage location - defaults to current loation |
|
546 * @param aBurstActive - set to ETrue if burst mode is active |
|
547 * @param aQualityIndex - index of the image quality |
|
548 * @return the number of images |
|
549 */ |
|
550 TInt ImagesRemaining( TCamMediaStorage aStorage, |
|
551 TBool aBurstActive, |
|
552 TInt aQualityIndex ); |
|
553 |
|
554 /** |
|
555 * Return amount of video that has been captured |
|
556 * @since 2.8 |
|
557 * @return the amount of video in micro secs |
|
558 */ |
|
559 TTimeIntervalMicroSeconds RecordTimeElapsed() const; |
|
560 |
|
561 |
|
562 /** |
|
563 * Set amount of video that has been captured |
|
564 * @param aElapsed - recorded video time. |
|
565 */ |
|
566 void RecordTimeElapsed(TTimeIntervalMicroSeconds aElapsed ); |
|
567 |
|
568 |
|
569 /* |
|
570 * Return amount of video that can still be captured |
|
571 * @since 2.8 |
|
572 * @return the amount of video in secs |
|
573 */ |
|
574 TTimeIntervalMicroSeconds RecordTimeRemaining(); |
|
575 |
|
576 /** |
|
577 * Updates the interval used in next TimeLapse capture |
|
578 * @since 3.0 |
|
579 * @param aInterval The new interval to use |
|
580 */ |
|
581 void SetTimeLapseInterval( TTimeIntervalMicroSeconds aInterval ); |
|
582 |
|
583 /** |
|
584 * Returns the interval used in next TimeLapse capture |
|
585 * @since 3.0 |
|
586 * @return The current time lapse interval in microseconds |
|
587 */ |
|
588 TTimeIntervalMicroSeconds TimeLapseInterval(); |
|
589 |
|
590 /** |
|
591 * Returns the remaining time lapse interval until the next capture |
|
592 * @since 3.0 |
|
593 * @return The remaining time to the next timelapse capture |
|
594 */ |
|
595 TTimeIntervalMicroSeconds TimeLapseCountdown(); |
|
596 |
|
597 /** |
|
598 * Start the autofocus procedure |
|
599 * @since 2.8 |
|
600 */ |
|
601 void StartAutoFocus(); |
|
602 |
|
603 /** |
|
604 * Begin the capture procedure |
|
605 * @since 2.8 |
|
606 */ |
|
607 void Capture(); |
|
608 |
|
609 /** |
|
610 * Stop the burst capture operation |
|
611 * @since 2.8 |
|
612 */ |
|
613 void StopSequenceCaptureL(); |
|
614 |
|
615 /** |
|
616 * Whether or not a still capture operation is pending |
|
617 * i.e. a request to start still capture has been made and is |
|
618 * waiting for the focus operation to complete. |
|
619 * @since 2.8 |
|
620 * @return ETrue if a still capture operation is pending |
|
621 */ |
|
622 TBool CapturePending() const; |
|
623 |
|
624 /** |
|
625 * Whether or not a capture key pressed during image saving |
|
626 * @since 2.8 |
|
627 * @return ETrue if capture key is pressed during image saving |
|
628 */ |
|
629 TBool CaptureKeyPressedWhileImageSaving() const; |
|
630 |
|
631 /** |
|
632 * Stores shutter key press during saving image |
|
633 * @since 2.8 |
|
634 */ |
|
635 void SetCaptureKeyPressedWhileImageSaving(TBool aCaptureKeyPressed); |
|
636 |
|
637 /** |
|
638 * Whether or not a video recording operation is pending |
|
639 * i.e. a request to start video recording has been made and is |
|
640 * waiting for the engine to complete a video name update operation. |
|
641 * @since 2.8 |
|
642 * @return ETrue if a record operation is pending |
|
643 */ |
|
644 TBool VideoRecordPending() const; |
|
645 |
|
646 /** |
|
647 * Whether or not a sequence capture is in progress |
|
648 * @since 2.8 |
|
649 * @return ETrue if a sequence capture is in progress |
|
650 */ |
|
651 TBool SequenceCaptureInProgress() const; |
|
652 |
|
653 /** |
|
654 * Begin the recording procedure |
|
655 * @since 2.8 |
|
656 */ |
|
657 void StartVideoRecordingL(); |
|
658 |
|
659 /** |
|
660 * End the recording procedure |
|
661 * @since 2.8 |
|
662 */ |
|
663 void StopVideoRecording(); |
|
664 |
|
665 /** |
|
666 * End the recording procedure |
|
667 * @since 5.0 |
|
668 */ |
|
669 void StopVideoRecordingAsync(); |
|
670 |
|
671 /** |
|
672 * Store the cause of the video stop |
|
673 * @since 3.0 |
|
674 */ |
|
675 void SetVideoStoppedForPhoneApp( TBool aIsPhoneApp ); |
|
676 |
|
677 /** |
|
678 * Pause the recording procedure |
|
679 * @since 2.8 |
|
680 */ |
|
681 void PauseVideoRecording(); |
|
682 |
|
683 /** |
|
684 * Continue the recording procedure |
|
685 * @since 2.8 |
|
686 */ |
|
687 void ContinueVideoRecording(); |
|
688 |
|
689 /** |
|
690 * Issue AF request. |
|
691 */ |
|
692 TBool TryAFRequest( TInt aAFRequest ); |
|
693 |
|
694 /** |
|
695 * Cancel ongoing AutoFocus. |
|
696 */ |
|
697 void CancelAFNow(); |
|
698 |
|
699 /** |
|
700 * Cancel a requested capture |
|
701 * @since 2.8 |
|
702 */ |
|
703 void CancelFocusAndCapture(); |
|
704 |
|
705 /** |
|
706 * Return the current snapshot image |
|
707 * @since 2.8 |
|
708 * @return the current snapshot image |
|
709 */ |
|
710 const CFbsBitmap* SnapshotImage() const; |
|
711 |
|
712 /** |
|
713 * Sets the specified burst mode item as the current image, in |
|
714 * preparation for a Post-capture view of the image. |
|
715 * @since 2.8 |
|
716 * @param aIndex The index of the burst item in "CCamBurstCaptureArray" |
|
717 */ |
|
718 void SetAsCurrentImage( TInt aIndex ); |
|
719 |
|
720 /** |
|
721 * Get the user-visible name for next image. |
|
722 * @since 2.8 |
|
723 * @return file name for the current image or video without path or |
|
724 * extension |
|
725 */ |
|
726 const TDesC& CurrentImageName() const; |
|
727 |
|
728 /** |
|
729 * Delete the current image/video file |
|
730 * @since 2.8 |
|
731 * @param aNofity Should notification be sent to observers about |
|
732 * change in media files. When this call is made |
|
733 * several times in a row, it's worth to do the |
|
734 * notification only once. |
|
735 * @return KErrNone if delete successful, otherwise system-wide |
|
736 * error code |
|
737 */ |
|
738 TInt DeleteCurrentFile( TBool aNotify = ETrue ); |
|
739 |
|
740 /** |
|
741 * Delete the timelapse sequence files |
|
742 * @since 3.0 |
|
743 */ |
|
744 void DeleteTimeLapseFiles(); |
|
745 |
|
746 /** |
|
747 * Indicate whether or not the controller is actively engaged in still |
|
748 * or video capture - this includes paused video, saving photos/videos, |
|
749 * periods in between timelapse captures and pending captures |
|
750 * (captures that have been requested but not yet started) |
|
751 * @since 3.0 |
|
752 * @return EFalse if not currently capturing, otherwise ETrue |
|
753 */ |
|
754 TBool IsProcessingCapture(); |
|
755 |
|
756 /** |
|
757 * Complete current capture asap, then report completion to the observer |
|
758 * @since 3.0 |
|
759 * @param aObserver To be notified when the current capture process completes |
|
760 * @param aSafeCompletion ETrue if all captures should be saved. EFalse to complete |
|
761 * sooner and lose any images that have not yet begun to save |
|
762 */ |
|
763 void CompleteCaptureAndNotifyL( MCamObserver* aObserver, TBool aSafeCompletion ); |
|
764 |
|
765 /** |
|
766 * The application is closing. Complete any active operations then |
|
767 * exit the application. |
|
768 * @param aImmediateShutdown ETrue: shutdown immediately or |
|
769 * EFalse: wait for pending operations to complete. |
|
770 * @since 2.8 |
|
771 */ |
|
772 void EnterShutdownMode( TBool aImmediateShutdown ); |
|
773 |
|
774 /** |
|
775 * Whether or not the controller is in shutdown mode |
|
776 * @since 2.8 |
|
777 * @return ETrue if the controller is in shutdown mode else EFalse |
|
778 */ |
|
779 TBool IsInShutdownMode() const; |
|
780 |
|
781 /** |
|
782 * Returns true if AppUi has been constructed, and not yet |
|
783 * destructed. |
|
784 */ |
|
785 TBool IsAppUiAvailable() const; |
|
786 |
|
787 /** |
|
788 * Sets AppUi availablility (see IsAppUiAvailable()) |
|
789 */ |
|
790 void SetAppUiAvailable( TBool aAvailable ); |
|
791 |
|
792 |
|
793 /** |
|
794 * Called to return the range of supported zoom values |
|
795 * @since 2.8 |
|
796 * @param aMinZoom on return contains the minimum zoom value |
|
797 * @param aMaxZoom on return contains the maximum zoom value |
|
798 */ |
|
799 void GetZoomRange( TInt& aMinZoom, TInt& aMaxZoom ) const; |
|
800 |
|
801 /** |
|
802 * Called to return current zoom value |
|
803 * @since 2.8 |
|
804 * @return the current zoom value |
|
805 */ |
|
806 TInt ZoomValue() const; |
|
807 |
|
808 /** |
|
809 * Sets the current zoom value |
|
810 * @since 2.8 |
|
811 * @param aValue the new zoom value to be used |
|
812 */ |
|
813 void SetZoomValue( TInt aValue ); |
|
814 |
|
815 /** |
|
816 * Resets all user scene settings to their defaults. |
|
817 * @since 2.8 |
|
818 */ |
|
819 void ResetUserSceneL(); |
|
820 |
|
821 /** |
|
822 * Previews a new value for the specified integer setting |
|
823 * @param aSettingItem specifies which setting item that want |
|
824 * to preview. |
|
825 * @param aSettingValue the new integer value for the specified |
|
826 * setting item to be previewed. |
|
827 * @since 2.8 |
|
828 */ |
|
829 void PreviewSettingChangeL( TInt aSettingItem, TInt aSettingValue ); |
|
830 |
|
831 /** |
|
832 * Cancels all preview changes, since last commit/cancel. |
|
833 * @since 2.8 |
|
834 */ |
|
835 void CancelPreviewChangesL(); |
|
836 |
|
837 /** |
|
838 * Commits last preview change. |
|
839 * @since 2.8 |
|
840 */ |
|
841 void CommitPreviewChanges(); |
|
842 |
|
843 /** |
|
844 * Re-prepare video after e.g. a setting change requires this. |
|
845 */ |
|
846 void RePrepareVideoL(); |
|
847 |
|
848 /** |
|
849 * Returns the current integer value for the specified setting |
|
850 * @return the current integer setting value |
|
851 * @param aSettingItem specifies which setting item that want |
|
852 * the value of. |
|
853 * @since 2.8 |
|
854 */ |
|
855 TInt IntegerSettingValue( TInt aSettingItem ) const; |
|
856 |
|
857 /** |
|
858 * Returns the current integer value for the specified setting |
|
859 * without the filtering usually performed on storage location. |
|
860 * This is neccesary to allow the video/photo settings list to show |
|
861 * the selected storage location rather than the forced storage location. |
|
862 * @return the current integer setting value |
|
863 * @param aSettingItem specifies which setting item that want the value of. |
|
864 * @since 2.8 |
|
865 */ |
|
866 TInt IntegerSettingValueUnfiltered( TInt aSettingItem ) const; |
|
867 |
|
868 /** |
|
869 * Sets a new value for the specified integer setting |
|
870 * @param aSettingItem specifies which setting item that want |
|
871 * to set the value of. |
|
872 * @param aSettingValue the new integer value for the specified |
|
873 * setting item. |
|
874 * @since 2.8 |
|
875 */ |
|
876 void SetIntegerSettingValueL( TInt aSettingItem, TInt aSettingValue ); |
|
877 |
|
878 /** |
|
879 * Sets pathnames for video and image files to point to the specified storage |
|
880 * @param aMediaStorage specifies phone memory or MMC |
|
881 * @since 2.8 |
|
882 */ |
|
883 void SetPathnamesToNewStorageL( TCamMediaStorage aMediaStorage ); |
|
884 |
|
885 /** |
|
886 * Sets a new text value for the specified setting |
|
887 * @param aSettingItem specifies which setting item that want to set |
|
888 * the text value of. |
|
889 * @param aSettingValue the new text value for the specified setting |
|
890 * item. |
|
891 * @since 2.8 |
|
892 */ |
|
893 void SetTextSettingValueL( TInt aSettingItem, |
|
894 const TDesC& aSettingValue ); |
|
895 |
|
896 |
|
897 /** |
|
898 * Returns the current text value for the specified setting |
|
899 * @return the current text setting value |
|
900 * @param aSettingItem specifies which setting item that want |
|
901 * the text value of. |
|
902 * @since 2.8 |
|
903 */ |
|
904 TPtrC TextSettingValue( TInt aSettingItem ) const; |
|
905 |
|
906 /** |
|
907 * Returns whether a particular setting value can be set or not. |
|
908 * @return ETrue if can be set. Otherwise, EFalse. |
|
909 * @param aSettingItem the setting item in question. |
|
910 * @param aSettingValue the value in question. |
|
911 * @since 2.8 |
|
912 */ |
|
913 TBool SettingValueEnabled( TInt aSettingItem, TInt aSettingValue ) const; |
|
914 |
|
915 /** |
|
916 * Loads the settings from shared data, or if unable to from the |
|
917 * resource file. |
|
918 * @param aIsEmbedded whether or not the application is running in |
|
919 * embedded mode. |
|
920 * @since 2.8 |
|
921 */ |
|
922 void LoadStaticSettingsL( TBool aIsEmbedded ); |
|
923 |
|
924 /** |
|
925 * Get the default value for a setting item. |
|
926 * @param aSettingId The id of the setting. |
|
927 * @return The default value for setting item or KErrNotFound if not found. |
|
928 */ |
|
929 TInt DynamicSettingDefaultValue( TInt aSettingId ) const; |
|
930 |
|
931 /** |
|
932 * Sets all dynamic settings to their defaults. |
|
933 * @since 2.8 |
|
934 */ |
|
935 void SetDynamicSettingsToDefaults(); |
|
936 |
|
937 /** |
|
938 * Sets a single dynamic setting to its default. |
|
939 * @since 2.8 |
|
940 */ |
|
941 void SetDynamicSettingToDefault(TInt aSettingItem); |
|
942 |
|
943 /** |
|
944 * Set scene default value to a dynamic setting. |
|
945 * @param aSceneId Id of the scene to use. |
|
946 * @param aSceneField Id of scene field. |
|
947 * @param aSettingId If of the dynamic setting to set. |
|
948 * @param aVideoScene Does aSceneId refer to a video scene. |
|
949 * @return KErrNotFound, if setting could not be set. |
|
950 */ |
|
951 TInt SetDynamicSettingToSceneDefaultL( TInt aSceneId, |
|
952 TInt aSceneField, |
|
953 TInt aSettingId, |
|
954 TBool aVideoScene ); |
|
955 |
|
956 |
|
957 #ifdef PRODUCT_USES_GENERIC_SETUP_INDICATOR |
|
958 /** |
|
959 * Returns whether or not the video setup settings are set to the |
|
960 * defaults for its current scene. |
|
961 * @since 2.8 |
|
962 * @return ETrue if set to defaults. Otherwise, EFalse |
|
963 */ |
|
964 TBool VideoSceneDefaultsAreSet(); |
|
965 |
|
966 /** |
|
967 * Returns whether or not the photo setup settings are set to the |
|
968 * defaults for its current scene. |
|
969 * @since 2.8 |
|
970 * @return ETrue if set to defaults. Otherwise, EFalse |
|
971 */ |
|
972 TBool PhotoSceneDefaultsAreSet(); |
|
973 #endif // PRODUCT_USES_GENERIC_SETUP_INDICATOR |
|
974 |
|
975 /** |
|
976 * Returns the file name of the most recent saved image/video clip |
|
977 * @return Filename of most recent captured image/video |
|
978 * @since 2.8 |
|
979 */ |
|
980 const TDesC& CurrentFullFileName() const; |
|
981 |
|
982 /** |
|
983 * Get the current video filename. |
|
984 */ |
|
985 const TDesC& CurrentVideoFileName() const; |
|
986 |
|
987 /** |
|
988 * Returns a pointer to an array representing the images in a burst |
|
989 * capture |
|
990 * @return reference to the burst capture array |
|
991 * @since 2.8 |
|
992 */ |
|
993 CCamBurstCaptureArray* BurstCaptureArray() const; |
|
994 |
|
995 /** |
|
996 * Returns the number of non-deleted items in the array |
|
997 * @return count of non-deleted items |
|
998 * @since 2.8 |
|
999 */ |
|
1000 TInt CurrentItemCount(); |
|
1001 |
|
1002 /** |
|
1003 * Returns the number of burst capture moments that have taken |
|
1004 * place in a current burst. If no burst is active this returns |
|
1005 * 0 |
|
1006 * @return count of burst capture moments |
|
1007 * @since 3.0 |
|
1008 */ |
|
1009 TInt CurrentCapturedCount(); |
|
1010 |
|
1011 /** |
|
1012 * Returns the number of items in a timelapse sequence |
|
1013 * @return count of timelapse sequence items |
|
1014 * @since 3.0 |
|
1015 */ |
|
1016 TInt TimeLapseImageCount(); |
|
1017 |
|
1018 /** |
|
1019 * Resets the array of filenames used in timelapse capture |
|
1020 * @since 3.0 |
|
1021 */ |
|
1022 void ResetTimelapseArray(); |
|
1023 |
|
1024 /** |
|
1025 * Initiates the playing of the specified sound. |
|
1026 * @since 2.8 |
|
1027 * @param aSoundId The enum value of the sound to play |
|
1028 * @param aEnableCallback Whether we want a callback when play complete |
|
1029 */ |
|
1030 void PlaySound( TCamSoundId aSoundId, TBool aEnableCallback ); |
|
1031 |
|
1032 /** |
|
1033 * Initiates the playing of the specified tone |
|
1034 * @since 2.8 |
|
1035 * @param aToneHz The frequency of the tone to play in Hertz |
|
1036 * @param aLenMicSec The length of tone to play in microseconds |
|
1037 * @param aVolume The volume of the tone, range 0.0 to 1.0 |
|
1038 * @param aEnableCallback Whether to be called back when playback complete |
|
1039 */ |
|
1040 void PlayTone( TInt aToneHz, TInt aLenMicSec, TReal32 aVolume, TBool aEnableCallback ); |
|
1041 |
|
1042 /** |
|
1043 * Releases the camera hardware for other apps to use |
|
1044 * @since 2.8 |
|
1045 */ |
|
1046 void ReleaseCamera(); |
|
1047 |
|
1048 /** |
|
1049 * Increments the engine usage count |
|
1050 * @since 2.8 |
|
1051 */ |
|
1052 void IncCameraUsers(); |
|
1053 |
|
1054 /** |
|
1055 * Decrements the engine usage count If the engine is no longer required |
|
1056 * then it is released. If it is still processing, the engine count will |
|
1057 * be checked when the current process completes and the engine will be |
|
1058 * released if it is no longer needed. |
|
1059 * @since 2.8 |
|
1060 */ |
|
1061 void DecCameraUsers(); |
|
1062 |
|
1063 /* |
|
1064 * Gets the handle to the static settings model, which is used inturn by the |
|
1065 * plugin to call the interfaces for performing needed actions. |
|
1066 */ |
|
1067 MCamStaticSettings& StaticSettingsModel(); |
|
1068 |
|
1069 /* |
|
1070 * Check if image/video scene mode is supported |
|
1071 */ |
|
1072 TBool IsSceneSupported( const TInt aSceneId, TBool aPhotoScene = ETrue ) const; |
|
1073 |
|
1074 /** |
|
1075 * Whether a call is active, including the ringing state |
|
1076 * @since 2.8 |
|
1077 * @return ETrue if in call or ringing, else EFalse |
|
1078 */ |
|
1079 TBool InCallOrRinging() const; |
|
1080 |
|
1081 /** |
|
1082 * Whether a video call is active, including the ringing state |
|
1083 * @return ETrue if in videocall or ringing, else EFalse |
|
1084 */ |
|
1085 TBool InVideocallOrRinging(); |
|
1086 |
|
1087 /** |
|
1088 * Whether or not a video clip is currently being saved |
|
1089 * @since 2.8 |
|
1090 * @return ETrue if saving, else EFalse |
|
1091 */ |
|
1092 TBool CurrentlySavingVideo() const; |
|
1093 |
|
1094 /** |
|
1095 * Returns whether all the settings list options for a particular setting |
|
1096 * item are visible or not |
|
1097 * @since 2.8 |
|
1098 * @param aSettingItem The setting item to be checked. |
|
1099 * @param aRevisedResourceId Receives the id of a resource if the return |
|
1100 * value is EFalse. The resource contains the list of visible |
|
1101 * options. |
|
1102 * @return ETrue if all options are visible. Otherwise, EFalse. |
|
1103 */ |
|
1104 TBool AllOptionsVisibleForSettingItem( TInt aSettingItem, |
|
1105 TInt& aRevisedResourceId ); |
|
1106 |
|
1107 /** |
|
1108 * Switches the camera being used |
|
1109 * @since 2.8 |
|
1110 */ |
|
1111 void SwitchCameraL(); |
|
1112 |
|
1113 /** |
|
1114 * Returns the active camera |
|
1115 * @since 2.8 |
|
1116 * @return @return either primary, secondary or none ( if in process of switching ) |
|
1117 */ |
|
1118 TCamActiveCamera ActiveCamera() const; |
|
1119 |
|
1120 /** |
|
1121 * Whether we currently have a camera switch required |
|
1122 * @since 2.8 |
|
1123 * @return TCameraSwitchRequired a camera switch is required or not |
|
1124 */ |
|
1125 TCameraSwitchRequired CameraSwitchQueued() const; |
|
1126 |
|
1127 /** |
|
1128 * Check if exit is required |
|
1129 * @since 2.8 |
|
1130 * @return TBool True if exit is required |
|
1131 */ |
|
1132 TBool CheckExitStatus(); |
|
1133 |
|
1134 /** |
|
1135 * Informs the controller that an end key event is waiting |
|
1136 * to close the app, or has been acted upon |
|
1137 * This is used when the end key is pressed during sequence capture |
|
1138 * @since 2.8 |
|
1139 */ |
|
1140 void SetEndKeyExitWaiting( TBool aEndKeyWaiting ); |
|
1141 |
|
1142 /** |
|
1143 * Returns the status of the camera slide |
|
1144 * @since 2.8 |
|
1145 * @return the status of the camera slide |
|
1146 */ |
|
1147 TInt CameraSlideState() const; |
|
1148 |
|
1149 /** |
|
1150 * Informs the controller that a slider close event has |
|
1151 * been reacted to by 'pretending' to exit |
|
1152 * @since 2.8 |
|
1153 */ |
|
1154 void SliderCloseEventActioned(); |
|
1155 |
|
1156 /** |
|
1157 * Set camera switch to queue |
|
1158 */ |
|
1159 void SetCameraSwitchRequired( TCameraSwitchRequired aSwitchRequired ); |
|
1160 |
|
1161 /** |
|
1162 * Check slide state and schedule camera switch if required |
|
1163 * @since 2.8 |
|
1164 */ |
|
1165 void CheckSlideStatus(); |
|
1166 |
|
1167 |
|
1168 /** |
|
1169 * Return range of EV value supported for current product |
|
1170 * @since 3.0 |
|
1171 * @return TEvRange struct |
|
1172 */ |
|
1173 TCamEvCompRange EvRange() const; |
|
1174 |
|
1175 public: // Derived from MCamCallStateObserver base class |
|
1176 /** |
|
1177 * Callback for when the current phone call state changes |
|
1178 * @since 3.0 |
|
1179 * @param aState The new call state |
|
1180 * @param aError An error code associated with the event |
|
1181 */ |
|
1182 void CallStateChanged( TPSCTsyCallState aState, TInt aError ); |
|
1183 |
|
1184 /** |
|
1185 * Returns the file size of the specified file |
|
1186 * @since 3.0 |
|
1187 * @param aFilename The file to retrieve the size of. |
|
1188 * @return The size of the file or KErrNotFound |
|
1189 */ |
|
1190 TInt FileSize( TDesC& aFilename ) const; |
|
1191 |
|
1192 /** |
|
1193 * Returns whether the current scene uses forced |
|
1194 * autofocus (so no AF required at capture time) |
|
1195 * @since 3.0 |
|
1196 * @return ETrue if forced, EFalse if not |
|
1197 */ |
|
1198 TBool CurrentSceneHasForcedFocus() const; |
|
1199 |
|
1200 public: |
|
1201 |
|
1202 /** |
|
1203 * Get the actual resolution (WxH) of current image quality. |
|
1204 */ |
|
1205 TSize GetCurrentImageDimensions() const; |
|
1206 |
|
1207 /** |
|
1208 * Retrieves the current image resolution, taking into account |
|
1209 * the user settings and and modifications due to zoom state. |
|
1210 * @since 2.8 |
|
1211 * @returns The current image resolution. |
|
1212 */ |
|
1213 TCamPhotoSizeId GetCurrentImageResolution() const; |
|
1214 |
|
1215 /** |
|
1216 * Retrieves the current image compression |
|
1217 * @since 2.8 |
|
1218 * @returns The current image compression. |
|
1219 */ |
|
1220 TInt GetCurrentImageCompression() const; |
|
1221 |
|
1222 /** |
|
1223 * Retrieves the current video resolution. |
|
1224 * @since 2.8 |
|
1225 * @returns The current video resolution. |
|
1226 */ |
|
1227 TCamVideoResolution GetCurrentVideoResolution() const; |
|
1228 |
|
1229 /** |
|
1230 * Force use of phone memory storage |
|
1231 * @since 2.8 |
|
1232 */ |
|
1233 void UsePhoneMemoryL() const; |
|
1234 |
|
1235 /** |
|
1236 * Sets the correct memory to be used based on settings |
|
1237 * and availability of MMC. |
|
1238 * @since 4.0 |
|
1239 * @return ETrue if memory location changed |
|
1240 */ |
|
1241 TBool CheckMemoryToUseL(); |
|
1242 |
|
1243 /** |
|
1244 * Indicate whether the phone memory is being force-used |
|
1245 * because of un-availability or errors in MMC. |
|
1246 * @since 4.0 |
|
1247 */ |
|
1248 TBool IsPhoneMemoryForced(); |
|
1249 |
|
1250 /** |
|
1251 * Retrieves the current image resolution from Settings. |
|
1252 * @since 2.8 |
|
1253 * @returns The current image from Settings |
|
1254 */ |
|
1255 TCamPhotoSizeId SettingsPhotoResolution() const; |
|
1256 |
|
1257 |
|
1258 /** |
|
1259 * Indication that a view has finished using the capture array |
|
1260 * @since 2.8 |
|
1261 * @param aForcedRelease Should the array be released even if |
|
1262 * the apparent usage count is not null. |
|
1263 */ |
|
1264 void ReleaseArray( TBool aForcedRelease = EFalse ); |
|
1265 |
|
1266 /** |
|
1267 * Restore Camera settings to default |
|
1268 * @since 3.0 |
|
1269 * @param aIsEmbedded if app is embedded |
|
1270 */ |
|
1271 void RestoreFactorySettingsL( TBool aIsEmbedded ); |
|
1272 |
|
1273 private: |
|
1274 /** |
|
1275 * Called when playback of a sound has completed |
|
1276 * @since 2.8 |
|
1277 */ |
|
1278 void PlaySoundComplete(); |
|
1279 public: |
|
1280 |
|
1281 /** |
|
1282 * Non-leaving version of StartViewFinderL() |
|
1283 * @since 2.8 |
|
1284 */ |
|
1285 void StartViewFinder(); |
|
1286 |
|
1287 /** |
|
1288 * Stop viewfinder |
|
1289 * @since 2.8 |
|
1290 */ |
|
1291 void StopViewFinder(); |
|
1292 |
|
1293 /** |
|
1294 * Stop viewfinder Ecam only |
|
1295 * Needed with async video recording stopping |
|
1296 * @since 5.0 |
|
1297 */ |
|
1298 void StopViewFinderEcam(); |
|
1299 |
|
1300 /** |
|
1301 * Sets the zoom mode of the engine |
|
1302 * @param aZoomMode The zoom mode to set |
|
1303 * @since 3.0 |
|
1304 */ |
|
1305 // Only digital mode supported currently - no need for this |
|
1306 //void SetZoomMode( const TCamZoomMode& aZoomMode ); |
|
1307 |
|
1308 /** |
|
1309 * Report whether a capture mode transition is currently in progress |
|
1310 * @since 2.8 |
|
1311 * @return TBool ETrue if transition (i.e. still/video capture prepare) is |
|
1312 * currently in progress, EFalse otherwise; |
|
1313 */ |
|
1314 TBool CaptureModeTransitionInProgress(); |
|
1315 |
|
1316 /** |
|
1317 * Check if viewfinder is active |
|
1318 * @since 2.8 |
|
1319 * @returns ETrue if viewfinding |
|
1320 */ |
|
1321 TBool IsViewFinding() const; |
|
1322 |
|
1323 /** |
|
1324 * Check if capture key needs to be released before starting |
|
1325 * new capture process. Used in post capture state to prevent |
|
1326 * image capture before viewfinder is completely shown. |
|
1327 * @since S60 v5.0 |
|
1328 * @return ETrue if waiting key release before next capture |
|
1329 */ |
|
1330 TBool IsDemandKeyRelease(); |
|
1331 |
|
1332 /** |
|
1333 * Set iDemandKeyRelease value |
|
1334 * @param aDemand Demand to release capture key |
|
1335 * @since S60 v5.0 |
|
1336 */ |
|
1337 void SetDemandKeyRelease( TBool aDemand ); |
|
1338 |
|
1339 /** |
|
1340 * Stop the idle timer |
|
1341 * @since 2.8 |
|
1342 */ |
|
1343 void StopIdleTimer(); |
|
1344 |
|
1345 /** |
|
1346 * Restart the idle timer |
|
1347 * @since 2.8 |
|
1348 */ |
|
1349 void StartIdleTimer(); |
|
1350 |
|
1351 |
|
1352 /** |
|
1353 * Flash modes supported by engine |
|
1354 * @since 3.0 |
|
1355 * @return supported flash modes |
|
1356 */ |
|
1357 TUint32 SupportedFlashModes(); |
|
1358 |
|
1359 |
|
1360 /** |
|
1361 * White balance modes supported by engine |
|
1362 * @since 3.0 |
|
1363 * @return supported white balance modes |
|
1364 */ |
|
1365 TUint32 SupportedWBModes(); |
|
1366 |
|
1367 /** |
|
1368 * EV modes supported by engine |
|
1369 * @since 3.0 |
|
1370 * @return supported EV modes |
|
1371 */ |
|
1372 TUint32 SupportedEVModes(); |
|
1373 |
|
1374 /** |
|
1375 * Capture state |
|
1376 * @return TInt capture state |
|
1377 */ |
|
1378 TInt CaptureState(); |
|
1379 |
|
1380 /** |
|
1381 * Returns the current capture-tone id |
|
1382 * @since 3.0 |
|
1383 * @return the current capture-tone id |
|
1384 */ |
|
1385 TCamSoundId CaptureToneId( ); |
|
1386 |
|
1387 #ifdef CAMERAAPP_PERFORMANCE_MEASUREMENT |
|
1388 public: |
|
1389 void SetPerformanceState( TCamPerformanceState aState ); |
|
1390 #endif |
|
1391 |
|
1392 /** |
|
1393 * Set pointer to settings plug-in. Takes ownership! |
|
1394 * @param aPlugin Pointer to settings plug-in. This object |
|
1395 * takes ownership. |
|
1396 * @since S60 v5.0 |
|
1397 */ |
|
1398 void SetSettingsPlugin( CCamGSInterface* aPlugin ); |
|
1399 |
|
1400 /** |
|
1401 * Set viewfinder window for direct screen viewfinder. The handle must remain |
|
1402 * valid as long as viewfinder is running. |
|
1403 * @since S60 v5.0 |
|
1404 * @param aWindow Handle to viewfinder window. Must remain valid while |
|
1405 * viewfinder is running. Ownership not transferred. |
|
1406 */ |
|
1407 void SetViewfinderWindowHandle( RWindowBase* aWindow ); |
|
1408 |
|
1409 /** |
|
1410 * Notify that the viewfinder window is about to be deleted. Viewfinder |
|
1411 * will be stopped if this window handle is currently used for the |
|
1412 * viewfinder. |
|
1413 * @since S60 v5.0 |
|
1414 * @param aWindow Handle to viewfinder window. Ownership not transferred. |
|
1415 */ |
|
1416 void ViewfinderWindowDeleted( RWindowBase* aWindow ); |
|
1417 |
|
1418 protected: // New functions |
|
1419 |
|
1420 /** |
|
1421 * C++ default constructor. |
|
1422 * @since 2.8 |
|
1423 */ |
|
1424 CCamAppController(); |
|
1425 |
|
1426 /** |
|
1427 * Symbian OS 2nd phase constructor. |
|
1428 * @since 2.8 |
|
1429 */ |
|
1430 void ConstructL(); |
|
1431 |
|
1432 // ----------------------------------------------------- |
|
1433 // Burst related |
|
1434 public: |
|
1435 |
|
1436 /** |
|
1437 * Stop burst in a soft way: |
|
1438 * - if have not moved yet to long burst mode, |
|
1439 * wait until the short burst ends and do not |
|
1440 * enter long burst mode (if aFastStop is true, |
|
1441 * stop asap when atleast 2 images captured). |
|
1442 * - if long burst already entered, stop capturing |
|
1443 * after the next capture. |
|
1444 * @param aFastStop Stop also short burst asap, but so that |
|
1445 * atleast 2 images are captured. |
|
1446 */ |
|
1447 void SoftStopBurstL( TBool aFastStop = EFalse ); |
|
1448 |
|
1449 /** |
|
1450 * Set iNoBurstCancel flag which is used to prevent stopping burst |
|
1451 * when actual burst capture has started after focusing. |
|
1452 */ |
|
1453 void SetNoBurstCancel( TBool aValue ); |
|
1454 |
|
1455 /** |
|
1456 * Set iKeyUPl flag which is used to prevent late |
|
1457 * activated burst timer when capturekey is up already |
|
1458 * before burstcapture has started. |
|
1459 */ |
|
1460 void SetKeyUp( TBool aValue = EFalse ); |
|
1461 |
|
1462 /** |
|
1463 * Returns amount of images captured in burst mode |
|
1464 * @return Amount of captured images |
|
1465 * |
|
1466 */ |
|
1467 TInt CapturedImages() const; |
|
1468 |
|
1469 private: |
|
1470 |
|
1471 /** |
|
1472 * Start the burst timer for changing to long burst mode. |
|
1473 */ |
|
1474 void StartBurstTimerL(); |
|
1475 |
|
1476 /* |
|
1477 * Stop the burst timer. |
|
1478 */ |
|
1479 void StopBurstTimer(); |
|
1480 |
|
1481 /** |
|
1482 * Callback for short burst timer. |
|
1483 * @param aController Pointer to app controller instance. |
|
1484 * @return Always zero, implies no repeated callbacks wanted. |
|
1485 */ |
|
1486 static TInt ShortBurstTimeout( TAny* aController ); |
|
1487 |
|
1488 /** |
|
1489 * Helper method for short burst timer callback. |
|
1490 */ |
|
1491 void DoShortBurstTimeoutL(); |
|
1492 |
|
1493 |
|
1494 // ----------------------------------------------------- |
|
1495 private: |
|
1496 |
|
1497 /** |
|
1498 * Return number of images that can still be captured for a particular |
|
1499 * image photo resolution |
|
1500 * @since 2.8 |
|
1501 * @param aStorage storage location - defaults to current loation |
|
1502 * @param aBurstActive - set to ETrue if burst mode is active |
|
1503 * @param aSize - the id of the photo resolution |
|
1504 * @return the number of images |
|
1505 */ |
|
1506 TInt ImagesRemaining( TCamMediaStorage aStorage, |
|
1507 TBool aBurstActive, |
|
1508 TCamPhotoSizeId aSize ); |
|
1509 |
|
1510 /** |
|
1511 * Change the controller's current state |
|
1512 * Notifies controller observers of change |
|
1513 * @since 2.8 |
|
1514 * @param aNewState new state code |
|
1515 */ |
|
1516 void ChangeState( const TCamCameraState& aNewState ); |
|
1517 |
|
1518 /** |
|
1519 * Change the controller's target state. The state will not be |
|
1520 * altered if the controller is already in shutdown mode. |
|
1521 * @since 2.8 |
|
1522 * @param aNewState new state code |
|
1523 */ |
|
1524 void ChangeTargetState( const TCamCameraState& aNewState ); |
|
1525 |
|
1526 /** |
|
1527 * Change the controller's current operation |
|
1528 * Notifies controller observers of change |
|
1529 * @since 2.8 |
|
1530 * @param aNewOperation new operation code |
|
1531 * @param aError error code associated with new state (if any) |
|
1532 */ |
|
1533 void ChangeOperation( TCamCaptureOperation aNewOperation, |
|
1534 TInt aError = KErrNone ); |
|
1535 |
|
1536 /** |
|
1537 * Notify controller observers of an event. |
|
1538 * @since 2.8 |
|
1539 * @param aEvent event code |
|
1540 * @param aError error code |
|
1541 */ |
|
1542 void NotifyControllerObservers( TCamControllerEvent aEvent, |
|
1543 TInt aError = KErrNone ) const; |
|
1544 |
|
1545 /** |
|
1546 * Starts the viewfinder if the engine has been prepared for the |
|
1547 * current mode. |
|
1548 * @since 2.8 |
|
1549 */ |
|
1550 void StartViewFinderL(); |
|
1551 |
|
1552 /** |
|
1553 * Initiate image capture |
|
1554 * @since 2.8 |
|
1555 * @return ETrue if the capture was initiated otherwise EFalse |
|
1556 */ |
|
1557 TBool DoCaptureL(); |
|
1558 |
|
1559 /** |
|
1560 * Initiate video recording |
|
1561 * @since 2.8 |
|
1562 */ |
|
1563 void DoRecord(); |
|
1564 |
|
1565 /** |
|
1566 * Make a local copy of the viewfinder frame to use when |
|
1567 * the viewfinder is frozen |
|
1568 * @since 2.8 |
|
1569 */ |
|
1570 void CopyFrameL( const CFbsBitmap& aBitmap ); |
|
1571 |
|
1572 /** |
|
1573 * Reserve a set of file names for the current capture |
|
1574 * Store the reserved name(s) in iCaptureArray |
|
1575 * @since 2.8 |
|
1576 * @param aCaptureMode still, burst or video mode |
|
1577 * @param aForcePhoneMem force path to use Phone memory (C:) |
|
1578 */ |
|
1579 void ReserveFileNamesL( |
|
1580 const TCamCameraMode& aCaptureMode, |
|
1581 const TCamImageCaptureMode& aImageMode, |
|
1582 TBool aForcePhoneMem = EFalse ); |
|
1583 |
|
1584 /** |
|
1585 * Create a file ready for saving captured image into |
|
1586 * @since 2.8 |
|
1587 * @param aFs: Handle to RFs |
|
1588 * @param aFullPath: Full path including drive and extension |
|
1589 * @return error code from file creation |
|
1590 */ |
|
1591 TInt CreateDummyFileL( RFs& aFs, const TDesC& aFullPath ); |
|
1592 |
|
1593 |
|
1594 /** |
|
1595 * Store file name and full file name (incl. path) |
|
1596 * to burst capture array |
|
1597 * @since 2.8 |
|
1598 * @param aFullPath: Full path including drive and extension |
|
1599 */ |
|
1600 void StoreNextFileNameL( const TDesC& aFullPath ); |
|
1601 |
|
1602 /** |
|
1603 * Generate a new file name and full path for saving the next video |
|
1604 * according to the specified mode (unless specified otherwise) |
|
1605 * @since 2.8 |
|
1606 * @param aForcePhoneMem force path to use Phone memory (C:) |
|
1607 */ |
|
1608 void GenerateNextVideoFilePathL( TBool aForcePhoneMem = EFalse ); |
|
1609 |
|
1610 /** |
|
1611 * Generate a new path for saving the next image |
|
1612 * @since 3.0 |
|
1613 */ |
|
1614 void GenerateNextValidImagesPathL(); |
|
1615 |
|
1616 /** |
|
1617 * Generate a new file name and full path for saving the next video |
|
1618 * according to the specified mode. File will always be |
|
1619 * available. |
|
1620 * @since 2.8 |
|
1621 */ |
|
1622 void GenerateNextValidVideoPathL(); |
|
1623 |
|
1624 /** |
|
1625 * Handle a notification from the autofocus custom extension |
|
1626 * @since 2.8 |
|
1627 */ |
|
1628 void HandleAutoFocusNotification( TCamExtAutoFocus aNotification ); |
|
1629 |
|
1630 /** |
|
1631 * Static callback function for idle timer expiry |
|
1632 * @since 2.8 |
|
1633 * @param aPtr Pointer to an instance of the CCamAppController |
|
1634 * @return TInt to indicate if function should be called again |
|
1635 */ |
|
1636 static TInt IdleTimeoutL( TAny* aPtr ); |
|
1637 |
|
1638 /** |
|
1639 * Static callback function for time lapse timer expiry |
|
1640 * @since 3.0 |
|
1641 * @param aPtr Pointer to an instance of the CCamAppController |
|
1642 * @return TInt to indicate if function should be called again |
|
1643 */ |
|
1644 static TInt TimeLapseTimeoutL( TAny* aPtr ); |
|
1645 |
|
1646 private: // Deep sleep timer |
|
1647 /** |
|
1648 * Static callback function for camera deep sleep |
|
1649 * @since S60 5.0 |
|
1650 * @param aPtr Pointer to an instance of the CCamAppController |
|
1651 * @return TInt dummy |
|
1652 */ |
|
1653 static TInt DeepSleepTimeout( TAny* aPtr ); |
|
1654 |
|
1655 /** |
|
1656 * Deep sleep timeout handler |
|
1657 */ |
|
1658 void DoDeepSleepTimeout(); |
|
1659 |
|
1660 public: // Deep sleep timer |
|
1661 /** |
|
1662 * Start deep sleep timer |
|
1663 */ |
|
1664 void DeepSleepTimerStart(); |
|
1665 |
|
1666 /** |
|
1667 * Cancel deep sleep timer |
|
1668 */ |
|
1669 void DeepSleepTimerCancel(); |
|
1670 |
|
1671 private: |
|
1672 /** |
|
1673 * Set video length (max or short) |
|
1674 * @param aLength Length of video |
|
1675 * @since 2.8 |
|
1676 */ |
|
1677 void SetVideoLengthL( TInt aLength ); |
|
1678 |
|
1679 /** |
|
1680 * Returns the current photo storage location. |
|
1681 * @return the photo storage location |
|
1682 * @since 2.8 |
|
1683 */ |
|
1684 TInt CurrentPhotoStorageLocation() const; |
|
1685 |
|
1686 /** |
|
1687 * Returns the current video storage location. |
|
1688 * @return the video storage location |
|
1689 * @since 2.8 |
|
1690 */ |
|
1691 TInt CurrentVideoStorageLocation() const; |
|
1692 |
|
1693 /** |
|
1694 * Returns ETrue if the supplied toneId should be silent if the profile is |
|
1695 * set to silent. Does *not* take into account network variant forcing |
|
1696 * sounds on. |
|
1697 * @since 3.0 |
|
1698 * @param aSoundId The tone to check |
|
1699 * @return ETrue if sound should always be played, else EFalse |
|
1700 */ |
|
1701 TBool ToneShouldBeSilent( TCamSoundId aSoundId ); |
|
1702 |
|
1703 /** |
|
1704 * Report to any observers that capture processing has completed |
|
1705 * @since 3.0 |
|
1706 */ |
|
1707 void HandleCaptureCompletion(); |
|
1708 |
|
1709 /** |
|
1710 * Tries to autofocus, will do nothing if camera in use is not |
|
1711 * primary camera, or focus range has not been set first |
|
1712 * @since 3.0 |
|
1713 * @return Whether or not auto focus has been initiated |
|
1714 */ |
|
1715 TBool TryAutoFocus(); |
|
1716 |
|
1717 /** |
|
1718 * Checks the current scene, and where required, updates the autofocus |
|
1719 * mode in use. Called when the photo scene or based-on-scene change |
|
1720 * @since 3.0 |
|
1721 * @param aForceAFReset Whether to force a ResetToIdle independant of scene mode |
|
1722 */ |
|
1723 void CheckAfModeForScene( TBool aForceAFReset = EFalse ); |
|
1724 |
|
1725 /** |
|
1726 * Initalises the AutoFocus interface, if needed |
|
1727 * @since 3.0 |
|
1728 */ |
|
1729 void InitAutoFocusL(); |
|
1730 |
|
1731 /** |
|
1732 * Timeout to play capture tone after delay (to match |
|
1733 * capture tone to actual capture event) |
|
1734 * @since 3.0 |
|
1735 * @param aPtr TAny* ptr (cast to CCamAppController) |
|
1736 * @return Error code retruned by function |
|
1737 */ |
|
1738 static TInt CaptureToneDelayTimeout( TAny* aPtr ); |
|
1739 |
|
1740 /** |
|
1741 * Play the capture tone (called from capture delay timeout) |
|
1742 * @since 3.0 |
|
1743 */ |
|
1744 void PlayDelayedCaptureTone(); |
|
1745 |
|
1746 /** |
|
1747 * Copy Snapshot if needed. Helper function for McaeoSnapImageReady |
|
1748 * @since 3.0 |
|
1749 * @param aSnapshot the snapshot to copy |
|
1750 * @param aError Error code KErrNone to indicate success or a |
|
1751 * standard Symbian OS error code. |
|
1752 */ |
|
1753 void CopySnapshotIfNeeded(const CFbsBitmap& aSnapshot, TInt aError); |
|
1754 |
|
1755 |
|
1756 /** |
|
1757 * Checks whether flash is required for taking a picture. |
|
1758 * @return true if flash is required current mode |
|
1759 */ |
|
1760 TBool FlashRequired() const; |
|
1761 |
|
1762 |
|
1763 private: // Functions from base classes |
|
1764 |
|
1765 /** |
|
1766 * From MCamImageSaveObserver, image save has completed |
|
1767 * @since 2.8 |
|
1768 */ |
|
1769 void HandleSaveEvent( TCamSaveEvent aEvent ); |
|
1770 |
|
1771 /** |
|
1772 * From MCamImageSaveObserver, image save has completed |
|
1773 * @since 2.8 |
|
1774 */ |
|
1775 void HandleFileHarvestingComplete(); |
|
1776 |
|
1777 /** |
|
1778 * Idle timeout expiry - invoke switch to standby mode |
|
1779 * @since 2.8 |
|
1780 * @return TInt to indicate if function should be called again |
|
1781 */ |
|
1782 TInt DoIdleTimeoutL(); |
|
1783 |
|
1784 /** |
|
1785 * Time lapse timeout expiry - update the remaining time countdown |
|
1786 * or initiate the next capture if the full period has expired |
|
1787 * @return TInt to indicate if function should be called again |
|
1788 */ |
|
1789 TInt DoTimeLapseTimeoutL(); |
|
1790 |
|
1791 /** |
|
1792 * Force the application to use phone memory for Video and Image saving. |
|
1793 * Typically called when attempting to access MMC fails. |
|
1794 * @since 2.8 |
|
1795 */ |
|
1796 void ForceUsePhoneMemoryL( TBool aEnable = ETrue ); |
|
1797 |
|
1798 /** |
|
1799 * Complete the burst operation |
|
1800 * @since 2.8 |
|
1801 */ |
|
1802 void CompleteBurstOperation(); |
|
1803 |
|
1804 /** |
|
1805 * Complete the time lapse operation |
|
1806 * @since 3.0 |
|
1807 */ |
|
1808 void CompleteTimeLapseOperation(); |
|
1809 |
|
1810 |
|
1811 /** |
|
1812 * Whether or not the engine is currently processing a capture |
|
1813 * still, video or sequence. |
|
1814 * @since 2.8 |
|
1815 * @return ETrue if the engine is performing a capture operation |
|
1816 */ |
|
1817 TBool EngineProcessingCapture() const; |
|
1818 |
|
1819 /** |
|
1820 * Handle an arriving call. Stops video and cancels sequence capture |
|
1821 * in early stages. |
|
1822 * @since 2.8 |
|
1823 */ |
|
1824 void HandleIncomingCall(); |
|
1825 |
|
1826 /** |
|
1827 * Cleans up the controller active camera state |
|
1828 * @param aAny Pointer to the object which is the target |
|
1829 * of the cleanup operation |
|
1830 * @since 2.8 |
|
1831 */ |
|
1832 static void Cleanup( TAny* aAny ); |
|
1833 |
|
1834 /** |
|
1835 * Immediately cancels a still capture at any stage. |
|
1836 * @since 2.8 |
|
1837 */ |
|
1838 void CancelStillCaptureNow(); |
|
1839 |
|
1840 /** |
|
1841 * Attempt to cleanup capture array if burst capture fails |
|
1842 * @since 2.8 |
|
1843 * @param aImageCountDelivered number of images delivered |
|
1844 * @param aError error returned from burst capture operation |
|
1845 */ |
|
1846 void TidyCaptureArray( TInt aImageCountDelivered, |
|
1847 TInt aError ); |
|
1848 |
|
1849 /** |
|
1850 * Load 2ndary caera specifc settings (on construction or camera switch) |
|
1851 * @since 3.0 |
|
1852 */ |
|
1853 void LoadSecondaryCameraSettingsL(); |
|
1854 |
|
1855 // ------------------------------------------------------- |
|
1856 // Orientation sensor / rotation related |
|
1857 public: |
|
1858 |
|
1859 /** |
|
1860 * Get current orientation to be used on image rotation. |
|
1861 * Always ECamOrientation0 if rotation setting is OFF. |
|
1862 * @return Current image orientation value. |
|
1863 */ |
|
1864 TCamImageOrientation ImageOrientation() const; |
|
1865 |
|
1866 /** |
|
1867 * Checks if mass storage exist in current phone. |
|
1868 * @ return True if Mass storage exist |
|
1869 */ |
|
1870 TBool ExistMassStorage() const; |
|
1871 |
|
1872 /** |
|
1873 * Checks if a memory type is available on the phone. |
|
1874 * @param aStorage TCamMediaStorage enum specifiying the type of storage; |
|
1875 * default=ECamMediaStorageCurrent |
|
1876 * @return ETrue if the Memory type is available |
|
1877 */ |
|
1878 TBool IsMemoryAvailable( const TCamMediaStorage aStorage = |
|
1879 ECamMediaStorageCurrent, TBool aIgnoreUsbPersonality = EFalse ) const; |
|
1880 |
|
1881 public: |
|
1882 |
|
1883 /** |
|
1884 * Update the sensor api object |
|
1885 * @since 3.0 |
|
1886 * @param aStartupApi eTrue if we need to recreate the Api |
|
1887 */ |
|
1888 void UpdateSensorApiL( TBool aStartupApi ); |
|
1889 |
|
1890 /** |
|
1891 * Forces a refresh of the local copy of the back slide status |
|
1892 * @since 2.8 |
|
1893 */ |
|
1894 void RefreshSlideStatus(); |
|
1895 |
|
1896 private: |
|
1897 |
|
1898 /** |
|
1899 * From MSensrvDataListener receive Sensor Data |
|
1900 * |
|
1901 * Indicates data is available in the receiving buffer. A client can read |
|
1902 * the data through GetData()-function in the related channel object. Data |
|
1903 * is valid until the data received notification occurs again. |
|
1904 * |
|
1905 * @since 5.0 |
|
1906 * @param[in] aChannel Reference to the related channel object |
|
1907 * @param[in] aCount Data object count in receiving buffer. |
|
1908 * @param[in] aDataLost Number of lost data items. Data loss can occur if |
|
1909 * the client does not request new data from server fast enough. This |
|
1910 * can happen |
|
1911 * when system is under heavy load and the client process has lower |
|
1912 * priority than sensor server process. If data loss is a problem, |
|
1913 * consider using higher object count in data listening, which will reduce |
|
1914 * number of expensive IPC calls used in data transmission. |
|
1915 */ |
|
1916 void DataReceived( CSensrvChannel& aChannel, |
|
1917 TInt aCount, |
|
1918 TInt aDataLost ); |
|
1919 /** |
|
1920 * From MSensrvDataListener receive data error notice |
|
1921 * |
|
1922 * Data listening failed. |
|
1923 * If error was fatal, channel has also been closed and sensor server session |
|
1924 * terminated. If error was minor, some data has potentially been lost. |
|
1925 * |
|
1926 * @since 5.0 |
|
1927 * @param[in] aChannel Reference to the related channel object |
|
1928 * @param[in] aError Error code. |
|
1929 */ |
|
1930 void DataError( CSensrvChannel& aChannel, |
|
1931 TSensrvErrorSeverity aError ); |
|
1932 |
|
1933 /** |
|
1934 * From MSensrvDataListener |
|
1935 * |
|
1936 * Returns a pointer to a specified interface - to allow future extension |
|
1937 * of this class without breaking binary compatibility |
|
1938 * |
|
1939 * @since S60 5.0 |
|
1940 * @param aInterfaceUid Identifier of the interface to be retrieved |
|
1941 * @param aInterface A reference to a pointer that retrieves the specified interface. |
|
1942 */ |
|
1943 void GetDataListenerInterfaceL( TUid aInterfaceUid, |
|
1944 TAny*& aInterface ); |
|
1945 |
|
1946 /** |
|
1947 * Set image rotation parameters |
|
1948 * @since 3.0 |
|
1949 */ |
|
1950 void SetImageOrientationL(); |
|
1951 |
|
1952 /** |
|
1953 * Mapping from Sensor orientation data type to our own |
|
1954 * image orientation type. |
|
1955 * @param aSensorOrientation Orientation Sensor device orientation value. |
|
1956 * @return Camera orientation value. |
|
1957 */ |
|
1958 static TCamImageOrientation MapSensorOrientatio2CamOrientation( |
|
1959 const TSensrvOrientationData::TSensrvDeviceOrientation& aSensorOrientation, TCamImageOrientation aLastImageOrientation); |
|
1960 |
|
1961 /** |
|
1962 * Mapping from camera orientation data type to bitmap orientation type. |
|
1963 * @param camera orientation value. |
|
1964 * @return CBitmapRotator::TRotationAngle. |
|
1965 */ |
|
1966 static CBitmapRotator::TRotationAngle MapCamOrientation2RotationAngle( |
|
1967 const TCamImageOrientation aOrientation ); |
|
1968 |
|
1969 // ------------------------------------------------------- |
|
1970 |
|
1971 private: |
|
1972 |
|
1973 /** |
|
1974 * From MPropertyObserver Handle change in a watched property |
|
1975 * @since 2.8 |
|
1976 * @param aCategory The type of property |
|
1977 * @param aKey The property that has changed |
|
1978 */ |
|
1979 void HandlePropertyChangedL( const TUid& aCategory, const TUint aKey ); |
|
1980 |
|
1981 private: |
|
1982 |
|
1983 /** |
|
1984 * Callback function that is called when lens cover state changes. |
|
1985 * Used to implement delayed handling of lens cover events. |
|
1986 * @param aPtr Pointer to CCamAppController |
|
1987 * @return |
|
1988 */ |
|
1989 static TInt LensCoverUpdateL( TAny* aPtr ); |
|
1990 |
|
1991 /** |
|
1992 * Handles the slide closed event |
|
1993 * @since 2.8 |
|
1994 */ |
|
1995 void HandleSlideClosedL(); |
|
1996 |
|
1997 /** |
|
1998 * Handles the slide open event |
|
1999 * @since 2.8 |
|
2000 */ |
|
2001 void HandleSlideOpenedL(); |
|
2002 |
|
2003 |
|
2004 private: // Functions from base classes |
|
2005 |
|
2006 /** |
|
2007 * From MCamObserver |
|
2008 * Receives event codes from observables |
|
2009 * @since 3.0 |
|
2010 * @param aEvent The event code |
|
2011 */ |
|
2012 void HandleObservedEvent( TCamObserverEvent aEvent ); |
|
2013 |
|
2014 /** |
|
2015 * Returns whether or not the current profile is silent |
|
2016 * @since 3.0 |
|
2017 * @return ETrue if current profile is silent |
|
2018 */ |
|
2019 TBool IsProfileSilentL(); |
|
2020 |
|
2021 /** |
|
2022 * Static callback function for backlight timer reset |
|
2023 * since 3.0 |
|
2024 * @param aPtr Pointer to an instance of the CCamAppController |
|
2025 * @return TInt to indicate if function should be called again |
|
2026 */ |
|
2027 static TInt ResetInactivityTimer( TAny* aPtr ); |
|
2028 |
|
2029 /** |
|
2030 * Enable or disable the system screensaver |
|
2031 * @since 3.0 |
|
2032 * @param aEnable ETrue if the screensaver is enabled |
|
2033 * else EFalse |
|
2034 */ |
|
2035 void EnableScreenSaver( TBool aEnable ); |
|
2036 |
|
2037 /** |
|
2038 * Static callback function for timer callback for closing |
|
2039 * location trail. |
|
2040 * @since S60 v5.0 |
|
2041 * @param aPtr Pointer to an instance of the CCamAppController |
|
2042 * @return TInt to indicate if function should be called again |
|
2043 */ |
|
2044 static TInt RetryStopLocationTrail( TAny* aPtr ); |
|
2045 |
|
2046 public: |
|
2047 void StartLocationTrailL(); |
|
2048 void StopLocationTrail( TBool aCloseSession = EFalse ); |
|
2049 |
|
2050 public: |
|
2051 /** |
|
2052 * Returns a pointer to flash status object. Never NULL if |
|
2053 * ConstructL has been executed successfully. |
|
2054 * @return flashStatusPointer |
|
2055 */ |
|
2056 CCamFlashStatus* FlashStatus() const; |
|
2057 |
|
2058 /** |
|
2059 * Returns false, if a picture cannot be taken, due to flash being |
|
2060 * required and recharged, true otherwise. |
|
2061 * @return flashstatus |
|
2062 */ |
|
2063 TBool CheckFlash() const; |
|
2064 |
|
2065 /** |
|
2066 * Called when about to switch to burst or timelapse mode. Stores |
|
2067 * the current flash mode and scene. |
|
2068 */ |
|
2069 void SaveFlashMode(); |
|
2070 |
|
2071 /** |
|
2072 * Called when switching to single image capture mode. Restores |
|
2073 * flash mode, if using same scene mode as was used when the |
|
2074 * flash mode was stored. Otherwise clears the stored info. |
|
2075 */ |
|
2076 void RestoreFlashMode(); |
|
2077 |
|
2078 public: |
|
2079 /** |
|
2080 * Returns a pointer to dynamic Configuration Manager. |
|
2081 * |
|
2082 * Never NULL if ConstructL has been executed successfully. |
|
2083 * @return Pointer to Configuration Manager |
|
2084 */ |
|
2085 CCamConfiguration* Configuration() const; |
|
2086 |
|
2087 |
|
2088 /** |
|
2089 * Returns whether or not the keylock is on |
|
2090 * @since 5.0 |
|
2091 * @return ETrue if keylock is on, otherwise EFalse |
|
2092 */ |
|
2093 TBool IsKeyLockOn(); |
|
2094 |
|
2095 /** |
|
2096 * Used to get whether user is sliding in the self timer preview. |
|
2097 * @return ETrue if user is sliding in the self timer preview. |
|
2098 */ |
|
2099 inline TBool IsSlideInSelfTimerPreview() const { return iSlideInSelfTimerPreview; }; |
|
2100 |
|
2101 /** |
|
2102 * Used to set whether user is sliding in the self timer preview. |
|
2103 * @param aValue the value to indicate whether user is sliding in the self timer preview. |
|
2104 */ |
|
2105 inline void SetSlideInSelfTimerPreview( TBool aValue ) { iSlideInSelfTimerPreview = aValue; }; |
|
2106 |
|
2107 /** |
|
2108 * Used to get the current storage. |
|
2109 * @return the current storage. |
|
2110 */ |
|
2111 TCamMediaStorage CurrentStorage(); |
|
2112 |
|
2113 /** |
|
2114 * Returns whether autofocus is still needed before capturing. |
|
2115 * @return ETrue if it's necessary to try autofocus one more time before the capture. |
|
2116 */ |
|
2117 TBool IsAfNeeded(); |
|
2118 |
|
2119 /** |
|
2120 * Sets an autofocus needed flag, so that autofocus is done after cancel and range set are finished. |
|
2121 */ |
|
2122 void SetAfNeeded( TBool aAfNeeded ); |
|
2123 |
|
2124 /** |
|
2125 * Returns whether recording was stopped because USB was connected. |
|
2126 * @return ETrue if video recording was stopped because USB was connected. |
|
2127 */ |
|
2128 TBool IsCaptureStoppedForUsb(); |
|
2129 |
|
2130 /** |
|
2131 * set the flag of iSetCaptureStoppedForUsb. |
|
2132 */ |
|
2133 void SetCaptureStoppedForUsb( TBool aCaptureStoppedForUsb ); |
|
2134 |
|
2135 /** |
|
2136 * Cancels the memory card dismount monitoring |
|
2137 */ |
|
2138 void CancelDismountMonitoring(); |
|
2139 |
|
2140 /** |
|
2141 * Start the memory card dismount monitoring |
|
2142 */ |
|
2143 void StartDismountMonitoring(); |
|
2144 |
|
2145 /** |
|
2146 * Returns whether all snapshots have been received in burst mode |
|
2147 * @return ETrue if all snapshots have been received in burst mode. |
|
2148 */ |
|
2149 TBool AllSnapshotsReceived(); |
|
2150 |
|
2151 /** |
|
2152 * Returns the last made autofocusrequest type or 0, if there are |
|
2153 * no pending autofocus requests. |
|
2154 */ |
|
2155 TInt PendingAFRequest(); |
|
2156 |
|
2157 /** |
|
2158 * Calculates the remaining video recording time based on video |
|
2159 * quality settings (instead of getting the value from camera |
|
2160 * controller) |
|
2161 * @param aStorage TCamMediaStorage enum specifying the type of storage; |
|
2162 * default=ECamMediaStorageCurrent |
|
2163 * @return remaining time |
|
2164 */ |
|
2165 TTimeIntervalMicroSeconds |
|
2166 CalculateVideoTimeRemainingL(const TCamMediaStorage |
|
2167 aStorage = ECamMediaStorageCurrent); |
|
2168 /** |
|
2169 * Sets orientation of the application to CCamera |
|
2170 * |
|
2171 */ |
|
2172 void SetCameraOrientationModeL( TInt aOrientation ); |
|
2173 |
|
2174 /** |
|
2175 * Final part in constructing cameracontroller |
|
2176 * |
|
2177 */ |
|
2178 void CompleteCameraConstructionL(); |
|
2179 |
|
2180 /** |
|
2181 * Returns index of current image. |
|
2182 */ |
|
2183 TInt CurrentImageIndex(); |
|
2184 |
|
2185 /** |
|
2186 * Sets the value defining the need for CAE video init and prepare |
|
2187 */ |
|
2188 void SetVideoInitNeeded( TBool aVideoInitNeeded ); |
|
2189 |
|
2190 /** |
|
2191 * Returns the value defining the need for CAE video init and prepare |
|
2192 */ |
|
2193 TBool VideoInitNeeded(); |
|
2194 |
|
2195 private: |
|
2196 |
|
2197 // ----------------------------------------------------- |
|
2198 // Construction parts |
|
2199 |
|
2200 void ConstructCameraControllerL( TInt aCameraIndex ); |
|
2201 |
|
2202 // ----------------------------------------------------- |
|
2203 // Helper utility methods |
|
2204 TInt GetCriticalMemoryLevelL( const TCamMediaStorage& aStorage ); |
|
2205 |
|
2206 // ----------------------------------------------------- |
|
2207 // Events and requests handling |
|
2208 void EventHandlingErrorRecovery( TInt aError ); |
|
2209 |
|
2210 void HandleSequenceEventL( TInt aStatus, |
|
2211 TCamCameraEventId aEventId, |
|
2212 TAny* aEventData ); |
|
2213 |
|
2214 void HandleRequestEventL( TInt aStatus, |
|
2215 TCamCameraEventId aEventId, |
|
2216 TAny* aEventData ); |
|
2217 |
|
2218 void HandleSettingEventL( TInt aStatus, |
|
2219 TCamCameraEventId aEventId, |
|
2220 TAny* aEventData ); |
|
2221 |
|
2222 void HandleImageCaptureEventL( TInt aStatus, |
|
2223 CCamBufferShare* aShare ); |
|
2224 void HandleImageStopEventL( TInt aStatus, |
|
2225 TInt aFullCaptureCount ); |
|
2226 |
|
2227 void HandleViewfinderFrame( TInt aStatus, CFbsBitmap* aFrame ); |
|
2228 void HandleSnapshotEvent( TInt aStatus, CFbsBitmap* aBitmap ); |
|
2229 void HandleVideoAsyncStopEvent( TInt aStatus ); |
|
2230 void HandleVideoStopEvent( TInt aStatus ); |
|
2231 |
|
2232 void IssueModeChangeSequenceL( TBool aStartup = EFalse ); |
|
2233 void GenerateModeChangeSequenceL( RCamRequestArray& aSequence ); |
|
2234 void GenerateStartupSequenceL( RCamRequestArray& aSequence ); |
|
2235 |
|
2236 void IssueRequestL( const TCamCameraRequestId& aId ); |
|
2237 void IssueDirectRequestL( const TCamCameraRequestId& aId ); |
|
2238 void IssueSettingsChangeRequestL(); |
|
2239 |
|
2240 void ProceedPendingOrNotifyReadyL(); |
|
2241 |
|
2242 void DoVideoNameRetryL( TInt aStatus ); |
|
2243 |
|
2244 /** |
|
2245 * Sets the current image/video settings from UI to camera, by calling |
|
2246 * RestoreSettingIfNecessaryL for each supported setting, and starting |
|
2247 * the setting process if any of them needs setting. |
|
2248 * This function needs to be called after camera release and switches |
|
2249 * between image/video mode. |
|
2250 */ |
|
2251 void RestoreSettingsToCameraL(); |
|
2252 |
|
2253 /** |
|
2254 * Checks if the setting needs restoring (UI setting value doesn't match |
|
2255 * the actual setting value in camera). In that case, function adds |
|
2256 * this setting to the list of pending settings. |
|
2257 * @param aSettingItem Setting item id |
|
2258 */ |
|
2259 void RestoreSettingIfNecessaryL( TCamSettingItemIds aSettingItem ); |
|
2260 |
|
2261 /** |
|
2262 * Checks if the setting needs restoring (UI setting value doesn't match |
|
2263 * the actual setting value in camera). In that case, function |
|
2264 * directly set settting to camera |
|
2265 * @param aSettingItem Setting item id |
|
2266 */ |
|
2267 void DirectRestoreSettingIfNecessaryL( TCamSettingItemIds aSettingItem ); |
|
2268 |
|
2269 /** |
|
2270 * Set internal state based on camera event. |
|
2271 */ |
|
2272 void SetStateFromEvent( TCamCameraEventId aEventId ); |
|
2273 |
|
2274 void InitCaptureLimitL(); |
|
2275 |
|
2276 static TCamCameraRequestId |
|
2277 NextRequestL( const TCamCameraState& aFrom, |
|
2278 const TCamCameraState& aTo ); |
|
2279 |
|
2280 static TCamCameraEventId |
|
2281 ResponseForRequest( const TCamCameraRequestId& aRequestId ); |
|
2282 |
|
2283 |
|
2284 /** |
|
2285 * Called when mmc is about to be dismounted |
|
2286 */ |
|
2287 TInt DriveChangeL( TCamDriveChangeType aType ); |
|
2288 |
|
2289 /** |
|
2290 * Rotate the snapshot copy before thumbnail creation |
|
2291 */ |
|
2292 void RotateSnapshotL(); |
|
2293 |
|
2294 /** |
|
2295 * Handle change in image quality setting. |
|
2296 * Handle stopping viewfinder, re-preparing quality and |
|
2297 * restarting viewfinder if viewfinder is running. |
|
2298 * Notify observers about quality change. |
|
2299 */ |
|
2300 void HandleImageQualitySettingChangeL(); |
|
2301 |
|
2302 // ======================================================= |
|
2303 private: // Data |
|
2304 TBool iValueIsStored; |
|
2305 CCamCameraController* iCameraController; |
|
2306 CCamSettingProvider* iSettingProvider; |
|
2307 |
|
2308 TUint iBusyFlags; // TCamBusyFlags values |
|
2309 TCamAppControllerInfo iInfo; |
|
2310 |
|
2311 // Temporarily stop notifications to observers |
|
2312 TBool iMuteNotifications; |
|
2313 |
|
2314 // Observers of controller events |
|
2315 RPointerArray<MCamControllerObserver> iControllerObservers; |
|
2316 TInt iCameraReferences; |
|
2317 |
|
2318 // The settings model for dynamic and static data. |
|
2319 // CCamSettingsModelBase* iSettingsModel; |
|
2320 MCamSettingsModel* iSettingsModel; |
|
2321 MCamSettingPreviewHandler* iSettingsPreviewHandler; // Currently same object as iSettingsModel. |
|
2322 RArray<TCamSettingItemIds> iPreviewRollbacks; // Used when cancelling previews. |
|
2323 |
|
2324 // Used to indicate whether user is sliding in the self timer preview. |
|
2325 TBool iSlideInSelfTimerPreview; |
|
2326 |
|
2327 TBool iVideoPrepareNeeded; // Video re-prepare needed due to setting change |
|
2328 |
|
2329 // Boolean to record if view finder should be frozen at next frame |
|
2330 TBool iFreezeViewFinder; |
|
2331 // Boolean to indicate that the frozen frame should be updated |
|
2332 TBool iUpdateFrozenFrame; |
|
2333 |
|
2334 // name for next file, including path and extension |
|
2335 TFileName iSuggestedVideoPath; |
|
2336 // Used to indicate that the media storage has been changed tbe |
|
2337 // pathnames need to be checked |
|
2338 TCamMediaStorage iSetNewPathnamesPending; |
|
2339 // Counters used for creating multiple month folders |
|
2340 TInt iMonthFolderCounters[CCamFolderUtility::ECamFolderTypeLast]; |
|
2341 // Counter for image number. |
|
2342 // Stored locally to avoid performance problems during burst. |
|
2343 TInt iImageNumberCache; |
|
2344 |
|
2345 // Whether or not the engine is initialized for video recording |
|
2346 TBool iVideoRecorderInitialized; |
|
2347 |
|
2348 // estimate of record time elapsed |
|
2349 TTimeIntervalMicroSeconds iVideoTimeElapsed; |
|
2350 // estimate of record time remaining |
|
2351 TTimeIntervalMicroSeconds iVideoTimeRemaining; |
|
2352 |
|
2353 // Whether or not a capture mode transition is in progress |
|
2354 TBool iCaptureModeTransitionInProgress; |
|
2355 |
|
2356 // Active object for saving images to file asynchronously |
|
2357 CCamImageSaveActive* iImageSaveActive; |
|
2358 // Array containing data that represents the images in a burst capture |
|
2359 CCamBurstCaptureArray* iCaptureArray; |
|
2360 // Index into burst capture array used to determine current image for |
|
2361 // SnapshotImage(), CurrentImageName(), CurrentFullFileName() and |
|
2362 // DeleteCurrentFile(). Set by call to SetAsCurrentImage(). |
|
2363 // Single capture and video always use index 0. |
|
2364 TInt iCurrentImageIndex; |
|
2365 // Filenames for a timelapse sequence used for the delete sequence option |
|
2366 CDesCArray* iSequenceFilenameArray; |
|
2367 // Tracks usage of the capture array, for timely release of memory |
|
2368 TInt iArrayUsageCount; |
|
2369 // Capture count requested. |
|
2370 // Used in burst and self-timer+timelapse modes. |
|
2371 TInt iRequestedCaptureCount; |
|
2372 // Indicates wheter autofocuscancel requests should be handled or not.. |
|
2373 // Used in CancelFocusAndCapture. |
|
2374 TBool iNoBurstCancel; |
|
2375 |
|
2376 // Indicates if capturekey has been raised or not. This is used to |
|
2377 // determine if bursttimer should be activated or not. |
|
2378 TBool iKeyUP; |
|
2379 |
|
2380 // Timer to control when short burst is changed to press and hold burst. |
|
2381 CCamTimer* iBurstTimer; |
|
2382 // Timer for switch to standby mode |
|
2383 CCamTimer* iIdleTimer; |
|
2384 // Timer for initiating Time Lapse captures |
|
2385 CCamTimer* iTimeLapseTimer; |
|
2386 |
|
2387 // Status variable for location trail |
|
2388 TBool iLocationTrailStarted; |
|
2389 |
|
2390 // Timer for stopping location trail |
|
2391 CCamTimer* iLocationTrailTimer; |
|
2392 |
|
2393 // Whether or not a capture key pressed during image saving |
|
2394 TBool iCaptureKeyPressedWhileImageSaving; |
|
2395 // flag to indicate current VF status |
|
2396 TBool iViewFinding; |
|
2397 // timer to keep backlight active while VF is running |
|
2398 CPeriodic* iBacklightTimer; |
|
2399 // Class for playing sounds |
|
2400 CCamAudioPlayerController* iSoundPlayer; |
|
2401 CRepository* iRepository; |
|
2402 TInt iDiskCriticalLevel; // critical threshold for card storage |
|
2403 TInt iRamDiskCriticalLevel; // critical threshold for phone memory storage |
|
2404 // Whether we are currently in a call or ringing |
|
2405 TBool iInCallOrRinging; |
|
2406 // Keep track of whether we are currently saving a video clip or image |
|
2407 TBool iSaving; |
|
2408 TBool iSaveStarted; |
|
2409 // Keep track of whether a ReleaseEngine call has been made while an Init call has been made |
|
2410 TBool iPendingRelease; |
|
2411 TBool iEndKeyWaiting; |
|
2412 TBool iCompleteTimeLapsePending; |
|
2413 TBool iAutoFocusRequested; |
|
2414 TBool iCaptureRequested; |
|
2415 TBool iVideoRequested; |
|
2416 TBool iAfNeeded; |
|
2417 |
|
2418 TBool iDemandKeyRelease; // Demand to release capture key |
|
2419 |
|
2420 // Keep track of the camera that the next switch will activate |
|
2421 TInt iNextSwitchIsToPrimaryCamera; |
|
2422 |
|
2423 // Flag for queued Camera switch operation |
|
2424 TCameraSwitchRequired iCameraSwitchRequired; |
|
2425 |
|
2426 TBool iForceUseOfPhoneMemory; |
|
2427 |
|
2428 // Keeps track of the number of times we have attempted to set the video name |
|
2429 TInt iVideoNameRetries; |
|
2430 |
|
2431 // Specified whether an image save request is pending. That is, |
|
2432 // we are waiting for the engine to return with an image that can be saved. |
|
2433 // Required to let post-capture know whether an image has been saved yet. |
|
2434 TBool iImageSaveRequestPending; |
|
2435 |
|
2436 // Keeps track of the camera slider state so that |
|
2437 // we don't have to keep accessing the shared data file |
|
2438 TInt iSlideState; |
|
2439 TInt iNewSlideState; |
|
2440 |
|
2441 // callback used for delayed slider update |
|
2442 CPeriodic* iSliderCallBack; |
|
2443 |
|
2444 // Slider event flag |
|
2445 TBool iSliderCloseEvent; |
|
2446 |
|
2447 // The period between each timelapse capture |
|
2448 TTimeIntervalMicroSeconds iTimeLapseInterval; |
|
2449 // The time at which the previous timelapse capture was initiated |
|
2450 TTime iTimeLapseStartTime; |
|
2451 |
|
2452 |
|
2453 |
|
2454 CSensrvChannel* iAccSensorChannel; |
|
2455 TBool iAccSensorListening; |
|
2456 TBool iAccSensorInfoInitialized; |
|
2457 // Flag to allow delayed re-preparation of engine |
|
2458 TBool iOrientationChangeOccured; |
|
2459 |
|
2460 // Outside flags, as available for Camera Controller at all times. |
|
2461 TCamImageOrientation iImageOrientation; |
|
2462 TCamImageOrientation iLastImageOrientation; |
|
2463 |
|
2464 // Property watcher to report changes in the slide state |
|
2465 CCamPropertyWatcher* iSlideStateWatcher; |
|
2466 // Property watcher to report changes in the keylock state |
|
2467 CCamPropertyWatcher* iKeyLockStatusWatcher; |
|
2468 // Set to ETrue if shutter sound always played |
|
2469 // otherwise playing shutter sound depends on |
|
2470 // current profile |
|
2471 TBool iShutterSndAlwaysOn; |
|
2472 // Active object to listen to the call state. |
|
2473 CCamCallStateAo* iCallStateAo; |
|
2474 // Organises notifications to observers of capture completion |
|
2475 CCamObserverHandler* iCaptureCompletionObserverHandler; |
|
2476 TInt iActualBurst; |
|
2477 CCamTimer* iCaptureToneDelayTimer; |
|
2478 // Whether or not the video was stopped due to the phone app |
|
2479 // having the foreground |
|
2480 TBool iVideoStoppedForPhoneApp; |
|
2481 // used to simulate the receipt of a viewfinder frame when |
|
2482 // timelapse capturing. |
|
2483 CFbsBitmap* iSnapShotCopy; |
|
2484 // estimated snapshot size in bytes - used when monitoring free |
|
2485 // RAM during burst capture |
|
2486 TInt iSnapshotDataSize; |
|
2487 // array of estimated jpeg sizes in bytes for different image |
|
2488 // resolutions - used when monitoring free RAM during burst capture |
|
2489 RArray<TInt> iJpegDataSizes; |
|
2490 // array of estimated post capture sizes required in bytes for |
|
2491 // different image resolutions - used when monitoring free RAM |
|
2492 // during burst capture |
|
2493 RArray<TInt> iSequencePostProcessDataSizes; |
|
2494 // Array of CameraEventInterested observers which wanted to be camera |
|
2495 // observers when camera wasn't yet created. When camera is created |
|
2496 // Observers from this array should be attached first and array should |
|
2497 // be cleared. |
|
2498 RArray<const MCamCameraObserver*> iPendingObserversArray; |
|
2499 RArray<TUint> iCameraEventInterested; |
|
2500 |
|
2501 // Used to wake the camera hardware approximately 2-3 seconds before |
|
2502 // a timelapse capture |
|
2503 TBool iCameraWoken; |
|
2504 TBool iZoomWaitingForCamera; |
|
2505 TBool iNewZoomPending; |
|
2506 TInt iDesiredZoomVal; |
|
2507 |
|
2508 TBool iSequenceCaptureInProgress; |
|
2509 TInt iLongSequenceLimit; |
|
2510 |
|
2511 // Boolean to determine whether filename has already been |
|
2512 // reserved for the image being currently captured. Reserving |
|
2513 // is done when either the image's snapshot snapshot or |
|
2514 // image data arrives. (But not again when the other one comes) |
|
2515 TBool iFilenameReserved; |
|
2516 TCamEvCompRange iEvRange; |
|
2517 |
|
2518 #if defined(RD_MDS_2_5) && !defined(__WINSCW__) |
|
2519 RLocationTrail iLocationUtility; |
|
2520 TBool iLocationUtilityConnected; |
|
2521 #endif // __WINSCW__ |
|
2522 |
|
2523 #ifdef CAMERAAPP_PERFORMANCE_MEASUREMENT |
|
2524 TCamPerformanceState iPerformanceState; |
|
2525 #endif |
|
2526 |
|
2527 TBool iAppUiAvailable; |
|
2528 // If this boolean is set to true, the next focus successful |
|
2529 // or focus failed event should be ignored as it's resulted by |
|
2530 // moving lens to hyperfocal position when cancelling AF. |
|
2531 TBool iAFCancelInProgress; |
|
2532 // Holds last made autofocusrequest type or 0, if there are no |
|
2533 // pending autofocus requests. |
|
2534 TInt iPendingAFRequest; |
|
2535 // AFrequest currently in processing. |
|
2536 TInt iCurrentAFRequest; |
|
2537 CCamFlashStatus* iFlashStatus; |
|
2538 TBool iFlashModeSaved; |
|
2539 TCamSceneId iSavedFlashScene; |
|
2540 TCamFlashId iSavedFlashMode; |
|
2541 TBool iSettingsRestoreNeeded; |
|
2542 CCamConfiguration* iConfiguration; //< Configuration Manager. *owned* |
|
2543 CCFClient* iContextFwClient; |
|
2544 TBool iDefineContextSuccessful; |
|
2545 TBool iStorageChangeProcessOngoing; |
|
2546 // own. |
|
2547 CCamGSInterface* iPlugin; |
|
2548 TBool iSilentProfile; |
|
2549 TInt iTimeLapseCaptureCount; |
|
2550 RFs iFs; |
|
2551 CCamDriveChangeNotifier* iDriveChangeNotifier; |
|
2552 TCamMediaStorage iCurrentStorage; |
|
2553 TCamMediaStorage iPreferredStorageLocation; |
|
2554 TCamMediaStorage iForcedStorageLocation; |
|
2555 TCamMediaStorage iInitialVideoStorageLocation; |
|
2556 TBool iCaptureStoppedForUsb; |
|
2557 TBool iDismountPending; |
|
2558 TBool iAllSnapshotsReceived; |
|
2559 CCamTimer* iDeepSleepTimer; // own |
|
2560 TBool iDeepSleepTimerExpired; |
|
2561 // not owned by camappcontroller |
|
2562 CCameraUiConfigManager* iConfigManager; |
|
2563 TBool iVideoInitNeeded; // Used to decide if the need to call CAE video init //PS |
|
2564 CCamSyncRotatorAo* iRotatorAo; |
|
2565 CFbsBitmap* iRotatedSnapshot; |
|
2566 CCamBurstCaptureArray* iRotationArray; |
|
2567 // orientation at capture time |
|
2568 TCamImageOrientation iCaptureOrientation; |
|
2569 |
|
2570 }; |
|
2571 |
|
2572 #endif // CAMAPPCONTROLLER_H |
|
2573 |
|
2574 // End of File |