1 /* |
|
2 * Copyright (c) 2002 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: Camera Application Engine |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CAEENGINE_H |
|
21 #define CAEENGINE_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <gdi.h> |
|
26 #include <ecam.h> |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class RWsSession; |
|
30 class CWsScreenDevice; |
|
31 class RWindowBase; |
|
32 class CFbsBitmap; |
|
33 |
|
34 // CONSTANTS |
|
35 |
|
36 // Service UIDs. Services are usually implemented in plug-in extension modules. |
|
37 |
|
38 const TUid KCaeProcessImageServiceUid = { 0x101F856A }; |
|
39 const TUid KCaeSettingsServiceUid = { 0x101F8569 }; |
|
40 |
|
41 |
|
42 // CLASS DECLARATIONS |
|
43 |
|
44 /** |
|
45 * The feature list item. The features that implement each service are sorted according |
|
46 * to the calling order in the engine. |
|
47 * |
|
48 * @lib CAEENGINE.LIB |
|
49 * @since 2.8 |
|
50 */ |
|
51 |
|
52 struct TCaeOrderedFeatureListItem |
|
53 { |
|
54 /** The UID of the service interface */ |
|
55 TUid iServiceUid; |
|
56 |
|
57 /** The UID of the feature. It identifies the extension that implements this service. */ |
|
58 TUid iFeatureUid; |
|
59 }; |
|
60 |
|
61 typedef RArray<TCaeOrderedFeatureListItem> RCaeOrderedFeatureList; |
|
62 |
|
63 /** |
|
64 * Information about camera and the engine. |
|
65 * |
|
66 * @lib CAEENGINE.LIB |
|
67 * @since 2.1 |
|
68 */ |
|
69 class TCamAppEngineInfo |
|
70 { |
|
71 |
|
72 public: |
|
73 // Camera Application Engine options. |
|
74 enum TOptions |
|
75 { |
|
76 /** No options supported */ |
|
77 ENoCaeOptionsSupported = 0x0000, |
|
78 /** Still capturing burst mode flag */ |
|
79 EStillBurstSupported = 0x0001, |
|
80 /** Ev compensation flag */ |
|
81 EEvCompensationSupported = 0x0002 |
|
82 }; |
|
83 |
|
84 public: |
|
85 |
|
86 // Camera hardware version present. |
|
87 TVersion iHardwareVersion; |
|
88 // Camera driver software version present. |
|
89 TVersion iSoftwareVersion; |
|
90 // Actual orientation of the camera. |
|
91 TCameraInfo::TCameraOrientation iOrientation; |
|
92 |
|
93 // Bitfield of CCamera::TOptions available. |
|
94 TUint32 iOptionsSupported; |
|
95 // Bitfield of CCamera::TFlash modes available. |
|
96 TUint32 iFlashModesSupported; |
|
97 // Bitfield of CCamera::TExposure modes available. |
|
98 TUint32 iExposureModesSupported; |
|
99 // Bitfield of CCamera::TWhiteBalance modes available. |
|
100 TUint32 iWhiteBalanceModesSupported; |
|
101 |
|
102 // Minimum zoom value allowed. Must be negative or |
|
103 // zero (for not supported). |
|
104 TInt iMinZoom; |
|
105 // Maximum zoom value allowed. Must be positive or |
|
106 // zero (for not supported). |
|
107 TInt iMaxZoom; |
|
108 // Maximum digital zoom value allowed. Must be positive or |
|
109 // zero (for not supported). |
|
110 TInt iMaxDigitalZoom; |
|
111 |
|
112 // Image size multiplier corresponding to minimum zoom value. |
|
113 // Must be between 0 and 1 inclusive. |
|
114 TReal32 iMinZoomFactor; |
|
115 // Image size multiplier corresponding to maximum zoom value. |
|
116 // Must be greater than or equal to 1. |
|
117 TReal32 iMaxZoomFactor; |
|
118 // Image size multiplier corresponding to maximum digital zoom value. |
|
119 // Must be greater than or equal to 1. |
|
120 TReal32 iMaxDigitalZoomFactor; |
|
121 |
|
122 // Count of still image capturing sizes allowed. |
|
123 TInt iNumImageSizesSupported; |
|
124 // Bitfield of still image CCamera::TFormat values supported. |
|
125 TUint32 iImageFormatsSupported; |
|
126 |
|
127 // Count of still image capturing quality levels initialized. |
|
128 TInt iNumStillQualityLevelsSupported; |
|
129 // Count of video recording quality levels initialized. |
|
130 TInt iNumVideoQualityLevelsSupported; |
|
131 |
|
132 // Bitfield of CCaeEngine::TOptions available. |
|
133 TUint32 iCaeOptionsSupported; |
|
134 |
|
135 // Integer (e.g. -9) that corresponds to minimum EV compensation value. |
|
136 TInt iMinEvCompensation; |
|
137 // Integer (e.g. 9) that corresponds to maximum EV compensation value. |
|
138 TInt iMaxEvCompensation; |
|
139 // Minimum camera EV compensation value (e.g. -3.0). |
|
140 TReal32 iMinEvCompensationValue; |
|
141 // Maximum camera EV compensation value (e.g. 3.0). |
|
142 TReal32 iMaxEvCompensationValue; |
|
143 }; |
|
144 |
|
145 |
|
146 /** |
|
147 * Camera Application Engine observer class. |
|
148 * Mixin base class for the clients of the engine. |
|
149 * |
|
150 * @lib CAEENGINE.LIB |
|
151 * @since 2.1 |
|
152 */ |
|
153 class MCamAppEngineObserver |
|
154 { |
|
155 |
|
156 public: |
|
157 |
|
158 /** |
|
159 * Called asynchronously when CCaeEngine::Init(), CCaeEngine::PowerOn(), |
|
160 * or CCaeEngine::Reserve() completes. |
|
161 * Indicates if Camera Application Engine is ready for operation, |
|
162 * the camera is reserved and its power is switched on. |
|
163 * @since 2.1 |
|
164 * @param aError Error code KErrNone to indicate success or a standard Symbian OS error code. |
|
165 * @return void |
|
166 */ |
|
167 virtual void McaeoInitComplete( TInt aError ) = 0; |
|
168 |
|
169 /** |
|
170 * Called (possibly asynchronously) when preparing of still image |
|
171 * capturing completes after |
|
172 * PrepareStillCaptureL() has been called. |
|
173 * @since 2.1 |
|
174 * @param aError Error code KErrNone to indicate success or a standard Symbian OS error code. |
|
175 * @return void |
|
176 */ |
|
177 virtual void McaeoStillPrepareComplete( TInt aError ) = 0; |
|
178 |
|
179 /** |
|
180 * Called asynchronously when preparing of video recording completes |
|
181 * after PrepareVideoRecordingL() has been called. |
|
182 * May be called second time with an error code after a successful preparation |
|
183 * if video recording loses its prepared state for some reason (e.g. audio HW |
|
184 * is reserved for some other application). |
|
185 * @since 2.1 |
|
186 * @param aError Error code KErrNone to indicate success or a standard Symbian OS error code. |
|
187 * @return void |
|
188 */ |
|
189 virtual void McaeoVideoPrepareComplete( TInt aError ) = 0; |
|
190 |
|
191 /** |
|
192 * Called asynchronously when a view finder bitmap is ready for display |
|
193 * CCaeEngine::StartViewFinderBitmapsL(...) has been called. |
|
194 * Called repeatedly until CCaeEngine::StopViewFinder() is called. |
|
195 * The bitmap should be drawn synchronously as it will be re-used as soon as this function returns. |
|
196 * @since 2.1 |
|
197 * @param aFrame Reference to a bitmap containing view finder data. Does not transfer ownership. |
|
198 * @param aError Error code KErrNone to indicate success or a standard Symbian OS error code. |
|
199 * @return void |
|
200 */ |
|
201 virtual void McaeoViewFinderFrameReady( CFbsBitmap& aFrame, |
|
202 TInt aError ) = 0; |
|
203 |
|
204 /** |
|
205 * Called asynchronously when CCaeEngine::CaptureStill() is called and |
|
206 * snap-image for displaying is ready. |
|
207 * @since 2.1 |
|
208 * @param aBitmap Constant reference to a bitmap set on success for Symbian OS bitmap formats. |
|
209 * Does not transfer ownership. Bitmap contents can not be changed. |
|
210 * @param aError Error code KErrNone to indicate success or a standard Symbian OS error code. |
|
211 * @return void |
|
212 */ |
|
213 virtual void McaeoSnapImageReady( const CFbsBitmap& aBitmap, |
|
214 TInt aError ) = 0; |
|
215 |
|
216 /** |
|
217 * Called asynchronously when CCaeEngine::CaptureStill() is called and |
|
218 * image for storaging is ready. |
|
219 * Depending on the prepared image data format, delivers either |
|
220 * Symbian OS bitmap image or an image in another format, not both. |
|
221 * The bitmap/the other format image must be used and deleted before |
|
222 * returning. |
|
223 * @since 2.1 |
|
224 * @param aBitmap Pointer to a bitmap transferring ownership and set on success |
|
225 * for Symbian OS bitmap formats. |
|
226 * @param aData Pointer to image data transferring ownership and set on success |
|
227 * for non-Symbian OS bitmap or other image data formats. |
|
228 * @param aError Error code KErrNone to indicate success or a standard Symbian OS error code. |
|
229 * @return void |
|
230 */ |
|
231 virtual void McaeoStillImageReady( CFbsBitmap* aBitmap, |
|
232 HBufC8* aData, |
|
233 TInt aError ) = 0; |
|
234 |
|
235 /** |
|
236 * Called (possibly asynchronously) when video recording is running |
|
237 * after CCaeEngine::StartVideoRecording() or |
|
238 * CCaeEngine::ResumeVideoRecording() has been called. |
|
239 * @since 2.1 |
|
240 * @param aError Error code KErrNone to indicate success or a standard Symbian OS error code. |
|
241 * @return void |
|
242 */ |
|
243 virtual void McaeoVideoRecordingOn( TInt aError ) = 0; |
|
244 |
|
245 /** |
|
246 * Called (possibly asynchronously) when video recording is paused after |
|
247 * CCaeEngine::PauseVideoRecording() has been called. |
|
248 * @since 2.1 |
|
249 * @param aError Error code KErrNone to indicate success or a standard Symbian OS error code. |
|
250 * @return void |
|
251 */ |
|
252 virtual void McaeoVideoRecordingPaused( TInt aError ) = 0; |
|
253 |
|
254 /** |
|
255 * Called (possibly asynchronously) when video recording is completed |
|
256 * after CCaeEngine::StopVideoRecording() has been called or |
|
257 * recording has been completed for some other reason. |
|
258 * @since 2.1 |
|
259 * @param aError Error code KErrNone to indicate success or a standard Symbian OS error code. |
|
260 * if aError == KErrDiskFull, then disk storage is full. |
|
261 * if aError == KErrCompletion, then clip max size was reached. |
|
262 * @return void |
|
263 */ |
|
264 virtual void McaeoVideoRecordingComplete( TInt aError ) = 0; |
|
265 |
|
266 /** |
|
267 * Called asynchronously and repeatedly with timed intervals |
|
268 * when video clip recording is running after |
|
269 * CCaeEngine::StartVideoRecording() or |
|
270 * CCaeEngine::ResumeVideoRecording() has been called. |
|
271 * Also, called once by video recording pause operation |
|
272 * by CCaeEngine::PauseVideoRecording() and stop operation |
|
273 * by CCaeEngine::StopVideoRecording(). |
|
274 * @since 2.1 |
|
275 * @param aTimeElapsed Returns recording time elapsed from video recording start. |
|
276 * @param aTimeRemaining Returns estimated video recording time left |
|
277 * limited by storage capacity or max clip size. |
|
278 * @param aError Error code KErrNone to indicate success or a standard Symbian OS error code. |
|
279 * @return void |
|
280 */ |
|
281 virtual void McaeoVideoRecordingTimes( |
|
282 TTimeIntervalMicroSeconds aTimeElapsed, |
|
283 TTimeIntervalMicroSeconds aTimeRemaining, |
|
284 TInt aError ) = 0; |
|
285 |
|
286 /** |
|
287 * Called asynchronously when video recording is stopped and the CCaeEngine::SetAsyncVideoStopMode() |
|
288 * has been enabled. After this client may play sounds etc. while waiting the |
|
289 * McaeoVideoRecordingComplete call. |
|
290 * @since 5.0 |
|
291 * @return void |
|
292 */ |
|
293 virtual void McaeoVideoRecordingStopped() |
|
294 { |
|
295 |
|
296 }; |
|
297 }; |
|
298 |
|
299 |
|
300 /** |
|
301 * Camera Application Engine still burst observer class. |
|
302 * Mixin base class for the clients of Camera Application Engine. |
|
303 * |
|
304 * @lib CAEENGINE.LIB |
|
305 * @since 2.1 |
|
306 */ |
|
307 class MCaeStillBurstObserver |
|
308 { |
|
309 |
|
310 public: |
|
311 |
|
312 /** |
|
313 * Called asynchronously (multiple times) when still image burst |
|
314 * capturing is running and an image is captured after |
|
315 * CCaeEngine::CaptureStill() has been called. |
|
316 * Called once for every still image capture during the burst (just before the capture). |
|
317 * @since 2.1 |
|
318 * @param aError Error code KErrNone to indicate success or a standard Symbian OS error code. |
|
319 * @return void |
|
320 */ |
|
321 virtual void McaesboStillBurstCaptureMoment( TInt aError ) = 0; |
|
322 |
|
323 /** |
|
324 * Called asynchronously when still image burst capturing is completed |
|
325 * after CCaeEngine::CaptureStill() has been called. |
|
326 * Before completion the engine has delivered all the captured images |
|
327 * using McaeoSnapImageReady() and McaeoStillImageReady() methods of |
|
328 * MCamAppEngineObserver. |
|
329 * @since 2.1 |
|
330 * @param aImageCountDelivered Count of delivered burst images. |
|
331 * @param aError Error code KErrNone to indicate success or a standard Symbian OS error code. |
|
332 * @return void |
|
333 */ |
|
334 virtual void McaesboStillBurstComplete( |
|
335 TInt aImageCountDelivered, |
|
336 TInt aError ) = 0; |
|
337 }; |
|
338 |
|
339 |
|
340 /** |
|
341 * The Camera Application Engine interface (abstract base class). |
|
342 * |
|
343 * @lib CAEENGINE.LIB |
|
344 * @since 2.1 |
|
345 */ |
|
346 class CCaeEngine : public CBase |
|
347 { |
|
348 |
|
349 public: // Enumerations |
|
350 |
|
351 // Possible operation modes. |
|
352 enum TOperationMode |
|
353 { |
|
354 EOperationModeStill = 0x00, // Still capturing mode (default). |
|
355 EOperationModeVideo = 0x01 // Video recording mode. |
|
356 }; |
|
357 |
|
358 // Possible viewfinder types. |
|
359 enum TViewFinder |
|
360 { |
|
361 EViewFinderBitmaps = 0x00, // Bitmap-based (default). |
|
362 EViewFinderDirect = 0x01 // Direct Screen Access. |
|
363 }; |
|
364 |
|
365 // Possible zooming modes. |
|
366 enum TZoomMode |
|
367 { |
|
368 EZoomModeDigital = 0x00, // Digital zoom (default). |
|
369 EZoomModeOptical = 0x01, // Optical zoom. |
|
370 EZoomModeOpticalDigital = 0x02 // Optical+digital zoom. |
|
371 }; |
|
372 |
|
373 // Possible snap image generating modes. |
|
374 enum TSnapImageSource |
|
375 { |
|
376 ESnapImageSourceOriginal, // Create snap image from the captured (JPEG/Exif) image. |
|
377 ESnapImageSourceThumbnail // Create snap image from the thumbnail of the captured (Exif) image. |
|
378 }; |
|
379 |
|
380 public: // Creation |
|
381 |
|
382 /** |
|
383 * A static (factory) function to create the class instance. |
|
384 * @since 2.1 |
|
385 * @return Pointer to a fully constructed CCaeEngine object. |
|
386 * Ownership is passed to the caller. |
|
387 */ |
|
388 IMPORT_C static CCaeEngine* NewL(); |
|
389 |
|
390 /** |
|
391 * Sets the Camera Application Engine observer. |
|
392 * @since 2.1 |
|
393 * @param aObserver Reference to Camera Application Engine observer. |
|
394 * @return void |
|
395 */ |
|
396 virtual void SetCamAppEngineObserver( |
|
397 MCamAppEngineObserver& aObserver ) = 0; |
|
398 |
|
399 public: // General methods |
|
400 |
|
401 /** |
|
402 * Gets information about the supported Camera Application Engine and |
|
403 * Camera features. |
|
404 * @since 2.1 |
|
405 * @param aInfo Info about supported features. |
|
406 * @return void |
|
407 */ |
|
408 virtual void GetInfo( TCamAppEngineInfo& aInfo ) const = 0; |
|
409 |
|
410 /** |
|
411 * Initializes Camera Application Engine for still image capturing. |
|
412 * Reserves the camera and switches the camera power on. |
|
413 * Intialization must be done before all other operations, except |
|
414 * SetCamAppEngineObserver and GetInfo. |
|
415 * Calls observer method McaeoInitComplete(). |
|
416 * @since 2.1 |
|
417 * @param aCreateSnapImage Boolean indicating if "snap-images" |
|
418 * should be created, leading to calls of McaeoSnapImageReady. |
|
419 * @return void |
|
420 */ |
|
421 virtual void InitL( TBool aCreateSnapImage = ETrue ) = 0; |
|
422 |
|
423 /** |
|
424 * Initialize the engine for still image capturing. |
|
425 * Switches also camera power on. |
|
426 * Intialization must be done before all other operations, except |
|
427 * SetCamAppEngineObserver and GetInfo. |
|
428 * Calls observer method McaeoInitComplete(). |
|
429 * @since 2.1 |
|
430 * @param aSdUidStillQltyLevels Still capturing quality levels Shared Data initialization file UID. |
|
431 * @param aCreateSnapImage Boolean indicating if "snap-images" should be created |
|
432 * leading to calls of McaeoSnapImageReady. |
|
433 * @return void |
|
434 */ |
|
435 virtual void InitL( TUid aSdUidStillQltyLevels, |
|
436 TBool aCreateSnapImage = ETrue ) = 0; |
|
437 |
|
438 /** |
|
439 * Initializes video recording. |
|
440 * The initialization must be done before video recording operations. |
|
441 * @since 2.1 |
|
442 * @return void |
|
443 */ |
|
444 virtual void InitVideoRecorderL() = 0; |
|
445 |
|
446 /** |
|
447 * Initializes video recording. |
|
448 * The initialization must be done before video recording operations. |
|
449 * @since 2.1 |
|
450 * @param aSdUidVideoQltyLevels Video recording quality levels Shared Data initialization file UID. |
|
451 * @return void |
|
452 */ |
|
453 virtual void InitVideoRecorderL( TUid aSdUidVideoQltyLevels ) = 0; |
|
454 |
|
455 /** |
|
456 * Reserves the camera into use and switches the camera power on. |
|
457 * Calls observer method McaeoInitComplete(). |
|
458 * @since 2.1 |
|
459 * @return void |
|
460 */ |
|
461 virtual void Reserve() = 0; |
|
462 |
|
463 /** |
|
464 * Switches the camera power off and releases the camera. |
|
465 * @since 2.1 |
|
466 * @return void |
|
467 */ |
|
468 virtual void Release() = 0; |
|
469 |
|
470 /** |
|
471 * Switches the camera power on. |
|
472 * Calls observer method McaeoInitComplete(). |
|
473 * @since 2.1 |
|
474 * @return void |
|
475 */ |
|
476 virtual void PowerOn() = 0; |
|
477 |
|
478 /** |
|
479 * Switches the camera power off. |
|
480 * @since 2.1 |
|
481 * @return void |
|
482 */ |
|
483 virtual void PowerOff() = 0; |
|
484 |
|
485 public: // Camera settings |
|
486 |
|
487 /** |
|
488 * Sets the zoom mode. |
|
489 * @since 2.1 |
|
490 * @param aZoomMode Zoom mode to set. |
|
491 * @return void |
|
492 */ |
|
493 virtual void SetZoomModeL( TZoomMode aZoomMode = EZoomModeDigital ) = 0; |
|
494 |
|
495 /** |
|
496 * Gets the current zoom mode. |
|
497 * @since 2.1 |
|
498 * @return The current zoom mode. |
|
499 */ |
|
500 virtual TZoomMode ZoomMode() const = 0; |
|
501 |
|
502 /** |
|
503 * Sets the zoom value. |
|
504 * @since 2.1 |
|
505 * @param aZoomValue Index of the zoom factor to set. |
|
506 * @return void |
|
507 */ |
|
508 virtual void SetZoomValueL( TInt aZoomValue = 0 ) = 0; |
|
509 |
|
510 /** |
|
511 * Gets the current zoom value. |
|
512 * @since 2.1 |
|
513 * @return Index of the current zoom factor. |
|
514 */ |
|
515 virtual TInt ZoomValue() const = 0; |
|
516 |
|
517 /** |
|
518 * Sets the brightness. |
|
519 * @since 2.1 |
|
520 * @param aBrightness Brightness value in the range ECam.h SetBrightnessL allows. |
|
521 * @return void |
|
522 */ |
|
523 virtual void SetBrightnessL( TInt aBrightness = 0 ) = 0; |
|
524 |
|
525 /** |
|
526 * Gets the current brightness setting. |
|
527 * @since 2.1 |
|
528 * @return Brightness value. |
|
529 */ |
|
530 virtual TInt Brightness() const = 0; |
|
531 |
|
532 /** |
|
533 * Sets the contrast. |
|
534 * @since 2.1 |
|
535 * @param aContrast Contrast value in the range ECam.h SetContrastL allows. |
|
536 * @return void |
|
537 */ |
|
538 virtual void SetContrastL( TInt aContrast = 0 ) = 0; |
|
539 |
|
540 /** |
|
541 * Gets the current contrast setting. |
|
542 * @since 2.1 |
|
543 * @return Contrast value. |
|
544 */ |
|
545 virtual TInt Contrast() const = 0; |
|
546 |
|
547 /** |
|
548 * Sets the exposure mode. |
|
549 * @since 2.1 |
|
550 * @param aExposureMode Exposure mode in the range ECam.h SetExposureL allows. |
|
551 * @return void |
|
552 */ |
|
553 virtual void SetExposureModeL( |
|
554 CCamera::TExposure aExposureMode = CCamera::EExposureAuto ) = 0; |
|
555 |
|
556 /** |
|
557 * Gets the current exposure mode. |
|
558 * @since 2.1 |
|
559 * @return Exposure mode. |
|
560 */ |
|
561 virtual CCamera::TExposure ExposureMode() const = 0; |
|
562 |
|
563 /** |
|
564 * Sets the white balance mode. |
|
565 * @since 2.1 |
|
566 * @param aWhiteBalanceMode White balance mode in the range ECam.h SetWhiteBalanceL allows. |
|
567 * @return void |
|
568 */ |
|
569 virtual void SetWhiteBalanceModeL( |
|
570 CCamera::TWhiteBalance aWhiteBalanceMode = CCamera::EWBAuto ) = 0; |
|
571 |
|
572 /** |
|
573 * Gets the current white balance mode. |
|
574 * @since 2.1 |
|
575 * @return White balance mode. |
|
576 */ |
|
577 virtual CCamera::TWhiteBalance WhiteBalanceMode() const = 0; |
|
578 |
|
579 /** |
|
580 * Sets the flash mode. |
|
581 * @since 2.1 |
|
582 * @param aFlashMode Flash mode in the range ECam.h SetFlashL allows. |
|
583 * @return void |
|
584 */ |
|
585 virtual void SetFlashModeL( |
|
586 CCamera::TFlash aFlashMode = CCamera::EFlashNone ) = 0; |
|
587 |
|
588 /** |
|
589 * Gets the current flash mode. |
|
590 * @since 2.1 |
|
591 * @return Flash mode. |
|
592 */ |
|
593 virtual CCamera::TFlash FlashMode() const = 0; |
|
594 |
|
595 /** |
|
596 * Resets to the default setting values. |
|
597 * Resets the following settings: exposure mode, white balance mode, |
|
598 * zoom mode, zoom value, flash mode, brightness, and contrast. |
|
599 * @since 2.1 |
|
600 * @return void |
|
601 */ |
|
602 virtual void ResetToDefaultsL() = 0; |
|
603 |
|
604 public: // View finder |
|
605 |
|
606 /** |
|
607 * Sets/resets view finder image mirroring. |
|
608 * @since 2.1 |
|
609 * @param aMirror Boolean indicating whether view finder image should be mirrored or not. |
|
610 * @return void |
|
611 */ |
|
612 virtual void SetViewFinderMirrorL( TBool aMirror = EFalse ) = 0; |
|
613 |
|
614 /** |
|
615 * Queries if view finder image mirroring is on. |
|
616 * @since 2.1 |
|
617 * @return Boolean indicating whether view finder image is currently mirrored or not. |
|
618 */ |
|
619 virtual TBool ViewFinderMirror() const = 0; |
|
620 |
|
621 /** |
|
622 * Starts the bitmap-based view finder. |
|
623 * The engine starts to call observer method McaeoViewFinderFrameReady() repeatedly. |
|
624 * @since 2.1 |
|
625 * @param aSize Desired view finder size. |
|
626 * @return void |
|
627 */ |
|
628 virtual void StartViewFinderBitmapsL( TSize& aSize ) = 0; |
|
629 |
|
630 /** |
|
631 * Starts the bitmap-based view finder. |
|
632 * The engine starts to call observer method McaeoViewFinderFrameReady() repeatedly. |
|
633 * @since 2.1 |
|
634 * @param aSize Desired view finder size. |
|
635 * @param aCropRect Desired cropping/clipping rectangle. |
|
636 * @return void |
|
637 */ |
|
638 virtual void StartViewFinderBitmapsL( |
|
639 TSize& aSize, |
|
640 TRect& aCropRect ) = 0; |
|
641 |
|
642 /** |
|
643 * Starts the direct screen access view finder. |
|
644 * @since 2.1 |
|
645 * @param aWs Window server session. |
|
646 * @param aScreenDevice Software device screen. |
|
647 * @param aWindow Client-side handle to a server-side window. |
|
648 * @param aScreenRect Portion of screen in screen co-ordinates. |
|
649 * @return void |
|
650 */ |
|
651 virtual void StartViewFinderDirectL( |
|
652 RWsSession& aWs, |
|
653 CWsScreenDevice& aScreenDevice, |
|
654 RWindowBase& aWindow, |
|
655 TRect& aScreenRect ) = 0; |
|
656 |
|
657 /** |
|
658 * Starts the direct screen access view finder. |
|
659 * @since 2.1 |
|
660 * @param aWs Window server session. |
|
661 * @param aScreenDevice Software device screen. |
|
662 * @param aWindow Client-side handle to a server-side window. |
|
663 * @param aScreenRect Portion of screen in screen co-ordinates. |
|
664 * @param aCropRect Desired cropping/clipping rectangle. |
|
665 * @return void |
|
666 */ |
|
667 virtual void StartViewFinderDirectL( |
|
668 RWsSession& aWs, |
|
669 CWsScreenDevice& aScreenDevice, |
|
670 RWindowBase& aWindow, |
|
671 TRect& aScreenRect, |
|
672 TRect& aCropRect ) = 0; |
|
673 |
|
674 /** |
|
675 * Stops the view finder. |
|
676 * @since 2.1 |
|
677 * @return void |
|
678 */ |
|
679 virtual void StopViewFinder() = 0; |
|
680 |
|
681 /** |
|
682 * Queries if view finder is running. |
|
683 * @since 2.1 |
|
684 * @return Boolean indicating whether view finder is running or not. |
|
685 */ |
|
686 virtual TBool IsViewFinding() const = 0; |
|
687 |
|
688 /** |
|
689 * Gets the current view finder size. |
|
690 * @since 2.1 |
|
691 * @param aSize View finder size. |
|
692 * @return void |
|
693 */ |
|
694 virtual void GetViewFinderSize( TSize& aSize ) = 0; |
|
695 |
|
696 public: // Still image capturing |
|
697 |
|
698 /** |
|
699 * Prepares Camera Application Engine for still image capture on |
|
700 * specified quality level. |
|
701 * Calls observer method McaeoStillPrepareComplete(). |
|
702 * @since 2.1 |
|
703 * @param aStillQualityIndex Still image quality level index. |
|
704 * Imaging parameters linked to quality levels are defined by Shared Data ini-file. |
|
705 * @return void |
|
706 */ |
|
707 virtual void PrepareStillCaptureL( TInt aStillQualityIndex ) = 0; |
|
708 |
|
709 /** |
|
710 * Prepares Camera Application Engine for still image capture on |
|
711 * specified quality level. |
|
712 * Calls observer method McaeoStillPrepareComplete(). |
|
713 * @since 2.1 |
|
714 * @param aStillQualityIndex Still image quality level index. |
|
715 * Can have values 0 ... TCamAppEngineInfo::iNumStillQualityLevelsSupported - 1 |
|
716 * @param aCropRect Desired cropping/clipping rectangle. |
|
717 * @return void |
|
718 */ |
|
719 virtual void PrepareStillCaptureL( |
|
720 TInt aStillQualityIndex, |
|
721 const TRect& aCropRect ) = 0; |
|
722 |
|
723 /** |
|
724 * Prepares Camera Application Engine for still image capture with |
|
725 * specified image size and format. |
|
726 * Calls observer method McaeoStillPrepareComplete(). |
|
727 * @since 2.1 |
|
728 * @param aSize Still image size. |
|
729 * @param aFormat Still image format. |
|
730 * @param aCompressionQuality Still image compression quality [0...100]. |
|
731 * @return void |
|
732 */ |
|
733 virtual void PrepareStillCaptureL( |
|
734 const TSize& aSize, |
|
735 CCamera::TFormat aFormat, |
|
736 TInt aCompressionQuality ) = 0; |
|
737 |
|
738 /** |
|
739 * Prepares Camera Application Engine for still image capture with specified image size and format. |
|
740 * Calls observer method McaeoStillPrepareComplete(). |
|
741 * @since 2.1 |
|
742 * @param aSize Still image size. |
|
743 * @param aFormat Still image format. |
|
744 * @param aCompressionQuality Still image compression quality [0...100]. |
|
745 * @param aCropRect Desired cropping/clipping rectangle. |
|
746 * @return void |
|
747 */ |
|
748 virtual void PrepareStillCaptureL( |
|
749 const TSize& aSize, |
|
750 CCamera::TFormat aFormat, |
|
751 TInt aCompressionQuality, |
|
752 const TRect& aCropRect ) = 0; |
|
753 |
|
754 /** |
|
755 * Gets the current prepared still quality level index. |
|
756 * @since 2.1 |
|
757 * @return Still quality level index. |
|
758 */ |
|
759 virtual TInt StillQualityIndex() const = 0; |
|
760 |
|
761 /** |
|
762 * Gets the still image frame size for the specified quality level. |
|
763 * @since 2.1 |
|
764 * @param aStillQualityIndex Still capture quality index. |
|
765 * @param aSize Still image frame size. |
|
766 * @return void |
|
767 */ |
|
768 virtual void GetStillFrameSize( |
|
769 TInt aStillQualityIndex, |
|
770 TSize& aSize ) const = 0; |
|
771 |
|
772 /** |
|
773 * Gets the estimated still image size in bytes for the |
|
774 * specified quality level. |
|
775 * @since 2.1 |
|
776 * @param aStillQualityIndex Still capture quality index. |
|
777 * @return Estimated still capturing image size in bytes. |
|
778 */ |
|
779 virtual TInt EstimatedStillSizeInBytes( |
|
780 TInt aStillQualityIndex ) const = 0; |
|
781 |
|
782 /** |
|
783 * Captures a still image or a still image burst. |
|
784 * Calls first observer method McaeoSnapImageReady() and then |
|
785 * McaeoStillImageReady(). |
|
786 * McaeoSnapImageReady() is not called if engine initialization |
|
787 * has been done |
|
788 * with parameter aCreateSnapImage == EFalse. |
|
789 * @since 2.1 |
|
790 * @return void |
|
791 */ |
|
792 virtual void CaptureStill() = 0; |
|
793 |
|
794 /** |
|
795 * Cancels the on-going still image (single/burst) capture request. |
|
796 * @since 2.1 |
|
797 * @return void |
|
798 */ |
|
799 virtual void CancelCaptureStill() = 0; |
|
800 |
|
801 public: // Video recording |
|
802 |
|
803 /** |
|
804 * Sets the file name for the video clip to be recorded. |
|
805 * @since 2.1 |
|
806 * @param aVideoClipFileName File name. |
|
807 * @return void |
|
808 */ |
|
809 virtual void SetVideoRecordingFileNameL( |
|
810 const TDesC& aVideoClipFileName ) = 0; |
|
811 |
|
812 /** |
|
813 * Prepares Camera Application Engine for video recording on |
|
814 * specified quality level. |
|
815 * Calls observer method McaeoVideoPrepareComplete(). |
|
816 * @since 2.1 |
|
817 * @param aVideoQualityIndex Video quality level index. |
|
818 * Can have values 0 ... TCamAppEngineInfo::iNumVideoQualityLevelsSupported - 1 |
|
819 * @return void |
|
820 */ |
|
821 virtual void PrepareVideoRecordingL( TInt aVideoQualityIndex ) = 0; |
|
822 |
|
823 /** |
|
824 * Prepares Camera Application Engine for video recording with |
|
825 * specified recording parameters. |
|
826 * Calls observer method McaeoVideoPrepareComplete(). |
|
827 * @since 2.1 |
|
828 * @param aFrameSize Frame size. |
|
829 * @param aFrameRate Frame rate. |
|
830 * @param aBitRate Bit rate. |
|
831 * @param aAudioEnabled Boolean indicating whether audio should be enabled or not. |
|
832 * @param aMimeType MIME type. |
|
833 * @param aPreferredSupplier Preferred supplier of video encoder. |
|
834 * @param aVideoType Video type. |
|
835 * @param aAudioType Audio type. |
|
836 * @return void |
|
837 */ |
|
838 virtual void PrepareVideoRecordingL( |
|
839 const TSize& aFrameSize, |
|
840 TReal32 aFrameRate, |
|
841 TInt aBitRate, |
|
842 TBool aAudioEnabled, |
|
843 const TDesC8& aMimeType, |
|
844 const TDesC& aPreferredSupplier, |
|
845 const TDesC8& aVideoType = KNullDesC8, |
|
846 const TDesC8& aAudioType = KNullDesC8 ) = 0; |
|
847 /** |
|
848 * Closes (prepared) video recording to free resources. |
|
849 * @since 2.1 |
|
850 * @return void |
|
851 */ |
|
852 virtual void CloseVideoRecording() = 0; |
|
853 |
|
854 /** |
|
855 * Gets the current prepared video quality level index. |
|
856 * @since 2.1 |
|
857 * @return Video quality level index. |
|
858 */ |
|
859 virtual TInt VideoQualityIndex() const = 0; |
|
860 |
|
861 /** |
|
862 * Gets the video frame size for the specified video quality level. |
|
863 * @since 2.1 |
|
864 * @param aVideoQualityIndex Video quality level index. |
|
865 * @return Video frame size. |
|
866 */ |
|
867 virtual void GetVideoFrameSize( |
|
868 TInt aVideoQualityIndex, |
|
869 TSize& aSize ) const = 0; |
|
870 |
|
871 /** |
|
872 * Gets the video frame rate for the specified video quality level. |
|
873 * @since 2.1 |
|
874 * @param aVideoQualityIndex Video quality level index. |
|
875 * @return Video frame rate. |
|
876 */ |
|
877 virtual TReal32 VideoFrameRate( TInt aVideoQualityIndex ) const = 0; |
|
878 |
|
879 /** |
|
880 * Gets the estimated video recording bit rate including audio bit rate |
|
881 * for the specified video quality level. |
|
882 * @since 2.1 |
|
883 * @param aVideoQualityIndex Video quality level index. |
|
884 * @return Video recording bit rate rate including audio bit rate. |
|
885 */ |
|
886 virtual TInt EstimatedVideoRecordingBitRateL( |
|
887 TInt aVideoQualityIndex ) const = 0; |
|
888 |
|
889 /** |
|
890 * Sets the maximum size in bytes for a video clip. |
|
891 * @since 2.1 |
|
892 * @param aMaxClipSizeInBytes Maximum video clip size measured in bytes. |
|
893 * If set to 0, then no limit but the available storage space. |
|
894 * @return void |
|
895 */ |
|
896 virtual void SetVideoClipMaxSizeL( TInt aMaxClipSizeInBytes = 0 ) = 0; |
|
897 |
|
898 /** |
|
899 * Gets the current maximum size in bytes for a video clip. |
|
900 * @since 2.1 |
|
901 * @return Video clip maximum size. |
|
902 */ |
|
903 virtual TInt VideoClipMaxSize() const = 0; |
|
904 |
|
905 /** |
|
906 * Sets audio enabled or disabled for video recording. |
|
907 * @since 2.1 |
|
908 * @param aAudioEnabled Boolean indicating whether audio should be enabled or not for video recording. |
|
909 * @return void |
|
910 */ |
|
911 virtual void SetVideoAudioL( TBool aAudioEnabled ) = 0; |
|
912 |
|
913 /** |
|
914 * Queries if audio is enabled or disabled for video recording. |
|
915 * @since 2.1 |
|
916 * @return Boolean indicating whether audio is enabled or disabled for video recording. |
|
917 */ |
|
918 virtual TBool VideoAudio() const = 0; |
|
919 |
|
920 /** |
|
921 * Sets the time interval for video recording time info. |
|
922 * @since 2.1 |
|
923 * @param aInterval Time interval in microseconds for video recording time info. |
|
924 * If zero is given as interval, then video recording time is not generated. |
|
925 * @return void |
|
926 */ |
|
927 virtual void SetVideoTimesIntervalL( |
|
928 TTimeIntervalMicroSeconds aInterval ) = 0; |
|
929 |
|
930 /** |
|
931 * Gets the current time interval for video recording time info. |
|
932 * @since 2.1 |
|
933 * @return Time interval in microseconds for video recording time info. |
|
934 */ |
|
935 virtual TTimeIntervalMicroSeconds VideoTimesInterval() const = 0; |
|
936 |
|
937 /** |
|
938 * Starts video recording. |
|
939 * Calls observer method McaeoVideoRecordingOn(). |
|
940 * @since 2.1 |
|
941 * @return void |
|
942 */ |
|
943 virtual void StartVideoRecording() = 0; |
|
944 |
|
945 /** |
|
946 * Stops video recording. |
|
947 * Calls observer method McaeoVideoRecordingComplete(). |
|
948 * @since 2.1 |
|
949 * @return void |
|
950 */ |
|
951 virtual void StopVideoRecording() = 0; |
|
952 |
|
953 /** |
|
954 * Pauses video recording. |
|
955 * Calls observer method McaeoVideoRecordingPaused(). |
|
956 * @since 2.1 |
|
957 * @return void |
|
958 */ |
|
959 virtual void PauseVideoRecording() = 0; |
|
960 |
|
961 /** |
|
962 * Resumes video recording after pause. |
|
963 * Calls observer method McaeoVideoRecordingOn(). |
|
964 * @since 2.1 |
|
965 * @return void |
|
966 */ |
|
967 virtual void ResumeVideoRecording() = 0; |
|
968 |
|
969 /** |
|
970 * Gets the remaining video recording time before recording has started. |
|
971 * @since 2.1 |
|
972 * @return Remaining video recording time. |
|
973 */ |
|
974 virtual TTimeIntervalMicroSeconds RemainingVideoRecordingTime() |
|
975 const = 0; |
|
976 |
|
977 /** |
|
978 * Queries if video recording is running. |
|
979 * @since 2.1 |
|
980 * @return Boolean indicating whether video recording is running or not. |
|
981 */ |
|
982 virtual TBool IsVideoRecording() const = 0; |
|
983 |
|
984 public: // New overloading method for preparing video recording |
|
985 |
|
986 /** |
|
987 * Prepares Camera Application Engine for video recording with specified recording parameters. |
|
988 * Calls observer method McaeoVideoPrepareComplete(). |
|
989 * @since 2.1 |
|
990 * @param aFrameSize Frame size. |
|
991 * @param aFrameRate Frame rate. |
|
992 * @param aBitRate Bit rate. |
|
993 * @param aAudioEnabled Boolean indicating whether audio should be enabled or not. |
|
994 * @param aAudioBitRate Audio bit rate. |
|
995 * @param aMimeType MIME type. |
|
996 * @param aPreferredSupplier Preferred supplier of video encoder. |
|
997 * @param aVideoType Video type. |
|
998 * @param aAudioType Audio type. |
|
999 * @return void |
|
1000 */ |
|
1001 virtual void PrepareVideoRecordingL( |
|
1002 const TSize& aFrameSize, |
|
1003 TReal32 aFrameRate, |
|
1004 TInt aBitRate, |
|
1005 TBool aAudioEnabled, |
|
1006 TInt aAudioBitRate, |
|
1007 const TDesC8& aMimeType, |
|
1008 const TDesC& aPreferredSupplier, |
|
1009 const TDesC8& aVideoType, |
|
1010 const TDesC8& aAudioType ) = 0; |
|
1011 |
|
1012 public: // Still image burst capturing |
|
1013 |
|
1014 /** |
|
1015 * Sets the Camera Application Engine still image burst capturing |
|
1016 * observer. |
|
1017 * @since 2.1 |
|
1018 * @param aObserver Camera Application Engine still burst observer. |
|
1019 * @return void |
|
1020 */ |
|
1021 virtual void SetCaeStillBurstObserver( |
|
1022 MCaeStillBurstObserver& aObserver ) = 0; |
|
1023 |
|
1024 /** |
|
1025 * Sets the image count for still image (burst) capturing. |
|
1026 * Note: Inputting value 1 switches back to normal still capturing. |
|
1027 * @since 2.1 |
|
1028 * @param aImageCount The desired count of images to capture (in a burst). |
|
1029 * @return The count of images to be captured (in a burst). |
|
1030 */ |
|
1031 virtual TInt SetStillCaptureImageCountL( TInt aImageCount ) = 0; |
|
1032 |
|
1033 /** |
|
1034 * Gets the image count for still image (burst) capturing. |
|
1035 * @since 2.1 |
|
1036 * @return Count of images to capture (in a burst). |
|
1037 */ |
|
1038 virtual TInt StillCaptureImageCount() const = 0; |
|
1039 |
|
1040 /** |
|
1041 * Sets the time interval between single captures in still burst. |
|
1042 * @since 2.1 |
|
1043 * @param aInterval Time interval in microseconds. |
|
1044 * @return void |
|
1045 */ |
|
1046 virtual void SetStillBurstCaptureIntervalL( |
|
1047 TTimeIntervalMicroSeconds aInterval ) = 0; |
|
1048 |
|
1049 /** |
|
1050 * Gets the time interval between single captures in still burst. |
|
1051 * @since 2.1 |
|
1052 * @return Time interval in microseconds. |
|
1053 */ |
|
1054 virtual TTimeIntervalMicroSeconds StillBurstCaptureInterval() const = 0; |
|
1055 |
|
1056 /** |
|
1057 * Stops still image burst capturing. |
|
1058 * Delivers the burst images captured before call. |
|
1059 * This is different from CancelCaptureStill that cancels the operation and |
|
1060 * prevents delivering the captured image. |
|
1061 * @since 2.1 |
|
1062 * @return void |
|
1063 */ |
|
1064 virtual void StopStillBurstCapture() = 0; |
|
1065 |
|
1066 public: |
|
1067 |
|
1068 /** |
|
1069 * Prepare Camera Application Engine for still image capture on |
|
1070 * specified quality level with desired snap image size. |
|
1071 * The returned snap image size is always equal or bigger in both |
|
1072 * dimensions than the given size. The returned size is stepwise |
|
1073 * downscaled from the captured image size. The parameter aSnapSize |
|
1074 * is ignored if the image format does not support it in the engine. |
|
1075 * Calls observer method McaeoStillPrepareComplete(). |
|
1076 * @since 2.1 |
|
1077 * @param aStillQualityIndex Still image quality level index. |
|
1078 * Can have values 0 ... TCamAppEngineInfo::iNumStillQualityLevelsSupported - 1 |
|
1079 * @param aSnapSize Desired snap image size. Returns the real snap image size. |
|
1080 * @return void |
|
1081 */ |
|
1082 virtual void PrepareStillCaptureL( |
|
1083 TInt aStillQualityIndex, |
|
1084 TSize& aSnapSize ) = 0; |
|
1085 |
|
1086 /** |
|
1087 * Prepare Camera Application Engine for still image capture with |
|
1088 * specified image size, format, and desired snap image size. |
|
1089 * The returned snap image size is always equal or bigger in both |
|
1090 * dimensions than the given size. The returned size is stepwise |
|
1091 * downscaled from the captured image size. The parameter aSnapSize |
|
1092 * is ignored if the image format does not support it in the engine. |
|
1093 * Calls observer method McaeoStillPrepareComplete(). |
|
1094 * @since 2.1 |
|
1095 * @param aSize Still image size. |
|
1096 * @param aFormat Still image format. |
|
1097 * @param aCompressionQuality Still image compression quality [0...100]. |
|
1098 * @param aCropRect Desired cropping/clipping rectangle. The size (0,0) means that this parameter is ignored. |
|
1099 * @param aSnapSize Desired snap image size. Returns the real snap image size. |
|
1100 * @return void |
|
1101 */ |
|
1102 virtual void PrepareStillCaptureL( |
|
1103 const TSize& aSize, |
|
1104 CCamera::TFormat aFormat, |
|
1105 TInt aCompressionQuality, |
|
1106 const TRect& aCropRect, |
|
1107 TSize& aSnapSize ) = 0; |
|
1108 |
|
1109 /** |
|
1110 * Sets the exposure value (EV) compensation index. |
|
1111 * @since 2.1 |
|
1112 * @param aEvIndex Exposure value compensation index to set. |
|
1113 * @return void |
|
1114 */ |
|
1115 virtual void SetEvCompensationL( TInt aEvIndex = 0 ) = 0; |
|
1116 |
|
1117 /** |
|
1118 * Gets the current exposure value (EV) compensation index. |
|
1119 * @since 2.1 |
|
1120 * @return Exposure value compensation index. |
|
1121 */ |
|
1122 virtual TInt EvCompensation() const = 0; |
|
1123 |
|
1124 /** |
|
1125 * Sets snap image creation on/off. |
|
1126 * @since 2.1 |
|
1127 * @param aCreateSnapImage Boolean indicating if "snap-images" for |
|
1128 * displaying should be created, leading to calls of McaeoSnapImageReady. |
|
1129 * @return void |
|
1130 */ |
|
1131 virtual void SetSnapImageCreation( |
|
1132 TBool aCreateSnapImage = ETrue ) = 0; |
|
1133 |
|
1134 /** |
|
1135 * A static (factory) function to create the class instance. |
|
1136 * @since 2.6 |
|
1137 * @param aCameraIndex Index from 0 to CamerasAvailable()-1 inclusive |
|
1138 * specifying the camera device to use. |
|
1139 * @return Pointer to a fully constructed CCaeEngine object. |
|
1140 * Ownership is passed to the caller. |
|
1141 */ |
|
1142 IMPORT_C static CCaeEngine* NewL( |
|
1143 TInt aCameraIndex ); |
|
1144 |
|
1145 /** |
|
1146 * Gets the number of cameras on the device. |
|
1147 * @since 2.6 |
|
1148 * @return Count of cameras present on the device. |
|
1149 */ |
|
1150 IMPORT_C static TInt CamerasAvailable(); |
|
1151 |
|
1152 /** |
|
1153 * Enumerates through the available image capture sizes. |
|
1154 * Returns the image size based on the specified size index and format. |
|
1155 * The largest image resolution is returned for index 0, the smallest |
|
1156 * for index TCamAppEngineInfo::iNumImageSizesSupported-1. |
|
1157 * The size index must be in the range 0 to |
|
1158 * TCamAppEngineInfo::iNumImageSizesSupported-1 inclusive. |
|
1159 * @since 2.6 |
|
1160 * @param aSize Returned image size. |
|
1161 * @param aSizeIndex Size index. |
|
1162 * @param aFormat The image format. |
|
1163 * @return void |
|
1164 */ |
|
1165 virtual void EnumerateStillCaptureSizes( |
|
1166 TSize& aSize, |
|
1167 TInt aSizeIndex, |
|
1168 CCamera::TFormat aFormat ) const = 0; |
|
1169 |
|
1170 /** |
|
1171 * Sets the quality value to use with JPEG and Exif image formats. |
|
1172 * @since 2.6 |
|
1173 * @param aQuality The quality value to use, clamped to the range 1 to 100. |
|
1174 * @return void |
|
1175 */ |
|
1176 virtual void SetJpegQuality( |
|
1177 TInt aQuality ) = 0; |
|
1178 |
|
1179 /** |
|
1180 * Gets the currently set JPEG quality value. |
|
1181 * Returns 0 if not previously prepared or set. |
|
1182 * @since 2.6 |
|
1183 * @return The currently set JPEG quality value. |
|
1184 */ |
|
1185 virtual TInt JpegQuality() const = 0; |
|
1186 |
|
1187 /** |
|
1188 * Gets a custom interface. The client has to cast the returned pointer. |
|
1189 * @since 2.6 |
|
1190 * @return "TAny*" Custom interface pointer. NULL if the requested interface is not supported. |
|
1191 */ |
|
1192 virtual TAny* CustomInterface( |
|
1193 TUid aInterface ) = 0; |
|
1194 |
|
1195 /** |
|
1196 * Sets the size of the snap image bitmap. |
|
1197 * @since 2.8 |
|
1198 * @param aSize The size of the snap bitmap. Corrected size is returned. |
|
1199 * @return void |
|
1200 */ |
|
1201 virtual void SetSnapImageSizeL( |
|
1202 TSize& aSize ) = 0; |
|
1203 /** |
|
1204 * Sets the color mode of the snap image bitmap |
|
1205 * @since 2.8 |
|
1206 * @param aMode The color mode of the snap bitmap. |
|
1207 * @return void |
|
1208 */ |
|
1209 virtual void SetSnapImageColorMode( |
|
1210 TDisplayMode aMode ) = 0; |
|
1211 |
|
1212 /** |
|
1213 * Gets array of features per interfaces. Each feature is ordered in |
|
1214 * the current calling order e.g. when certain image prosessing |
|
1215 * operation is applied to the captured image. If SetOrder() has not yet |
|
1216 * been called, the returned order is the default order. |
|
1217 * @since 2.8 |
|
1218 * @param aOrderedFeatureArray Feature array sorted by the current calling order in an interface. |
|
1219 * @return void |
|
1220 */ |
|
1221 virtual void GetOrderL( RCaeOrderedFeatureList& aOrderedFeatureList ) = 0; |
|
1222 |
|
1223 /** |
|
1224 * Sets array of features per interfaces. Each feature should be ordered |
|
1225 * according to the wanted calling order e.g. to define when certain image |
|
1226 * prosessing operation is applied to the captured image. If this method |
|
1227 * leaves, the internal array has not been changed. |
|
1228 * @since 2.8 |
|
1229 * @param aOrderedFeatureArray Feature array sorted by the wanted calling order in an interface. |
|
1230 * @return void. |
|
1231 */ |
|
1232 virtual void SetOrderL( const RCaeOrderedFeatureList& aOrderedFeatureList ) = 0; |
|
1233 |
|
1234 /** |
|
1235 * A static (factory) function to create the class instance. |
|
1236 * @since 2.6 |
|
1237 * @param aCameraIndex Index from 0 to CamerasAvailable()-1 inclusive |
|
1238 * specifying the camera device to use. |
|
1239 * @param aDisplayIndex Display index specifying the display to use. |
|
1240 * @return Pointer to a fully constructed CCaeEngine object. |
|
1241 * Ownership is passed to the caller. |
|
1242 */ |
|
1243 IMPORT_C static CCaeEngine* NewL( |
|
1244 TInt aCameraIndex, TInt aDisplayIndex ); |
|
1245 /** |
|
1246 * Sets the source of the snap image bitmap. |
|
1247 * @since 2.8 |
|
1248 * @param aSnapImageSource The source of the snap image bitmap. |
|
1249 * @return void |
|
1250 */ |
|
1251 virtual void SetSnapImageSourceL( |
|
1252 TSnapImageSource aSnapImageSource ) = 0; |
|
1253 |
|
1254 /** |
|
1255 * Sets the specific image codec implementation to be used in decoding and encoding. |
|
1256 * @since 3.1 |
|
1257 * @param aDecoderUid The UID of the specific image decoder to be used. KNullUid means the default decoder. |
|
1258 * @param aEncoderUid The UID of the specific image encoder to be used. KNullUid means the default encoder. |
|
1259 * @return void |
|
1260 */ |
|
1261 virtual void SetImageCodecsL( |
|
1262 TUid aDecoderUid, TUid aEncoderUid ) = 0; |
|
1263 |
|
1264 /** |
|
1265 * Enumerate Video Frame Size. |
|
1266 * @since 3.2 |
|
1267 * @param aSize enumerated size |
|
1268 * @return size index of camera HW. Returns -1 if aSize is not supported. |
|
1269 */ |
|
1270 virtual TInt EnumerateVideoFrameSizeL(const TSize& aSize) = 0; |
|
1271 |
|
1272 /** |
|
1273 * Gets the device-unique handle of camera object owned by the CCaeEngine. |
|
1274 * @since 3.2 |
|
1275 * @return Camera object handle |
|
1276 */ |
|
1277 virtual TInt CCameraHandle() const = 0; |
|
1278 |
|
1279 /** |
|
1280 * Set CamAppEngine internal camera state to reserved and power state on. |
|
1281 * This method is used when client uses Camera-API directly through the duplicate instance in still mode, |
|
1282 * but wants to use CAE in video recording mode without using the CAE InitL. |
|
1283 * @since 3.2 |
|
1284 * @return void |
|
1285 */ |
|
1286 virtual void EnableVideoRecording() = 0; |
|
1287 |
|
1288 /** |
|
1289 * Set CamAppEngine internal camera state to released and power state off. |
|
1290 * @since 3.2 |
|
1291 * @return void |
|
1292 */ |
|
1293 virtual void DisableVideoRecording() = 0; |
|
1294 |
|
1295 /** |
|
1296 * Sets CAE to Extension processing mode. |
|
1297 * @since 3.2 |
|
1298 * @param aExtModeActive Boolean indicating if extension mode is enabled or disabled. |
|
1299 * @param aCreateSnapImage Boolean indicating if "snap-images" should be created by CAE. |
|
1300 * @return void |
|
1301 */ |
|
1302 virtual void SetCaeExtensionModeL( TBool aExtModeActive, TBool aCreateSnapImage ) = 0; |
|
1303 |
|
1304 /** |
|
1305 * Process extension for view finder. |
|
1306 * @since 3.2 |
|
1307 * @param aFrame The view finder frame bitmap that is processed. |
|
1308 * @return void |
|
1309 */ |
|
1310 virtual void ProcessExtViewFinderFrameReadyL( CFbsBitmap& aFrame ) = 0; |
|
1311 |
|
1312 /** |
|
1313 * Process extension for snap image. |
|
1314 * @since 3.2 |
|
1315 * @param aSnapImage The bitmap of snap image. Does not transfer ownership. |
|
1316 * @return void |
|
1317 */ |
|
1318 virtual void ProcessExtSnapImageL( CFbsBitmap& aSnapImage ) = 0; |
|
1319 |
|
1320 /** |
|
1321 * Process extension for captured image. |
|
1322 * @since 3.2 |
|
1323 * @param aBitmap The captured bitmap image. Does not transfer ownership. |
|
1324 * @param aLastImage Set when last image of the burst is completed. |
|
1325 * @return void |
|
1326 */ |
|
1327 virtual void ProcessExtCapturedImageL( CFbsBitmap& aBitmap, TBool aLastImage ) = 0; |
|
1328 |
|
1329 /** |
|
1330 * Process extension for captured image. |
|
1331 * @since 3.2 |
|
1332 * @param aImageData The captured image, if it is a formatted image and type of HBufC8. Ownership is transferred. |
|
1333 * @param aLastImage Set when last image of the burst is completed. |
|
1334 * @return void |
|
1335 */ |
|
1336 virtual void ProcessExtCapturedImageL( HBufC8* aImageData, TBool aLastImage ) = 0; |
|
1337 |
|
1338 /** |
|
1339 * Process extension for captured image. |
|
1340 * @since 3.2 |
|
1341 * @param aImageDataDes The captured image, if it is a formatted image and type of TDesC8. Does not transfer ownership. |
|
1342 * @param aLastImage Set when last image of the burst is completed. |
|
1343 * @return void |
|
1344 */ |
|
1345 virtual void ProcessExtCapturedImageL( TDesC8& aImageDataDes, TBool aLastImage ) = 0; |
|
1346 |
|
1347 /** |
|
1348 * Cancels extensions processing |
|
1349 * @since 3.2 |
|
1350 * @return void |
|
1351 */ |
|
1352 virtual void ProcessExtCancel() = 0; |
|
1353 |
|
1354 /** |
|
1355 * Get list of skipped extensions. Application may define which extensions are skipped during image processing. |
|
1356 * @since 3.2 |
|
1357 * @param aSkippedExtensions The list of skipped extensions TUid. |
|
1358 * @return void |
|
1359 */ |
|
1360 virtual void SkippedExtensionListL( RCaeOrderedFeatureList& aSkippedExtensions ) = 0; |
|
1361 |
|
1362 /** |
|
1363 * Set list of skipped extensions. Application may define which extensions are skipped during image processing. |
|
1364 * The GetOrderL() returns the list of all installed extensions. |
|
1365 * @since 3.2 |
|
1366 * @param aSkippedExtensions The list of installed and skipped extensions TUid. |
|
1367 * @return void |
|
1368 */ |
|
1369 virtual void SetSkippedExtensionList( RCaeOrderedFeatureList& aSkippedExtensions ) = 0; |
|
1370 |
|
1371 /** |
|
1372 * Set asynchronous video recording stop mode. When Enabled then StopVideoRecording will return quickly and |
|
1373 * MCamAppEngineObserver callbacks McaeoVideoRecordingStopped and McaeoVideoRecordingComplete |
|
1374 * are called asynchronously. |
|
1375 * @since 5.0 |
|
1376 * @param aAsyncVideoStopEnabled The async stop state. |
|
1377 * @return error code KErrNone if supported by the video framework and mode was changed. |
|
1378 */ |
|
1379 virtual TInt SetAsyncVideoStopMode( TBool aAsyncVideoStopEnabled ) = 0; |
|
1380 |
|
1381 }; |
|
1382 |
|
1383 #endif // CAEENGINE_H |
|