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 FMediaCamera.h
20 * @brief This is the header file for the %Camera class.
22 * This header file contains the declarations of the %Camera class.
25 #ifndef _FMEDIA_CAMERA_H_
26 #define _FMEDIA_CAMERA_H_
29 #include <FGraphics.h>
30 #include <FMediaCameraTypes.h>
31 #include <FMediaICameraEventListener.h>
33 namespace Tizen { namespace Media
40 * @brief This class controls the camera device.
45 * The %Camera class controls the camera device.
46 * The supported properties are device-dependent. The list of the properties available can be retrieved using the methods of %Camera and MediaCapability classes.
47 * All the other methods, except SetAutoFocus(), StartPreview(), and Capture() work synchronously.
48 * The previewed or captured data are passed through ICameraEventListener. @n
50 * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/media/capturing_still_images.htm">Capturing Still Images</a>.
52 * The following example demonstrates how to use the %Camera class.
56 * #include <FGraphics.h>
60 * using namespace Tizen::Graphics;
61 * using namespace Tizen::Ui;
62 * using namespace Tizen::Ui::Controls;
63 * using namespace Tizen::Media;
66 * : public Tizen::Ui::Controls::Form
67 * , public Tizen::Media::ICameraEventListener
75 * virtual void OnCameraAutoFocused(bool completeCondition) {}
76 * virtual void OnCameraPreviewed( Tizen::Base::ByteBuffer& previewedData, result r) {}
77 * virtual void OnCameraCaptured( Tizen::Base::ByteBuffer& capturedData, result r) {}
78 * virtual void OnCameraErrorOccurred(CameraErrorReason r ) {}
82 * OverlayRegion * __pOverlay;
85 * CameraSample::CameraSample(void)
91 * CameraSample::Start(void)
93 * result r = E_SUCCESS;
94 * Rectangle rect(0, 0, 320, 240);
95 * bool modified = false;
96 * bool isValid = false;
97 * BufferInfo bufferInfo;
99 * r = __camera.Construct(*this, CAMERA_PRIMARY);
105 * r = __camera.PowerOn();
111 * isValid = OverlayRegion::EvaluateBounds(OVERLAY_REGION_EVALUATION_OPTION_LESS_THAN, rect, modified);
112 * if (isValid != true)
114 * return GetLastResult();
117 * // Gets OverlayRegion from this Form
118 * __pOverlay = GetOverlayRegionN(rect, OVERLAY_REGION_TYPE_PRIMARY_CAMERA);
119 * if (__pOverlay == null)
121 * return GetLastResult();
124 * __pOverlay->GetBackgroundBufferInfo(bufferInfo);
126 * r = __camera.StartPreview(&bufferInfo, true);
143 * CameraSample::Stop(void)
145 * __camera.StopPreview();
146 * __camera.PowerOff();
158 class _OSP_EXPORT_ Camera
159 : public Tizen::Base::Object
163 * This is the default constructor for this class.
167 * @remarks The object is not fully constructed after this constructor is called. For full construction,
168 * the Construct() method must be called right after calling this constructor.
173 * This is the destructor for this class. @n
174 * All allocated resources are deallocated by this method. This method must be called in the same thread
175 * where the Construct() method is called.This polymorphic destructor should be overridden if required.
176 * This way, the destructors of the derived classes are called when the destructor of this interface is called.
181 virtual ~Camera(void);
184 * Initializes this instance of %Camera with the specified parameters. @n
185 * The %Construct() method creates an instance of %Camera in the subsystem. Only one instance is created at a given time.
189 * @return An error code
190 * @param[in] listener An instance of ICameraEventListener
191 * @param[in] camSel The %Camera to power on
192 * @exception E_SUCCESS The method is successful.
193 * @exception E_SYSTEM A system error has occurred.
194 * @exception E_DEVICE_BUSY The camera is under use by other application or already used in this application.
195 * @exception E_DEVICE_UNAVAILABLE The camera is unavailable.
196 * @exception E_UNSUPPORTED_OPERATION The camera usage is not supported.
197 * @exception E_OUT_OF_MEMORY The memory is insufficient.
199 result Construct(ICameraEventListener& listener, CameraSelection camSel = CAMERA_PRIMARY);
202 * Powers the camera on.
205 * @privilege %http://tizen.org/privilege/camera
207 * @return An error code
208 * @exception E_SUCCESS The method is successful.
209 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
210 * @exception E_DEVICE_BUSY The camera is under use by other application.
211 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
212 * @exception E_DEVICE_FAILED The device operation has failed.
213 * @exception E_OUT_OF_MEMORY The memory is insufficient.
214 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
215 * @remarks The reserved configurations are set in this method.
218 result PowerOn(void);
221 * Powers the camera off.
224 * @privilege %http://tizen.org/privilege/camera
226 * @return An error code
227 * @exception E_SUCCESS The method is successful.
228 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
229 * @exception E_DEVICE_BUSY The camera is under use by other application.
230 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
231 * @exception E_DEVICE_FAILED The device operation has failed.
232 * @exception E_OUT_OF_MEMORY The memory is insufficient.
233 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
236 result PowerOff(void);
239 * Checks whether the camera is powered on.
243 * @return @c true if the camera is powered on, @n
245 * @see PowerOn(), PowerOff()
247 bool IsPoweredOn(void) const;
250 * Starts displaying the preview image on the camera device. @n
251 * If the value of @c pBufferInfo is @c null, no preview image is displayed. In this case, the application can
252 * draw the preview image with the data passed on by the ICameraEventListener::OnCameraPreviewed() method.
254 * If the value of @c previewedData is @c true, the previewed image data is passed to the
255 * ICameraEventListener::OnCameraPreviewed() method periodically based on the frame-rate, otherwise the
256 * callback is not invoked. The default value of @c previewedData is @c false.
259 * @privilege %http://tizen.org/privilege/camera
261 * @return An error code
262 * @param[in] pBufferInfo The buffer information for the camera preview display
263 * @param[in] previewedData Set to @c true if the previewed data is delivered to the callback method, @n
265 * @exception E_SUCCESS The method is successful.
266 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
267 * @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
268 * @exception E_DEVICE_BUSY The camera is under use by other application.
269 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
270 * @exception E_DEVICE_FAILED The device operation has failed.
271 * @exception E_OUT_OF_MEMORY The memory is insufficient.
272 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
273 * @remarks The overlay region retrieved by the buffer information must be the topmost window when this method is
275 * @remarks The ICameraEventListener::OnCameraPreviewed() method can be delayed or dropped depending on
276 * the system's performance. @n
277 * For more information on the relationship between this method and the PowerOn() method, and the
278 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
281 * @see ICameraEventListener::OnCameraPreviewed()
283 result StartPreview(const Tizen::Graphics::BufferInfo* pBufferInfo, bool previewedData = false);
286 * Stops displaying the preview image on the camera device.
289 * @privilege %http://tizen.org/privilege/camera
291 * @return An error code
292 * @exception E_SUCCESS The method is successful.
293 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
294 * @exception E_DEVICE_BUSY The camera is under use by other application.
295 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
296 * @exception E_DEVICE_FAILED The device operation has failed.
297 * @exception E_OUT_OF_MEMORY The memory is insufficient.
298 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
299 * @remarks For more information on the relationship between this method and the PowerOn() method, and the
300 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
302 * @see StartPreview()
304 result StopPreview(void);
307 * Captures the current image data from the camera sensor. @n
308 * After capturing the image, the camera's state changes to ::CAMERA_STATE_CAPTURED. @n
309 * The camera's preview must be restarted by calling the StartPreview() method. @n
310 * In a zero-shutter-lag camera, after capturing the image, the state changes to ::CAMERA_STATE_PREVIEW. @n
311 * The camera does not need to restart the preview in this case. @n
312 * The captured image is passed through ICameraEventListener::OnCameraCaptured().
315 * @privilege %http://tizen.org/privilege/camera
317 * @return An error code
318 * @exception E_SUCCESS The method is successful.
319 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
320 * @exception E_DEVICE_BUSY The camera is under use by other application.
321 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
322 * @exception E_DEVICE_FAILED The device operation has failed.
323 * @exception E_UNSUPPORTED_OPERATION The target device does not support capture feature.
324 * @exception E_OUT_OF_MEMORY The memory is insufficient.
325 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
326 * @remarks For more information on the relationship between this method and the PowerOn() method, and the
327 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
329 * @remarks In a zero-shutter-lag camera, the state changes to ::CAMERA_STATE_PREVIEW after capturing.
330 * @remarks The zero-shutter-lag capability can be checked using MediaCapability::GetValue(const Tizen::Base::String& key, bool& value) with
331 * ::CAMERA_PRIMARY_SUPPORT_ZERO_SHUTTER_LAG, ::CAMERA_SECONDARY_SUPPORT_ZERO_SHUTTER_LAG keys.
332 * @see ICameraEventListener::OnCameraCaptured()
334 result Capture(void);
337 * Gets the state of the camera in CameraState.
341 * @return The current state of the camera
343 * @see SetAutoFocus()
346 CameraState GetState(void) const;
349 * Sets the brightness level of the camera input data.
352 * @privilege %http://tizen.org/privilege/camera
354 * @return An error code
355 * @param[in] brightness The brightness level to set @n
356 * The range of this parameter is from @c 0 to @c 9.
357 * @exception E_SUCCESS The method is successful.
358 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
359 * @exception E_OUT_OF_RANGE The specified @c brightness is out of range.
360 * @exception E_DEVICE_BUSY The camera is under use by other application.
361 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
362 * @exception E_DEVICE_FAILED The device operation has failed.
363 * @exception E_UNSUPPORTED_OPERATION The target device does not support brightness configuration feature.
364 * @exception E_OUT_OF_MEMORY The memory is insufficient.
365 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
366 * @remarks The default brightness level is @c 5. @n
367 * The device's supported range for the brightness level is from @c 0 to @c 9. @n
368 * This method works correctly when PowerOn() is executed. @n@n
369 * For more information on the relationship between this method and the PowerOn() method, and the
370 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
372 * @see GetBrightness()
374 result SetBrightness(int brightness);
377 * Gets the brightness level of the camera input data.
381 * @return The current brightness level @n
382 * The returned value ranges from @c 0 to @c 9.
383 * @remarks The device's supported range for the brightness level is from @c 0 to @c 9.
384 * @see SetBrightness()
386 int GetBrightness(void) const;
389 * Sets the contrast level of the %Camera input data.
392 * @privilege %http://tizen.org/privilege/camera
394 * @return An error code
395 * @param[in] contrast The contrast level to set @n
396 * The range of this parameter is from @c 0 to @c 9.
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_RANGE The specified contrast is out of range.
400 * @exception E_DEVICE_BUSY The camera is under use by other application.
401 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
402 * @exception E_DEVICE_FAILED The device operation has failed.
403 * @exception E_UNSUPPORTED_OPERATION The target device does not support contrast configuration feature.
404 * @exception E_OUT_OF_MEMORY The memory is insufficient.
405 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
406 * @remarks The default contrast level is @c 5. @n
407 * The device's supported range for the contrast level is from @c 0 to @c 9. @n
408 * This method works correctly when PowerOn() is executed. @n@n
409 * For more information on the relationship between this method and the PowerOn() method, and the
410 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
414 result SetContrast(int contrast);
417 * Gets the contrast level of the camera input data.
421 * @return The current contrast level @n
422 * The returned value ranges from @c 0 to @c 9.
423 * @remarks The device's supported range for the contrast level is from @c 0 to @c 9.
426 int GetContrast(void) const;
429 * Zooms in the camera.
432 * @privilege %http://tizen.org/privilege/camera
434 * @return An error code
435 * @exception E_SUCCESS The method is successful.
436 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
437 * @exception E_DEVICE_BUSY The camera is under use by other application.
438 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
439 * @exception E_DEVICE_FAILED The device operation has failed.
440 * @exception E_UNSUPPORTED_OPERATION The target device does not support zooming feature.
441 * @exception E_OUT_OF_MEMORY The memory is insufficient.
442 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
443 * @remarks This method returns E_UNSUPPORTED_OPERATION in the Emulator.
444 * If Camera supports only ::CAMERA_ZOOM_TYPE_SMART, the zoom ratio can differ according
445 * to the preview, capture, and recording resolutions.
446 * The supported zoom types can be obtained by using the
447 * MediaCapability::GetValueN(CAMERA_PRIMARY_ZOOM_TYPE) method. @n@n
448 * For more information on the relationship between this method and the PowerOn() method, and the
449 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
452 * @see GetZoomLevel()
453 * @see GetMaxZoomLevel()
458 * Zooms out the camera.
461 * @privilege %http://tizen.org/privilege/camera
463 * @return An error code
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_DEVICE_BUSY The camera is under use by other application.
467 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
468 * @exception E_DEVICE_FAILED The device operation has failed.
469 * @exception E_UNSUPPORTED_OPERATION The target device does not support zooming feature.
470 * @exception E_OUT_OF_MEMORY The memory is insufficient.
471 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
472 * @remarks This method returns E_UNSUPPORTED_OPERATION in the Emulator.
473 * If CameraZoomType supports only ::CAMERA_ZOOM_TYPE_SMART, zoom ratio can differ according to
474 * the preview, capture, and recording resolutions.
475 * The supported zoom types can be obtained by using the
476 * MediaCapability::GetValueN(CAMERA_PRIMARY_ZOOM_TYPE) method. @n@n
477 * For more information on the relationship between this method and the PowerOn() method, and the
478 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
481 * @see GetZoomLevel()
482 * @see GetMaxZoomLevel()
484 result ZoomOut(void);
487 * Gets the zoom level of the camera.
491 * @return The current zoom level
492 * @remarks The zoom level is different for each camera device.
495 * @see GetMaxZoomLevel()
497 int GetZoomLevel(void) const;
500 * Gets the maximum zoom level supported by this %Camera.
504 * @return The maximum zoom level
505 * @remarks The zoom level is different for each camera device.
508 * @see GetZoomLevel()
510 int GetMaxZoomLevel(void) const;
513 * Sets the current resolution of the preview.
516 * @privilege %http://tizen.org/privilege/camera
518 * @return An error code
519 * @param[in] resolution The preview resolution @n
520 * It must be one of the listed dimensions that are extracted using GetSupportedPreviewResolutionListN().
521 * @exception E_SUCCESS The method is successful.
522 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
523 * @exception E_OUT_OF_RANGE The position or size is out of range.
524 * @exception E_OUT_OF_MEMORY The memory is insufficient.
525 * @exception E_DEVICE_BUSY The camera is under use by other application.
526 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
527 * @exception E_UNSUPPORTED_OPERATION The target device does not support preview resolution configuration feature.
528 * @exception E_DEVICE_FAILED The device operation has failed.
529 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
530 * @remarks This method works in the ::CAMERA_STATE_INITIALIZED state. @n@n
531 * For more information on the relationship between this method and the PowerOn() method, and the
532 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
534 * @see GetPreviewResolution()
536 result SetPreviewResolution(const Tizen::Graphics::Dimension& resolution);
539 * Gets the current resolution of the preview.
543 * @return The current preview resolution
544 * @see SetPreviewResolution()
546 Tizen::Graphics::Dimension GetPreviewResolution(void) const;
549 * Gets the supported preview resolution list of the %Camera class. @n
550 * Each item in the returned list contains a pointer of Tizen::Graphics::Dimension value.
554 * @return A list of dimensions that represent the preview resolutions supported by the %Camera class, @n
555 * else @c null if no preview resolution is supported or an exception occurs
556 * @exception E_SUCCESS The method is successful.
557 * @exception E_SYSTEM A system error has occurred.
558 * @exception E_OUT_OF_MEMORY The memory is insufficient.
559 * @remarks The specific error code can be accessed using the GetLastResult() method. @n
560 * The return value and each item in the list must be deleted by the caller.
561 * @see SetPreviewResolution()
562 * @see GetPreviewResolution()
564 Tizen::Base::Collection::IList* GetSupportedPreviewResolutionListN(void) const;
568 * Sets the capturing resolution of the camera. @n
569 * Initially, the default resolution is set using the internal configuration.
572 * @privilege %http://tizen.org/privilege/camera
574 * @return An error code
575 * @param[in] resolution The display resolution @n
576 * The display resolution must be one of the values extracted using GetSupportedCaptureResolutionListN().
577 * @exception E_SUCCESS The method is successful.
578 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
579 * @exception E_SYSTEM A system error has occurred.
580 * @exception E_OUT_OF_RANGE The specified resolution is out of range.
581 * @exception E_DEVICE_BUSY The camera is under use by other application.
582 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
583 * @exception E_DEVICE_FAILED The device operation has failed.
584 * @exception E_UNSUPPORTED_OPERATION The target device does not support capture resolution configuration feature.
585 * @exception E_OUT_OF_MEMORY The memory is insufficient.
586 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
587 * @remarks For more information on the relationship between this method and the PowerOn() method, and the
588 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
590 * @remarks In a zero-shutter-lag camera, the default preview format applies this feature correctly. The other preview formats are not guaranteed.
591 * @remarks The zero-shutter-lag capability can be checked using MediaCapability::GetValue(const Tizen::Base::String& key, bool& value) with
592 * ::CAMERA_PRIMARY_SUPPORT_ZERO_SHUTTER_LAG, ::CAMERA_SECONDARY_SUPPORT_ZERO_SHUTTER_LAG keys.
593 * @see GetCaptureResolution()
595 result SetCaptureResolution(const Tizen::Graphics::Dimension& resolution);
598 * Gets the resolution for capturing the data of the camera.
602 * @return The current resolution for capturing the data of the camera
603 * @see SetCaptureResolution()
604 * @see GetSupportedCaptureResolutionListN()
606 Tizen::Graphics::Dimension GetCaptureResolution(void) const;
609 * Gets a list of the capturing resolutions supported by the %Camera class. @n
610 * Each item of the list has a pointer of the Tizen::Graphics::Dimension value.
614 * @return A list of the capture resolutions supported by the %Camera class @n
615 * else @c null if no capture resolution is supported or an exception occurs
616 * @exception E_SUCCESS The method is successful.
617 * @exception E_SYSTEM A system error has occurred.
618 * @exception E_OUT_OF_MEMORY The memory is insufficient.
619 * @remarks The specific error code can be accessed using the GetLastResult() method. @n
620 * The return value and each item in the list must be deleted by the caller.
621 * @see SetCaptureResolution()
622 * @see GetCaptureResolution()
624 Tizen::Base::Collection::IList* GetSupportedCaptureResolutionListN(void) const;
627 * Sets the effect for the input data of the camera.
630 * @privilege %http://tizen.org/privilege/camera
632 * @return An error code
633 * @param[in] effect The effect for the input data of the camera
634 * @exception E_SUCCESS The method is successful.
635 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
636 * @exception E_INVALID_ARG The specified input parameter is invalid.
637 * @exception E_DEVICE_BUSY The camera is under use by other application.
638 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
639 * @exception E_DEVICE_FAILED The device operation has failed.
640 * @exception E_UNSUPPORTED_OPERATION The target device does not support effect configuration feature.
641 * @exception E_UNSUPPORTED_TYPE The specified @c effect is not supported.
642 * @exception E_OUT_OF_MEMORY The memory is insufficient.
643 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
644 * @remarks The default effect is ::CAMERA_EFFECT_NONE.
645 * This method returns E_UNSUPPORTED_OPERATION in the Emulator.
646 * This method works correctly when PowerOn() is executed. @n@n
647 * For more information on the relationship between this method and the PowerOn() method, and the
648 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
652 result SetEffect(CameraEffect effect);
655 * Gets the effect for the input data of the camera.
659 * @return The effect for the input data of the camera
662 CameraEffect GetEffect(void) const;
666 * Sets the camera's flash.
668 * @brief <i> [Deprecated] </i>
669 * @deprecated This method is deprecated. @n
670 * Instead of using this method, use the SetFlashMode() method.
672 * @privilege %http://tizen.org/privilege/camera
674 * @return An error code
675 * @param[in] flashOn Set to @c true to switch on the flash light, @n
677 * @exception E_SUCCESS The method is successful.
678 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
679 * @exception E_DEVICE_BUSY The camera is under use by other application.
680 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
681 * @exception E_DEVICE_FAILED The device operation has failed.
682 * @exception E_OUT_OF_MEMORY The memory is insufficient.
683 * @exception E_UNSUPPORTED_OPERATION The target device does not support flash configuration feature.
684 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
685 * @remarks The flash is switched on when the camera captures a picture. If the value of @c flashOn is
686 * set to @c true, this method returns E_UNSUPPORTED_OPERATION in the Emulator. @n
687 * SetFlash(true) works same as SetFlashMode(CAMERA_FLASH_MODE_ON) and SetFlash(false) works same as SetFlashMode(CAMERA_FLASH_MODE_OFF). @n
688 * For more information on the relationship between this method and the PowerOn() method, and the
689 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
691 * @remarks In a zero-shutter-lag camera, only the default preview format applies this feature.
693 * @see SetFlashMode()
694 * @see CameraFlashMode
697 result SetFlash(bool flashOn)
699 CameraFlashMode flashMode = CAMERA_FLASH_MODE_ON;
702 flashMode = CAMERA_FLASH_MODE_OFF;
704 return SetFlashMode(flashMode);
709 * Checks whether the camera's flash is switched on.
711 * @brief <i> [Deprecated] </i>
712 * @deprecated This method is deprecated. @n
713 * Instead of using this method, use the GetFlashMode() method.
716 * @return @c true if the flash light is on, @n
718 * @remarks This method works same as return (GetFlashMode()!=CAMERA_FLASH_MODE_OFF).
720 * @see GetFlashMode()
721 * @see CameraFlashMode
724 bool IsFlashOn(void) const
726 return (GetFlashMode() != CAMERA_FLASH_MODE_OFF);
730 * Sets the camera's flash mode.
733 * @privilege %http://tizen.org/privilege/camera
735 * @return An error code
736 * @param[in] flashMode flash mode to switch on the flash light.
737 * @exception E_SUCCESS The method is successful.
738 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
739 * @exception E_INVALID_ARG The specified flash mode is invalid.
740 * @exception E_DEVICE_BUSY The camera is under use by other application.
741 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
742 * @exception E_DEVICE_FAILED The device operation has failed.
743 * @exception E_OUT_OF_MEMORY The memory is insufficient.
744 * @exception E_UNSUPPORTED_OPERATION The target device does not support flash configuration feature.
745 * @exception E_UNSUPPORTED_TYPE The specified @c flashMode is not supported.
746 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
747 * @remarks Normally the flash splashes before the camera captures a picture. @n
748 * ::CAMERA_FLASH_MODE_CONTINUOUS keeps the flash turned on after the method is called until ::CAMERA_FLASH_MODE_OFF is set. @n
749 * This method returns E_UNSUPPORTED_OPERATION in the Emulator.
750 * @remarks In a zero-shutter-lag camera, the default preview format applies this feature correctly. The other preview formats are not guaranteed.
751 * @remarks The zero-shutter-lag capability can be checked using MediaCapability::GetValue(const Tizen::Base::String& key, bool& value) with
752 * ::CAMERA_PRIMARY_SUPPORT_ZERO_SHUTTER_LAG, ::CAMERA_SECONDARY_SUPPORT_ZERO_SHUTTER_LAG keys.
753 * @see GetFlashMode()
755 result SetFlashMode(CameraFlashMode flashMode);
758 * Gets the flash mode of the camera.
762 * @return The flash mode of the camera
763 * @remarks If the %Camera doesn't support the flash mode, this method always returns ::CAMERA_FLASH_MODE_OFF.
764 * @see SetFlashMode()
766 CameraFlashMode GetFlashMode(void) const;
769 * Sets the exposure level of the camera.
772 * @privilege %http://tizen.org/privilege/camera
774 * @return An error code
775 * @param[in] exposure The camera exposure level @n
776 * The range of this parameter is from @c 0 to @c 9.
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_OUT_OF_RANGE The specified exposure level is out of range.
780 * @exception E_DEVICE_BUSY The camera is under use by other application.
781 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
782 * @exception E_DEVICE_FAILED The device operation has failed.
783 * @exception E_UNSUPPORTED_OPERATION The target device does not support exposure configuration feature.
784 * @exception E_OUT_OF_MEMORY The memory is insufficient.
785 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
786 * @remarks The default exposure level is @c 5.
787 * The supported range for exposure level is from @c 0 to @c 9.
788 * This method returns E_UNSUPPORTED_OPERATION in the Emulator.
789 * This method works correctly when PowerOn() is executed. @n@n
790 * For more information on the relationship between this method and the PowerOn() method, and the
791 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
795 result SetExposure(int exposure);
798 * Gets the exposure level of the camera.
802 * @return An integer value representing the exposure level of the camera @n
803 * The returned value ranges from @c 0 to @c 9.
804 * @remarks The supported range for exposure level is from @c 0 to @c 9.
807 int GetExposure(void) const;
810 * Sets the white balance level of the camera.
813 * @privilege %http://tizen.org/privilege/camera
815 * @return An error code
816 * @param[in] whiteBalance The camera white balance level
817 * @exception E_SUCCESS The method is successful.
818 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
819 * @exception E_INVALID_ARG The specified input parameter is invalid.
820 * @exception E_DEVICE_BUSY The camera is under use by other application.
821 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
822 * @exception E_DEVICE_FAILED The device operation has failed.
823 * @exception E_UNSUPPORTED_OPERATION The target device does not support white balance configuration feature.
824 * @exception E_UNSUPPORTED_TYPE The specified @c whiteBalance is not supported.
825 * @exception E_OUT_OF_MEMORY The memory is insufficient.
826 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
827 * @remarks The default white balance is ::CAMERA_WHITE_BALANCE_AUTO.
828 * This method returns E_UNSUPPORTED_OPERATION in the Emulator.
829 * This method works correctly when PowerOn() is executed. @n@n
830 * For more information on the relationship between this method and the PowerOn() method, and the
831 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
833 * @see GetWhiteBalance()
835 result SetWhiteBalance(CameraWhiteBalance whiteBalance);
838 * Gets the white balance level of the camera.
842 * @return The white balance level of the camera
843 * @see SetWhiteBalance()
845 CameraWhiteBalance GetWhiteBalance(void) const;
848 * Sets the capturing quality of the camera.
851 * @privilege %http://tizen.org/privilege/camera
853 * @return An error code
854 * @param[in] quality The camera's quality level
855 * @exception E_SUCCESS The method is successful.
856 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
857 * @exception E_INVALID_ARG The specified @c quality is not supported.
858 * @exception E_DEVICE_BUSY The camera is under use by other application.
859 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
860 * @exception E_DEVICE_FAILED The device operation has failed.
861 * @exception E_UNSUPPORTED_OPERATION The target device does not support capturing quality configuration feature.
862 * @exception E_OUT_OF_MEMORY The memory is insufficient.
863 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
864 * @remarks The default quality is ::CAMERA_QUALITY_NORMAL.
865 * This method works correctly when PowerOn() is executed. @n@n
866 * For more information on the relationship between this method and the PowerOn() method, and the
867 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
871 result SetQuality(CameraQuality quality);
874 * Gets the capturing quality of the camera.
878 * @return The %Camera quality level
881 CameraQuality GetQuality(void) const;
884 * Sets the focus mode of the camera.
887 * @privilege %http://tizen.org/privilege/camera
889 * @return An error code
890 * @param[in] focusMode focus mode
891 * @exception E_SUCCESS The method is successful.
892 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
893 * @exception E_DEVICE_BUSY The camera is under use by other application.
894 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
895 * @exception E_DEVICE_FAILED The device operation has failed.
896 * @exception E_INVALID_ARG The specified focus mode is invalid.
897 * @exception E_UNSUPPORTED_OPERATION The target device does not support focus mode configuration feature.
898 * @exception E_UNSUPPORTED_TYPE The specified @c focusMode is not supported.
899 * @exception E_OUT_OF_MEMORY The memory is insufficient.
900 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
901 * @remarks ::CAMERA_FOCUS_MODE_NONE always throws E_INVALID_ARG.
902 * @see GetFocusMode()
904 result SetFocusMode(CameraFocusMode focusMode);
907 * Gets the focus mode of the camera.
911 * @return The %Camera focus mode
912 * @remarks If the %Camera does not support the focus mode, this method always returns ::CAMERA_FOCUS_MODE_NONE.
913 * @see SetFocusMode()
915 CameraFocusMode GetFocusMode(void) const;
918 * Sets the auto focus point list.
921 * @privilege %http://tizen.org/privilege/camera
923 * @return An error code
924 * @param[in] pointList The auto focus point list which consists of Tizen::Graphics::Point pointers
925 * @exception E_SUCCESS The method is successful.
926 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
927 * @exception E_DEVICE_BUSY The camera is under use by other application.
928 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
929 * @exception E_DEVICE_FAILED The device operation has failed.
930 * @exception E_INVALID_ARG The specified input parameter is invalid.
931 * @exception E_UNSUPPORTED_OPERATION The target device does not support focus pointing feature.
932 * @exception E_UNSUPPORTED_TYPE This method is not supported for the current focus mode.
933 * @exception E_OUT_OF_MEMORY The memory is insufficient.
934 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
935 * @remarks This method works fine when the current focus mode is @c CAMERA_FOCUS_MODE_NORMAL or @c CAMERA_FOCUS_MODE_MACRO.@n
936 * If the input parameter has a empty list, the focus area is changed to the center.
937 * @see GetAutoFocusPointN()
939 result SetAutoFocusPoint(const Tizen::Base::Collection::IList& pointList);
942 * Gets the auto focus point list. @n
943 * Each item of the list has a pointer of the Tizen::Graphics::Point value.
947 * @return The %Camera auto focus point list @n
948 * A list of points that represent the auto focus point, @n
949 * else @c null if no auto focus point is set or if an exception occurs.
950 * @exception E_SUCCESS The method is successful.
951 * @exception E_OUT_OF_MEMORY The memory is insufficient.
952 * @remarks The specific error code can be accessed using the GetLastResult() method. @n
953 * The return value and each item in the list must be deleted by the caller.
954 * @see SetAutoFocusPoint()
956 Tizen::Base::Collection::IList* GetAutoFocusPointN(void) const;
959 * Sets the auto focus mode of the camera.
962 * @privilege %http://tizen.org/privilege/camera
964 * @return An error code
965 * @param[in] callback Set to @c true to enable auto focus callback, @n
967 * @exception E_SUCCESS The method is successful.
968 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
969 * @exception E_DEVICE_BUSY The camera is under use by other application.
970 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
971 * @exception E_DEVICE_FAILED The device operation has failed.
972 * @exception E_UNSUPPORTED_OPERATION The target device does not support auto focus feature.
973 * @exception E_OUT_OF_MEMORY The memory is insufficient.
974 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
975 * @remarks If @c callback is set to @c false, the ICameraEventListener::OnCameraAutoFocused() method is not called.
976 * This method throws @c E_UNSUPPORTED_OPERATION in the emulator. @n
977 * For more information on the relationship between this method and the PowerOn() method, and the
978 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
981 result SetAutoFocus(bool callback);
984 * Sets the capturing format of the camera. @n
985 * Initially, the default format is set using the internal configuration.
988 * @privilege %http://tizen.org/privilege/camera
990 * @return An error code
991 * @param[in] format The camera's capture format @n
992 * It must be one of the pixel formats extracted using GetSupportedCaptureFormatListN().
993 * @exception E_SUCCESS The method is successful.
994 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
995 * @exception E_SYSTEM A system error has occurred.
996 * @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
997 * @exception E_DEVICE_BUSY The camera is under use by other application.
998 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
999 * @exception E_DEVICE_FAILED The device operation has failed.
1000 * @exception E_UNSUPPORTED_OPERATION The target device does not support capture format configuration feature.
1001 * @exception E_OUT_OF_MEMORY The memory is insufficient.
1002 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1003 * @remarks This method works correctly when PowerOn() is executed.
1004 * @see GetCaptureFormat()
1006 result SetCaptureFormat(const Tizen::Graphics::PixelFormat format);
1009 * Gets the capturing format of the camera.
1013 * @return The capturing format of the camera
1014 * @see SetCaptureFormat()
1015 * @see GetSupportedCaptureFormatListN()
1017 Tizen::Graphics::PixelFormat GetCaptureFormat(void) const;
1020 * Gets the supported capturing format list for the %Camera class. @n
1021 * Each list item has a Tizen::Graphics::PixelFormat value.
1025 * @return A list of the formats supported by the %Camera class, @n
1026 * else @c null if no capture format is supported or an exception occurs
1027 * @exception E_SUCCESS The method is successful.
1028 * @exception E_SYSTEM A system error has occurred.
1029 * @exception E_OUT_OF_MEMORY The memory is insufficient.
1030 * @remarks The specific error code can be accessed using the GetLastResult() method. @n
1031 * The return value must be deleted.
1032 * @see SetCaptureFormat()
1033 * @see GetCaptureFormat()
1035 Tizen::Base::Collection::IListT <Tizen::Graphics::PixelFormat>* GetSupportedCaptureFormatListN(void) const;
1038 * Sets the preview format of the camera. @n
1039 * Initially, the default format is set using the internal configuration.
1042 * @privilege %http://tizen.org/privilege/camera
1044 * @return An error code
1045 * @param[in] format The camera's preview format @n
1046 * It must be one of the pixel formats extracted using GetSupportedPreviewFormatListN().
1047 * @exception E_SUCCESS The method is successful.
1048 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1049 * @exception E_SYSTEM A system error has occurred.
1050 * @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
1051 * @exception E_DEVICE_BUSY The camera is under use by other application.
1052 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
1053 * @exception E_DEVICE_FAILED The device operation has failed.
1054 * @exception E_UNSUPPORTED_OPERATION The target device does not support preview format configuration feature.
1055 * @exception E_OUT_OF_MEMORY The memory is insufficient.
1056 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1057 * @remarks This method works in ::CAMERA_STATE_INITIALIZED state. @n@n
1058 * For more information on the relationship between this method and the PowerOn() method, and the
1059 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
1061 * @see GetPreviewFormat()
1062 * @see GetSupportedPreviewFormatListN()
1064 result SetPreviewFormat(const Tizen::Graphics::PixelFormat format);
1067 * Gets the preview format of the camera.
1071 * @return The preview format of the camera
1072 * @see SetPreviewFormat()
1073 * @see GetSupportedPreviewFormatListN()
1075 Tizen::Graphics::PixelFormat GetPreviewFormat(void) const;
1078 * Gets the supported preview format list for the %Camera class. @n
1079 * Each list item has a Tizen::Graphics::PixelFormat value.
1083 * @return A list of the preview format supported by the %Camera class, @n
1084 * else @c null if no preview format is supported or an exception occurs
1085 * @exception E_SUCCESS The method is successful.
1086 * @exception E_SYSTEM A system error has occurred.
1087 * @exception E_OUT_OF_MEMORY The memory is insufficient.
1088 * @remarks The specific error code can be accessed using the GetLastResult() method. @n
1089 * The return value must be deleted.
1090 * @see SetPreviewFormat()
1091 * @see GetPreviewFormat()
1093 Tizen::Base::Collection::IListT <Tizen::Graphics::PixelFormat>* GetSupportedPreviewFormatListN(void) const;
1097 * Sets the ISO level of the camera.
1100 * @privilege %http://tizen.org/privilege/camera
1102 * @return An error code
1103 * @param[in] isoLevel The camera's ISO level @n
1104 * The default ISO level is set from the internal configuration.
1105 * @exception E_SUCCESS The method is successful.
1106 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1107 * @exception E_OUT_OF_RANGE The specified ISO level is out of range.
1108 * @exception E_DEVICE_BUSY The camera is under use by other application.
1109 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
1110 * @exception E_DEVICE_FAILED The device operation has failed.
1111 * @exception E_UNSUPPORTED_OPERATION The target device does not support iso level configuration feature.
1112 * @exception E_UNSUPPORTED_TYPE The specified @c isoLevel is not supported.
1113 * @exception E_OUT_OF_MEMORY The memory is insufficient.
1114 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1115 * @remarks In some devices this method works in the ::CAMERA_STATE_PREVIEW state.
1116 * This method throws E_UNSUPPORTED_OPERATION in the Emulator. @n@n
1117 * For more information on the relationship between this method and the PowerOn() method, and the
1118 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
1120 * @see GetIsoLevel()
1122 result SetIsoLevel(CameraIsoLevel isoLevel);
1125 * Gets the ISO level of the camera.
1129 * @return The ISO level of the camera
1130 * @see SetIsoLevel()
1132 CameraIsoLevel GetIsoLevel(void) const;
1135 * Sets the preview frame rate of the camera. @n
1136 * Initially, the default frame rate is set using the internal configuration.
1139 * @privilege %http://tizen.org/privilege/camera
1141 * @return An error code
1142 * @param[in] fps The frame rate per second
1143 * @exception E_SUCCESS The method is successful.
1144 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1145 * @exception E_OUT_OF_RANGE The specified @c fps is out of range on this device.
1146 * @exception E_DEVICE_BUSY The camera is under use by other application.
1147 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
1148 * @exception E_DEVICE_FAILED The device operation has failed.
1149 * @exception E_UNSUPPORTED_OPERATION The target device does not support preview frame rate configuration feature.
1150 * @exception E_OUT_OF_MEMORY The memory is insufficient.
1151 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1152 * @remarks This method works in ::CAMERA_STATE_INITIALIZED state. @n@n
1153 * For more information on the relationship between this method and the PowerOn() method, and the
1154 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
1156 * @see GetPreviewFrameRate()
1157 * @see GetSupportedPreviewFrameRateListN()
1158 * @see FRAME_RATE_AUTO
1160 result SetPreviewFrameRate(int fps);
1163 * Gets the frame rate of the camera.
1167 * @return The frame rate of the camera @n
1168 * If the frame rate is not set using SetPreviewFrameRate(), the system-dependent default frame rate is returned.
1169 * @see GetSupportedPreviewFrameRateListN()
1171 int GetPreviewFrameRate(void) const;
1174 * Gets the supported preview frame rate list for the %Camera class. @n
1175 * Each list item has an integer value.
1179 * @return A list of the preview frame rate supported by the %Camera class, @n
1180 * else @c null if no frame rate is supported or an exception occurs
1181 * @exception E_SUCCESS The method is successful.
1182 * @exception E_SYSTEM A system error has occurred.
1183 * @exception E_OUT_OF_MEMORY The memory is insufficient.
1184 * @remarks The specific error code can be accessed using the GetLastResult() method. @n
1185 * The return value must be deleted by the caller. @n
1186 * This method returns fps list that can be supported by all resolutions.
1187 * @see SetPreviewFrameRate()
1188 * @see GetPreviewFrameRate()
1189 * @see FRAME_RATE_AUTO
1190 * @see GetSupportedPreviewFrameRateListN(const Tizen::Graphics::Dimension& dim) const
1192 Tizen::Base::Collection::IListT <int>* GetSupportedPreviewFrameRateListN(void) const;
1195 * Gets the supported preview frame rate list of the input resolution of the %Camera class. @n
1196 * Each item of the list has an integer value.
1200 * @return A list of the preview frame rate of the input preview resolution, @n
1201 * else @c null if no frame rate is supported or if an exception occurs
1202 * @param[in] dim The preview resolution of the camera
1203 * @exception E_SUCCESS The method is successful.
1204 * @exception E_INVALID_ARG The specified input resolution is invalid.
1205 * @exception E_SYSTEM A system error has occurred.
1206 * @exception E_OUT_OF_MEMORY The memory is insufficient.
1207 * @remarks The specific error code can be accessed using the GetLastResult() method. @n
1208 * The return value must be deleted by the caller. @n
1209 * @see SetPreviewFrameRate()
1210 * @see GetPreviewFrameRate()
1211 * @see GetSupportedPreviewFrameRateListN(void) const
1213 Tizen::Base::Collection::IListT <int>* GetSupportedPreviewFrameRateListN(const Tizen::Graphics::Dimension& dim) const;
1216 * Sets the orientation value in the Exchangeable Image File Format (EXIF) field of the captured data.
1219 * @privilege %http://tizen.org/privilege/camera
1221 * @return An error code
1222 * @param[in] orientation The orientation value to set in EXIF
1223 * @exception E_SUCCESS The method is successful.
1224 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1225 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1226 * @exception E_OUT_OF_RANGE The input value is out of range.
1227 * @exception E_UNSUPPORTED_OPERATION The target device does not support exif orientation configuration feature.
1228 * @exception E_SYSTEM A system error has occurred.
1229 * @remarks The default value of orientation is @c CAMERA_EXIF_ORIENTATION_TOP_LEFT. @n
1230 * This method works correctly when PowerOn() is executed. The orientation value set by this method can be obtained using the
1231 * Tizen::Content::ImageData::GetOrientation() method after writing the captured data to a file.
1233 result SetExifOrientation(CameraExifOrientation orientation);
1236 * Sets the GPS coordinates in the Exchangeable %Image File Format (EXIF) field for the captured data.
1239 * @privilege %http://tizen.org/privilege/camera
1241 * @return An error code
1242 * @param[in] latitude The latitude value to set in EXIF @n
1243 * The valid range is [-90.0, 90.0].
1244 * @param[in] longitude The longitude value to set in EXIF @n
1245 * The valid range is [-180.0, 180.0]
1246 * @param[in] altitude The altitude value to set in EXIF
1247 * @exception E_SUCCESS The method is successful.
1248 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1249 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1250 * @exception E_OUT_OF_RANGE The input value is out of range.
1251 * @exception E_UNSUPPORTED_OPERATION The target device does not support exif gps coordinates configuration feature.
1252 * @exception E_SYSTEM A system error has occurred.
1253 * @remarks This method sets the GPS coordinates and enables entering the coordinates into the Exchangeable Image File Format (EXIF).
1254 * @remarks By default, the GPS coordinates are not entered in JPEG's EXIF.
1255 * @remarks The GPS coordinates that are set using this method are entered in every call to the
1256 * Capture() method, until DisableExifGpsCoordinates() is called or this instance is destroyed. @n
1257 * This method works correctly when PowerOn() is executed. @n
1258 * 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.
1260 result SetExifGpsCoordinates(double latitude, double longitude, float altitude);
1263 * Disables the insertion of the GPS coordinates in the Exchangeable %Image File Format (EXIF) field for the captured data.
1266 * @privilege %http://tizen.org/privilege/camera
1268 * @return An error code
1269 * @exception E_SUCCESS The method is successful.
1270 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1271 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1272 * @exception E_OUT_OF_RANGE The input value is out of range.
1273 * @exception E_UNSUPPORTED_OPERATION The target device does not support exif gps coordinates configuration feature.
1274 * @exception E_SYSTEM A system error has occurred.
1275 * @see SetExifGpsCoordinates()
1277 result DisableExifGpsCoordinates(void);
1280 * Sets the flip type for the previewed and captured data.
1283 * @privilege %http://tizen.org/privilege/camera
1285 * @return An error code
1286 * @param[in] flip The camera flip type
1287 * @exception E_SUCCESS The method is successful.
1288 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1289 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1290 * @exception E_INVALID_ARG The input value is out of range.
1291 * @exception E_UNSUPPORTED_OPERATION The target device does not support flip configuration feature.
1292 * @exception E_UNSUPPORTED_TYPE The specified @c flip is not supported.
1293 * @exception E_SYSTEM A system error has occurred.
1294 * @remarks This method works in the ::CAMERA_STATE_INITIALIZED state.
1295 * @remarks Finally the last specified type is applied even with the several types applicable.
1296 * @remarks In a zero-shutter-lag camera, the default preview format is not guaranteed to apply this feature correctly.
1297 * @remarks The zero-shutter-lag capability can be checked using MediaCapability::GetValue(const Tizen::Base::String& key, bool& value) with
1298 * ::CAMERA_PRIMARY_SUPPORT_ZERO_SHUTTER_LAG, ::CAMERA_SECONDARY_SUPPORT_ZERO_SHUTTER_LAG keys.
1301 result SetFlip(CameraFlipType flip);
1304 * Gets the flip type for the previewed and captured data.
1308 * @return The camera flip type
1311 CameraFlipType GetFlip(void) const;
1314 * Sets the rotation for the previewed data.
1317 * @privilege %http://tizen.org/privilege/camera
1319 * @return An error code
1320 * @param[in] rotation The camera rotation
1321 * @exception E_SUCCESS The method is successful.
1322 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1323 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1324 * @exception E_INVALID_ARG The input value is out of range.
1325 * @exception E_UNSUPPORTED_OPERATION The target device does not support preview rotation configuration feature.
1326 * @exception E_UNSUPPORTED_TYPE The specified @c rotation is not supported.
1327 * @exception E_SYSTEM A system error has occurred.
1328 * @remarks This method works in the ::CAMERA_STATE_INITIALIZED state.
1329 * @remarks The last specified type is applied even with the several types applicable.
1330 * @remarks This method rotates the preview and recording data but not the captured image. @n
1331 * The captured image's orientation is always following the physical rotation.
1332 * @remarks When the preview is rotated, the preview callback data's width and height can be changed. @n
1333 * Thus the application must recognize these changes when it uses the preview data in ICameraEventListener::OnCameraPreviewed() callback.
1334 * @remarks For the intended view of preview, Tizen::Ui::Controls::OverlayRegion::OVERLAY_REGION_TYPE_NORMAL must be selected when Tizen::Ui::Controls::OverlayRegion is created.
1335 * @remarks In a zero-shutter-lag camera, the default preview format is not guaranteed to apply this feature correctly.
1336 * @remarks The zero-shutter-lag capability can be checked using MediaCapability::GetValue(const Tizen::Base::String& key, bool& value) with
1337 * ::CAMERA_PRIMARY_SUPPORT_ZERO_SHUTTER_LAG, ::CAMERA_SECONDARY_SUPPORT_ZERO_SHUTTER_LAG keys.
1338 * @see GetPreviewRotation()
1341 result SetPreviewRotation(CameraRotation rotation);
1345 * Gets the rotation for the previewed data.
1349 * @return The camera rotation
1350 * @see SetPreviewRotation()
1353 CameraRotation GetPreviewRotation(void) const;
1356 * Sets the metering mode of the camera.
1359 * @privilege %http://tizen.org/privilege/camera
1361 * @return An error code
1362 * @param[in] meteringMode The metering mode
1363 * @exception E_SUCCESS The method is successful.
1364 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1365 * @exception E_DEVICE_BUSY The camera is under use by other application.
1366 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
1367 * @exception E_DEVICE_FAILED The device operation has failed.
1368 * @exception E_INVALID_ARG The specified metering mode is invalid.
1369 * @exception E_UNSUPPORTED_OPERATION The target device does not support metering mode configuration feature.
1370 * @exception E_UNSUPPORTED_TYPE The specified @c meteringMode is not supported.
1371 * @exception E_OUT_OF_MEMORY The memory is insufficient.
1372 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1373 * @remarks ::CAMERA_METERING_MODE_NONE always throws E_INVALID_ARG.
1374 * @see GetMeteringMode()
1376 result SetMeteringMode(CameraMeteringMode meteringMode);
1379 * Gets the metering mode of the camera.
1383 * @return The %Camera metering mode
1384 * @remarks If the %Camera does not support the metering mode, this method always returns ::CAMERA_METERING_MODE_NONE.
1385 * @see SetMeteringMode()
1387 CameraMeteringMode GetMeteringMode(void) const;
1390 * This value can be used to set the preview frame rate by using the SetPreviewFrameRate() method. @n
1391 * If the preview frame rate is set using this value, the frame rate during the preview is automatically adjusted as per the light condition.
1395 static const int FRAME_RATE_AUTO = 0xFFFFFFFF;
1399 * This is the copy constructor for this class.
1403 * @remarks The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
1406 Camera(const Camera& rhs);
1409 * This is the copy assignment operator for this class.
1413 * @remarks The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
1416 Camera& operator =(const Camera& rhs);
1418 friend class _CameraImpl;
1419 _CameraImpl* __pImpl;