2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FMedia_CameraImpl.h
20 * @brief This header file contains the declarations of the %_CameraImpl class.
24 #ifndef _FMEDIA_INTERNAL_CAMERA_IMPL_H_
25 #define _FMEDIA_INTERNAL_CAMERA_IMPL_H_
28 #include <FBaseColIList.h>
29 #include <FBaseColIListT.h>
30 #include <FBaseObject.h>
31 #include <FBaseColQueue.h>
32 #include <FGrpBufferInfo.h>
33 #include <FGrpDimension.h>
34 #include <FGrpPixelFormat.h>
35 #include <FGrpRectangle.h>
36 #include <FMediaCameraTypes.h>
37 #include <FMediaTypes.h>
38 #include "FMedia_CameraTypes.h"
39 #include "FMedia_CapabilityTypes.h"
40 #include "FMedia_ICameraCoordinatorListener.h"
41 #include "FMedia_CameraBuffer.h"
43 namespace Tizen { namespace Media
46 class ICameraEventListener;
48 class _CameraCoordinator;
49 class _CameraCapability;
52 typedef void (*_CameraPreprocessingCallback)( MediaPixelFormat format, byte* data[4], int size[4], void* user);
56 * @brief This class implements the APIs of %Camera class.
60 : public Tizen::Base::Object
61 , public _ICameraCoordinatorListener
65 * This is the default constructor for this class.
67 * @remarks After creating an instance of this class, the Construct() method must be called explicitly to
68 * initialize this instance.
73 * This is the destructor for this class. @n
74 * All allocated resources are deallocated by this method. This method should be called in the same thread
75 * where the Construct() method is called.
79 virtual ~_CameraImpl(void);
83 * Initializes this instance of Camera with the specified parameters. @n
84 * This method creates an instance of Camera in the subsystem. Only one instance is created at a given time.
86 * @return An error code
87 * @param[in] listener An event listener instance
88 * @param[in] camSel The Camera to be used
89 * @exception E_SUCCESS The method is successful.
90 * @exception E_SYSTEM A system error has occurred.
91 * @exception E_DEVICE_BUSY The device cannot be approached because of other operations.
92 * @exception E_DEVICE_UNAVAILABLE The device is unavailable.
94 result Construct(ICameraEventListener& listener, CameraSelection camSel);
97 * Powers the camera on.
99 * @return An error code
100 * @exception E_SUCCESS The method is successful.
101 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
102 * @exception E_DEVICE_BUSY The device cannot be approached because of other operations.
103 * @exception E_DEVICE_UNAVAILABLE The device is unavailable.
104 * @exception E_DEVICE_FAILED The device operation has failed.
105 * @exception E_OUT_OF_MEMORY The memory is insufficient.
106 * @remarks The reserved configurations are set in this method.
109 result PowerOn(void);
112 * Powers the camera off.
114 * @return An error code
115 * @exception E_SUCCESS The method is successful.
116 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
117 * @exception E_DEVICE_BUSY The device cannot be approached because of other operations.
118 * @exception E_DEVICE_UNAVAILABLE The device is unavailable.
119 * @exception E_DEVICE_FAILED The device operation has failed.
120 * @exception E_OUT_OF_MEMORY The memory is insufficient.
123 result PowerOff(void);
126 * Checks whether the camera is powered on.
128 * @return @c true if the camera is powered on, @n
130 * @exception E_SUCCESS The method is successful.
131 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
132 * @exception E_OUT_OF_MEMORY The memory is insufficient.
133 * @remarks The specific error code can be accessed using the GetLastResult() method.
134 * @see PowerOn(), PowerOff()
136 bool IsPoweredOn(void) const;
139 * Starts displaying the preview image on the camera device. @n
140 * If the value of @c pBufferInfo is @c null, no preview image is displayed. In this case, the application can
141 * draw the preview image with the data passed on by the ICameraEventListener::OnCameraPreviewed() method.
143 * If the value of @c previewedData is @c true, the previewed image data is passed to the
144 * ICameraEventListener::OnCameraPreviewed() method periodically based on the frame-rate, otherwise the
145 * callback is not invoked. The default value of @c previewedData is @c false.
147 * @return An error code
148 * @param[in] pBufferInfo The buffer information for the camera preview display
149 * @param[in] previewedData Set to @c true if the previewed data is delivered to the callback method, @n
151 * @exception E_SUCCESS The method is successful.
152 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
153 * @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
154 * @exception E_DEVICE_BUSY The device cannot be approached because of other operations.
155 * @exception E_DEVICE_UNAVAILABLE The device is unavailable.
156 * @exception E_DEVICE_FAILED The device operation has failed.
157 * @exception E_OUT_OF_MEMORY The memory is insufficient.
158 * @remarks The overlay region retrieved by the buffer information should be the topmost window when this method is
160 * @remarks The ICameraEventListener::OnCameraPreviewed() method can be delayed or dropped depending on
161 * the system's performance. @n@n
162 * For more information on the relationship between this method and the PowerOn() method, and the
163 * state transition caused by this method, see <a href="../com.osp.cppprogramming.help/html/dev_guide/media/launching_camera.htm
164 ">Launching the Camera</a>.
166 * @see StopPreview(), ICameraEventListener::OnCameraPreviewed()
168 result StartPreview(const Tizen::Graphics::BufferInfo* pBufferInfo, bool previewedData = false);
171 * Stops displaying the preview image on the camera device.
173 * @return An error code
174 * @exception E_SUCCESS The method is successful.
175 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
176 * @exception E_DEVICE_BUSY The device cannot be approached because of other operations.
177 * @exception E_DEVICE_UNAVAILABLE The device is unavailable.
178 * @exception E_DEVICE_FAILED The device operation has failed.
179 * @exception E_OUT_OF_MEMORY The memory is insufficient.
180 * @remarks For more information on the relationship between this method and the PowerOn() method, and the
181 * state transition caused by this method, see <a href="../com.osp.cppprogramming.help/html/dev_guide/media/launching_camera.htm
182 ">Launching the Camera</a>.
183 * @see StartPreview()
185 result StopPreview(void);
188 * Captures the current image data from the camera sensor. @n
189 * After capturing the image, the camera's state changes to ::CAMERA_STATE_CAPTURED. @n
190 * The camera's preview should be restarted by calling the StartPreview() method. @n
191 * The captured image is passed through ICameraEventListener::OnCameraCaptured().
193 * @return An error code
194 * @exception E_SUCCESS The method is successful.
195 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
196 * @exception E_DEVICE_BUSY The device cannot be approached because of other operations.
197 * @exception E_DEVICE_UNAVAILABLE The device is unavailable.
198 * @exception E_DEVICE_FAILED The device operation has failed.
199 * @exception E_UNSUPPORTED_OPERATION This operation is not supported.
200 * @exception E_OUT_OF_MEMORY The memory is insufficient.
201 * @remarks For more information on the relationship between this method and the PowerOn() method, and the
202 * state transition caused by this method, see <a href="../com.osp.cppprogramming.help/html/dev_guide/media/launching_camera.htm
203 ">Launching the Camera</a>.
204 * @see ICameraEventListener::OnCameraCaptured()
206 result Capture(void);
209 * Gets the state of the camera in CameraState.
211 * @return The current state of the camera
212 * @exception E_SUCCESS The method is successful.
213 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
214 * @exception E_OUT_OF_MEMORY The memory is insufficient.
215 * @remarks The specific error code can be accessed using the GetLastResult() method.
216 * @see StartPreview(), StopPreview(), SetAutoFocus(), Capture()
218 CameraState GetState(void) const;
221 * Sets the brightness level of the camera input data.
223 * @return An error code
224 * @param[in] brightness The brightness level to set @n
225 * The range of this parameter is from @c 0 to @c 9.
226 * @exception E_SUCCESS The method is successful.
227 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
228 * @exception E_OUT_OF_RANGE The specified @c brightness is out of range.
229 * @exception E_DEVICE_BUSY The device cannot be approached because of other operations.
230 * @exception E_DEVICE_UNAVAILABLE The device is unavailable.
231 * @exception E_DEVICE_FAILED The device operation has failed.
232 * @exception E_UNSUPPORTED_OPERATION This operation is not supported.
233 * @exception E_OUT_OF_MEMORY The memory is insufficient.
234 * @remarks The default brightness level is @c 5. @n
235 * The device's supported range for the brightness level is from @c 0 to @c 9. @n
236 * This method works correctly when PowerOn() is executed. @n@n
237 * For more information on the relationship between this method and the PowerOn() method, and the
238 * state transition caused by this method, see <a href="../com.osp.cppprogramming.help/html/dev_guide/media/launching_camera.htm
239 ">Launching the Camera</a>.
240 * @see GetBrightness()
242 result SetBrightness(int brightness);
245 * Gets the brightness level of the camera input data.
247 * @return The current brightness level @n
248 * The returned value ranges from @c 0 to @c 9.
249 * @exception E_SUCCESS The method is successful.
250 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
251 * @exception E_OUT_OF_MEMORY The memory is insufficient.
252 * @remarks The specific error code can be accessed using the GetLastResult() method. @n
253 * The device's supported range for the brightness level is from @c 0 to @c 9. @n
254 * @see SetBrightness()
256 int GetBrightness(void) const;
259 * Sets the contrast level of the Camera input data.
261 * @return An error code
262 * @param[in] contrast The contrast level to set @n
263 * The range of this parameter is from @c 0 to @c 9.
264 * @exception E_SUCCESS The method is successful.
265 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
266 * @exception E_OUT_OF_RANGE The specified contrast is out of range.
267 * @exception E_DEVICE_BUSY The device cannot be approached because of other operations.
268 * @exception E_DEVICE_UNAVAILABLE The device is unavailable.
269 * @exception E_DEVICE_FAILED The device operation has failed.
270 * @exception E_UNSUPPORTED_OPERATION This operation is not supported.
271 * @exception E_OUT_OF_MEMORY The memory is insufficient.
272 * @remarks The default contrast level is @c 5. @n
273 * The device's supported range for the contrast level is from @c 0 to @c 9. @n
274 * This method works correctly when PowerOn() is executed. @n@n
275 * For more information on the relationship between this method and the PowerOn() method, and the
276 * state transition caused by this method, see <a href="../com.osp.cppprogramming.help/html/dev_guide/media/launching_camera.htm
277 ">Launching the Camera</a>.
280 result SetContrast(int contrast);
283 * Gets the contrast level of the camera input data.
285 * @return The current contrast level @n
286 * The returned value ranges from @c 0 to @c 9.
287 * @exception E_SUCCESS The method is successful.
288 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
289 * @exception E_OUT_OF_MEMORY The memory is insufficient.
290 * @remarks The specific error code can be accessed using the GetLastResult() method. @n
291 * The device's supported range for the contrast level is from @c 0 to @c 9.
294 int GetContrast(void) const;
297 * Increases the zoom level of the camera.
299 * @return An error code
300 * @exception E_SUCCESS The method is successful.
301 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
302 * @exception E_DEVICE_BUSY The device cannot be approached because of other operations.
303 * @exception E_DEVICE_UNAVAILABLE The device is unavailable.
304 * @exception E_DEVICE_FAILED The device operation has failed.
305 * @exception E_UNSUPPORTED_OPERATION This operation is not supported.
306 * @exception E_OUT_OF_MEMORY The memory is insufficient.
307 * @remarks This method returns E_UNSUPPORTED_OPERATION in the emulator.
308 * If CameraZoomType supports only ::CAMERA_ZOOM_TYPE_SMART, the zoom ratio can differ according
309 * to the preview, capture, and recording resolutions.
310 * The supported zoom types can be obtained by using the
311 * MediaCapability::GetValueN(CAMERA_PRIMARY_ZOOM_TYPE) method. @n@n
312 * For more information on the relationship between this method and the PowerOn() method, and the
313 * state transition caused by this method, see <a href="../com.osp.cppprogramming.help/html/dev_guide/media/launching_camera.htm
314 ">Launching the Camera</a>.
315 * @see ZoomOut(),GetZoomLevel(),GetMaxZoomLevel()
320 * Decreases the zoom level of the camera.
322 * @return An error code
323 * @exception E_SUCCESS The method is successful.
324 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
325 * @exception E_DEVICE_BUSY The device cannot be approached because of other operations.
326 * @exception E_DEVICE_UNAVAILABLE The device is unavailable.
327 * @exception E_DEVICE_FAILED The device operation has failed.
328 * @exception E_UNSUPPORTED_OPERATION This operation is not supported.
329 * @exception E_OUT_OF_MEMORY The memory is insufficient.
330 * @remarks This method returns E_UNSUPPORTED_OPERATION in the emulator.
331 * If CameraZoomType supports only ::CAMERA_ZOOM_TYPE_SMART, zoom ratio can differ according to
332 * the preview, capture, and recording resolutions.
333 * The supported zoom types can be obtained by using the
334 * MediaCapability::GetValueN(CAMERA_PRIMARY_ZOOM_TYPE) method. @n@n
335 * For more information on the relationship between this method and the PowerOn() method, and the
336 * state transition caused by this method, see <a href="../com.osp.cppprogramming.help/html/dev_guide/media/launching_camera.htm
337 ">Launching the Camera</a>.
338 * @see ZoomIn(),GetZoomLevel(),GetMaxZoomLevel()
340 result ZoomOut(void);
343 * Gets the zoom level of the camera.
345 * @return The current zoom level
346 * @exception E_SUCCESS The method is successful.
347 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
348 * @exception E_OUT_OF_MEMORY The memory is insufficient.
349 * @remarks The specific error code can be accessed using the GetLastResult() method.
350 * @remarks The zoom level is different for each camera device.
351 * @remarks This method throws E_UNSUPPORTED_OPERATION in the emulator.
352 * @see ZoomIn(), ZoomOut(),GetMaxZoomLevel()
354 int GetZoomLevel(void) const;
357 * Gets the maximum zoom level supported by this Camera.
359 * @return The maximum zoom level
360 * @exception E_SUCCESS The method is successful.
361 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
362 * @exception E_OUT_OF_MEMORY The memory is insufficient.
363 * @remarks The specific error code can be accessed using the GetLastResult() method.
364 * @remarks The zoom level is different for each camera device.
365 * @remarks This method returns E_UNSUPPORTED_OPERATION in the emulator. @n
366 * This method works correctly when PowerOn() is executed.
367 * @see ZoomIn(), ZoomOut(), GetZoomLevel()
369 int GetMaxZoomLevel(void) const;
372 * Changes the current resolution of the preview.
374 * @return An error code
375 * @param[in] resolution The preview resolution @n
376 * It should be one of the listed dimensions that are extracted using GetSupportedPreviewResolutionListN().
377 * @exception E_SUCCESS The method is successful.
378 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
379 * @exception E_OUT_OF_RANGE The position or size is out of range.
380 * @exception E_OUT_OF_MEMORY The memory is insufficient.
381 * @exception E_DEVICE_BUSY The device cannot be approached because of other operations.
382 * @exception E_DEVICE_UNAVAILABLE The device is unavailable.
383 * @exception E_UNSUPPORTED_OPERATION This operation is not supported.
384 * @exception E_DEVICE_FAILED The device operation has failed.
385 * @remarks This method works in the ::CAMERA_STATE_INITIALIZED state. @n@n
386 * For more information on the relationship between this method and the PowerOn() method, and the
387 * state transition caused by this method, see <a href="../com.osp.cppprogramming.help/html/dev_guide/media/launching_camera.htm
388 ">Launching the Camera</a>.
389 * @see GetPreviewResolution()
391 result SetPreviewResolution(const Tizen::Graphics::Dimension& resolution);
394 * Retrieves the current resolution of the preview.
396 * @return The current preview resolution
397 * @exception E_SUCCESS The method is successful.
398 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
399 * @exception E_OUT_OF_MEMORY The memory is insufficient.
400 * @remarks The specific error code can be accessed using the GetLastResult() method.
401 * @see SetPreviewResolution()
403 Tizen::Graphics::Dimension GetPreviewResolution(void) const;
406 * Retrieves the supported preview resolution list of the Camera class. @n
407 * Each item in the returned list contains a pointer of Tizen::Graphics::Dimension value.
409 * @return A list of dimensions that represent the preview resolutions supported by the Camera class, @n
410 * else @c null if no preview resolution is supported or an exception occurs
411 * @exception E_SUCCESS The method is successful.
412 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
413 * @exception E_SYSTEM A system error has occurred.
414 * @exception E_OUT_OF_MEMORY The memory is insufficient.
415 * @remark The specific error code can be accessed using the GetLastResult() method. @n
416 * The return value and each item in the list must be deleted by the caller. @n
417 * This method works correctly when Camera::PowerOn() is executed.
418 * @see SetPreviewResolution(), GetPreviewResolution()
420 Tizen::Base::Collection::IList* GetSupportedPreviewResolutionListN(void) const;
424 * Sets the capturing resolution of the camera. @n
425 * Initially, the default resolution is set using the internal configuration.
427 * @return An error code
428 * @param[in] resolution The display resolution @n
429 * The display resolution should be one of the values extracted using GetSupportedCaptureResolutionListN().
430 * @exception E_SUCCESS The method is successful.
431 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
432 * @exception E_SYSTEM A system error has occurred.
433 * @exception E_OUT_OF_RANGE The specified resolution is out of range.
434 * @exception E_DEVICE_BUSY The device cannot be approached because of other operations.
435 * @exception E_DEVICE_UNAVAILABLE The device is unavailable.
436 * @exception E_DEVICE_FAILED The device operation has failed.
437 * @exception E_UNSUPPORTED_OPERATION This operation is not supported.
438 * @exception E_OUT_OF_MEMORY The memory is insufficient.
439 * @remarks For more information on the relationship between this method and the PowerOn() method, and the
440 * state transition caused by this method, see <a href="../com.osp.cppprogramming.help/html/dev_guide/media/launching_camera.htm
441 ">Launching the Camera</a>.
442 * @see GetCaptureResolution(), GetSupportedCaptureResolutionListN()
444 result SetCaptureResolution(const Tizen::Graphics::Dimension& resolution);
447 * Gets the resolution for capturing the data of the camera.
449 * @return The current resolution for capturing the data of the camera
450 * @exception E_SUCCESS The method is successful.
451 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
452 * @exception E_OUT_OF_MEMORY The memory is insufficient.
453 * @remarks The specific error code can be accessed using the GetLastResult() method.
454 * @see SetCaptureResolution(),GetSupportedCaptureResolutionListN()
456 Tizen::Graphics::Dimension GetCaptureResolution(void) const;
459 * Gets a list of the capturing resolutions supported by the Camera class. @n
460 * Each item of the list has a pointer of the Tizen::Graphics::Dimension value.
462 * @return A list of the capture resolutions supported by the Camera class @n
463 * else @c null if no capture resolution is supported or an exception occurs
464 * @exception E_SUCCESS The method is successful.
465 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
466 * @exception E_SYSTEM A system error has occurred.
467 * @exception E_OUT_OF_MEMORY The memory is insufficient.
468 * @remark The specific error code can be accessed using the GetLastResult() method. @n
469 * The return value and each item in the list must be deleted by the caller. @n
470 * This method works correctly when PowerOn() is executed.
471 * @see SetCaptureResolution(), GetCaptureResolution()
473 Tizen::Base::Collection::IList* GetSupportedCaptureResolutionListN(void) const;
476 * Sets the effect for the input data of the camera.
478 * @return An error code
479 * @param[in] effect The effect for the input data of the camera
480 * @exception E_SUCCESS The method is successful.
481 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
482 * @exception E_INVALID_ARG The specified input parameter is invalid.
483 * @exception E_DEVICE_BUSY The device cannot be approached because of other operations.
484 * @exception E_DEVICE_UNAVAILABLE The device is unavailable.
485 * @exception E_DEVICE_FAILED The device operation has failed.
486 * @exception E_UNSUPPORTED_OPERATION This operation is not supported.
487 * @exception E_UNSUPPORTED_TYPE The effect type is not supported.
488 * @exception E_OUT_OF_MEMORY The memory is insufficient.
489 * @remarks The default effect is ::CAMERA_EFFECT_NONE.
490 * This method works correctly when PowerOn() is executed. @n@n
491 * For more information on the relationship between this method and the PowerOn() method, and the
492 * state transition caused by this method, see <a href="../com.osp.cppprogramming.help/html/dev_guide/media/launching_camera.htm
493 ">Launching the Camera</a>.
496 result SetEffect(CameraEffect effect);
499 * Gets the effect for the input data of the camera.
501 * @return The effect for the input data of the camera
502 * @exception E_SUCCESS The method is successful.
503 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
504 * @exception E_OUT_OF_MEMORY The memory is insufficient.
505 * @remarks The specific error code can be accessed using the GetLastResult() method.
508 CameraEffect GetEffect(void) const;
511 * Sets the camera's flash mode.
513 * @return An error code
514 * @param[in] flashMode flash mode to switch on the flash light.
515 * @exception E_SUCCESS The method is successful.
516 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
517 * @exception E_INVALID_ARG The specified flash mode is invalid.
518 * @exception E_DEVICE_BUSY The camera is under use by other application.
519 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
520 * @exception E_DEVICE_FAILED The device operation has failed.
521 * @exception E_OUT_OF_MEMORY The memory is insufficient.
522 * @exception E_UNSUPPORTED_OPERATION The target device does not support flash configuration feature.
523 * @exception E_UNSUPPORTED_TYPE The specified @c flashMode is not supported.
524 * @remarks Normally the flash splashes before the camera captures a picture. @n
525 * ::CAMERA_FLASH_MODE_CONTINUOUS keeps the flash turned on after the method is called until ::CAMERA_FLASH_MODE_OFF is set. @n
526 * This method returns E_UNSUPPORTED_OPERATION in the Emulator.
527 * @see GetFlashMode()
529 result SetFlashMode(CameraFlashMode flashMode);
532 * Gets the flash mode of the camera.
534 * @return The flash mode of the camera
535 * @exception E_SUCCESS The method is successful.
536 * @remarks The specific error code can be accessed using the GetLastResult() method.
537 * If the %Camera doesn't support the flash mode, this method always returns ::CAMERA_FLASH_MODE_OFF.
538 * @see SetFlashMode()
540 CameraFlashMode GetFlashMode(void) const;
543 * Sets the exposure level of the camera.
545 * @return An error code
546 * @param[in] exposure The camera exposure level @n
547 * The range of this parameter is from @c 0 to @c 9.
548 * @exception E_SUCCESS The method is successful.
549 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
550 * @exception E_OUT_OF_RANGE The specified exposure level is out of range.
551 * @exception E_DEVICE_BUSY The device cannot be approached because of other operations.
552 * @exception E_DEVICE_UNAVAILABLE The device is unavailable.
553 * @exception E_DEVICE_FAILED The device operation has failed.
554 * @exception E_UNSUPPORTED_OPERATION This operation is not supported.
555 * @exception E_OUT_OF_MEMORY The memory is insufficient.
556 * @remarks The default exposure level is @c 5.
557 * The supported range for exposure level is from @c 0 to @c 9.
558 * This method works correctly when PowerOn() is executed. @n@n
559 * For more information on the relationship between this method and the PowerOn() method, and the
560 * state transition caused by this method, see <a href="../com.osp.cppprogramming.help/html/dev_guide/media/launching_camera.htm
561 ">Launching the Camera</a>.
564 result SetExposure(int exposure);
567 * Gets the exposure level of the camera.
569 * @return An integer value representing the exposure level of the camera @n
570 * The returned value ranges from @c 0 to @c 9.
571 * @exception E_SUCCESS The method is successful.
572 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
573 * @exception E_OUT_OF_MEMORY The memory is insufficient.
574 * @remarks The specific error code can be accessed using the GetLastResult() method. @n
575 * The supported range for exposure level is from @c 0 to @c 9.
578 int GetExposure(void) const;
581 * Sets the white balance level of the camera.
583 * @return An error code
584 * @param[in] whiteBalance The camera white balance level
585 * @exception E_SUCCESS The method is successful.
586 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
587 * @exception E_INVALID_ARG The specified input parameter is invalid.
588 * @exception E_DEVICE_BUSY The device cannot be approached because of other operations.
589 * @exception E_DEVICE_UNAVAILABLE The device is unavailable.
590 * @exception E_DEVICE_FAILED The device operation has failed.
591 * @exception E_UNSUPPORTED_OPERATION This operation is not supported.
592 * @exception E_UNSUPPORTED_TYPE The @c whiteBalance type is not supported.
593 * @exception E_OUT_OF_MEMORY The memory is insufficient.
594 * @remarks The default white balance is ::CAMERA_WHITE_BALANCE_AUTO.
595 * This method works correctly when PowerOn() is executed. @n@n
596 * For more information on the relationship between this method and the PowerOn() method, and the
597 * state transition caused by this method, see <a href="../com.osp.cppprogramming.help/html/dev_guide/media/launching_camera.htm
598 ">Launching the Camera</a>.
599 * @see GetWhiteBalance()
602 result SetWhiteBalance(CameraWhiteBalance whiteBalance);
605 * Gets the white balance level of the camera.
607 * @return The white balance level of the camera
608 * @exception E_SUCCESS The method is successful.
609 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
610 * @exception E_OUT_OF_MEMORY The memory is insufficient.
611 * @remarks The specific error code can be accessed using the GetLastResult() method.
612 * @see SetWhiteBalance()
614 CameraWhiteBalance GetWhiteBalance(void) const;
617 * Sets the capturing quality of the camera.
619 * @return An error code
620 * @param[in] quality The camera's quality level
621 * @exception E_SUCCESS The method is successful.
622 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
623 * @exception E_INVALID_ARG The specified @c quality is not supported.
624 * @exception E_DEVICE_BUSY The device cannot be approached because of other operations.
625 * @exception E_DEVICE_UNAVAILABLE The device is unavailable.
626 * @exception E_DEVICE_FAILED The device operation has failed.
627 * @exception E_UNSUPPORTED_OPERATION This operation is not supported.
628 * @exception E_OUT_OF_MEMORY The memory is insufficient.
629 * @remarks The default quality is ::CAMERA_QUALITY_NORMAL.
630 * This method works correctly when PowerOn() is executed. @n@n
631 * For more information on the relationship between this method and the PowerOn() method, and the
632 * state transition caused by this method, see <a href="../com.osp.cppprogramming.help/html/dev_guide/media/launching_camera.htm
633 ">Launching the Camera</a>.
636 result SetQuality(CameraQuality quality);
639 * Gets the capturing quality of the camera.
641 * @return The Camera quality level
642 * @exception E_SUCCESS The method is successful.
643 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
644 * @exception E_OUT_OF_MEMORY The memory is insufficient.
645 * @remarks The specific error code can be accessed using the GetLastResult() method.
648 CameraQuality GetQuality(void) const;
651 * Sets the focus mode of the camera.
653 * @return An error code
654 * @param[in] focusMode focus mode
655 * @exception E_SUCCESS The method is successful.
656 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
657 * @exception E_DEVICE_BUSY The device cannot be approached because of other operations.
658 * @exception E_DEVICE_UNAVAILABLE The device is unavailable.
659 * @exception E_DEVICE_FAILED The device operation has failed.
660 * @exception E_UNSUPPORTED_OPERATION This operation is not supported.
661 * @exception E_UNSUPPORTED_TYPE The @c focusMode type is not supported.
662 * @exception E_OUT_OF_MEMORY The memory is insufficient.
663 * @remarks ::CAMERA_FOCUS_MODE_NONE always throws E_INVALID_ARG.
664 * @see GetFocusMode()
666 result SetFocusMode(CameraFocusMode focusMode);
669 * Gets the focus mode of the camera.
671 * @return The %Camera focus mode
672 * @see SetFocusMode()
674 CameraFocusMode GetFocusMode(void) const;
677 * Enables or disables the auto focus mode of the camera.
679 * @return An error code
680 * @param[in] callback Set to @c true to enable auto focus callback, @n
682 * @exception E_SUCCESS The method is successful.
683 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
684 * @exception E_DEVICE_BUSY The device cannot be approached because of other operations.
685 * @exception E_DEVICE_UNAVAILABLE The device is unavailable.
686 * @exception E_DEVICE_FAILED The device operation has failed.
687 * @exception E_UNSUPPORTED_OPERATION This operation is not supported.
688 * @exception E_OUT_OF_MEMORY The memory is insufficient.
689 * @remarks If @c callback is set to @c false, the ICameraEventListener::OnCameraAutoFocused() method is not called.
690 * This method throws E_UNSUPPORTED_OPERATION in the emulator. @n@n
691 * For more information on the relationship between this method and the PowerOn() method, and the
692 * state transition caused by this method, see <a href="../com.osp.cppprogramming.help/html/dev_guide/media/launching_camera.htm
693 ">Launching the Camera</a>.
694 * @see ICameraEventListener::OnCameraAutoFocused()
696 result SetAutoFocus(bool callback);
699 * Check the object is ready to call the auto focus callback or not.
701 * @return true if it calls the callback, otherwise false.
703 bool ReadyToAutoFocusCallback(void) const;
706 * Sets the auto focus point list.
708 * @return An error code
709 * @param[in] pointList auto focus point list which consists of Tizen::Graphics::Point pointers
710 * @exception E_SUCCESS The method is successful.
711 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
712 * @exception E_DEVICE_BUSY The device cannot be approached because of other operations.
713 * @exception E_DEVICE_UNAVAILABLE The device is unavailable.
714 * @exception E_DEVICE_FAILED The device operation has failed.
715 * @exception E_INVALID_ARG The specified input parameter is invalid.
716 * @exception E_UNSUPPORTED_OPERATION The device does not support the focus point.
717 * @exception E_UNSUPPORTED_TYPE This method is not supported for the current focus mode.
718 * @exception E_OUT_OF_MEMORY The memory is insufficient.
719 * @remarks This method works fine when the current focus mode is CAMERA_FOCUS_MODE_NORMAL or CAMRA_FOCUS_MODE_MACRO.
720 * @see GetAutoFocusPointN()
722 result SetAutoFocusPoint(const Tizen::Base::Collection::IList& pointList);
725 * Gets the auto focus point list. @n
726 * Each item of the list has a pointer of the Tizen::Graphics::Point value.
728 * @return A list of dimensions that represent the auto focus point, @n
729 * else @c null if no auto focus point is set or an exception occurs
730 * @exception E_SUCCESS The method is successful.
731 * @exception E_OUT_OF_MEMORY The memory is insufficient.
732 * @remarks The specific error code can be accessed using the GetLastResult() method. @n
733 * The return value and each item in the list must be deleted by the caller.
734 * @see SetAutoFocusPoint()
736 Tizen::Base::Collection::IList* GetAutoFocusPointN(void) const;
739 * Sets the capturing format of the camera. @n
740 * Initially, the default format is set using the internal configuration.
742 * @return An error code
743 * @param[in] format The camera's capture format @n
744 * It should be one of the pixel formats extracted using GetSupportedCaptureFormatListN().
745 * @exception E_SUCCESS The method is successful.
746 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
747 * @exception E_SYSTEM A system error has occurred.
748 * @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
749 * @exception E_DEVICE_BUSY The device cannot be approached because of other operations.
750 * @exception E_DEVICE_UNAVAILABLE The device is unavailable.
751 * @exception E_DEVICE_FAILED The device operation has failed.
752 * @exception E_UNSUPPORTED_OPERATION This operation is not supported.
753 * @exception E_OUT_OF_MEMORY The memory is insufficient.
754 * @remarks This method works correctly when PowerOn() is executed.
755 * @see GetCaptureFormat(), GetSupportedCaptureFormatListN()
757 result SetCaptureFormat(const Tizen::Graphics::PixelFormat format);
760 * Gets the capturing format of the camera.
762 * @return The capturing format of the camera
763 * @exception E_SUCCESS The method is successful.
764 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
765 * @exception E_OUT_OF_MEMORY The memory is insufficient.
766 * @remarks The specific error code can be accessed using the GetLastResult() method.
767 * @see SetCaptureFormat(), GetSupportedCaptureFormatListN()
769 Tizen::Graphics::PixelFormat GetCaptureFormat(void) const;
772 * Gets the supported capturing format list for the Camera class. @n
773 * Each list item has a Tizen::Graphics::PixelFormat value.
775 * @return A list of the formats supported by the Camera class, @n
776 * else @c null if no capture format is supported or an exception occurs
777 * @exception E_SUCCESS The method is successful.
778 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
779 * @exception E_SYSTEM A system error has occurred.
780 * @exception E_OUT_OF_MEMORY The memory is insufficient.
781 * @remark The specific error code can be accessed using the GetLastResult() method. @n
782 * The return value must be deleted. @n
783 * This method works correctly when PowerOn() is executed.
784 * @see SetCaptureFormat(), GetCaptureFormat()
786 Tizen::Base::Collection::IListT<Tizen::Graphics::PixelFormat>* GetSupportedCaptureFormatListN(void) const;
789 * Sets the preview format of the camera. @n
790 * Initially, the default format is set using the internal configuration.
792 * @return An error code
793 * @param[in] format The camera's preview format @n
794 * It should be one of the pixel formats extracted using GetSupportedPreviewFormatListN().
795 * @exception E_SUCCESS The method is successful.
796 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
797 * @exception E_SYSTEM A system error has occurred.
798 * @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
799 * @exception E_DEVICE_BUSY The device cannot be approached because of other operations.
800 * @exception E_DEVICE_UNAVAILABLE The device is unavailable.
801 * @exception E_DEVICE_FAILED The device operation has failed.
802 * @exception E_UNSUPPORTED_OPERATION This operation is not supported.
803 * @exception E_OUT_OF_MEMORY The memory is insufficient.
804 * @remarks This method works in ::CAMERA_STATE_INITIALIZED state. @n@n
805 * For more information on the relationship between this method and the PowerOn() method, and the
806 * state transition caused by this method, see <a href="../com.osp.cppprogramming.help/html/dev_guide/media/launching_camera.htm
807 ">Launching the Camera</a>.
808 * @see GetPreviewFormat(), GetSupportedPreviewFormatListN()
810 result SetPreviewFormat(const Tizen::Graphics::PixelFormat format);
813 * Gets the preview format of the camera.
815 * @return The preview format of the camera
816 * @exception E_SUCCESS The method is successful.
817 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
818 * @exception E_OUT_OF_MEMORY The memory is insufficient.
819 * @remarks The specific error code can be accessed using the GetLastResult() method.
820 * @see SetPreviewFormat(), GetSupportedPreviewFormatListN()
822 Tizen::Graphics::PixelFormat GetPreviewFormat(void) const;
825 * Gets the supported preview format list for the Camera class. @n
826 * Each list item has a Tizen::Graphics::PixelFormat value.
828 * @return A list of the preview format supported by the Camera class, @n
829 * else @c null if no preview format is supported or an exception occurs
830 * @exception E_SUCCESS The method is successful.
831 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
832 * @exception E_SYSTEM A system error has occurred.
833 * @exception E_OUT_OF_MEMORY The memory is insufficient.
834 * @remark The specific error code can be accessed using the GetLastResult() method. @n
835 * The return value must be deleted. @n
836 * This method works correctly when PowerOn() is executed.
837 * @see SetPreviewFormat(), GetPreviewFormat()
839 Tizen::Base::Collection::IListT<Tizen::Graphics::PixelFormat>* GetSupportedPreviewFormatListN(void) const;
843 * Sets the ISO level of the camera.
845 * @return An error code
846 * @param[in] isoLevel The camera's ISO level @n
847 * The default ISO level is set from the internal configuration.
848 * @exception E_SUCCESS The method is successful.
849 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
850 * @exception E_OUT_OF_RANGE The specified ISO level is out of range.
851 * @exception E_DEVICE_BUSY The device cannot be approached because of other operations.
852 * @exception E_DEVICE_UNAVAILABLE The device is unavailable.
853 * @exception E_DEVICE_FAILED The device operation has failed.
854 * @exception E_UNSUPPORTED_OPERATION This operation is not supported.
855 * @exception E_UNSUPPORTED_TYPE The specified @c isoLevel is not supported.
856 * @exception E_OUT_OF_MEMORY The memory is insufficient.
857 * @remarks In some devices this method works in the ::CAMERA_STATE_PREVIEW state.
858 * This method throws E_UNSUPPORTED_OPERATION in the emulator. @n@n
859 * For more information on the relationship between this method and the PowerOn() method, and the
860 * state transition caused by this method, see <a href="../com.osp.cppprogramming.help/html/dev_guide/media/launching_camera.htm
861 ">Launching the Camera</a>.
864 result SetIsoLevel(CameraIsoLevel isoLevel);
867 * Gets the ISO level of the camera.
869 * @return The ISO level of the camera
870 * @exception E_SUCCESS The method is successful.
871 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
872 * @exception E_OUT_OF_MEMORY The memory is insufficient.
873 * @remarks The specific error code can be accessed using the GetLastResult() method.
876 CameraIsoLevel GetIsoLevel(void) const;
879 * Sets the preview frame rate of the camera. @n
880 * Initially, the default frame rate is set using the internal configuration.
882 * @return An error code
883 * @param[in] fps The frame rate per second
884 * @exception E_SUCCESS The method is successful.
885 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
886 * @exception E_OUT_OF_RANGE The specified @c fps is out of range on this device.
887 * @exception E_DEVICE_BUSY The device cannot be approached because of other operations.
888 * @exception E_DEVICE_UNAVAILABLE The device is unavailable.
889 * @exception E_DEVICE_FAILED The device operation has failed.
890 * @exception E_UNSUPPORTED_OPERATION This operation is not supported.
891 * @exception E_OUT_OF_MEMORY The memory is insufficient.
892 * @remarks This method works in ::CAMERA_STATE_INITIALIZED state. @n@n
893 * For more information on the relationship between this method and the PowerOn() method, and the
894 * state transition caused by this method, see <a href="../com.osp.cppprogramming.help/html/dev_guide/media/launching_camera.htm
895 ">Launching the Camera</a>.
896 * @see GetPreviewFrameRate(), GetSupportedPreviewFrameRateListN(), FRAME_RATE_AUTO
898 result SetPreviewFrameRate(int fps);
901 * Retrieves the frame rate of the camera.
903 * @return The frame rate of the camera @n
904 * If the frame rate is not set using SetPreviewFrameRate(), the system-dependent default frame rate is returned.
905 * @exception E_SUCCESS The method is successful.
906 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
907 * @exception E_OUT_OF_MEMORY The memory is insufficient.
908 * @remarks The specific error code can be accessed using the GetLastResult() method.
909 * @see SetPreviewFrameRate(), GetSupportedPreviewFrameRateListN()
911 int GetPreviewFrameRate(void) const;
914 * Gets the supported preview frame rate list for the Camera class. @n
915 * Each list item has an integer value.
917 * @return A list of the preview frame rate supported by the Camera class, @n
918 * else @c null if no frame rate is supported or an exception occurs
919 * @exception E_SUCCESS The method is successful.
920 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
921 * @exception E_SYSTEM A system error has occurred.
922 * @exception E_OUT_OF_MEMORY The memory is insufficient.
923 * @remark The specific error code can be accessed using the GetLastResult() method. @n
924 * The return value must be deleted by the caller. @n
925 * This method works correctly when PowerOn() is executed. @n
926 * This method returns fps list that can be supported by all resolutions.
927 * @see SetPreviewFrameRate(), GetPreviewFrameRate(), FRAME_RATE_AUTO
928 * @see GetSupportedPreviewFrameRateListN(const Tizen::Graphics::Dimension& dim) const
930 Tizen::Base::Collection::IListT<int>* GetSupportedPreviewFrameRateListN(void) const;
933 * Gets the supported preview frame rate list of the input resolution of the Camera class. @n
934 * Each item of the list has an integer value.
936 * @return A list of the preview frame rate of the input preview resolution, @n
937 * else @c null if no frame rate is supported or an exception occurs
938 * @param[in] dim The preview resolution of the camera
939 * @exception E_SUCCESS The method is successful.
940 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
941 * @exception E_INVALID_ARG The specified input resolution is invalid.
942 * @exception E_SYSTEM A system error has occurred.
943 * @exception E_OUT_OF_MEMORY The memory is insufficient.
944 * @remark The specific error code can be accessed using the GetLastResult() method. @n
945 * The return value must be deleted by the caller. @n
946 * This method works correctly when PowerOn() is executed.
947 * @see SetPreviewFrameRate(), GetPreviewFrameRate()
948 * @see GetSupportedPreviewFrameRateListN(void) const
950 Tizen::Base::Collection::IListT<int>* GetSupportedPreviewFrameRateListN(const Tizen::Graphics::Dimension& dim) const;
953 * Sets the orientation value in the Exchangeable Image File Format (EXIF) field of the captured data.
955 * @return An error code
956 * @param[in] orientation The orientation value to set in EXIF
957 * @exception E_SUCCESS The method is successful.
958 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
959 * @exception E_OUT_OF_RANGE The input value is out of range.
960 * @exception E_UNSUPPORTED_OPERATION This operation is not supported.
961 * @exception E_SYSTEM A system error has occurred.
962 * @remarks The default value of orientation is CAMERA_EXIF_ORIENTATION_TOP_LEFT. @n
963 * This method works correctly when PowerOn() is executed. The orientation value set by this method can be obtained using the
964 * Tizen::Content::ImageData::GetOrientation() method after writing the captured data to a file.
966 result SetExifOrientation(CameraExifOrientation orientation);
969 * Sets the GPS coordinates in the Exchangeable Image File Format (EXIF) field for the captured data.
971 * @return An error code
972 * @param[in] latitude The latitude value to be set in EXIF @n
973 * The valid range is [-90.0, 90.0].
974 * @param[in] longitude The longitude value to be set in EXIF @n
975 * The valid range is [-180.0, 180.0]
976 * @param[in] altitude The altitude value to be set in EXIF
977 * @exception E_SUCCESS The method is successful.
978 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
979 * @exception E_OUT_OF_RANGE The input value is out of range.
980 * @exception E_UNSUPPORTED_OPERATION This operation is not supported.
981 * @exception E_SYSTEM A system error has occurred.
982 * @remarks This method sets the GPS coordinates and enables entering the coordinates into the Exchangeable Image File Format (EXIF).
983 * @remarks By default, the GPS coordinates are not entered in JPEG's EXIF.
984 * @remarks The GPS coordinates that are set using this method are entered in every call to the
985 * Capture() method, until DisableExifGpsCoordinates() is called or this instance is destroyed. @n
986 * This method works correctly when PowerOn() is executed. @n
987 * The values set by this method can result in an error as compared to the values stored in the Exchangeable Image File Format (EXIF) field.
988 * @see DisableExifGpsCoordinates()
990 result SetExifGpsCoordinates(double latitude, double longitude, float altitude);
993 * Disables the insertion of the GPS coordinates in the Exchangeable Image File Format (EXIF) field for the captured data.
995 * @return An error code
996 * @exception E_SUCCESS The method is successful.
997 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
998 * @exception E_OUT_OF_RANGE The input value is out of range.
999 * @exception E_UNSUPPORTED_OPERATION This operation is not supported.
1000 * @exception E_SYSTEM A system error has occurred.
1001 * @see SetExifGpsCoordinates()
1003 result DisableExifGpsCoordinates(void);
1006 * Sets the flip type for the previewed and captured data.
1008 * @return An error code
1009 * @param[in] flip The camera flip type
1010 * @exception E_SUCCESS The method is successful.
1011 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1012 * @exception E_INVALID_ARG The input value is out of range.
1013 * @exception E_UNSUPPORTED_OPERATION This operation is not supported.
1014 * @exception E_UNSUPPORTED_TYPE The specified flip type is not supported.
1015 * @exception E_SYSTEM A system error has occurred.
1016 * @remarks This method works in the ::CAMERA_STATE_INITIALIZED state.
1017 * @remarks Finally the last specified type is applied even with the several types applicable.
1020 result SetFlip(CameraFlipType flip);
1023 * Gets the flip type for the previewed and captured data.
1025 * @return The Camera flip type
1026 * @exception E_SUCCESS The method is successful.
1027 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1030 CameraFlipType GetFlip(void) const;
1033 * Sets the rotation for the previewed data.
1035 * @return An error code
1036 * @param[in] rotation The camera rotation
1037 * @exception E_SUCCESS The method is successful.
1038 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1039 * @exception E_INVALID_ARG The input value is out of range.
1040 * @exception E_UNSUPPORTED_OPERATION This operation is not supported.
1041 * @exception E_UNSUPPORTED_TYPE The specified rotation type is not supported.
1042 * @exception E_SYSTEM A system error has occurred.
1043 * @remarks This method works in the ::CAMERA_STATE_INITIALIZED state.
1044 * @remarks The last specified type is applied even with the several types applicable.
1045 * @remarks This method rotates the preview and recording data but not the captured image. @n
1046 * The captured image's orientation is always following the physical rotation.
1047 * @remarks When the preview is rotated, the preview callback data's width and height can be changed. @n
1048 * Thus the application should recognize these changes when it uses the preview data in ICameraEventListener::OnCameraPreviewed() callback.
1049 * @remarks For the intended view of preview, Tizen::Ui::Controls::OverlayRegion::OVERLAY_REGION_TYPE_NORMAL should be selected when Tizen::Ui::Controls::OverlayRegion is created.
1050 * @see GetPreviewRotation()
1053 result SetPreviewRotation(CameraRotation rotation);
1057 * Gets the rotation for the previewed data.
1059 * @return The camera rotation
1060 * @exception E_SUCCESS The method is successful.
1061 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1062 * @see SetPreviewRotation()
1065 CameraRotation GetPreviewRotation(void) const;
1068 * Sets the metering mode of the camera.
1070 * @return An error code
1071 * @param[in] meteringMode metering mode
1072 * @exception E_SUCCESS The method is successful.
1073 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1074 * @exception E_DEVICE_BUSY The device cannot be approached because of other operations.
1075 * @exception E_DEVICE_UNAVAILABLE The device is unavailable.
1076 * @exception E_DEVICE_FAILED The device operation has failed.
1077 * @exception E_UNSUPPORTED_OPERATION This operation is not supported.
1078 * @exception E_UNSUPPORTED_TYPE The @c meteringMode type is not supported.
1079 * @exception E_OUT_OF_MEMORY The memory is insufficient.
1080 * @remarks ::CAMERA_METERING_MODE_NONE always throws E_INVALID_ARG.
1081 * @see GetMeteringMode()
1083 result SetMeteringMode(CameraMeteringMode meteringMode);
1086 * Gets the metering mode of the camera.
1088 * @return The %Camera metering mode
1089 * @see SetMeteringMode()
1091 CameraMeteringMode GetMeteringMode(void) const;
1094 * Gets the camera's state.
1098 camera_state_e GetMmState(void) const;
1103 * @param[in] state _AudioRecorderImpl's state
1105 void SetState(CameraState state);
1108 * Get the event processing object.
1110 * @return The event processing object.
1111 * @remarks This event is working synchronously.
1113 _CameraEvent* GetEvent(void) const;
1116 * Get the camera selection.
1118 * @return The camera selection.
1120 CameraSelection GetSelection(void) const;
1123 * Gets the preview process flag
1125 * @return The preview processing flag
1127 int GetPreviewProcessing(void) const;
1130 * Enqueues the preview or captured data.
1132 * @return An error code
1133 * @exception E_SUCCESS The method is successful.
1134 * @exception E_INVALID_ARG A specified input parameter is invalid.
1135 * @param[in] cameraBuffer The data prepared for enqueing.
1136 * @remarks The preview and capture data is delivered by callback. _CameraImpl class should keep the data using Queue and consume the data in the event listener. @n
1137 * Preview frame skip is controled in this method.
1139 result EnqueueData(_CameraBuffer& cameraBuffer);
1142 * Dequeues the preview or captured data.
1144 * @return A buffer data
1145 * @param[in] bufferType The buffer type
1146 * @remarks The preview and capture data is delivered by callback. _CameraImpl class should keep the data using Queue and consume the data in the event listener. @n
1147 * Preview frame skip is controled in this method. @n
1148 * The return value must be deleted. @n
1149 * The return value cannot be null.
1151 _CameraBuffer* DequeueDataN(_CameraBufferType bufferType);
1154 * Gets the queue's element count.
1156 * @return A count of queue element
1157 * @param[in] bufferType Queue type
1159 int GetDataCount(_CameraBufferType bufferType);
1162 * Gets the camera coordinator.
1164 * @return camera coordinator
1166 _CameraCoordinator* GetCoordinator(void);
1169 * Gets the camera's zero shutter lag capability
1171 * @return Zero shutter lag capability
1173 bool IsZeroShutterLag(void) const;
1176 * Called when the event is received from the %_ICameraCoordinatorListener object.
1178 * @return An error code
1179 * @param[in] message message id
1180 * @param[in] state camera state
1181 * @param[in] pParam0 Extra data0
1183 result OnCamcorderCoordinatorEventReceived(camera_state_e previous, camera_state_e current, bool byPolicy);
1186 * Called when the mode is prepared to change.
1188 * @return An error code
1189 * @param[in] mode camcorder mode
1191 result OnCameraCoordinatorModeChangePrepared(_CameraMode mode);
1194 * Called when the mode is changed.
1196 * @return An error code
1197 * @param[in] mode camcorder mode
1199 result OnCameraCoordinatorModeChanged(_CameraMode mode);
1202 * Sets the preprocessing callback fuction pointer.
1204 * @param[in] pPreProcessCbFunc preprocessing callback fuction pointer
1205 * @param[in] pPreProcessUserData preprocessing userdata pointer
1207 void SetPreprocessingCb(_CameraPreprocessingCallback pPreProcessCbFunc, void* pPreProcessUserData);
1210 * Gets the preprocessing callback fuction pointer.
1212 * @param[out] pPreProcessCbFunc preprocessing callback fuction pointer
1213 * @param[out] pPreProcessUserData preprocessing userdata pointer
1215 void GetPreprocessingCb(_CameraPreprocessingCallback& pPreProcessCbFunc, void*& pPreProcessUserData);
1218 * Function definition for start capture.
1220 * @return This function returns 0 on success, else on failure.
1221 * @param[in] mmHandle The camcorder handle
1223 static int StartMmCapture(_CameraHandle mmHandle);
1226 * Function definition for state chnaged callback.
1228 * @param[in] previous Previous state
1229 * @param[in] current Current state
1230 * @param[in] byPolicy The flag which says the state was chnaged from the policy.
1231 * @param[in] pUserData User parameter which is received from user when callback function was set
1232 * @remarks This function is called in the camera created thread.
1234 static void StateChangedCb(camera_state_e previous, camera_state_e current, bool byPolicy, void *pUserData);
1237 * Function definition for image capture callback.
1239 * @param[in] pImage Reference pointer to captured image data
1240 * @param[in] pPostview Reference pointer to post view image data
1241 * @param[in] pThumbnail Reference pointer to thumbnail data
1242 * @param[in] pUserData User parameter which is received from user when callback function was set
1243 * @remarks This function is issued in the context of gstreamer (video src thread).
1245 static void CaptureCb(camera_image_data_s* pImage, camera_image_data_s *pPostview, camera_image_data_s* pThumbnail, void* pUserData);
1248 * Function definition for capture completion callback.
1250 * @param[in] pUserData User parameter which is received from user when callback function was set
1251 * @remarks This function is issued in the context of gstreamer (video src thread).
1253 static void CaptureCompletedCb(void *pUserData);
1256 * Function definition for preview stream callback.
1258 * @param[in] pFrame frame data structure for stream
1259 * @param[in] pUserData User parameter which is received from user when callback function was set
1260 * @remarks This function is issued in the context of gstreamer (video src thread).
1262 static void PreviewCb(camera_preview_data_s *pFrame, void *pUSerData);
1265 * Function definition for interrupted callback.
1267 * @param[in] policy The policy which made the interruption
1268 * @param[in] previous Previous state
1269 * @param[in] current Current state
1270 * @param[in] pUserData User parameter which is received from user when callback function was set
1271 * @remarks This function is called in the camera created thread.
1273 static void InterruptedCb(camera_policy_e policy, camera_state_e previous, camera_state_e current, void *pUserData);
1276 * Function definition for focus changed callback.
1278 * @param[in] state focus state
1279 * @param[in] pUserData User parameter which is received from user when callback function was set
1280 * @remarks This function is called in the camera created thread.
1282 static void FocusStateChangedCb(camera_focus_state_e state, void *pUserData);
1285 * Function check fo this object is alive.
1287 * @return true if the object is alive, otherwise false.
1289 static bool IsAlive(void);
1292 * Gets the Impl instance.
1294 * @return The pointer to %_CameraImpl
1295 * @param[in] pCamera The %Camera pointer
1297 static _CameraImpl* GetInstance(Camera *pCamera);
1300 * Gets the Impl instance.
1302 * @return The pointer to %_CameraImpl
1303 * @param[in] pCamera The %Camera pointer
1305 static const _CameraImpl* GetInstance(const Camera *pCamera);
1309 * Converts the error from camera.
1311 * @return An error code
1312 * @param[in] err camera error
1314 result ConvertResult(int err) const;
1319 * @return An error code
1320 * @param[in] operation camcorder's operation type
1321 * @param[in] min min value
1322 * @param[in] max max value
1323 * @param[in] value value to be set
1325 result SetProperty(_CameraOperationType operation, int min, int max, int value);
1330 * @return An error code
1331 * @param[in] operation camcorder's operation type
1332 * @param[out] mmMin min value
1333 * @param[out] mmMax max value
1335 result GetProperty(_CameraOperationType operation, int& mmMin, int& mmMax) const;
1338 * Get the property list.
1340 * @return The property list
1341 * @param[in] operation camcorder's operation type
1342 * @param[in] itemQueryType item type for verifying the list
1343 * @remarks If the list's item type and itemQueryType parameter are not same, it returns null.
1345 Tizen::Base::Collection::IList* GetPropertyListN(_CameraOperationType operation, _ResultType itemQueryType) const;
1348 * Get the property list.
1350 * @return The property list
1351 * @param[in] key key name
1353 Tizen::Base::Collection::IList* GetPropertyListN(const Tizen::Base::String& key) const;
1356 * Re-load configuration.
1358 * @return An error code
1359 * @param[in] reload reload configuration field
1360 * @exception E_SUCCESS The method is successful.
1361 * @exception E_SYSTEM A system error has occurred.
1362 * @remarks Multiple configuration field can be set using reloadConf parameter appending.
1364 result ReloadConfiguration(int reload);
1367 * Load default configuration.
1369 * @return An error code
1370 * @param[in] reload reload configuration field
1371 * @exception E_SUCCESS The method is successful.
1372 * @exception E_SYSTEM A system error has occurred.
1374 result LoadDefaultConfiguration(int reload);
1377 * Change the focus state.
1379 * @return An error code
1380 * @param[in] currentMode focus' current mode
1381 * @param[in] destMode focus' destinationed mode
1382 * @exception E_SUCCESS The method is successful.
1383 * @exception E_SYSTEM A system error has occurred.
1385 result ChangeFocusModeTo(CameraFocusMode currentMode, CameraFocusMode destMode);
1388 * Handle the auto focus operations.
1390 * @return An error code
1391 * @param[in] currentMode focus' current mode
1392 * @exception E_SUCCESS The method is successful.
1393 * @exception E_SYSTEM A system error has occurred.
1395 result HandleAutoFocus(CameraFocusMode currentMode);
1397 _CameraImpl(const _CameraImpl& camera);
1398 _CameraImpl& operator =(const _CameraImpl& camera);
1400 _CameraDeviceType __deviceType;
1401 _CameraCoordinator* __pCoordinator;
1402 _CameraCapability* __pCameraCapability;
1404 CameraState __state;
1405 _CameraHandle __handle;
1407 _CameraEvent* __pCameraEvent;
1408 ICameraEventListener* __pCameraEventListener;
1409 Tizen::Base::Collection::Queue* __pCaptureBufferQueue;
1410 Tizen::Base::Collection::Queue* __pPreviewBufferQueue;
1412 bool __isConstructed;
1414 CameraSelection __selection;
1421 CameraEffect __effect;
1422 CameraWhiteBalance __wb;
1423 CameraQuality __quality;
1424 CameraIsoLevel __isoLevel;
1425 CameraFlashMode __flashMode;
1426 bool __zeroShutterLag;
1427 CameraMeteringMode __meteringMode;
1428 bool __focusCallback;
1429 bool __isFocusAreaSet;
1431 Tizen::Graphics::Dimension __previewResolution;
1432 Tizen::Graphics::Dimension __deviceDefaultPreviewResolution; // device default
1433 Tizen::Graphics::Dimension __captureResolution;
1434 Tizen::Graphics::Dimension __deviceDefaultCaptureResolution; // device default
1436 Tizen::Graphics::PixelFormat __previewFormat;
1437 Tizen::Graphics::PixelFormat __deviceDefaultPreviewFormat; // device default
1438 Tizen::Graphics::PixelFormat __captureFormat;
1439 Tizen::Graphics::PixelFormat __deviceDefaultCaptureFormat; // device default
1441 CameraExifOrientation __exifOrientation;
1442 static const CameraExifOrientation CAMERA_EXIF_ORIENTATION_NONE = (CameraExifOrientation)-1;
1443 double __exifLatitude;
1444 double __exifLongitude;
1445 float __exifAltitude;
1447 CameraFlipType __flip;
1448 CameraRotation __previewRotation;
1450 CameraFocusMode __focusMode;
1452 int __previewProcessing;
1453 Tizen::Graphics::Rectangle __previewRegionRect;
1454 int __previewRegionHandle;
1455 camera_display_type_e __previewDisplayType;
1456 CameraRotation __displayRotationType;
1457 CameraDirection __physicalDirection;
1458 CameraRotation __physicalRotation;
1459 static const int MAX_FOCUS_POINT = 10;
1460 int __focusPoints[2][MAX_FOCUS_POINT];
1461 int __supportedFocusPointCount;
1463 static bool __isUsed;
1465 _CameraPreprocessingCallback __pPreProcessCbFunc;
1466 void* __pPreProcessUserData;