|
1 /* |
|
2 * Copyright (c) 2007-2008 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: Data type definitions for Camera Controller. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CAM_CONTROLLERTYPES_H |
|
20 #define CAM_CONTROLLERTYPES_H |
|
21 |
|
22 #include "camcameracontrollerflags.hrh" |
|
23 #include "camcamerarequests.h" |
|
24 #ifdef CAMERAAPP_CAPI_V2_ADV |
|
25 #include <ecamadvsettings.h> |
|
26 #endif |
|
27 |
|
28 // Max video recording time is 1:29:59 |
|
29 // To be moved to a separate constants header. |
|
30 const TInt64 KMaxRecordingLength = MAKE_TINT64( 1, 0x41CE33C0 ); |
|
31 |
|
32 typedef RArray<TCamCameraRequestId> RCamRequestArray; |
|
33 |
|
34 |
|
35 enum TCamCameraStateFlags |
|
36 { |
|
37 ECamIdle = 0, |
|
38 ECamReserved = 1<<0, |
|
39 ECamPowerOn = 1<<1, |
|
40 ECamVFOn = 1<<2, |
|
41 ECamImageOn = 1<<3, |
|
42 ECamVideoOn = 1<<4 |
|
43 // ECamCaptureOn = 1<<5 |
|
44 }; |
|
45 |
|
46 enum TCamCameraCaptureState |
|
47 { |
|
48 ECamCaptureOff, |
|
49 ECamCaptureOn, |
|
50 ECamCapturePaused |
|
51 }; |
|
52 |
|
53 enum TCamCameraTriState |
|
54 { |
|
55 ECamTriIdle, |
|
56 ECamTriInactive, |
|
57 ECamTriActive |
|
58 }; |
|
59 |
|
60 enum TCamCameraReadyState |
|
61 { |
|
62 ECamUnknown, |
|
63 ECamNotReady, |
|
64 ECamReady |
|
65 }; |
|
66 |
|
67 enum TCamViewfinderMode |
|
68 { |
|
69 ECamViewfinderNone, |
|
70 ECamViewfinderBitmap, |
|
71 ECamViewfinderDirect |
|
72 }; |
|
73 |
|
74 enum TCamCameraControllerBusyFlags |
|
75 { |
|
76 ECamBusyOff = 0, |
|
77 ECamBusySequence = 1, |
|
78 ECamBusySingle = 2, |
|
79 ECamBusySetting = 4 |
|
80 }; |
|
81 |
|
82 class TCamVideoRecordingTimes |
|
83 { |
|
84 public: |
|
85 TTimeIntervalMicroSeconds iTimeElapsed; |
|
86 TTimeIntervalMicroSeconds iTimeRemaining; |
|
87 }; |
|
88 |
|
89 |
|
90 /** |
|
91 * Camera controller information |
|
92 */ |
|
93 class TCamControllerInfo |
|
94 { |
|
95 // =================================== |
|
96 public: |
|
97 |
|
98 TCamControllerInfo(); |
|
99 |
|
100 void Reset( TBool aPreserveBusyFlag = EFalse, |
|
101 TBool aPreserveCameraIndex = EFalse ); |
|
102 |
|
103 void PrintInfo() const; |
|
104 |
|
105 // =================================== |
|
106 // Data |
|
107 public: |
|
108 |
|
109 /** |
|
110 * Current camera index |
|
111 */ |
|
112 TInt iCurrentCamera; |
|
113 |
|
114 /** |
|
115 * Controller overall state. |
|
116 * TCamCameraStateFlags ORed. |
|
117 */ |
|
118 TUint iState; |
|
119 |
|
120 /** |
|
121 * Current state of capturing image or video. |
|
122 */ |
|
123 TCamCameraCaptureState iCaptureState; //< Is capture on, off or paused |
|
124 TInt iCaptureLimit; //< Amount of captures (images) requested |
|
125 TInt iCaptureCount; //< Amount of captures (images) received |
|
126 TInt iSnapshotCount; //< Amount of snapshots (images) received |
|
127 |
|
128 /** |
|
129 * Viewfinder details |
|
130 */ |
|
131 TCamViewfinderMode iVfMode; |
|
132 TCamCameraTriState iVfState; |
|
133 TSize iViewfinderSize; |
|
134 CCamera::TFormat iViewfinderFormat; |
|
135 |
|
136 /** |
|
137 * Snapshot details |
|
138 */ |
|
139 TCamCameraTriState iSsState; |
|
140 TSize iSnapshotSize; |
|
141 CCamera::TFormat iSnapshotFormat; |
|
142 TBool iSnapshotAspectMaintain; |
|
143 |
|
144 #ifdef CAMERAAPP_CAPI_V2_ADV |
|
145 /** |
|
146 * Autofocus range |
|
147 */ |
|
148 CCamera::CCameraAdvancedSettings::TFocusRange iCurrentFocusRange; |
|
149 #endif // CAMERAAPP_CAPI_V2_ADV |
|
150 |
|
151 |
|
152 /** |
|
153 * Is controller busy handling requests? |
|
154 * New requests can not be issued if this is not EBusyOff. |
|
155 * CancelSequence and CancelRequest can still be used. |
|
156 */ |
|
157 TUint iBusy; |
|
158 |
|
159 // =================================== |
|
160 }; |
|
161 |
|
162 |
|
163 #ifdef CAMERAAPP_CAPI_V2_ADV |
|
164 /** |
|
165 * Information on advanced settings. |
|
166 * (These use CCameraAdvancedSettings.) |
|
167 * |
|
168 */ |
|
169 class TCamAdvancedSettingInfo |
|
170 { |
|
171 // =================================== |
|
172 public: |
|
173 |
|
174 TCamAdvancedSettingInfo(); |
|
175 ~TCamAdvancedSettingInfo(); |
|
176 |
|
177 void Reset(); |
|
178 void PrintInfo() const; |
|
179 |
|
180 // =================================== |
|
181 // Data |
|
182 // |
|
183 // NOTE: Remember to modify Reset() if members are added. |
|
184 public: |
|
185 |
|
186 // Camera index which this info matches |
|
187 TInt iForCameraIndex; |
|
188 |
|
189 // Exposure compenstion support |
|
190 TInt iEvModesSupport; |
|
191 RArray<TInt> iEvStepsSupport; |
|
192 TValueInfo iEvStepsValueInfo; |
|
193 |
|
194 // ISO rate support |
|
195 RArray<TInt> iIsoRatesSupport; |
|
196 |
|
197 // Digital zoom steps support |
|
198 RArray<TInt> iDigitalZoomSupport; |
|
199 TValueInfo iDigitalZoomValueInfo; |
|
200 |
|
201 #ifdef CAMERAAPP_CAPI_V2_IP |
|
202 // Colour fx support |
|
203 RArray<TInt> iColourEffectSupport; |
|
204 TValueInfo iColourEffectValueInfo; |
|
205 |
|
206 // Sharpness support |
|
207 RArray<TInt> iSharpnessSupport; |
|
208 TValueInfo iSharpnessValueInfo; |
|
209 #endif |
|
210 |
|
211 // Stabilization support |
|
212 TInt iStabilizationModeSupport; |
|
213 TInt iStabilizationEffectSupport; |
|
214 TInt iStabilizationComplexitySupport; |
|
215 |
|
216 // =================================== |
|
217 }; |
|
218 #endif // CAMERAAPP_CAPI_V2_ADV |
|
219 |
|
220 /** |
|
221 * Container for CCamera supported resolutions |
|
222 * for certain camera index and format. |
|
223 */ |
|
224 class TCamCameraResolutionSupport |
|
225 { |
|
226 // =================================== |
|
227 public: |
|
228 |
|
229 TCamCameraResolutionSupport(); |
|
230 ~TCamCameraResolutionSupport(); |
|
231 |
|
232 void Reset(); |
|
233 |
|
234 // =================================== |
|
235 // Data |
|
236 public: |
|
237 |
|
238 TInt iForCameraIndex; |
|
239 TInt iForCameraFormat; |
|
240 RArray<TSize> iResolutions; |
|
241 |
|
242 // =================================== |
|
243 }; |
|
244 |
|
245 |
|
246 |
|
247 // =========================================================================== |
|
248 // Debug strings |
|
249 #ifdef _DEBUG |
|
250 const TUint16* const KCamCameraCaptureStateNames[] = |
|
251 { |
|
252 (const TUint16* const)_S16("ECamCaptureOff"), |
|
253 (const TUint16* const)_S16("ECamCaptureOn"), |
|
254 (const TUint16* const)_S16("ECamCapturePaused") |
|
255 }; |
|
256 |
|
257 const TUint16* const KCamCameraTriStateNames[] = |
|
258 { |
|
259 (const TUint16* const)_S16("ECamTriIdle"), |
|
260 (const TUint16* const)_S16("ECamTriInactive"), |
|
261 (const TUint16* const)_S16("ECamTriActive") |
|
262 }; |
|
263 |
|
264 const TUint16* const KCamCameraReadyStateNames[] = |
|
265 { |
|
266 (const TUint16* const)_S16("ECamUnknown"), |
|
267 (const TUint16* const)_S16("ECamNotReady"), |
|
268 (const TUint16* const)_S16("ECamReady") |
|
269 }; |
|
270 |
|
271 const TUint16* const KCamViewfinderModeNames[] = |
|
272 { |
|
273 (const TUint16* const)_S16("ECamViewfinderNone"), |
|
274 (const TUint16* const)_S16("ECamViewfinderBitmap"), |
|
275 (const TUint16* const)_S16("ECamViewfinderDirect") |
|
276 }; |
|
277 #endif // _DEBUG |
|
278 |
|
279 #endif // CAM_CONTROLLERTYPES_H |
|
280 |
|
281 // end of file |