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
36 class IVideoStreamFilter;
41 * @brief This class controls the camera device.
46 * The %Camera class controls the camera device.
47 * The supported properties are device-dependent. The list of the properties available can be retrieved using the methods of %Camera and MediaCapability classes.
48 * All the other methods, except SetAutoFocus(), StartPreview(), and Capture() work synchronously.
49 * The previewed or captured data are passed through ICameraEventListener. @n
51 * 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>.
53 * The following example demonstrates how to use the %Camera class.
57 * #include <FGraphics.h>
61 * using namespace Tizen::Graphics;
62 * using namespace Tizen::Ui;
63 * using namespace Tizen::Ui::Controls;
64 * using namespace Tizen::Media;
67 * : public Tizen::Ui::Controls::Form
68 * , public Tizen::Media::ICameraEventListener
76 * virtual void OnCameraAutoFocused(bool completeCondition) {}
77 * virtual void OnCameraPreviewed( Tizen::Base::ByteBuffer& previewedData, result r) {}
78 * virtual void OnCameraCaptured( Tizen::Base::ByteBuffer& capturedData, result r) {}
79 * virtual void OnCameraErrorOccurred(CameraErrorReason r ) {}
83 * OverlayRegion * __pOverlay;
86 * CameraSample::CameraSample(void)
92 * CameraSample::Start(void)
94 * result r = E_SUCCESS;
95 * Rectangle rect(0, 0, 320, 240);
96 * bool modified = false;
97 * bool isValid = false;
98 * BufferInfo bufferInfo;
100 * r = __camera.Construct(*this, CAMERA_PRIMARY);
106 * r = __camera.PowerOn();
112 * isValid = OverlayRegion::EvaluateBounds(OVERLAY_REGION_EVALUATION_OPTION_LESS_THAN, rect, modified);
113 * if (isValid != true)
115 * return GetLastResult();
118 * // Gets OverlayRegion from this Form
119 * __pOverlay = GetOverlayRegionN(rect, OVERLAY_REGION_TYPE_PRIMARY_CAMERA);
120 * if (__pOverlay == null)
122 * return GetLastResult();
125 * __pOverlay->GetBackgroundBufferInfo(bufferInfo);
127 * r = __camera.StartPreview(&bufferInfo, true);
144 * CameraSample::Stop(void)
146 * __camera.StopPreview();
147 * __camera.PowerOff();
159 class _OSP_EXPORT_ Camera
160 : public Tizen::Base::Object
164 * This is the default constructor for this class.
169 * -The object is not fully constructed after this constructor is called. For full construction,
170 * the Construct() method must be called right after calling this constructor.
175 * This is the destructor for this class. @n
176 * All allocated resources are deallocated by this method. This method must be called in the same thread
177 * where the Construct() method is called.This polymorphic destructor should be overridden if required.
178 * This way, the destructors of the derived classes are called when the destructor of this interface is called.
183 virtual ~Camera(void);
186 * Initializes this instance of %Camera with the specified parameters. @n
187 * The %Construct() method creates an instance of %Camera in the subsystem. Only one instance is created at a given time.
191 * @feature %http://tizen.org/feature/camera.back or %http://tizen.org/feature/camera.front
192 * @return An error code
193 * @param[in] listener An instance of ICameraEventListener
194 * @param[in] camSel The %Camera to power on
195 * @exception E_SUCCESS The method is successful.
196 * @exception E_SYSTEM A system error has occurred.
197 * @exception E_DEVICE_BUSY The camera is under use by other application or already used in this application.
198 * @exception E_DEVICE_UNAVAILABLE The camera is unavailable.
199 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
200 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
201 * @exception E_OUT_OF_MEMORY The memory is insufficient.
203 result Construct(ICameraEventListener& listener, CameraSelection camSel = CAMERA_PRIMARY);
206 * Powers the camera on.
210 * @privilege %http://tizen.org/privilege/camera
211 * @feature %http://tizen.org/feature/camera
213 * @return An error code
214 * @exception E_SUCCESS The method is successful.
215 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
216 * @exception E_DEVICE_BUSY The camera is under use by other application.
217 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
218 * @exception E_DEVICE_FAILED The device operation has failed.
219 * @exception E_OUT_OF_MEMORY The memory is insufficient.
220 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
221 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
222 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
224 * -reserved configurations are set in this method.
227 result PowerOn(void);
230 * Powers the camera off.
234 * @privilege %http://tizen.org/privilege/camera
235 * @feature %http://tizen.org/feature/camera
237 * @return An error code
238 * @exception E_SUCCESS The method is successful.
239 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
240 * @exception E_DEVICE_BUSY The camera is under use by other application.
241 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
242 * @exception E_DEVICE_FAILED The device operation has failed.
243 * @exception E_OUT_OF_MEMORY The memory is insufficient.
244 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
245 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
246 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
249 result PowerOff(void);
252 * Checks whether the camera is powered on.
256 * @return @c true if the camera is powered on, @n
261 bool IsPoweredOn(void) const;
264 * Starts displaying the preview image on the camera device. @n
265 * If the value of @c pBufferInfo is @c null, no preview image is displayed. In this case, the application can
266 * draw the preview image with the data passed on by the ICameraEventListener::OnCameraPreviewed() method.
268 * If the value of @c previewedData is @c true, the previewed image data is passed to the
269 * ICameraEventListener::OnCameraPreviewed() method periodically based on the frame-rate, otherwise the
270 * callback is not invoked. The default value of @c previewedData is @c false.
274 * @privilege %http://tizen.org/privilege/camera
275 * @feature %http://tizen.org/feature/camera
277 * @return An error code
278 * @param[in] pBufferInfo The buffer information for the camera preview display
279 * @param[in] previewedData Set to @c true if the previewed data is delivered to the callback method, @n
281 * @exception E_SUCCESS The method is successful.
282 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
283 * @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
284 * @exception E_DEVICE_BUSY The camera is under use by other application.
285 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
286 * @exception E_DEVICE_FAILED The device operation has failed.
287 * @exception E_OUT_OF_MEMORY The memory is insufficient.
288 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
289 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
290 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
292 * -The overlay region retrieved by the buffer information must be the topmost window when this method is called. @n
293 * -The ICameraEventListener::OnCameraPreviewed() method can be delayed or dropped depending on
294 * the system's performance. @n
295 * -For more information on the relationship between this method and the PowerOn() method, and the
296 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
299 * @see ICameraEventListener::OnCameraPreviewed()
301 result StartPreview(const Tizen::Graphics::BufferInfo* pBufferInfo, bool previewedData = false);
304 * Stops displaying the preview image on the camera device.
308 * @privilege %http://tizen.org/privilege/camera
309 * @feature %http://tizen.org/feature/camera
311 * @return An error code
312 * @exception E_SUCCESS The method is successful.
313 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
314 * @exception E_DEVICE_BUSY The camera is under use by other application.
315 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
316 * @exception E_DEVICE_FAILED The device operation has failed.
317 * @exception E_OUT_OF_MEMORY The memory is insufficient.
318 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
319 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
320 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
322 * - For more information on the relationship between this method and the PowerOn() method, and the
323 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
325 * @see StartPreview()
327 result StopPreview(void);
330 * Captures the current image data from the camera sensor. @n
331 * After capturing the image, the camera's state changes to ::CAMERA_STATE_CAPTURED. @n
332 * The camera's preview must be restarted by calling the StartPreview() method. @n
333 * In a zero-shutter-lag camera, after capturing the image, the state changes to ::CAMERA_STATE_PREVIEW. @n
334 * The camera does not need to restart the preview in this case. @n
335 * The captured image is passed through ICameraEventListener::OnCameraCaptured().
339 * @privilege %http://tizen.org/privilege/camera
340 * @feature %http://tizen.org/feature/camera
342 * @return An error code
343 * @exception E_SUCCESS The method is successful.
344 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
345 * @exception E_DEVICE_BUSY The camera is under use by other application.
346 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
347 * @exception E_DEVICE_FAILED The device operation has failed.
348 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
349 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
350 * @exception E_OUT_OF_MEMORY The memory is insufficient.
351 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
353 * -For more information on the relationship between this method and the PowerOn() method, and the
354 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
356 * -In a zero-shutter-lag camera, the state changes to ::CAMERA_STATE_PREVIEW after capturing.
357 * -The zero-shutter-lag capability can be checked using MediaCapability::GetValue(const Tizen::Base::String& key, bool& value) with
358 * ::CAMERA_PRIMARY_SUPPORT_ZERO_SHUTTER_LAG, ::CAMERA_SECONDARY_SUPPORT_ZERO_SHUTTER_LAG keys.
359 * @see ICameraEventListener::OnCameraCaptured()
361 result Capture(void);
364 * Gets the state of the camera in CameraState.
368 * @return The current state of the camera
370 * @see SetAutoFocus()
373 CameraState GetState(void) const;
376 * Sets the brightness level of the camera input data.
380 * @privilege %http://tizen.org/privilege/camera
381 * @feature %http://tizen.org/feature/camera
383 * @return An error code
384 * @param[in] brightness The brightness level to set @n
385 * The range of this parameter is from @c 0 to @c 9.
386 * @exception E_SUCCESS The method is successful.
387 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
388 * @exception E_OUT_OF_RANGE The specified @c brightness is out of range.
389 * @exception E_DEVICE_BUSY The camera is under use by other application.
390 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
391 * @exception E_DEVICE_FAILED The device operation has failed.
392 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
393 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
394 * @exception E_OUT_OF_MEMORY The memory is insufficient.
395 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
397 * -The default brightness level is @c 5. @n
398 * -The device's supported range for the brightness level is from @c 0 to @c 9. @n
399 * -This method works correctly when PowerOn() is executed. @n@n
400 * -For more information on the relationship between this method and the PowerOn() method, and the
401 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
403 * @see GetBrightness()
405 result SetBrightness(int brightness);
408 * Gets the brightness level of the camera input data.
412 * @return The current brightness level @n
413 * The returned value ranges from @c 0 to @c 9.
415 * -The device's supported range for the brightness level is from @c 0 to @c 9.
416 * @see SetBrightness()
418 int GetBrightness(void) const;
421 * Sets the contrast level of the %Camera input data.
425 * @privilege %http://tizen.org/privilege/camera
426 * @feature %http://tizen.org/feature/camera
428 * @return An error code
429 * @param[in] contrast The contrast level to set @n
430 * The range of this parameter is from @c 0 to @c 9.
431 * @exception E_SUCCESS The method is successful.
432 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
433 * @exception E_OUT_OF_RANGE The specified contrast is out of range.
434 * @exception E_DEVICE_BUSY The camera is under use by other application.
435 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
436 * @exception E_DEVICE_FAILED The device operation has failed.
437 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
438 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
439 * @exception E_OUT_OF_MEMORY The memory is insufficient.
440 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
442 * -The default contrast level is @c 5. @n
443 * -The device's supported range for the contrast level is from @c 0 to @c 9. @n
444 * -This method works correctly when PowerOn() is executed. @n@n
445 * -For more information on the relationship between this method and the PowerOn() method, and the
446 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
450 result SetContrast(int contrast);
453 * Gets the contrast level of the camera input data.
457 * @return The current contrast level @n
458 * The returned value ranges from @c 0 to @c 9.
460 * -The device's supported range for the contrast level is from @c 0 to @c 9.
463 int GetContrast(void) const;
466 * Zooms in the camera.
470 * @privilege %http://tizen.org/privilege/camera
471 * @feature %http://tizen.org/feature/camera
473 * @return An error code
474 * @exception E_SUCCESS The method is successful.
475 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
476 * @exception E_DEVICE_BUSY The camera is under use by other application.
477 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
478 * @exception E_DEVICE_FAILED The device operation has failed.
479 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
480 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
481 * @exception E_OUT_OF_MEMORY The memory is insufficient.
482 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
484 * -This method returns E_UNSUPPORTED_OPERATION in the Emulator.
485 * -If Camera supports only ::CAMERA_ZOOM_TYPE_SMART, the zoom ratio can differ according
486 * to the preview, capture, and recording resolutions.
487 * -The supported zoom types can be obtained by using the
488 * MediaCapability::GetValueN(CAMERA_PRIMARY_ZOOM_TYPE) method. @n@n
489 * -For more information on the relationship between this method and the PowerOn() method, and the
490 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
493 * @see GetZoomLevel()
494 * @see GetMaxZoomLevel()
499 * Zooms out the camera.
503 * @privilege %http://tizen.org/privilege/camera
504 * @feature %http://tizen.org/feature/camera
506 * @return An error code
507 * @exception E_SUCCESS The method is successful.
508 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
509 * @exception E_DEVICE_BUSY The camera is under use by other application.
510 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
511 * @exception E_DEVICE_FAILED The device operation has failed.
512 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
513 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
514 * @exception E_OUT_OF_MEMORY The memory is insufficient.
515 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
517 * -This method returns E_UNSUPPORTED_OPERATION in the Emulator.
518 * -If CameraZoomType supports only ::CAMERA_ZOOM_TYPE_SMART, zoom ratio can differ according to
519 * the preview, capture, and recording resolutions.
520 * -The supported zoom types can be obtained by using the
521 * MediaCapability::GetValueN(CAMERA_PRIMARY_ZOOM_TYPE) method. @n@n
522 * -For more information on the relationship between this method and the PowerOn() method, and the
523 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
526 * @see GetZoomLevel()
527 * @see GetMaxZoomLevel()
529 result ZoomOut(void);
532 * Gets the zoom level of the camera.
536 * @return The current zoom level
538 * -The zoom level is different for each camera device.
541 * @see GetMaxZoomLevel()
543 int GetZoomLevel(void) const;
546 * Gets the maximum zoom level supported by this %Camera.
550 * @return The maximum zoom level
552 * -The zoom level is different for each camera device.
555 * @see GetZoomLevel()
557 int GetMaxZoomLevel(void) const;
560 * Sets the current resolution of the preview.
564 * @privilege %http://tizen.org/privilege/camera
565 * @feature %http://tizen.org/feature/camera
567 * @return An error code
568 * @param[in] resolution The preview resolution @n
569 * It must be one of the listed dimensions that are extracted using GetSupportedPreviewResolutionListN().
570 * @exception E_SUCCESS The method is successful.
571 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
572 * @exception E_OUT_OF_RANGE The position or size is out of range.
573 * @exception E_OUT_OF_MEMORY The memory is insufficient.
574 * @exception E_DEVICE_BUSY The camera is under use by other application.
575 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
576 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
577 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
578 * @exception E_DEVICE_FAILED The device operation has failed.
579 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
581 * -This method works in the ::CAMERA_STATE_INITIALIZED state. @n@n
582 * -For more information on the relationship between this method and the PowerOn() method, and the
583 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
585 * @see GetPreviewResolution()
587 result SetPreviewResolution(const Tizen::Graphics::Dimension& resolution);
590 * Gets the current resolution of the preview.
594 * @return The current preview resolution
595 * @see SetPreviewResolution()
597 Tizen::Graphics::Dimension GetPreviewResolution(void) const;
600 * Gets the supported preview resolution list of the %Camera class. @n
601 * Each item in the returned list contains a pointer of Tizen::Graphics::Dimension value.
605 * @return A list of dimensions that represent the preview resolutions supported by the %Camera class, @n
606 * else @c null if no preview resolution is supported or an exception occurs
607 * @exception E_SUCCESS The method is successful.
608 * @exception E_SYSTEM A system error has occurred.
609 * @exception E_OUT_OF_MEMORY The memory is insufficient.
611 * -The specific error code can be accessed using the GetLastResult() method. @n
612 * -The return value and each item in the list must be deleted by the caller.
613 * @see SetPreviewResolution()
614 * @see GetPreviewResolution()
616 Tizen::Base::Collection::IList* GetSupportedPreviewResolutionListN(void) const;
620 * Sets the capturing resolution of the camera. @n
621 * Initially, the default resolution is set using the internal configuration.
625 * @privilege %http://tizen.org/privilege/camera
626 * @feature %http://tizen.org/feature/camera
628 * @return An error code
629 * @param[in] resolution The display resolution @n
630 * The display resolution must be one of the values extracted using GetSupportedCaptureResolutionListN().
631 * @exception E_SUCCESS The method is successful.
632 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
633 * @exception E_SYSTEM A system error has occurred.
634 * @exception E_OUT_OF_RANGE The specified resolution is out of range.
635 * @exception E_DEVICE_BUSY The camera is under use by other application.
636 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
637 * @exception E_DEVICE_FAILED The device operation has failed.
638 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
639 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
640 * @exception E_OUT_OF_MEMORY The memory is insufficient.
641 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
643 * -For more information on the relationship between this method and the PowerOn() method, and the
644 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
646 * -In a zero-shutter-lag camera, the default preview format applies this feature correctly. The other preview formats are not guaranteed.
647 * -The zero-shutter-lag capability can be checked using MediaCapability::GetValue(const Tizen::Base::String& key, bool& value) with
648 * ::CAMERA_PRIMARY_SUPPORT_ZERO_SHUTTER_LAG, ::CAMERA_SECONDARY_SUPPORT_ZERO_SHUTTER_LAG keys.
649 * @see GetCaptureResolution()
651 result SetCaptureResolution(const Tizen::Graphics::Dimension& resolution);
654 * Gets the resolution for capturing the data of the camera.
658 * @return The current resolution for capturing the data of the camera
659 * @see SetCaptureResolution()
660 * @see GetSupportedCaptureResolutionListN()
662 Tizen::Graphics::Dimension GetCaptureResolution(void) const;
665 * Gets a list of the capturing resolutions supported by the %Camera class. @n
666 * Each item of the list has a pointer of the Tizen::Graphics::Dimension value.
670 * @return A list of the capture resolutions supported by the %Camera class @n
671 * else @c null if no capture resolution is supported or an exception occurs
672 * @exception E_SUCCESS The method is successful.
673 * @exception E_SYSTEM A system error has occurred.
674 * @exception E_OUT_OF_MEMORY The memory is insufficient.
676 * -The specific error code can be accessed using the GetLastResult() method. @n
677 * -The return value and each item in the list must be deleted by the caller.
678 * @see SetCaptureResolution()
679 * @see GetCaptureResolution()
681 Tizen::Base::Collection::IList* GetSupportedCaptureResolutionListN(void) const;
684 * Sets the effect for the input data of the camera.
688 * @privilege %http://tizen.org/privilege/camera
689 * @feature %http://tizen.org/feature/camera
691 * @return An error code
692 * @param[in] effect The effect for the input data of the camera
693 * @exception E_SUCCESS The method is successful.
694 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
695 * @exception E_INVALID_ARG The specified input parameter is invalid.
696 * @exception E_DEVICE_BUSY The camera is under use by other application.
697 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
698 * @exception E_DEVICE_FAILED The device operation has failed.
699 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
700 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
701 * @exception E_UNSUPPORTED_TYPE The specified @c effect is not supported.
702 * @exception E_OUT_OF_MEMORY The memory is insufficient.
703 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
705 * -The default effect is ::CAMERA_EFFECT_NONE.
706 * -This method returns E_UNSUPPORTED_OPERATION in the Emulator.
707 * -This method works correctly when PowerOn() is executed. @n@n
708 * -For more information on the relationship between this method and the PowerOn() method, and the
709 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
713 result SetEffect(CameraEffect effect);
716 * Gets the effect for the input data of the camera.
720 * @return The effect for the input data of the camera
723 CameraEffect GetEffect(void) const;
727 * Sets the camera's flash.
729 * @brief <i> [Deprecated] </i>
730 * @deprecated This method is deprecated. @n
731 * Instead of using this method, use the SetFlashMode() method.
734 * @privilege %http://tizen.org/privilege/camera
735 * @feature %http://tizen.org/feature/camera.back.flash or %http://tizen.org/feature/camera.front.flash
737 * @return An error code
738 * @param[in] flashOn Set to @c true to switch on the flash light, @n
740 * @exception E_SUCCESS The method is successful.
741 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
742 * @exception E_DEVICE_BUSY The camera is under use by other application.
743 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
744 * @exception E_DEVICE_FAILED The device operation has failed.
745 * @exception E_OUT_OF_MEMORY The memory is insufficient.
746 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
747 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
748 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
750 * -The flash is switched on when the camera captures a picture. If the value of @c flashOn is
751 * set to @c true, this method returns E_UNSUPPORTED_OPERATION in the Emulator. @n
752 * -SetFlash(true) works same as SetFlashMode(CAMERA_FLASH_MODE_ON) and SetFlash(false) works same as SetFlashMode(CAMERA_FLASH_MODE_OFF). @n
753 * -For more information on the relationship between this method and the PowerOn() method, and the
754 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
757 * -In a zero-shutter-lag camera, only the default preview format applies this feature.
759 * @see SetFlashMode()
760 * @see CameraFlashMode
763 result SetFlash(bool flashOn)
765 CameraFlashMode flashMode = CAMERA_FLASH_MODE_ON;
768 flashMode = CAMERA_FLASH_MODE_OFF;
770 return SetFlashMode(flashMode);
775 * Checks whether the camera's flash is switched on.
777 * @brief <i> [Deprecated] </i>
778 * @deprecated This method is deprecated. @n
779 * Instead of using this method, use the GetFlashMode() method.
782 * @return @c true if the flash light is on, @n
785 * -This method works same as return (GetFlashMode()!=CAMERA_FLASH_MODE_OFF).
787 * @see GetFlashMode()
788 * @see CameraFlashMode
791 bool IsFlashOn(void) const
793 return (GetFlashMode() != CAMERA_FLASH_MODE_OFF);
797 * Sets the camera's flash mode.
801 * @privilege %http://tizen.org/privilege/camera
802 * @feature %http://tizen.org/feature/camera.back.flash or %http://tizen.org/feature/camera.front.flash
804 * @return An error code
805 * @param[in] flashMode flash mode to switch on the flash light.
806 * @exception E_SUCCESS The method is successful.
807 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
808 * @exception E_INVALID_ARG The specified flash mode is invalid.
809 * @exception E_DEVICE_BUSY The camera is under use by other application.
810 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
811 * @exception E_DEVICE_FAILED The device operation has failed.
812 * @exception E_OUT_OF_MEMORY The memory is insufficient.
813 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
814 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
815 * @exception E_UNSUPPORTED_TYPE The specified @c flashMode is not supported.
816 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
818 * -Normally the flash splashes before the camera captures a picture. @n
819 * ::CAMERA_FLASH_MODE_CONTINUOUS keeps the flash turned on after the method is called until ::CAMERA_FLASH_MODE_OFF is set. @n
820 * -This method returns E_UNSUPPORTED_OPERATION in the Emulator.
821 * -In a zero-shutter-lag camera, the default preview format applies this feature correctly. The other preview formats are not guaranteed.
822 * -The zero-shutter-lag capability can be checked using MediaCapability::GetValue(const Tizen::Base::String& key, bool& value) with
823 * ::CAMERA_PRIMARY_SUPPORT_ZERO_SHUTTER_LAG, ::CAMERA_SECONDARY_SUPPORT_ZERO_SHUTTER_LAG keys.
824 * @see GetFlashMode()
826 result SetFlashMode(CameraFlashMode flashMode);
829 * Gets the flash mode of the camera.
833 * @return The flash mode of the camera
835 * -If the %Camera doesn't support the flash mode, this method always returns ::CAMERA_FLASH_MODE_OFF.
836 * @see SetFlashMode()
838 CameraFlashMode GetFlashMode(void) const;
841 * Sets the exposure level of the camera.
845 * @privilege %http://tizen.org/privilege/camera
846 * @feature %http://tizen.org/feature/camera
848 * @return An error code
849 * @param[in] exposure The camera exposure level @n
850 * The range of this parameter is from @c 0 to @c 9.
851 * @exception E_SUCCESS The method is successful.
852 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
853 * @exception E_OUT_OF_RANGE The specified exposure level is out of range.
854 * @exception E_DEVICE_BUSY The camera is under use by other application.
855 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
856 * @exception E_DEVICE_FAILED The device operation has failed.
857 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
858 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
859 * @exception E_OUT_OF_MEMORY The memory is insufficient.
860 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
862 * -The default exposure level is @c 5.
863 * -The supported range for exposure level is from @c 0 to @c 9.
864 * -This method returns E_UNSUPPORTED_OPERATION in the Emulator.
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 SetExposure(int exposure);
874 * Gets the exposure level of the camera.
878 * @return An integer value representing the exposure level of the camera @n
879 * The returned value ranges from @c 0 to @c 9.
881 * -The supported range for exposure level is from @c 0 to @c 9.
884 int GetExposure(void) const;
887 * Sets the white balance level of the camera.
891 * @privilege %http://tizen.org/privilege/camera
892 * @feature %http://tizen.org/feature/camera
894 * @return An error code
895 * @param[in] whiteBalance The camera white balance level
896 * @exception E_SUCCESS The method is successful.
897 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
898 * @exception E_INVALID_ARG The specified input parameter is invalid.
899 * @exception E_DEVICE_BUSY The camera is under use by other application.
900 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
901 * @exception E_DEVICE_FAILED The device operation has failed.
902 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
903 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
904 * @exception E_UNSUPPORTED_TYPE The specified @c whiteBalance is not supported.
905 * @exception E_OUT_OF_MEMORY The memory is insufficient.
906 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
908 * -The default white balance is ::CAMERA_WHITE_BALANCE_AUTO.
909 * -This method returns E_UNSUPPORTED_OPERATION in the Emulator.
910 * -This method works correctly when PowerOn() is executed. @n@n
911 * -For more information on the relationship between this method and the PowerOn() method, and the
912 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
914 * @see GetWhiteBalance()
916 result SetWhiteBalance(CameraWhiteBalance whiteBalance);
919 * Gets the white balance level of the camera.
923 * @return The white balance level of the camera
924 * @see SetWhiteBalance()
926 CameraWhiteBalance GetWhiteBalance(void) const;
929 * Sets the capturing quality of the camera.
933 * @privilege %http://tizen.org/privilege/camera
934 * @feature %http://tizen.org/feature/camera
936 * @return An error code
937 * @param[in] quality The camera's quality level
938 * @exception E_SUCCESS The method is successful.
939 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
940 * @exception E_INVALID_ARG The specified @c quality is not supported.
941 * @exception E_DEVICE_BUSY The camera is under use by other application.
942 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
943 * @exception E_DEVICE_FAILED The device operation has failed.
944 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
945 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
946 * @exception E_OUT_OF_MEMORY The memory is insufficient.
947 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
949 * -The default quality is ::CAMERA_QUALITY_NORMAL.
950 * -This method works correctly when PowerOn() is executed. @n@n
951 * -For more information on the relationship between this method and the PowerOn() method, and the
952 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
956 result SetQuality(CameraQuality quality);
959 * Gets the capturing quality of the camera.
963 * @return The %Camera quality level
966 CameraQuality GetQuality(void) const;
969 * Sets the focus mode of the camera.
973 * @privilege %http://tizen.org/privilege/camera
974 * @feature %http://tizen.org/feature/camera
976 * @return An error code
977 * @param[in] focusMode focus mode
978 * @exception E_SUCCESS The method is successful.
979 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
980 * @exception E_DEVICE_BUSY The camera is under use by other application.
981 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
982 * @exception E_DEVICE_FAILED The device operation has failed.
983 * @exception E_INVALID_ARG The specified focus mode is invalid.
984 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
985 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
986 * @exception E_UNSUPPORTED_TYPE The specified @c focusMode is not supported.
987 * @exception E_OUT_OF_MEMORY The memory is insufficient.
988 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
990 * -::CAMERA_FOCUS_MODE_NONE always throws E_INVALID_ARG.
991 * @see GetFocusMode()
993 result SetFocusMode(CameraFocusMode focusMode);
996 * Gets the focus mode of the camera.
1000 * @return The %Camera focus mode
1002 * -If the %Camera does not support the focus mode, this method always returns ::CAMERA_FOCUS_MODE_NONE.
1003 * @see SetFocusMode()
1005 CameraFocusMode GetFocusMode(void) const;
1008 * Sets the auto focus point list.
1012 * @privilege %http://tizen.org/privilege/camera
1013 * @feature %http://tizen.org/feature/camera
1015 * @return An error code
1016 * @param[in] pointList The auto focus point list which consists of Tizen::Graphics::Point pointers
1017 * @exception E_SUCCESS The method is successful.
1018 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1019 * @exception E_DEVICE_BUSY The camera is under use by other application.
1020 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
1021 * @exception E_DEVICE_FAILED The device operation has failed.
1022 * @exception E_INVALID_ARG The specified input parameter is invalid.
1023 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
1024 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
1025 * @exception E_UNSUPPORTED_TYPE This method is not supported for the current focus mode.
1026 * @exception E_OUT_OF_MEMORY The memory is insufficient.
1027 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1029 * -This method works fine when the current focus mode is @c CAMERA_FOCUS_MODE_NORMAL or @c CAMERA_FOCUS_MODE_MACRO.@n
1030 * -If the input parameter has a empty list, the focus area is changed to the center.
1031 * @see GetAutoFocusPointN()
1033 result SetAutoFocusPoint(const Tizen::Base::Collection::IList& pointList);
1036 * Gets the auto focus point list. @n
1037 * Each item of the list has a pointer of the Tizen::Graphics::Point value.
1041 * @return The %Camera auto focus point list @n
1042 * A list of points that represent the auto focus point, @n
1043 * else @c null if no auto focus point is set or if an exception occurs.
1044 * @exception E_SUCCESS The method is successful.
1045 * @exception E_OUT_OF_MEMORY The memory is insufficient.
1047 * -The specific error code can be accessed using the GetLastResult() method. @n
1048 * -The return value and each item in the list must be deleted by the caller.
1049 * @see SetAutoFocusPoint()
1051 Tizen::Base::Collection::IList* GetAutoFocusPointN(void) const;
1054 * Sets the auto focus mode of the camera.
1058 * @privilege %http://tizen.org/privilege/camera
1059 * @feature %http://tizen.org/feature/camera
1061 * @return An error code
1062 * @param[in] callback Set to @c true to enable auto focus callback, @n
1064 * @exception E_SUCCESS The method is successful.
1065 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1066 * @exception E_DEVICE_BUSY The camera is under use by other application.
1067 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
1068 * @exception E_DEVICE_FAILED The device operation has failed.
1069 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
1070 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
1071 * @exception E_OUT_OF_MEMORY The memory is insufficient.
1072 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1074 * -If @c callback is set to @c false, the ICameraEventListener::OnCameraAutoFocused() method is not called.
1075 * -This method throws @c E_UNSUPPORTED_OPERATION in the emulator. @n
1076 * -For more information on the relationship between this method and the PowerOn() method, and the
1077 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
1080 result SetAutoFocus(bool callback);
1083 * Sets the capturing format of the camera. @n
1084 * Initially, the default format is set using the internal configuration.
1088 * @privilege %http://tizen.org/privilege/camera
1089 * @feature %http://tizen.org/feature/camera
1091 * @return An error code
1092 * @param[in] format The camera's capture format @n
1093 * It must be one of the pixel formats extracted using GetSupportedCaptureFormatListN().
1094 * @exception E_SUCCESS The method is successful.
1095 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1096 * @exception E_SYSTEM A system error has occurred.
1097 * @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
1098 * @exception E_DEVICE_BUSY The camera is under use by other application.
1099 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
1100 * @exception E_DEVICE_FAILED The device operation has failed.
1101 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
1102 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
1103 * @exception E_OUT_OF_MEMORY The memory is insufficient.
1104 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1106 * -This method works correctly when PowerOn() is executed.
1107 * @see GetCaptureFormat()
1109 result SetCaptureFormat(const Tizen::Graphics::PixelFormat format);
1112 * Gets the capturing format of the camera.
1116 * @return The capturing format of the camera
1117 * @see SetCaptureFormat()
1118 * @see GetSupportedCaptureFormatListN()
1120 Tizen::Graphics::PixelFormat GetCaptureFormat(void) const;
1123 * Gets the supported capturing format list for the %Camera class. @n
1124 * Each list item has a Tizen::Graphics::PixelFormat value.
1128 * @return A list of the formats supported by the %Camera class, @n
1129 * else @c null if no capture format is supported or an exception occurs
1130 * @exception E_SUCCESS The method is successful.
1131 * @exception E_SYSTEM A system error has occurred.
1132 * @exception E_OUT_OF_MEMORY The memory is insufficient.
1134 * -The specific error code can be accessed using the GetLastResult() method. @n
1135 * -The return value must be deleted.
1136 * @see SetCaptureFormat()
1137 * @see GetCaptureFormat()
1139 Tizen::Base::Collection::IListT <Tizen::Graphics::PixelFormat>* GetSupportedCaptureFormatListN(void) const;
1142 * Sets the preview format of the camera. @n
1143 * Initially, the default format is set using the internal configuration.
1147 * @privilege %http://tizen.org/privilege/camera
1148 * @feature %http://tizen.org/feature/camera
1150 * @return An error code
1151 * @param[in] format The camera's preview format @n
1152 * It must be one of the pixel formats extracted using GetSupportedPreviewFormatListN().
1153 * @exception E_SUCCESS The method is successful.
1154 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1155 * @exception E_SYSTEM A system error has occurred.
1156 * @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
1157 * @exception E_DEVICE_BUSY The camera is under use by other application.
1158 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
1159 * @exception E_DEVICE_FAILED The device operation has failed.
1160 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
1161 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
1162 * @exception E_OUT_OF_MEMORY The memory is insufficient.
1163 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1165 * -This method works in ::CAMERA_STATE_INITIALIZED state. @n@n
1166 * -For more information on the relationship between this method and the PowerOn() method, and the
1167 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
1169 * @see GetPreviewFormat()
1170 * @see GetSupportedPreviewFormatListN()
1172 result SetPreviewFormat(const Tizen::Graphics::PixelFormat format);
1175 * Gets the preview format of the camera.
1179 * @return The preview format of the camera
1180 * @see SetPreviewFormat()
1181 * @see GetSupportedPreviewFormatListN()
1183 Tizen::Graphics::PixelFormat GetPreviewFormat(void) const;
1186 * Gets the supported preview format list for the %Camera class. @n
1187 * Each list item has a Tizen::Graphics::PixelFormat value.
1191 * @return A list of the preview format supported by the %Camera class, @n
1192 * else @c null if no preview format is supported or an exception occurs
1193 * @exception E_SUCCESS The method is successful.
1194 * @exception E_SYSTEM A system error has occurred.
1195 * @exception E_OUT_OF_MEMORY The memory is insufficient.
1197 * -The specific error code can be accessed using the GetLastResult() method. @n
1198 * -The return value must be deleted.
1199 * @see SetPreviewFormat()
1200 * @see GetPreviewFormat()
1202 Tizen::Base::Collection::IListT <Tizen::Graphics::PixelFormat>* GetSupportedPreviewFormatListN(void) const;
1206 * Sets the ISO level of the camera.
1210 * @privilege %http://tizen.org/privilege/camera
1211 * @feature %http://tizen.org/feature/camera
1213 * @return An error code
1214 * @param[in] isoLevel The camera's ISO level @n
1215 * The default ISO level is set from the internal configuration.
1216 * @exception E_SUCCESS The method is successful.
1217 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1218 * @exception E_OUT_OF_RANGE The specified ISO level is out of range.
1219 * @exception E_DEVICE_BUSY The camera is under use by other application.
1220 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
1221 * @exception E_DEVICE_FAILED The device operation has failed.
1222 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
1223 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
1224 * @exception E_UNSUPPORTED_TYPE The specified @c isoLevel is not supported.
1225 * @exception E_OUT_OF_MEMORY The memory is insufficient.
1226 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1228 * -In some devices this method works in the ::CAMERA_STATE_PREVIEW state.
1229 * -This method throws E_UNSUPPORTED_OPERATION in the Emulator. @n@n
1230 * -For more information on the relationship between this method and the PowerOn() method, and the
1231 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
1233 * @see GetIsoLevel()
1235 result SetIsoLevel(CameraIsoLevel isoLevel);
1238 * Gets the ISO level of the camera.
1242 * @return The ISO level of the camera
1243 * @see SetIsoLevel()
1245 CameraIsoLevel GetIsoLevel(void) const;
1248 * Sets the preview frame rate of the camera. @n
1249 * Initially, the default frame rate is set using the internal configuration.
1253 * @privilege %http://tizen.org/privilege/camera
1254 * @feature %http://tizen.org/feature/camera
1256 * @return An error code
1257 * @param[in] fps The frame rate per second
1258 * @exception E_SUCCESS The method is successful.
1259 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1260 * @exception E_OUT_OF_RANGE The specified @c fps is out of range on this device.
1261 * @exception E_DEVICE_BUSY The camera is under use by other application.
1262 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
1263 * @exception E_DEVICE_FAILED The device operation has failed.
1264 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
1265 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
1266 * @exception E_OUT_OF_MEMORY The memory is insufficient.
1267 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1269 * -This method works in ::CAMERA_STATE_INITIALIZED state. @n@n
1270 * -For more information on the relationship between this method and the PowerOn() method, and the
1271 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
1273 * @see GetPreviewFrameRate()
1274 * @see GetSupportedPreviewFrameRateListN()
1275 * @see FRAME_RATE_AUTO
1277 result SetPreviewFrameRate(int fps);
1280 * Gets the frame rate of the camera.
1284 * @return The frame rate of the camera @n
1285 * If the frame rate is not set using SetPreviewFrameRate(), the system-dependent default frame rate is returned.
1286 * @see GetSupportedPreviewFrameRateListN()
1288 int GetPreviewFrameRate(void) const;
1291 * Gets the supported preview frame rate list for the %Camera class. @n
1292 * Each list item has an integer value.
1296 * @return A list of the preview frame rate supported by the %Camera class, @n
1297 * else @c null if no frame rate is supported or an exception occurs
1298 * @exception E_SUCCESS The method is successful.
1299 * @exception E_SYSTEM A system error has occurred.
1300 * @exception E_OUT_OF_MEMORY The memory is insufficient.
1302 * -The specific error code can be accessed using the GetLastResult() method. @n
1303 * -The return value must be deleted by the caller. @n
1304 * -This method returns fps list that can be supported by all resolutions.
1305 * @see SetPreviewFrameRate()
1306 * @see GetPreviewFrameRate()
1307 * @see FRAME_RATE_AUTO
1308 * @see GetSupportedPreviewFrameRateListN(const Tizen::Graphics::Dimension& dim) const
1310 Tizen::Base::Collection::IListT <int>* GetSupportedPreviewFrameRateListN(void) const;
1313 * Gets the supported preview frame rate list of the input resolution of the %Camera class. @n
1314 * Each item of the list has an integer value.
1318 * @return A list of the preview frame rate of the input preview resolution, @n
1319 * else @c null if no frame rate is supported or if an exception occurs
1320 * @param[in] dim The preview resolution of the camera
1321 * @exception E_SUCCESS The method is successful.
1322 * @exception E_INVALID_ARG The specified input resolution is invalid.
1323 * @exception E_SYSTEM A system error has occurred.
1324 * @exception E_OUT_OF_MEMORY The memory is insufficient.
1326 * -The specific error code can be accessed using the GetLastResult() method. @n
1327 * -The return value must be deleted by the caller. @n
1328 * @see SetPreviewFrameRate()
1329 * @see GetPreviewFrameRate()
1330 * @see GetSupportedPreviewFrameRateListN(void) const
1332 Tizen::Base::Collection::IListT <int>* GetSupportedPreviewFrameRateListN(const Tizen::Graphics::Dimension& dim) const;
1335 * Sets the orientation value in the Exchangeable Image File Format (EXIF) field of the captured data.
1339 * @privilege %http://tizen.org/privilege/camera
1340 * @feature %http://tizen.org/feature/camera
1342 * @return An error code
1343 * @param[in] orientation The orientation value to set in EXIF
1344 * @exception E_SUCCESS The method is successful.
1345 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1346 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1347 * @exception E_OUT_OF_RANGE The input value is out of range.
1348 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
1349 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
1350 * @exception E_SYSTEM A system error has occurred.
1352 * -The default value of orientation is @c CAMERA_EXIF_ORIENTATION_TOP_LEFT. @n
1353 * -This method works correctly when PowerOn() is executed. The orientation value set by this method can be obtained using the
1354 * Tizen::Content::ImageData::GetOrientation() method after writing the captured data to a file.
1356 result SetExifOrientation(CameraExifOrientation orientation);
1359 * Sets the GPS coordinates in the Exchangeable %Image File Format (EXIF) field for the captured data.
1363 * @privilege %http://tizen.org/privilege/camera
1364 * @feature %http://tizen.org/feature/camera
1366 * @return An error code
1367 * @param[in] latitude The latitude value to set in EXIF @n
1368 * The valid range is [-90.0, 90.0].
1369 * @param[in] longitude The longitude value to set in EXIF @n
1370 * The valid range is [-180.0, 180.0]
1371 * @param[in] altitude The altitude value to set in EXIF
1372 * @exception E_SUCCESS The method is successful.
1373 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1374 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1375 * @exception E_OUT_OF_RANGE The input value is out of range.
1376 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
1377 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
1378 * @exception E_SYSTEM A system error has occurred.
1380 * -This method sets the GPS coordinates and enables entering the coordinates into the Exchangeable Image File Format (EXIF).
1381 * -By default, the GPS coordinates are not entered in JPEG's EXIF.
1382 * -The GPS coordinates that are set using this method are entered in every call to the
1383 * Capture() method, until DisableExifGpsCoordinates() is called or this instance is destroyed. @n
1384 * -This method works correctly when PowerOn() is executed. @n
1385 * -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.
1387 result SetExifGpsCoordinates(double latitude, double longitude, float altitude);
1390 * Disables the insertion of the GPS coordinates in the Exchangeable %Image File Format (EXIF) field for the captured data.
1394 * @privilege %http://tizen.org/privilege/camera
1395 * @feature %http://tizen.org/feature/camera
1397 * @return An error code
1398 * @exception E_SUCCESS The method is successful.
1399 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1400 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1401 * @exception E_OUT_OF_RANGE The input value is out of range.
1402 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
1403 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
1404 * @exception E_SYSTEM A system error has occurred.
1405 * @see SetExifGpsCoordinates()
1407 result DisableExifGpsCoordinates(void);
1410 * Sets the flip type for the previewed and captured data.
1414 * @privilege %http://tizen.org/privilege/camera
1415 * @feature %http://tizen.org/feature/camera
1417 * @return An error code
1418 * @param[in] flip The camera flip type
1419 * @exception E_SUCCESS The method is successful.
1420 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1421 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1422 * @exception E_INVALID_ARG The input value is out of range.
1423 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
1424 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
1425 * @exception E_UNSUPPORTED_TYPE The specified @c flip is not supported.
1426 * @exception E_SYSTEM A system error has occurred.
1428 * -This method works in the ::CAMERA_STATE_INITIALIZED state.
1429 * -Finally the last specified type is applied even with the several types applicable.
1430 * -In a zero-shutter-lag camera, the default preview format is not guaranteed to apply this feature correctly.
1431 * -The zero-shutter-lag capability can be checked using MediaCapability::GetValue(const Tizen::Base::String& key, bool& value) with
1432 * ::CAMERA_PRIMARY_SUPPORT_ZERO_SHUTTER_LAG, ::CAMERA_SECONDARY_SUPPORT_ZERO_SHUTTER_LAG keys.
1435 result SetFlip(CameraFlipType flip);
1438 * Gets the flip type for the previewed and captured data.
1442 * @return The camera flip type
1445 CameraFlipType GetFlip(void) const;
1448 * Sets the rotation for the previewed data.
1452 * @privilege %http://tizen.org/privilege/camera
1453 * @feature %http://tizen.org/feature/camera
1455 * @return An error code
1456 * @param[in] rotation The camera rotation
1457 * @exception E_SUCCESS The method is successful.
1458 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1459 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1460 * @exception E_INVALID_ARG The input value is out of range.
1461 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
1462 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
1463 * @exception E_UNSUPPORTED_TYPE The specified @c rotation is not supported.
1464 * @exception E_SYSTEM A system error has occurred.
1466 * -This method works in the ::CAMERA_STATE_INITIALIZED state.
1467 * -The last specified type is applied even with the several types applicable.
1468 * -This method rotates the preview and recording data but not the captured image. @n
1469 * The captured image's orientation is always following the physical rotation.
1470 * -When the preview is rotated, the preview callback data's width and height can be changed. @n
1471 * Thus the application must recognize these changes when it uses the preview data in ICameraEventListener::OnCameraPreviewed() callback.
1472 * - For the intended view of preview, Tizen::Ui::Controls::OverlayRegion::OVERLAY_REGION_TYPE_NORMAL must be selected when Tizen::Ui::Controls::OverlayRegion is created.
1473 * -In a zero-shutter-lag camera, the default preview format is not guaranteed to apply this feature correctly.
1474 * -The zero-shutter-lag capability can be checked using MediaCapability::GetValue(const Tizen::Base::String& key, bool& value) with
1475 * ::CAMERA_PRIMARY_SUPPORT_ZERO_SHUTTER_LAG, ::CAMERA_SECONDARY_SUPPORT_ZERO_SHUTTER_LAG keys.
1476 * @see GetPreviewRotation()
1479 result SetPreviewRotation(CameraRotation rotation);
1483 * Gets the rotation for the previewed data.
1487 * @return The camera rotation
1488 * @see SetPreviewRotation()
1491 CameraRotation GetPreviewRotation(void) const;
1494 * Sets the metering mode of the camera.
1498 * @privilege %http://tizen.org/privilege/camera
1499 * @feature %http://tizen.org/feature/camera
1501 * @return An error code
1502 * @param[in] meteringMode The metering mode
1503 * @exception E_SUCCESS The method is successful.
1504 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1505 * @exception E_DEVICE_BUSY The camera is under use by other application.
1506 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
1507 * @exception E_DEVICE_FAILED The device operation has failed.
1508 * @exception E_INVALID_ARG The specified metering mode is invalid.
1509 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
1510 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
1511 * @exception E_UNSUPPORTED_TYPE The specified @c meteringMode is not supported.
1512 * @exception E_OUT_OF_MEMORY The memory is insufficient.
1513 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1515 * -::CAMERA_METERING_MODE_NONE always throws E_INVALID_ARG.
1516 * @see GetMeteringMode()
1518 result SetMeteringMode(CameraMeteringMode meteringMode);
1521 * Gets the metering mode of the camera.
1525 * @return The %Camera metering mode
1527 * -If the %Camera does not support the metering mode, this method always returns ::CAMERA_METERING_MODE_NONE.
1528 * @see SetMeteringMode()
1530 CameraMeteringMode GetMeteringMode(void) const;
1533 * Sets the scene mode of the camera.
1537 * @privilege %http://tizen.org/privilege/camera
1538 * @feature %http://tizen.org/feature/camera
1540 * @return An error code
1541 * @param[in] sceneMode The scene mode
1542 * @exception E_SUCCESS The method is successful.
1543 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1544 * @exception E_DEVICE_BUSY The camera is under use by another application.
1545 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
1546 * @exception E_DEVICE_FAILED The device operation has failed.
1547 * @exception E_INVALID_ARG The specified @c sceneMode is invalid.
1548 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
1549 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
1550 * @exception E_UNSUPPORTED_TYPE The specified @c sceneMode is not supported.
1551 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1553 * -In a specific scene mode, camera's attributes such as brightness, metering mode, iso level, white balance, flash, and focus are changed to the ones that are pre-defined by each scene mode. @n
1554 * -In a specific scene mode, if an application sets any attribute that is related to the scene, the mode can be changed to ::CAMERA_SCENE_OFF. @n
1555 * Thus, it is recommended that the application check the current scene mode after setting the attributes. @n
1556 * -In case that the scene mode is changed to ::CAMERA_SCENE_OFF, all the attributes set by the application are reloaded.
1558 result SetSceneMode(CameraSceneMode sceneMode);
1562 * Gets the scene mode of the camera.
1566 * @return The %Camera scene mode
1568 CameraSceneMode GetSceneMode(void) const;
1571 * Adds the stream filter to process the video stream data while previewing or recording.
1575 * @privilege %http://tizen.org/privilege/camera
1576 * @feature %http://tizen.org/feature/camera
1578 * @return An error code
1579 * @param[in] filter An instance of IVideoStreamFilter
1580 * @exception E_SUCCESS The method is successful.
1581 * @exception E_OBJ_ALREADY_EXIST The filter already exists.
1582 * @exception E_OUT_OF_MEMORY The memory is insufficient.
1583 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1584 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
1585 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
1587 * -IVideoStreamFilter::ProcessVideoStream() will be called when the video frame is ready.
1589 result AddVideoStreamFilter(Tizen::Media::IVideoStreamFilter& filter);
1592 * Removes the stream filter to stop receiving the video stream data.
1596 * @privilege %http://tizen.org/privilege/camera
1597 * @feature %http://tizen.org/feature/camera
1599 * @return An error code
1600 * @param[in] filter An instance of IVideoStreamFilter
1601 * @exception E_SUCCESS The method is successful.
1602 * @exception E_OBJ_NOT_FOUND The filter is not found.
1603 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1604 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
1605 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
1607 result RemoveVideoStreamFilter(Tizen::Media::IVideoStreamFilter& filter);
1610 * This value can be used to set the preview frame rate by using the SetPreviewFrameRate() method. @n
1611 * If the preview frame rate is set using this value, the frame rate during the preview is automatically adjusted as per the light condition.
1615 static const int FRAME_RATE_AUTO = 0xFFFFFFFF;
1619 * This is the copy constructor for this class.
1624 * -The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
1627 Camera(const Camera& rhs);
1630 * This is the copy assignment operator for this class.
1635 * -The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
1638 Camera& operator =(const Camera& rhs);
1640 friend class _CameraImpl;
1641 _CameraImpl* __pImpl;