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. @n
165 * The object is not fully constructed after this constructor is called. @n
166 * For full construction, 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.@n 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 * @feature %http://tizen.org/feature/camera.back or %http://tizen.org/feature/camera.front
190 * @return An error code
191 * @param[in] listener An instance of ICameraEventListener
192 * @param[in] camSel The %Camera to power on
193 * @exception E_SUCCESS The method is successful.
194 * @exception E_SYSTEM A system error has occurred.
195 * @exception E_DEVICE_BUSY The camera is under use by other application or already used in this application.
196 * @exception E_DEVICE_UNAVAILABLE The camera is unavailable.
197 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @n
198 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
199 * @exception E_OUT_OF_MEMORY The memory is insufficient.
200 * @remarks Before calling this method, check whether the feature is supported by MediaCapability::GetValue(const Tizen::Base::String& key, int& value) with CAMERA_COUNT key.
202 result Construct(ICameraEventListener& listener, CameraSelection camSel = CAMERA_PRIMARY);
205 * Powers the camera on.
209 * @privilege %http://tizen.org/privilege/camera
210 * @feature %http://tizen.org/feature/camera
212 * @return An error code
213 * @exception E_SUCCESS The method is successful.
214 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
215 * @exception E_DEVICE_BUSY The camera is under use by other application.
216 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
217 * @exception E_DEVICE_FAILED The device operation has failed.
218 * @exception E_OUT_OF_MEMORY The memory is insufficient.
219 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
220 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @n
221 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
222 * @remarks Reserved configurations are set in this method.
225 result PowerOn(void);
228 * Powers the camera off.
232 * @privilege %http://tizen.org/privilege/camera
233 * @feature %http://tizen.org/feature/camera
235 * @return An error code
236 * @exception E_SUCCESS The method is successful.
237 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
238 * @exception E_DEVICE_BUSY The camera is under use by other application.
239 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
240 * @exception E_DEVICE_FAILED The device operation has failed.
241 * @exception E_OUT_OF_MEMORY The memory is insufficient.
242 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
243 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @n
244 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
247 result PowerOff(void);
250 * Checks whether the camera is powered on.
254 * @return @c true if the camera is powered on, @n
259 bool IsPoweredOn(void) const;
262 * Starts displaying the preview image on the camera device. @n
263 * If the value of @c pBufferInfo is @c null, no preview image is displayed. In this case, the application can
264 * draw the preview image with the data passed on by the ICameraEventListener::OnCameraPreviewed() method.
266 * If the value of @c previewedData is @c true, the previewed image data is passed to the
267 * ICameraEventListener::OnCameraPreviewed() method periodically based on the frame-rate, otherwise the
268 * callback is not invoked. The default value of @c previewedData is @c false.
272 * @privilege %http://tizen.org/privilege/camera
273 * @feature %http://tizen.org/feature/camera
275 * @return An error code
276 * @param[in] pBufferInfo The buffer information for the camera preview display
277 * @param[in] previewedData Set to @c true if the previewed data is delivered to the callback method, @n
279 * @exception E_SUCCESS The method is successful.
280 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
281 * @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
282 * @exception E_DEVICE_BUSY The camera is under use by other application.
283 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
284 * @exception E_DEVICE_FAILED The device operation has failed.
285 * @exception E_OUT_OF_MEMORY The memory is insufficient.
286 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
287 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @n
288 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
290 * - The overlay region retrieved by the buffer information must be the topmost window when this method is called.
291 * - The ICameraEventListener::OnCameraPreviewed() method can be delayed or dropped depending on
292 * the system's performance.
293 * - For more information on the relationship between this method and the PowerOn() method, and the
294 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
296 * - Before calling this method, check whether the feature is supported by MediaCapability::GetValue(const Tizen::Base::String& key, bool& value)
297 * with CAMERA_PRIMARY_SUPPORT_PREVIEW or CAMERA_SECONDARY_SUPPORT_PREVIEW keys.
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. @n
320 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
321 * @remarks For more information on the relationship between this method and the PowerOn() method, and the
322 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
324 * @see StartPreview()
326 result StopPreview(void);
329 * Captures the current image data from the camera sensor. @n
330 * After capturing the image, the camera's state changes to ::CAMERA_STATE_CAPTURED. @n
331 * The camera's preview must be restarted by calling the StartPreview() method. @n
332 * In a zero-shutter-lag camera, after capturing the image, the state changes to ::CAMERA_STATE_PREVIEW. @n
333 * The camera does not need to restart the preview in this case. @n
334 * The captured image is passed through ICameraEventListener::OnCameraCaptured().
338 * @privilege %http://tizen.org/privilege/camera
339 * @feature %http://tizen.org/feature/camera
341 * @return An error code
342 * @exception E_SUCCESS The method is successful.
343 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
344 * @exception E_DEVICE_BUSY The camera is under use by other application.
345 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
346 * @exception E_DEVICE_FAILED The device operation has failed.
347 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @n
348 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
349 * @exception E_OUT_OF_MEMORY The memory is insufficient.
350 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
352 * -For more information on the relationship between this method and the PowerOn() method, and the
353 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
355 * - Before calling this method, check whether the feature is supported by MediaCapability::GetValue(const Tizen::Base::String& key, bool& value)
356 * with CAMERA_PRIMARY_SUPPORT_CAPTURE or CAMERA_SECONDARY_SUPPORT_CAPTURE keys.
357 * -In a zero-shutter-lag camera, the state changes to ::CAMERA_STATE_PREVIEW after capturing.
358 * -The zero-shutter-lag capability can be checked using MediaCapability::GetValue(const Tizen::Base::String& key, bool& value) with
359 * ::CAMERA_PRIMARY_SUPPORT_ZERO_SHUTTER_LAG, ::CAMERA_SECONDARY_SUPPORT_ZERO_SHUTTER_LAG keys.
360 * @see ICameraEventListener::OnCameraCaptured()
362 result Capture(void);
365 * Gets the state of the camera in CameraState.
369 * @return The current state of the camera
371 * @see SetAutoFocus()
374 CameraState GetState(void) const;
377 * Sets the brightness level of the camera input data.
381 * @privilege %http://tizen.org/privilege/camera
382 * @feature %http://tizen.org/feature/camera
384 * @return An error code
385 * @param[in] brightness The brightness level to set @n
386 * The range of this parameter is from @c 0 to @c 9.
387 * @exception E_SUCCESS The method is successful.
388 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
389 * @exception E_OUT_OF_RANGE The specified @c brightness is out of range.
390 * @exception E_DEVICE_BUSY The camera is under use by other application.
391 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
392 * @exception E_DEVICE_FAILED The device operation has failed.
393 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @n
394 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
395 * @exception E_OUT_OF_MEMORY The memory is insufficient.
396 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
398 * - The default brightness level is @c 5.
399 * - The device's supported range for the brightness level is from @c 0 to @c 9.
400 * - This method works correctly when PowerOn() is executed. @n
401 * For more information on the relationship between this method and the PowerOn() method, and the
402 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm">here</a>.
403 * - Before calling this method, check whether the feature is supported by MediaCapability::GetValue(const Tizen::Base::String& key, bool& value)
404 * with CAMERA_PRIMARY_SUPPORT_BRIGHTNESS or CAMERA_SECONDARY_SUPPORT_BRIGHTNESS keys.
405 * @see GetBrightness()
407 result SetBrightness(int brightness);
410 * Gets the brightness level of the camera input data.
414 * @return The current brightness level @n
415 * The returned value ranges from @c 0 to @c 9.
417 * -The device's supported range for the brightness level is from @c 0 to @c 9.
418 * @see SetBrightness()
420 int GetBrightness(void) const;
423 * Sets the contrast level of the %Camera input data.
427 * @privilege %http://tizen.org/privilege/camera
428 * @feature %http://tizen.org/feature/camera
430 * @return An error code
431 * @param[in] contrast The contrast level to set @n
432 * The range of this parameter is from @c 0 to @c 9.
433 * @exception E_SUCCESS The method is successful.
434 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
435 * @exception E_OUT_OF_RANGE The specified contrast is out of range.
436 * @exception E_DEVICE_BUSY The camera is under use by other application.
437 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
438 * @exception E_DEVICE_FAILED The device operation has failed.
439 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @n
440 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
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.
444 * - The default contrast level is @c 5.
445 * - The device's supported range for the contrast level is from @c 0 to @c 9.
446 * - This method works correctly when PowerOn() is executed. @n
447 * For more information on the relationship between this method and the PowerOn() method, and the
448 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm">here</a>.
449 * - Before calling this method, check whether the feature is supported by MediaCapability::GetValue(const Tizen::Base::String& key, bool& value)
450 * with CAMERA_PRIMARY_SUPPORT_CONTRAST or CAMERA_SECONDARY_SUPPORT_CONTRAST keys.
453 result SetContrast(int contrast);
456 * Gets the contrast level of the camera input data.
460 * @return The current contrast level @n
461 * The returned value ranges from @c 0 to @c 9.
462 * @remarks The device's supported range for the contrast level is from @c 0 to @c 9.
465 int GetContrast(void) const;
468 * Zooms in the camera.
472 * @privilege %http://tizen.org/privilege/camera
473 * @feature %http://tizen.org/feature/camera
475 * @return An error code
476 * @exception E_SUCCESS The method is successful.
477 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
478 * @exception E_DEVICE_BUSY The camera is under use by other application.
479 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
480 * @exception E_DEVICE_FAILED The device operation has failed.
481 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @n
482 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
483 * @exception E_OUT_OF_MEMORY The memory is insufficient.
484 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
486 * - This method returns @c E_UNSUPPORTED_OPERATION in the Emulator.
487 * - Before calling this method, check whether the feature is supported by MediaCapability::GetValue(const Tizen::Base::String& key, bool& value)
488 * with CAMERA_PRIMARY_SUPPORT_ZOOM or CAMERA_SECONDARY_SUPPORT_ZOOM keys.
489 * - If Camera supports only ::CAMERA_ZOOM_TYPE_SMART, the zoom ratio can differ according
490 * to the preview, capture, and recording resolutions.
491 * - The supported zoom types can be obtained by using the
492 * MediaCapability::GetValueN(CAMERA_PRIMARY_ZOOM_TYPE) method.
493 * - For more information on the relationship between this method and the PowerOn() method, and the
494 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm">here</a>.
496 * @see GetZoomLevel()
497 * @see GetMaxZoomLevel()
502 * Zooms out the camera.
506 * @privilege %http://tizen.org/privilege/camera
507 * @feature %http://tizen.org/feature/camera
509 * @return An error code
510 * @exception E_SUCCESS The method is successful.
511 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
512 * @exception E_DEVICE_BUSY The camera is under use by other application.
513 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
514 * @exception E_DEVICE_FAILED The device operation has failed.
515 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @n
516 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
517 * @exception E_OUT_OF_MEMORY The memory is insufficient.
518 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
520 * - This method returns @c E_UNSUPPORTED_OPERATION in the Emulator.
521 * - Before calling this method, check whether the feature is supported by MediaCapability::GetValue(const Tizen::Base::String& key, bool& value)
522 * with CAMERA_PRIMARY_SUPPORT_ZOOM or CAMERA_SECONDARY_SUPPORT_ZOOM keys.
523 * - If CameraZoomType supports only ::CAMERA_ZOOM_TYPE_SMART, zoom ratio can differ according to
524 * the preview, capture, and recording resolutions.
525 * - The supported zoom types can be obtained by using the
526 * MediaCapability::GetValueN(CAMERA_PRIMARY_ZOOM_TYPE) method.
527 * - For more information on the relationship between this method and the PowerOn() method, and the
528 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm">here</a>.
530 * @see GetZoomLevel()
531 * @see GetMaxZoomLevel()
533 result ZoomOut(void);
536 * Gets the zoom level of the camera.
540 * @return The current zoom level
541 * @remarks The zoom level is different for each camera device.
544 * @see GetMaxZoomLevel()
546 int GetZoomLevel(void) const;
549 * Gets the maximum zoom level supported by this %Camera.
553 * @return The maximum zoom level
554 * @remarks The zoom level is different for each camera device.
557 * @see GetZoomLevel()
559 int GetMaxZoomLevel(void) const;
562 * Sets the current resolution of the preview.
566 * @privilege %http://tizen.org/privilege/camera
567 * @feature %http://tizen.org/feature/camera
569 * @return An error code
570 * @param[in] resolution The preview resolution @n
571 * It must be one of the listed dimensions that are extracted using GetSupportedPreviewResolutionListN().
572 * @exception E_SUCCESS The method is successful.
573 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
574 * @exception E_OUT_OF_RANGE The position or size is out of range.
575 * @exception E_OUT_OF_MEMORY The memory is insufficient.
576 * @exception E_DEVICE_BUSY The camera is under use by other application.
577 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
578 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @n
579 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
580 * @exception E_DEVICE_FAILED The device operation has failed.
581 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
583 * -This method works in the ::CAMERA_STATE_INITIALIZED state. @n@n
584 * -For more information on the relationship between this method and the PowerOn() method, and the
585 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
587 * @see GetPreviewResolution()
589 result SetPreviewResolution(const Tizen::Graphics::Dimension& resolution);
592 * Gets the current resolution of the preview.
596 * @return The current preview resolution
597 * @see SetPreviewResolution()
599 Tizen::Graphics::Dimension GetPreviewResolution(void) const;
602 * Gets the supported preview resolution list of the %Camera class. @n
603 * Each item in the returned list contains a pointer of Tizen::Graphics::Dimension value.
607 * @return A list of dimensions that represent the preview resolutions supported by the %Camera class, @n
608 * else @c null if no preview resolution is supported or an exception occurs
609 * @exception E_SUCCESS The method is successful.
610 * @exception E_SYSTEM A system error has occurred.
611 * @exception E_OUT_OF_MEMORY The memory is insufficient.
613 * - The specific error code can be accessed using the GetLastResult() method.
614 * - The return value and each item in the list must be deleted by the caller.
615 * @see SetPreviewResolution()
616 * @see GetPreviewResolution()
618 Tizen::Base::Collection::IList* GetSupportedPreviewResolutionListN(void) const;
622 * Sets the capturing resolution of the camera. @n
623 * Initially, the default resolution is set using the internal configuration.
627 * @privilege %http://tizen.org/privilege/camera
628 * @feature %http://tizen.org/feature/camera
630 * @return An error code
631 * @param[in] resolution The display resolution @n
632 * The display resolution must be one of the values extracted using GetSupportedCaptureResolutionListN().
633 * @exception E_SUCCESS The method is successful.
634 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
635 * @exception E_SYSTEM A system error has occurred.
636 * @exception E_OUT_OF_RANGE The specified resolution is out of range.
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 Emulator or target device does not support the required feature. @n
641 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
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.
645 * -For more information on the relationship between this method and the PowerOn() method, and the
646 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
648 * -In a zero-shutter-lag camera, the default preview format applies this feature correctly. The other preview formats are not guaranteed.
649 * -The zero-shutter-lag capability can be checked using MediaCapability::GetValue(const Tizen::Base::String& key, bool& value) with
650 * ::CAMERA_PRIMARY_SUPPORT_ZERO_SHUTTER_LAG, ::CAMERA_SECONDARY_SUPPORT_ZERO_SHUTTER_LAG keys.
651 * @see GetCaptureResolution()
653 result SetCaptureResolution(const Tizen::Graphics::Dimension& resolution);
656 * Gets the resolution for capturing the data of the camera.
660 * @return The current resolution for capturing the data of the camera
661 * @see SetCaptureResolution()
662 * @see GetSupportedCaptureResolutionListN()
664 Tizen::Graphics::Dimension GetCaptureResolution(void) const;
667 * Gets a list of the capturing resolutions supported by the %Camera class. @n
668 * Each item of the list has a pointer of the Tizen::Graphics::Dimension value.
672 * @return A list of the capture resolutions supported by the %Camera class @n
673 * else @c null if no capture resolution is supported or an exception occurs
674 * @exception E_SUCCESS The method is successful.
675 * @exception E_SYSTEM A system error has occurred.
676 * @exception E_OUT_OF_MEMORY The memory is insufficient.
678 * - The specific error code can be accessed using the GetLastResult() method.
679 * - The return value and each item in the list must be deleted by the caller.
680 * @see SetCaptureResolution()
681 * @see GetCaptureResolution()
683 Tizen::Base::Collection::IList* GetSupportedCaptureResolutionListN(void) const;
686 * Sets the effect for the input data of the camera.
690 * @privilege %http://tizen.org/privilege/camera
691 * @feature %http://tizen.org/feature/camera
693 * @return An error code
694 * @param[in] effect The effect for the input data of the camera
695 * @exception E_SUCCESS The method is successful.
696 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
697 * @exception E_INVALID_ARG The specified input parameter is invalid.
698 * @exception E_DEVICE_BUSY The camera is under use by other application.
699 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
700 * @exception E_DEVICE_FAILED The device operation has failed.
701 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @n
702 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
703 * @exception E_UNSUPPORTED_TYPE The specified @c effect is not supported.
704 * @exception E_OUT_OF_MEMORY The memory is insufficient.
705 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
707 * -The default effect is @c CAMERA_EFFECT_NONE.
708 * -This method returns @c E_UNSUPPORTED_OPERATION in the Emulator.
709 * -This method works correctly when PowerOn() is executed. @n@n
710 * For more information on the relationship between this method and the PowerOn() method, and the
711 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm
713 * - Before calling this method, check whether the feature is supported by MediaCapability::GetValueN(const Tizen::Base::String& key)
714 * with CAMERA_PRIMARY_EFFECT or CAMERA_SECONDARY_EFFECT keys.
717 result SetEffect(CameraEffect effect);
720 * Gets the effect for the input data of the camera.
724 * @return The effect for the input data of the camera
727 CameraEffect GetEffect(void) const;
732 * Sets the camera's flash.
734 * @brief <i> [Deprecated] </i>
735 * @deprecated This method is deprecated. @n
736 * Instead of using this method, use the SetFlashMode() method.
739 * @privilege %http://tizen.org/privilege/camera
740 * @feature %http://tizen.org/feature/camera.back.flash or %http://tizen.org/feature/camera.front.flash
742 * @return An error code
743 * @param[in] flashOn Set to @c true to switch on the flash light, @n
745 * @exception E_SUCCESS The method is successful.
746 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
747 * @exception E_DEVICE_BUSY The camera is under use by other application.
748 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
749 * @exception E_DEVICE_FAILED The device operation has failed.
750 * @exception E_OUT_OF_MEMORY The memory is insufficient.
751 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @n
752 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
753 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
755 * -The flash is switched on when the camera captures a picture. If the value of @c flashOn is
756 * set to @c true, this method returns @c E_UNSUPPORTED_OPERATION in the Emulator. @n
757 * SetFlash(true) works same as SetFlashMode(CAMERA_FLASH_MODE_ON) and SetFlash(false) works same as SetFlashMode(CAMERA_FLASH_MODE_OFF).
758 * - For more information on the relationship between this method and the PowerOn() method, and the
759 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm">here</a>.
760 * - Before calling this method, check whether the feature is supported by MediaCapability::GetValue(const Tizen::Base::String& key, bool& value)
761 * with CAMERA_PRIMARY_SUPPORT_FLASH or CAMERA_SECONDARY_SUPPORT_FLASH keys.
762 * -In a zero-shutter-lag camera, only the default preview format applies this feature.
764 * @see SetFlashMode()
765 * @see CameraFlashMode
770 result SetFlash(bool flashOn)
772 CameraFlashMode flashMode = CAMERA_FLASH_MODE_ON;
775 flashMode = CAMERA_FLASH_MODE_OFF;
777 return SetFlashMode(flashMode);
782 * Checks whether the camera's flash is switched on.
784 * @brief <i> [Deprecated] </i>
785 * @deprecated This method is deprecated. @n
786 * Instead of using this method, use the GetFlashMode() method.
789 * @return @c true if the flash light is on, @n
791 * @remarks This method works same as return (GetFlashMode()!=CAMERA_FLASH_MODE_OFF).
793 * @see GetFlashMode()
794 * @see CameraFlashMode
797 bool IsFlashOn(void) const
799 return (GetFlashMode() != CAMERA_FLASH_MODE_OFF);
803 * Sets the camera's flash mode.
807 * @privilege %http://tizen.org/privilege/camera
808 * @feature %http://tizen.org/feature/camera.back.flash or %http://tizen.org/feature/camera.front.flash
810 * @return An error code
811 * @param[in] flashMode flash mode to switch on the flash light.
812 * @exception E_SUCCESS The method is successful.
813 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
814 * @exception E_INVALID_ARG The specified flash mode is invalid.
815 * @exception E_DEVICE_BUSY The camera is under use by other application.
816 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
817 * @exception E_DEVICE_FAILED The device operation has failed.
818 * @exception E_OUT_OF_MEMORY The memory is insufficient.
819 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @n
820 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
821 * @exception E_UNSUPPORTED_TYPE The specified @c flashMode is not supported.
822 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
824 * - Normally the flash splashes before the camera captures a picture. @n
825 * @c CAMERA_FLASH_MODE_CONTINUOUS keeps the flash turned on after the method is called until @c CAMERA_FLASH_MODE_OFF is set.
826 * - This method returns @c E_UNSUPPORTED_OPERATION in the Emulator.
827 * - Before calling this method, check whether the feature is supported by MediaCapability::GetValueN(const Tizen::Base::String& key)
828 * with CAMERA_PRIMARY_FLASH_MODE or CAMERA_SECONDARY_FLASH_MODE keys.
829 * - In a zero-shutter-lag camera, the default preview format applies this feature correctly. The other preview formats are not guaranteed.
830 * - The zero-shutter-lag capability can be checked using MediaCapability::GetValue(const Tizen::Base::String& key, bool& value) with
831 * ::CAMERA_PRIMARY_SUPPORT_ZERO_SHUTTER_LAG, ::CAMERA_SECONDARY_SUPPORT_ZERO_SHUTTER_LAG keys.
832 * @see GetFlashMode()
834 result SetFlashMode(CameraFlashMode flashMode);
837 * Gets the flash mode of the camera.
841 * @return The flash mode of the camera
842 * @remarks If the %Camera doesn't support the flash mode, this method always returns @c CAMERA_FLASH_MODE_OFF.
843 * @see SetFlashMode()
845 CameraFlashMode GetFlashMode(void) const;
848 * Sets the exposure level of the camera.
852 * @privilege %http://tizen.org/privilege/camera
853 * @feature %http://tizen.org/feature/camera
855 * @return An error code
856 * @param[in] exposure The camera exposure level @n
857 * The range of this parameter is from @c 0 to @c 9.
858 * @exception E_SUCCESS The method is successful.
859 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
860 * @exception E_OUT_OF_RANGE The specified exposure level is out of range.
861 * @exception E_DEVICE_BUSY The camera is under use by other application.
862 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
863 * @exception E_DEVICE_FAILED The device operation has failed.
864 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @n
865 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
866 * @exception E_OUT_OF_MEMORY The memory is insufficient.
867 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
869 * - The default exposure level is @c 5.
870 * - The supported range for exposure level is from @c 0 to @c 9.
871 * - This method returns @c E_UNSUPPORTED_OPERATION in the Emulator.
872 * - This method works correctly when PowerOn() is executed. @n
873 * For more information on the relationship between this method and the PowerOn() method, and the
874 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm">here</a>.
875 * - Before calling this method, check whether the feature is supported by MediaCapability::GetValue(const Tizen::Base::String& key, bool& value)
876 * with CAMERA_PRIMARY_SUPPORT_EXPOSURE or CAMERA_SECONDARY_SUPPORT_EXPOSURE keys.
879 result SetExposure(int exposure);
882 * Gets the exposure level of the camera.
886 * @return An integer value representing the exposure level of the camera @n
887 * The returned value ranges from @c 0 to @c 9.
888 * @remarks The supported range for exposure level is from @c 0 to @c 9.
891 int GetExposure(void) const;
894 * Sets the white balance level of the camera.
898 * @privilege %http://tizen.org/privilege/camera
899 * @feature %http://tizen.org/feature/camera
901 * @return An error code
902 * @param[in] whiteBalance The camera white balance level
903 * @exception E_SUCCESS The method is successful.
904 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
905 * @exception E_INVALID_ARG The specified input parameter is invalid.
906 * @exception E_DEVICE_BUSY The camera is under use by other application.
907 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
908 * @exception E_DEVICE_FAILED The device operation has failed.
909 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @n
910 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
911 * @exception E_UNSUPPORTED_TYPE The specified @c whiteBalance is not supported.
912 * @exception E_OUT_OF_MEMORY The memory is insufficient.
913 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
915 * - The default white balance is @c CAMERA_WHITE_BALANCE_AUTO.
916 * - This method returns @c E_UNSUPPORTED_OPERATION in the Emulator.
917 * - This method works correctly when PowerOn() is executed. @n
918 * For more information on the relationship between this method and the PowerOn() method, and the
919 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm">here</a>.
920 * - Before calling this method, check whether the feature is supported by MediaCapability::GetValueN(const Tizen::Base::String& key)
921 * with CAMERA_PRIMARY_WHITE_BALANCE or CAMERA_SECONDARY_WHITE_BALANCE keys.
922 * @see GetWhiteBalance()
924 result SetWhiteBalance(CameraWhiteBalance whiteBalance);
927 * Gets the white balance level of the camera.
931 * @return The white balance level of the camera
932 * @see SetWhiteBalance()
934 CameraWhiteBalance GetWhiteBalance(void) const;
937 * Sets the capturing quality of the camera.
941 * @privilege %http://tizen.org/privilege/camera
942 * @feature %http://tizen.org/feature/camera
944 * @return An error code
945 * @param[in] quality The camera's quality level
946 * @exception E_SUCCESS The method is successful.
947 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
948 * @exception E_INVALID_ARG The specified @c quality is not supported.
949 * @exception E_DEVICE_BUSY The camera is under use by other application.
950 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
951 * @exception E_DEVICE_FAILED The device operation has failed.
952 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @n
953 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
954 * @exception E_OUT_OF_MEMORY The memory is insufficient.
955 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
957 * - The default quality is @c CAMERA_QUALITY_NORMAL.
958 * - This method works correctly when PowerOn() is executed. @n
959 * For more information on the relationship between this method and the PowerOn() method, and the
960 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm>here</a>.
963 result SetQuality(CameraQuality quality);
966 * Gets the capturing quality of the camera.
970 * @return The %Camera quality level
973 CameraQuality GetQuality(void) const;
976 * Sets the focus mode of the camera.
980 * @privilege %http://tizen.org/privilege/camera
981 * @feature %http://tizen.org/feature/camera
983 * @return An error code
984 * @param[in] focusMode focus mode
985 * @exception E_SUCCESS The method is successful.
986 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
987 * @exception E_DEVICE_BUSY The camera is under use by other application.
988 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
989 * @exception E_DEVICE_FAILED The device operation has failed.
990 * @exception E_INVALID_ARG The specified focus mode is invalid.
991 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @n
992 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
993 * @exception E_UNSUPPORTED_TYPE The specified @c focusMode is not supported.
994 * @exception E_OUT_OF_MEMORY The memory is insufficient.
995 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
997 * - @c CAMERA_FOCUS_MODE_NONE always throws @c E_INVALID_ARG.
998 * - Before calling this method, check whether the feature is supported by MediaCapability::GetValueN(const Tizen::Base::String& key)
999 * with CAMERA_PRIMARY_FOCUS_MODE or CAMERA_SECONDARY_FOCUS_MODE keys.
1001 * @see GetFocusMode()
1003 result SetFocusMode(CameraFocusMode focusMode);
1006 * Gets the focus mode of the camera.
1010 * @return The %Camera focus mode
1011 * @remarks If the %Camera does not support the focus mode, this method always returns @c CAMERA_FOCUS_MODE_NONE.
1012 * @see SetFocusMode()
1014 CameraFocusMode GetFocusMode(void) const;
1017 * Sets the auto focus point list.
1021 * @privilege %http://tizen.org/privilege/camera
1022 * @feature %http://tizen.org/feature/camera
1024 * @return An error code
1025 * @param[in] pointList The auto focus point list which consists of Tizen::Graphics::Point pointers
1026 * @exception E_SUCCESS The method is successful.
1027 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1028 * @exception E_DEVICE_BUSY The camera is under use by other application.
1029 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
1030 * @exception E_DEVICE_FAILED The device operation has failed.
1031 * @exception E_INVALID_ARG The specified input parameter is invalid.
1032 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @n
1033 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
1034 * @exception E_UNSUPPORTED_TYPE This method is not supported for the current focus mode.
1035 * @exception E_OUT_OF_MEMORY The memory is insufficient.
1036 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1038 * - This method works fine when the current focus mode is ::CAMERA_FOCUS_MODE_NORMAL or ::CAMERA_FOCUS_MODE_MACRO.
1039 * - If the input parameter has a empty list, the focus area is changed to the center.
1040 * @see GetAutoFocusPointN()
1042 result SetAutoFocusPoint(const Tizen::Base::Collection::IList& pointList);
1045 * Gets the auto focus point list. @n
1046 * Each item of the list has a pointer of the Tizen::Graphics::Point value.
1050 * @return The %Camera auto focus point list @n
1051 * A list of points that represent the auto focus point, @n
1052 * else @c null if no auto focus point is set or if an exception occurs.
1053 * @exception E_SUCCESS The method is successful.
1054 * @exception E_OUT_OF_MEMORY The memory is insufficient.
1056 * - The specific error code can be accessed using the GetLastResult() method.
1057 * - The return value and each item in the list must be deleted by the caller.
1058 * @see SetAutoFocusPoint()
1060 Tizen::Base::Collection::IList* GetAutoFocusPointN(void) const;
1063 * Sets the auto focus mode of the camera.
1067 * @privilege %http://tizen.org/privilege/camera
1068 * @feature %http://tizen.org/feature/camera
1070 * @return An error code
1071 * @param[in] callback Set to @c true to enable auto focus callback, @n
1073 * @exception E_SUCCESS The method is successful.
1074 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1075 * @exception E_DEVICE_BUSY The camera is under use by other application.
1076 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
1077 * @exception E_DEVICE_FAILED The device operation has failed.
1078 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @n
1079 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
1080 * @exception E_OUT_OF_MEMORY The memory is insufficient.
1081 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1083 * - If @c callback is set to @c false, the ICameraEventListener::OnCameraAutoFocused() method is not called.
1084 * - This method throws @c E_UNSUPPORTED_OPERATION in the emulator.
1085 * - For more information on the relationship between this method and the PowerOn() method, and the
1086 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm">here</a>.
1087 * - Before calling this method, check whether the feature is supported by MediaCapability::GetValue(const Tizen::Base::String& key, bool& value)
1088 * with CAMERA_PRIMARY_SUPPORT_FOCUS or CAMERA_SECONDARY_SUPPORT_FOCUS keys.
1090 result SetAutoFocus(bool callback);
1093 * Sets the capturing format of the camera. @n
1094 * Initially, the default format is set using the internal configuration.
1098 * @privilege %http://tizen.org/privilege/camera
1099 * @feature %http://tizen.org/feature/camera
1101 * @return An error code
1102 * @param[in] format The camera's capture format @n
1103 * It must be one of the pixel formats extracted using GetSupportedCaptureFormatListN().
1104 * @exception E_SUCCESS The method is successful.
1105 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1106 * @exception E_SYSTEM A system error has occurred.
1107 * @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
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 Emulator or target device does not support the required feature. @n
1112 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
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 This method works correctly when PowerOn() is executed.
1116 * @see GetCaptureFormat()
1118 result SetCaptureFormat(const Tizen::Graphics::PixelFormat format);
1121 * Gets the capturing format of the camera.
1125 * @return The capturing format of the camera
1126 * @see SetCaptureFormat()
1127 * @see GetSupportedCaptureFormatListN()
1129 Tizen::Graphics::PixelFormat GetCaptureFormat(void) const;
1132 * Gets the supported capturing format list for the %Camera class. @n
1133 * Each list item has a Tizen::Graphics::PixelFormat value.
1137 * @return A list of the formats supported by the %Camera class, @n
1138 * else @c null if no capture format is supported or an exception occurs
1139 * @exception E_SUCCESS The method is successful.
1140 * @exception E_SYSTEM A system error has occurred.
1141 * @exception E_OUT_OF_MEMORY The memory is insufficient.
1143 * - The specific error code can be accessed using the GetLastResult() method.
1144 * - The return value must be deleted.
1145 * @see SetCaptureFormat()
1146 * @see GetCaptureFormat()
1148 Tizen::Base::Collection::IListT <Tizen::Graphics::PixelFormat>* GetSupportedCaptureFormatListN(void) const;
1151 * Sets the preview format of the camera. @n
1152 * Initially, the default format is set using the internal configuration.
1156 * @privilege %http://tizen.org/privilege/camera
1157 * @feature %http://tizen.org/feature/camera
1159 * @return An error code
1160 * @param[in] format The camera's preview format @n
1161 * It must be one of the pixel formats extracted using GetSupportedPreviewFormatListN().
1162 * @exception E_SUCCESS The method is successful.
1163 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1164 * @exception E_SYSTEM A system error has occurred.
1165 * @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
1166 * @exception E_DEVICE_BUSY The camera is under use by other application.
1167 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
1168 * @exception E_DEVICE_FAILED The device operation has failed.
1169 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @n
1170 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
1171 * @exception E_OUT_OF_MEMORY The memory is insufficient.
1172 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1174 * - This method works in ::CAMERA_STATE_INITIALIZED state.
1175 * - For more information on the relationship between this method and the PowerOn() method, and the
1176 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm">here</a>.
1177 * @see GetPreviewFormat()
1178 * @see GetSupportedPreviewFormatListN()
1180 result SetPreviewFormat(const Tizen::Graphics::PixelFormat format);
1183 * Gets the preview format of the camera.
1187 * @return The preview format of the camera
1188 * @see SetPreviewFormat()
1189 * @see GetSupportedPreviewFormatListN()
1191 Tizen::Graphics::PixelFormat GetPreviewFormat(void) const;
1194 * Gets the supported preview format list for the %Camera class. @n
1195 * Each list item has a Tizen::Graphics::PixelFormat value.
1199 * @return A list of the preview format supported by the %Camera class, @n
1200 * else @c null if no preview format is supported or an exception occurs
1201 * @exception E_SUCCESS The method is successful.
1202 * @exception E_SYSTEM A system error has occurred.
1203 * @exception E_OUT_OF_MEMORY The memory is insufficient.
1205 * - The specific error code can be accessed using the GetLastResult() method.
1206 * - The return value must be deleted.
1207 * @see SetPreviewFormat()
1208 * @see GetPreviewFormat()
1210 Tizen::Base::Collection::IListT <Tizen::Graphics::PixelFormat>* GetSupportedPreviewFormatListN(void) const;
1214 * Sets the ISO level of the camera.
1218 * @privilege %http://tizen.org/privilege/camera
1219 * @feature %http://tizen.org/feature/camera
1221 * @return An error code
1222 * @param[in] isoLevel The camera's ISO level @n
1223 * The default ISO level is set from the internal configuration.
1224 * @exception E_SUCCESS The method is successful.
1225 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1226 * @exception E_OUT_OF_RANGE The specified ISO level is out of range.
1227 * @exception E_DEVICE_BUSY The camera is under use by other application.
1228 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
1229 * @exception E_DEVICE_FAILED The device operation has failed.
1230 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @n
1231 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
1232 * @exception E_UNSUPPORTED_TYPE The specified @c isoLevel is not supported.
1233 * @exception E_OUT_OF_MEMORY The memory is insufficient.
1234 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1236 * - In some devices this method works in the ::CAMERA_STATE_PREVIEW state.
1237 * - This method throws @c E_UNSUPPORTED_OPERATION in the Emulator.
1238 * - For more information on the relationship between this method and the PowerOn() method, and the
1239 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm">here</a>.
1240 * - Before calling this method, check whether the feature is supported by MediaCapability::GetValueN(const Tizen::Base::String& key)
1241 * with CAMERA_PRIMARY_ISO_LEVEL or CAMERA_SECONDARY_ISO_LEVEL keys.
1242 * @see GetIsoLevel()
1244 result SetIsoLevel(CameraIsoLevel isoLevel);
1247 * Gets the ISO level of the camera.
1251 * @return The ISO level of the camera
1252 * @see SetIsoLevel()
1254 CameraIsoLevel GetIsoLevel(void) const;
1257 * Sets the preview frame rate of the camera. @n
1258 * Initially, the default frame rate is set using the internal configuration.
1262 * @privilege %http://tizen.org/privilege/camera
1263 * @feature %http://tizen.org/feature/camera
1265 * @return An error code
1266 * @param[in] fps The frame rate per second @n
1267 * It must be one of the fps extracted using GetSupportedPreviewFrameRateListN().
1268 * @exception E_SUCCESS The method is successful.
1269 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1270 * @exception E_OUT_OF_RANGE The specified @c fps is out of range on this device.
1271 * @exception E_DEVICE_BUSY The camera is under use by other application.
1272 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
1273 * @exception E_DEVICE_FAILED The device operation has failed.
1274 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @n
1275 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
1276 * @exception E_OUT_OF_MEMORY The memory is insufficient.
1277 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1279 * - This method works in ::CAMERA_STATE_INITIALIZED state.
1280 * - For more information on the relationship between this method and the PowerOn() method, and the
1281 * state transition caused by this method, see <a href="../org.tizen.native.appprogramming/html/guide/media/launching_camera.htm">here</a>.
1282 * @see GetPreviewFrameRate()
1284 result SetPreviewFrameRate(int fps);
1287 * Gets the frame rate of the camera.
1291 * @return The frame rate of the camera @n
1292 * If the frame rate is not set using SetPreviewFrameRate(), the system-dependent default frame rate is returned.
1293 * @see GetSupportedPreviewFrameRateListN()
1295 int GetPreviewFrameRate(void) const;
1298 * Gets the supported preview frame rate list for the %Camera class. @n
1299 * Each list item has an integer value.
1303 * @return A list of the preview frame rate supported by the %Camera class, @n
1304 * else @c null if no frame rate is supported or an exception occurs
1305 * @exception E_SUCCESS The method is successful.
1306 * @exception E_SYSTEM A system error has occurred.
1307 * @exception E_OUT_OF_MEMORY The memory is insufficient.
1309 * - The specific error code can be accessed using the GetLastResult() method.
1310 * - The return value must be deleted by the caller.
1311 * - This method returns fps list that can be supported by all resolutions.
1312 * @see SetPreviewFrameRate()
1313 * @see GetPreviewFrameRate()
1314 * @see FRAME_RATE_AUTO
1315 * @see GetSupportedPreviewFrameRateListN(const Tizen::Graphics::Dimension& dim) const
1317 Tizen::Base::Collection::IListT <int>* GetSupportedPreviewFrameRateListN(void) const;
1320 * Gets the supported preview frame rate list of the input resolution of the %Camera class. @n
1321 * Each item of the list has an integer value.
1325 * @return A list of the preview frame rate of the input preview resolution, @n
1326 * else @c null if no frame rate is supported or if an exception occurs
1327 * @param[in] dim The preview resolution of the camera
1328 * @exception E_SUCCESS The method is successful.
1329 * @exception E_INVALID_ARG The specified input resolution is invalid.
1330 * @exception E_SYSTEM A system error has occurred.
1331 * @exception E_OUT_OF_MEMORY The memory is insufficient.
1333 * - The specific error code can be accessed using the GetLastResult() method.
1334 * - The return value must be deleted by the caller.
1335 * @see SetPreviewFrameRate()
1336 * @see GetPreviewFrameRate()
1337 * @see GetSupportedPreviewFrameRateListN(void) const
1339 Tizen::Base::Collection::IListT <int>* GetSupportedPreviewFrameRateListN(const Tizen::Graphics::Dimension& dim) const;
1342 * Sets the orientation value in the Exchangeable Image File Format (EXIF) field of the captured data.
1346 * @privilege %http://tizen.org/privilege/camera
1347 * @feature %http://tizen.org/feature/camera
1349 * @return An error code
1350 * @param[in] orientation The orientation value to set in EXIF
1351 * @exception E_SUCCESS The method is successful.
1352 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1353 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1354 * @exception E_OUT_OF_RANGE The input value is out of range.
1355 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @n
1356 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
1357 * @exception E_SYSTEM A system error has occurred.
1359 * - The default value of orientation is @c CAMERA_EXIF_ORIENTATION_TOP_LEFT.
1360 * - This method works correctly when PowerOn() is executed. The orientation value set by this method can be obtained using the
1361 * Tizen::Content::ImageData::GetOrientation() method after writing the captured data to a file.
1363 result SetExifOrientation(CameraExifOrientation orientation);
1366 * Sets the GPS coordinates in the Exchangeable %Image File Format (EXIF) field for the captured data.
1370 * @privilege %http://tizen.org/privilege/camera
1371 * @feature %http://tizen.org/feature/camera
1373 * @return An error code
1374 * @param[in] latitude The latitude value to set in EXIF @n
1375 * The valid range is [-90.0, 90.0].
1376 * @param[in] longitude The longitude value to set in EXIF @n
1377 * The valid range is [-180.0, 180.0]
1378 * @param[in] altitude The altitude value to set in EXIF
1379 * @exception E_SUCCESS The method is successful.
1380 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1381 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1382 * @exception E_OUT_OF_RANGE The input value is out of range.
1383 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @n
1384 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
1385 * @exception E_SYSTEM A system error has occurred.
1387 * -This method sets the GPS coordinates and enables entering the coordinates into the Exchangeable Image File Format (EXIF).
1388 * -By default, the GPS coordinates are not entered in JPEG's EXIF.
1389 * -The GPS coordinates that are set using this method are entered in every call to the
1390 * Capture() method, until DisableExifGpsCoordinates() is called or this instance is destroyed.
1391 * - This method works correctly when PowerOn() is executed.
1392 * - 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.
1394 result SetExifGpsCoordinates(double latitude, double longitude, float altitude);
1397 * Disables the insertion of the GPS coordinates in the Exchangeable %Image File Format (EXIF) field for the captured data.
1401 * @privilege %http://tizen.org/privilege/camera
1402 * @feature %http://tizen.org/feature/camera
1404 * @return An error code
1405 * @exception E_SUCCESS The method is successful.
1406 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1407 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1408 * @exception E_OUT_OF_RANGE The input value is out of range.
1409 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @n
1410 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
1411 * @exception E_SYSTEM A system error has occurred.
1412 * @see SetExifGpsCoordinates()
1414 result DisableExifGpsCoordinates(void);
1417 * Sets the flip type for the previewed and captured data.
1421 * @privilege %http://tizen.org/privilege/camera
1422 * @feature %http://tizen.org/feature/camera
1424 * @return An error code
1425 * @param[in] flip The camera flip type
1426 * @exception E_SUCCESS The method is successful.
1427 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1428 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1429 * @exception E_INVALID_ARG The input value is out of range.
1430 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @n
1431 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
1432 * @exception E_UNSUPPORTED_TYPE The specified @c flip is not supported.
1433 * @exception E_SYSTEM A system error has occurred.
1435 * -This method works in the ::CAMERA_STATE_INITIALIZED state.
1436 * -Finally the last specified type is applied even with the several types applicable.
1437 * - Before calling this method, check whether the feature is supported by MediaCapability::GetValueN(const Tizen::Base::String& key)
1438 * with CAMERA_PRIMARY_FLIP or CAMERA_SECONDARY_FLIP keys.
1439 * -In a zero-shutter-lag camera, the default preview format is not guaranteed to apply this feature correctly.
1440 * -The zero-shutter-lag capability can be checked using MediaCapability::GetValue(const Tizen::Base::String& key, bool& value) with
1441 * ::CAMERA_PRIMARY_SUPPORT_ZERO_SHUTTER_LAG, ::CAMERA_SECONDARY_SUPPORT_ZERO_SHUTTER_LAG keys.
1444 result SetFlip(CameraFlipType flip);
1447 * Gets the flip type for the previewed and captured data.
1451 * @return The camera flip type
1454 CameraFlipType GetFlip(void) const;
1457 * Sets the rotation for the previewed data.
1461 * @privilege %http://tizen.org/privilege/camera
1462 * @feature %http://tizen.org/feature/camera
1464 * @return An error code
1465 * @param[in] rotation The camera rotation
1466 * @exception E_SUCCESS The method is successful.
1467 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1468 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1469 * @exception E_INVALID_ARG The input value is out of range.
1470 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @n
1471 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
1472 * @exception E_UNSUPPORTED_TYPE The specified @c rotation is not supported.
1473 * @exception E_SYSTEM A system error has occurred.
1475 * - This method works in the ::CAMERA_STATE_INITIALIZED state.
1476 * - The last specified type is applied even with the several types applicable.
1477 * - This method rotates the preview and recording data but not the captured image. @n
1478 * The captured image's orientation is always following the physical rotation.
1479 * - When the preview is rotated, the preview callback data's width and height can be changed. @n
1480 * Thus the application must recognize these changes when it uses the preview data in ICameraEventListener::OnCameraPreviewed() callback.
1481 * - For the intended view of preview, Tizen::Ui::Controls::OverlayRegion::OVERLAY_REGION_TYPE_NORMAL must be selected when Tizen::Ui::Controls::OverlayRegion is created.
1482 * - Before calling this method, check whether the feature is supported by MediaCapability::GetValueN(const Tizen::Base::String& key)
1483 * with CAMERA_PRIMARY_PREVIEW_ROTATION or CAMERA_SECONDARY_PREVIEW_ROTATION keys.
1484 * - In a zero-shutter-lag camera, the default preview format is not guaranteed to apply this feature correctly.
1485 * - The zero-shutter-lag capability can be checked using MediaCapability::GetValue(const Tizen::Base::String& key, bool& value) with
1486 * ::CAMERA_PRIMARY_SUPPORT_ZERO_SHUTTER_LAG, ::CAMERA_SECONDARY_SUPPORT_ZERO_SHUTTER_LAG keys.
1487 * @see GetPreviewRotation()
1490 result SetPreviewRotation(CameraRotation rotation);
1494 * Gets the rotation for the previewed data.
1498 * @return The camera rotation
1499 * @see SetPreviewRotation()
1502 CameraRotation GetPreviewRotation(void) const;
1505 * Sets the metering mode of the camera.
1509 * @privilege %http://tizen.org/privilege/camera
1510 * @feature %http://tizen.org/feature/camera
1512 * @return An error code
1513 * @param[in] meteringMode The metering mode
1514 * @exception E_SUCCESS The method is successful.
1515 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1516 * @exception E_DEVICE_BUSY The camera is under use by other application.
1517 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
1518 * @exception E_DEVICE_FAILED The device operation has failed.
1519 * @exception E_INVALID_ARG The specified metering mode is invalid.
1520 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @n
1521 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
1522 * @exception E_UNSUPPORTED_TYPE The specified @c meteringMode is not supported.
1523 * @exception E_OUT_OF_MEMORY The memory is insufficient.
1524 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1526 * - @c CAMERA_METERING_MODE_NONE always throws @c E_INVALID_ARG.
1527 * - Before calling this method, check whether the feature is supported by MediaCapability::GetValueN(const Tizen::Base::String& key)
1528 * with CAMERA_PRIMARY_METERING_MODE or CAMERA_SECONDARY_METERING_MODE keys.
1529 * @see GetMeteringMode()
1531 result SetMeteringMode(CameraMeteringMode meteringMode);
1534 * Gets the metering mode of the camera.
1538 * @return The %Camera metering mode
1540 * If the %Camera does not support the metering mode, this method always returns @c CAMERA_METERING_MODE_NONE.
1541 * @see SetMeteringMode()
1543 CameraMeteringMode GetMeteringMode(void) const;
1546 * Sets the scene mode of the camera.
1550 * @privilege %http://tizen.org/privilege/camera
1551 * @feature %http://tizen.org/feature/camera
1553 * @return An error code
1554 * @param[in] sceneMode The scene mode
1555 * @exception E_SUCCESS The method is successful.
1556 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
1557 * @exception E_DEVICE_BUSY The camera is under use by another application.
1558 * @exception E_DEVICE_UNAVAILABLE The camera becomes unavailable.
1559 * @exception E_DEVICE_FAILED The device operation has failed.
1560 * @exception E_INVALID_ARG The specified @c sceneMode is invalid.
1561 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @n
1562 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
1563 * @exception E_UNSUPPORTED_TYPE The specified @c sceneMode is not supported.
1564 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1566 * - 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.
1567 * - In a specific scene mode, if an application sets any attribute that is related to the scene, the mode can be changed to @c CAMERA_SCENE_OFF. @n
1568 * Thus, it is recommended that the application check the current scene mode after setting the attributes. @n
1569 * In case that the scene mode is changed to @c CAMERA_SCENE_OFF, all the attributes set by the application are reloaded.
1570 * - Before calling this method, check whether the feature is supported by MediaCapability::GetValueN(const Tizen::Base::String& key)
1571 * with CAMERA_PRIMARY_SCENE_MODE or CAMERA_SECONDARY_SCENE_MODE keys.
1573 result SetSceneMode(CameraSceneMode sceneMode);
1577 * Gets the scene mode of the camera.
1581 * @return The %Camera scene mode
1583 CameraSceneMode GetSceneMode(void) const;
1586 * Adds the stream filter to process the video stream data while previewing or recording.
1590 * @privilege %http://tizen.org/privilege/camera
1591 * @feature %http://tizen.org/feature/camera
1593 * @return An error code
1594 * @param[in] filter An instance of IVideoStreamFilter
1595 * @exception E_SUCCESS The method is successful.
1596 * @exception E_OBJ_ALREADY_EXIST The filter already exists.
1597 * @exception E_OUT_OF_MEMORY The memory is insufficient.
1598 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1599 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @n
1600 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
1601 * @remarks IVideoStreamFilter::ProcessVideoStream() will be called when the video frame is ready.
1603 result AddVideoStreamFilter(Tizen::Media::IVideoStreamFilter& filter);
1606 * Removes the stream filter to stop receiving the video stream data.
1610 * @privilege %http://tizen.org/privilege/camera
1611 * @feature %http://tizen.org/feature/camera
1613 * @return An error code
1614 * @param[in] filter An instance of IVideoStreamFilter
1615 * @exception E_SUCCESS The method is successful.
1616 * @exception E_OBJ_NOT_FOUND The filter is not found.
1617 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
1618 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @n
1619 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
1621 result RemoveVideoStreamFilter(Tizen::Media::IVideoStreamFilter& filter);
1624 * This value can be used to set the preview frame rate by using the SetPreviewFrameRate() method. @n
1625 * If the preview frame rate is set using this value, the frame rate during the preview is automatically adjusted as per the light condition.
1629 static const int FRAME_RATE_AUTO = 0xFFFFFFFF;
1633 * This is the copy constructor for this class.
1637 * @remarks The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
1640 Camera(const Camera& rhs);
1643 * This is the copy assignment operator for this class.
1647 * @remarks The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
1650 Camera& operator =(const Camera& rhs);
1652 friend class _CameraImpl;
1653 _CameraImpl* __pImpl;