e37f818d47eaf6cec22506f2858fa01284a68f8e
[platform/core/api/camera.git] / include / camera.h
1 /*
2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 #ifndef __TIZEN_MULTIMEDIA_CAMERA_H__
18 #define __TIZEN_MULTIMEDIA_CAMERA_H__
19
20 #include <tizen.h>
21 #include <media_packet.h>
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27 /**
28  * @file camera.h
29  * @brief This file contains the Camera API, related structures and enumerations.
30  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
31  */
32
33 /**
34  * @addtogroup CAPI_MEDIA_CAMERA_MODULE
35  * @{
36  */
37
38 #define CAMERA_ERROR_CLASS          TIZEN_ERROR_CAMERA | 0x00
39
40 /**
41  * @brief Enumeration for the error codes of Camera.
42  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
43  */
44 typedef enum
45 {
46     CAMERA_ERROR_NONE                   = TIZEN_ERROR_NONE,                     /**< Successful */
47     CAMERA_ERROR_INVALID_PARAMETER      = TIZEN_ERROR_INVALID_PARAMETER,        /**< Invalid parameter */
48     CAMERA_ERROR_INVALID_STATE          = CAMERA_ERROR_CLASS | 0x02,            /**< Invalid state */
49     CAMERA_ERROR_OUT_OF_MEMORY          = TIZEN_ERROR_OUT_OF_MEMORY,            /**< Out of memory */
50     CAMERA_ERROR_DEVICE                 = CAMERA_ERROR_CLASS | 0x04,            /**< Device error */
51     CAMERA_ERROR_INVALID_OPERATION      = TIZEN_ERROR_INVALID_OPERATION,        /**< Internal error */
52     CAMERA_ERROR_SOUND_POLICY           = CAMERA_ERROR_CLASS | 0x06,            /**< Blocked by Audio Session Manager */
53     CAMERA_ERROR_SECURITY_RESTRICTED    = CAMERA_ERROR_CLASS | 0x07,            /**< Restricted by security system policy */
54     CAMERA_ERROR_DEVICE_BUSY            = CAMERA_ERROR_CLASS | 0x08,            /**< The device is using another application or working on some operation */
55     CAMERA_ERROR_DEVICE_NOT_FOUND       = CAMERA_ERROR_CLASS | 0x09,            /**< No camera device */
56     CAMERA_ERROR_SOUND_POLICY_BY_CALL   = CAMERA_ERROR_CLASS | 0x0a,            /**< Blocked by Audio Session Manager - CALL */
57     CAMERA_ERROR_SOUND_POLICY_BY_ALARM  = CAMERA_ERROR_CLASS | 0x0b,            /**< Blocked by Audio Session Manager - ALARM */
58     CAMERA_ERROR_ESD                    = CAMERA_ERROR_CLASS | 0x0c,            /**< ESD situation */
59     CAMERA_ERROR_PERMISSION_DENIED      = TIZEN_ERROR_PERMISSION_DENIED,        /**< The access to the resources can not be granted*/
60     CAMERA_ERROR_NOT_SUPPORTED          = TIZEN_ERROR_NOT_SUPPORTED,            /**< The feature is not supported */
61 } camera_error_e;
62
63 /**
64  * @brief Enumeration for the camera state.
65  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
66  */
67 typedef enum
68 {
69     CAMERA_STATE_NONE,       /**< Before creating */
70     CAMERA_STATE_CREATED,    /**< Created, but not initialized yet */
71     CAMERA_STATE_PREVIEW,    /**< Preview */
72     CAMERA_STATE_CAPTURING,  /**< While capturing */
73     CAMERA_STATE_CAPTURED    /**< After capturing */
74 } camera_state_e;
75
76 /**
77  * @brief Enumeration for the camera device.
78  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
79  */
80 typedef enum
81 {
82     CAMERA_DEVICE_CAMERA0 = 0, /**< Primary camera */
83     CAMERA_DEVICE_CAMERA1      /**< Secondary camera */
84 } camera_device_e;
85
86 /**
87  * @brief Enumeration for the camera pixel format.
88  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
89  */
90 typedef enum
91 {
92         CAMERA_PIXEL_FORMAT_INVALID = -1,   /**< Invalid pixel format */
93         CAMERA_PIXEL_FORMAT_NV12,           /**< NV12 pixel format */
94         CAMERA_PIXEL_FORMAT_NV12T,          /**< NV12 Tiled pixel format */
95         CAMERA_PIXEL_FORMAT_NV16,           /**< NV16 pixel format */
96         CAMERA_PIXEL_FORMAT_NV21,           /**< NV21 pixel format */
97         CAMERA_PIXEL_FORMAT_YUYV,           /**< YUYV(YUY2) pixel format */
98         CAMERA_PIXEL_FORMAT_UYVY,           /**< UYVY pixel format */
99         CAMERA_PIXEL_FORMAT_422P,           /**< YUV422(Y:U:V) planar pixel format */
100         CAMERA_PIXEL_FORMAT_I420,           /**< I420 pixel format */
101         CAMERA_PIXEL_FORMAT_YV12,           /**< YV12 pixel format */
102         CAMERA_PIXEL_FORMAT_RGB565,         /**< RGB565 pixel format */
103         CAMERA_PIXEL_FORMAT_RGB888,         /**< RGB888 pixel format */
104         CAMERA_PIXEL_FORMAT_RGBA,           /**< RGBA pixel format */
105         CAMERA_PIXEL_FORMAT_ARGB,           /**< ARGB pixel format */
106         CAMERA_PIXEL_FORMAT_JPEG,           /**< Encoded pixel format */
107 } camera_pixel_format_e;
108
109 /**
110  * @brief Enumeration for the camera display type.
111  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
112  */
113 typedef enum
114 {
115         CAMERA_DISPLAY_TYPE_OVERLAY = 0,        /**< Overlay surface display */
116         CAMERA_DISPLAY_TYPE_EVAS,               /**< Evas object surface display */
117         CAMERA_DISPLAY_TYPE_NONE                /**< This disposes off buffers */
118 } camera_display_type_e;
119
120 /**
121  * @brief Enumeration for the camera policy.
122  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
123  */
124 typedef enum
125 {
126         CAMERA_POLICY_NONE = 0,         /**< None */
127         CAMERA_POLICY_SOUND,            /**< Sound policy */
128         CAMERA_POLICY_SOUND_BY_CALL,    /**< Sound policy by CALL */
129         CAMERA_POLICY_SOUND_BY_ALARM,   /**< Sound policy by ALARM */
130         CAMERA_POLICY_SECURITY          /**< Security policy */
131 } camera_policy_e;
132
133 /**
134  * @brief Enumeration for the camera rotation type.
135  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
136  */
137 typedef enum
138 {
139         CAMERA_ROTATION_NONE,   /**< No rotation */
140         CAMERA_ROTATION_90,             /**< 90 degree rotation */
141         CAMERA_ROTATION_180,    /**< 180 degree rotation */
142         CAMERA_ROTATION_270,    /**< 270 degree rotation */
143 } camera_rotation_e;
144
145
146 /**
147  * @brief Enumeration for the camera flip type.
148  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
149  */
150 typedef enum
151 {
152         CAMERA_FLIP_NONE,       /**< No Flip */
153         CAMERA_FLIP_HORIZONTAL, /**< Horizontal flip */
154         CAMERA_FLIP_VERTICAL,   /**< Vertical flip */
155         CAMERA_FLIP_BOTH        /** Horizontal and vertical flip */
156 } camera_flip_e;
157
158 /**
159  * @brief Enumeration for the camera focus state.
160  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
161  */
162 typedef enum
163 {
164     CAMERA_FOCUS_STATE_RELEASED = 0, /**< Focus released */
165     CAMERA_FOCUS_STATE_ONGOING,      /**< Focus in progress */
166     CAMERA_FOCUS_STATE_FOCUSED,      /**< Focus succeeded */
167     CAMERA_FOCUS_STATE_FAILED,       /**< Focus failed */
168 } camera_focus_state_e;
169
170 /**
171  * @brief The structure type of the image data.
172  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
173  */
174  typedef struct
175 {
176         unsigned char *data;            /**< The image buffer */
177         unsigned int size;              /**< The size of the buffer */
178         int width;                      /**< The width of the image */
179         int height;                     /**< The height of the image */
180         camera_pixel_format_e format;   /**< The format of the image pixel */
181         unsigned char *exif;            /**< The exif raw data */
182         unsigned int exif_size;         /**< The size of the exif data */
183 } camera_image_data_s;
184
185 /**
186  * @brief The structure type for face detection.
187  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
188  */
189 typedef struct
190 {
191         int id;         /**< The ID of each face */
192         int score;      /**< The confidence level for the detection of the face */
193         int x;          /**< The x coordinates of the face */
194         int y;          /**< The y coordinates of the face */
195         int width;      /**< The width of the face */
196         int height;     /**< The height of the face */
197 } camera_detected_face_s;
198
199 /**
200  * @brief The structure type to preview stream data.
201  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
202  */
203 typedef struct
204 {
205         camera_pixel_format_e format;   /**< The format of the frame pixel */
206         int width;                      /**< The width of the frame */
207         int height;                     /**< The height of the frame */
208         int num_of_planes;              /**< The number of planes */
209         unsigned int timestamp;         /**< The timestamp of the frame */
210         union {
211                 struct {
212                         unsigned char *yuv;     /**< The yuv data pointer */
213                         unsigned int size;      /**< The size of data */
214                 } single_plane;                 /**< single plane frame data */
215
216                 struct {
217                         unsigned char *y;       /**< The y data pointer */
218                         unsigned char *uv;      /**< The uv data pointer */
219                         unsigned int y_size;    /**< The size of y data */
220                         unsigned int uv_size;   /**< The size of uv data */
221                 } double_plane;                 /**< double plane frame data */
222
223                 struct {
224                         unsigned char *y;       /**< The y data pointer */
225                         unsigned char *u;       /**< The u data pointer */
226                         unsigned char *v;       /**< The v data pointer */
227                         unsigned int y_size;    /**< The size of y data */
228                         unsigned int u_size;    /**< The size of u data */
229                         unsigned int v_size;    /**< The size of v data */
230                 } triple_plane;                 /**< triple plane frame data */
231         } data;
232 } camera_preview_data_s;
233
234 /**
235  * @brief The Camera handle.
236  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
237  * @see recorder_create_videorecorder()
238  */
239 typedef struct camera_s *camera_h;
240
241 /**
242  * @brief The Camera display handle.
243  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
244  */
245 typedef void *camera_display_h;
246
247 #ifndef GET_DISPLAY
248
249 /**
250  * @brief Gets a display handle.
251  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
252  */
253 #define GET_DISPLAY(x) (void*)(x)
254
255 #endif
256
257 /**
258  * @}
259  */
260
261 /**
262  * @addtogroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE
263  * @{
264  */
265
266 /**
267  * @brief Enumeration for the camera display mode.
268  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
269  */
270 typedef enum
271 {
272         CAMERA_DISPLAY_MODE_LETTER_BOX = 0,    /**< Letter box */
273         CAMERA_DISPLAY_MODE_ORIGIN_SIZE,       /**< Origin size */
274         CAMERA_DISPLAY_MODE_FULL,              /**< Full screen */
275         CAMERA_DISPLAY_MODE_CROPPED_FULL,      /**< Cropped full screen */
276 } camera_display_mode_e;
277
278 /**
279  * @}
280  */
281
282 /**
283  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
284  * @{
285  */
286
287 /**
288  * @brief Enumeration for the color tone, which provides the impression of looking through a tinted glass.
289  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
290  */
291 typedef enum
292 {
293     CAMERA_ATTR_EFFECT_NONE = 0,              /**< None */
294     CAMERA_ATTR_EFFECT_MONO,                  /**< Mono */
295     CAMERA_ATTR_EFFECT_SEPIA,                 /**< Sepia */
296     CAMERA_ATTR_EFFECT_NEGATIVE,              /**< Negative */
297     CAMERA_ATTR_EFFECT_BLUE,                  /**< Blue */
298     CAMERA_ATTR_EFFECT_GREEN,                 /**< Green */
299     CAMERA_ATTR_EFFECT_AQUA,                  /**< Aqua */
300     CAMERA_ATTR_EFFECT_VIOLET,                /**< Violet */
301     CAMERA_ATTR_EFFECT_ORANGE,                /**< Orange */
302     CAMERA_ATTR_EFFECT_GRAY,                  /**< Gray */
303     CAMERA_ATTR_EFFECT_RED,                   /**< Red */
304     CAMERA_ATTR_EFFECT_ANTIQUE,               /**< Antique */
305     CAMERA_ATTR_EFFECT_WARM,                  /**< Warm */
306     CAMERA_ATTR_EFFECT_PINK,                  /**< Pink */
307     CAMERA_ATTR_EFFECT_YELLOW,                /**< Yellow */
308     CAMERA_ATTR_EFFECT_PURPLE,                /**< Purple */
309     CAMERA_ATTR_EFFECT_EMBOSS,                /**< Emboss */
310     CAMERA_ATTR_EFFECT_OUTLINE,               /**< Outline */
311     CAMERA_ATTR_EFFECT_SOLARIZATION,          /**< Solarization */
312     CAMERA_ATTR_EFFECT_SKETCH,                /**< Sketch */
313     CAMERA_ATTR_EFFECT_WASHED,                /**< Washed */
314     CAMERA_ATTR_EFFECT_VINTAGE_WARM,          /**< Vintage warm  */
315     CAMERA_ATTR_EFFECT_VINTAGE_COLD,          /**< Vintage cold */
316     CAMERA_ATTR_EFFECT_POSTERIZATION,         /**< Posterization */
317     CAMERA_ATTR_EFFECT_CARTOON,               /**< Cartoon */
318     CAMERA_ATTR_EFFECT_SELECTIVE_RED,         /**< Selective color - Red */
319     CAMERA_ATTR_EFFECT_SELECTIVE_GREEN,       /**< Selective color - Green */
320     CAMERA_ATTR_EFFECT_SELECTIVE_BLUE,        /**< Selective color - Blue */
321     CAMERA_ATTR_EFFECT_SELECTIVE_YELLOW,      /**< Selective color - Yellow */
322     CAMERA_ATTR_EFFECT_SELECTIVE_RED_YELLOW,  /**< Selective color - Red and Yellow */
323     CAMERA_ATTR_EFFECT_OTHER_GRAPHICS,        /**< Other Graphic effects */
324 } camera_attr_effect_mode_e;
325
326 /**
327  * @brief Enumeration for the white balance levels of the camera.
328  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
329  */
330 typedef enum
331 {
332     CAMERA_ATTR_WHITE_BALANCE_NONE = 0,     /**< None */
333     CAMERA_ATTR_WHITE_BALANCE_AUTOMATIC,    /**< Automatic */
334     CAMERA_ATTR_WHITE_BALANCE_DAYLIGHT,     /**< Daylight */
335     CAMERA_ATTR_WHITE_BALANCE_CLOUDY,       /**< Cloudy */
336     CAMERA_ATTR_WHITE_BALANCE_FLUORESCENT,  /**< Fluorescent */
337     CAMERA_ATTR_WHITE_BALANCE_INCANDESCENT, /**< Incandescent */
338     CAMERA_ATTR_WHITE_BALANCE_SHADE,        /**< Shade */
339     CAMERA_ATTR_WHITE_BALANCE_HORIZON,      /**< Horizon */
340     CAMERA_ATTR_WHITE_BALANCE_FLASH,        /**< Flash */
341     CAMERA_ATTR_WHITE_BALANCE_CUSTOM,       /**< Custom */
342 } camera_attr_whitebalance_e;
343
344 /**
345  * @brief Enumeration for the scene mode.
346  * @details The mode of operation can be in daylight, night, or back-light.
347  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
348  */
349 typedef enum
350 {
351     CAMERA_ATTR_SCENE_MODE_NORMAL = 0,     /**< Normal */
352     CAMERA_ATTR_SCENE_MODE_PORTRAIT,       /**< Portrait */
353     CAMERA_ATTR_SCENE_MODE_LANDSCAPE,      /**< Landscape */
354     CAMERA_ATTR_SCENE_MODE_SPORTS,         /**< Sports */
355     CAMERA_ATTR_SCENE_MODE_PARTY_N_INDOOR, /**< Party & indoor */
356     CAMERA_ATTR_SCENE_MODE_BEACH_N_INDOOR, /**< Beach & indoor */
357     CAMERA_ATTR_SCENE_MODE_SUNSET,         /**< Sunset */
358     CAMERA_ATTR_SCENE_MODE_DUSK_N_DAWN,    /**< Dusk & dawn */
359     CAMERA_ATTR_SCENE_MODE_FALL_COLOR,     /**< Fall */
360     CAMERA_ATTR_SCENE_MODE_NIGHT_SCENE,    /**< Night scene */
361     CAMERA_ATTR_SCENE_MODE_FIREWORK,       /**< Firework */
362     CAMERA_ATTR_SCENE_MODE_TEXT,           /**< Text */
363     CAMERA_ATTR_SCENE_MODE_SHOW_WINDOW,    /**< Show window */
364     CAMERA_ATTR_SCENE_MODE_CANDLE_LIGHT,   /**< Candle light */
365     CAMERA_ATTR_SCENE_MODE_BACKLIGHT,      /**< Backlight */
366     CAMERA_ATTR_SCENE_MODE_AQUA,           /**< Aqua */
367 } camera_attr_scene_mode_e;
368
369 /**
370  * @brief Enumeration for the auto focus mode.
371  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
372  */
373 typedef enum
374 {
375     CAMERA_ATTR_AF_NONE = 0,    /**< auto-focus is not set */
376     CAMERA_ATTR_AF_NORMAL,      /**< auto-focus in the normal mode  */
377     CAMERA_ATTR_AF_MACRO,       /**< auto-focus in the macro mode(close distance)  */
378     CAMERA_ATTR_AF_FULL,        /**< auto-focus in the full mode(all range scan, limited by device spec) */
379 } camera_attr_af_mode_e;
380
381 /**
382  * @brief Enumeration for the ISO levels of the camera.
383  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
384  */
385 typedef enum
386 {
387     CAMERA_ATTR_ISO_AUTO = 0, /**< ISO auto mode */
388     CAMERA_ATTR_ISO_50,       /**< ISO 50 */
389     CAMERA_ATTR_ISO_100,      /**< ISO 100 */
390     CAMERA_ATTR_ISO_200,      /**< ISO 200 */
391     CAMERA_ATTR_ISO_400,      /**< ISO 400 */
392     CAMERA_ATTR_ISO_800,      /**< ISO 800 */
393     CAMERA_ATTR_ISO_1600,     /**< ISO 1600 */
394     CAMERA_ATTR_ISO_3200,     /**< ISO 3200 */
395 } camera_attr_iso_e;
396
397 /**
398  * @brief Enumeration for the camera exposure modes.
399  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
400  */
401 typedef enum
402 {
403     CAMERA_ATTR_EXPOSURE_MODE_OFF = 0,   /**< Off */
404     CAMERA_ATTR_EXPOSURE_MODE_ALL,       /**< All mode */
405     CAMERA_ATTR_EXPOSURE_MODE_CENTER,    /**< Center mode */
406     CAMERA_ATTR_EXPOSURE_MODE_SPOT,      /**< Spot mode */
407     CAMERA_ATTR_EXPOSURE_MODE_CUSTOM,    /**< Custom mode */
408 } camera_attr_exposure_mode_e;
409
410 /**
411  * @brief Enumeration for the orientation values of tag.
412  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
413  */
414 typedef enum
415 {
416     CAMERA_ATTR_TAG_ORIENTATION_TOP_LEFT = 1,      /**< Row #0 is at the top, Column #0 is to the left */
417     CAMERA_ATTR_TAG_ORIENTATION_TOP_RIGHT = 2,     /**< Row #0 is at the top, Column #0 is to the right (flipped) */
418     CAMERA_ATTR_TAG_ORIENTATION_BOTTOM_RIGHT = 3,  /**< Row #0 is at the bottom, Column #0 is to the right */
419     CAMERA_ATTR_TAG_ORIENTATION_BOTTOM_LEFT = 4,   /**< Row #0 is at the bottom, Column #0 is to the left (flipped) */
420     CAMERA_ATTR_TAG_ORIENTATION_LEFT_TOP = 5,      /**< Row #0 is to the left, Column #0 is at the top (flipped) */
421     CAMERA_ATTR_TAG_ORIENTATION_RIGHT_TOP = 6,     /**< Row #0 is to the right, Column #0 is at the top */
422     CAMERA_ATTR_TAG_ORIENTATION_RIGHT_BOTTOM = 7,  /**< Row #0 is to the right, Column #0 is at the bottom (flipped) */
423     CAMERA_ATTR_TAG_ORIENTATION_LEFT_BOTTOM = 8,   /**< Row #0 is to the left, Column #0 is at the bottom */
424 } camera_attr_tag_orientation_e;
425
426 /**
427  * @brief Enumeration for the flash mode.
428  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
429  */
430 typedef enum
431 {
432     CAMERA_ATTR_FLASH_MODE_OFF = 0,          /**< Always off */
433     CAMERA_ATTR_FLASH_MODE_ON,               /**< Always splashes */
434     CAMERA_ATTR_FLASH_MODE_AUTO,             /**< Depending on intensity of light, strobe starts to flash */
435     CAMERA_ATTR_FLASH_MODE_REDEYE_REDUCTION, /**< Red eye reduction. Multiple flash before capturing */
436     CAMERA_ATTR_FLASH_MODE_SLOW_SYNC,        /**< Slow sync curtain synchronization */
437     CAMERA_ATTR_FLASH_MODE_FRONT_CURTAIN,    /**< Front curtain synchronization */
438     CAMERA_ATTR_FLASH_MODE_REAR_CURTAIN,     /**< Rear curtain synchronization */
439     CAMERA_ATTR_FLASH_MODE_PERMANENT,        /**< Keep turned on until turning off */
440 } camera_attr_flash_mode_e;
441
442 /**
443  * @brief Enumeration to preview FPS.
444  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
445  */
446 typedef enum
447 {
448     CAMERA_ATTR_FPS_AUTO = 0, /**< AUTO FPS */
449     CAMERA_ATTR_FPS_7 = 7,    /**< 7 FPS */
450     CAMERA_ATTR_FPS_8 = 8,    /**< 8 FPS */
451     CAMERA_ATTR_FPS_15 = 15,  /**< 15 FPS */
452     CAMERA_ATTR_FPS_20 = 20,  /**< 20 FPS */
453     CAMERA_ATTR_FPS_24 = 24,  /**< 24 FPS */
454     CAMERA_ATTR_FPS_25 = 25,  /**< 25 FPS */
455     CAMERA_ATTR_FPS_30 = 30,  /**< 30 FPS */
456     CAMERA_ATTR_FPS_60 = 60,  /**< 60 FPS */
457     CAMERA_ATTR_FPS_90 = 90,  /**< 90 FPS */
458     CAMERA_ATTR_FPS_120 = 120 /**< 120 FPS */
459 } camera_attr_fps_e;
460
461 /**
462  * @brief Enumeration for the theater mode.
463  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
464  */
465 typedef enum
466 {
467         CAMERA_ATTR_THEATER_MODE_DISABLE = 0, /**< Disable theater mode - External display shows same image as device display */
468         CAMERA_ATTR_THEATER_MODE_ENABLE = 2,  /**< Enable theater mode - Preview image is displayed on external display with full screen mode, but preview image is not shown on device display */
469         CAMERA_ATTR_THEATER_MODE_CLONE = 1    /**< Clone mode - Preview image is displayed on external display with full screen mode. Also preview image is shown by the UI on device display */
470 } camera_attr_theater_mode_e;
471
472 /**
473  * @brief Enumeration for HDR capture mode.
474  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
475  */
476 typedef enum
477 {
478         CAMERA_ATTR_HDR_MODE_DISABLE = 0,  /**< Disable HDR capture */
479         CAMERA_ATTR_HDR_MODE_ENABLE,       /**< Enable HDR capture */
480         CAMERA_ATTR_HDR_MODE_KEEP_ORIGINAL /**< Enable HDR capture and keep original image data */
481 } camera_attr_hdr_mode_e;
482
483
484 /**
485  * @}
486  */
487
488 /**
489  * @addtogroup CAPI_MEDIA_CAMERA_MODULE
490  * @{
491  */
492
493 /**
494  * @brief Called when the camera state is changed.
495  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
496  *
497  * @param[in] previous The previous state of the camera
498  * @param[in] current The current state of the camera
499  * @param[in] by_policy If @c true the state is changed by policy, otherwise @c false
500  * @param[in] user_data The user data passed from the callback registration function
501  * @pre camera_start_preview(), camera_start_capture() or camera_stop_preview()
502  *      will invoke this callback if you register this callback using camera_set_state_changed_cb().
503  * @see camera_set_state_changed_cb()
504  */
505 typedef void (*camera_state_changed_cb)(camera_state_e previous, camera_state_e current,
506         bool by_policy, void *user_data);
507
508 /**
509  * @brief Called when the camera is interrupted by policy.
510  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
511  *
512  * @param[in] policy The policy that interrupted the camera
513  * @param[in] previous The previous state of the camera
514  * @param[in] current The current state of the camera
515  * @param[in] user_data The user data passed from the callback registration function
516  * @see camera_set_interrupted_cb()
517  */
518 typedef void (*camera_interrupted_cb)(camera_policy_e policy, camera_state_e previous, camera_state_e current, void *user_data);
519
520 /**
521  * @brief Called when the camera focus state is changed.
522  * @details When the camera auto focus completes or a change to the focus state occurs,
523  *          this callback is invoked. \n \n
524  *          Changes of focus state are as follows: \n
525  *          #CAMERA_FOCUS_STATE_RELEASED -> start focusing -> #CAMERA_FOCUS_STATE_ONGOING -> working ->
526  *          #CAMERA_FOCUS_STATE_FOCUSED or #CAMERA_FOCUS_STATE_FAILED.
527  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
528  *
529  * @param[in] state The current state of the auto-focus
530  * @param[in] user_data The user data passed from the callback registration function
531  * @pre camera_start_focusing() will invoke this callback if you register it using camera_set_focus_changed_cb().
532  * @see camera_set_focus_changed_cb()
533  * @see camera_unset_focus_changed_cb()
534  * @see camera_start_focusing()
535  * @see camera_cancel_focusing()
536  */
537 typedef void (*camera_focus_changed_cb)(camera_focus_state_e state, void *user_data);
538
539 /**
540  * @brief Called to register for notifications about delivering a copy of the new preview frame when every preview frame is displayed.
541  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
542  *
543  * @remarks This function is issued in the context of gstreamer so the UI update code should not be directly invoked.\n
544  *          If the camera is used as a recorder then this callback function won't be called.
545  *
546  * @param[in] frame The reference pointer to preview stream data
547  * @param[in] user_data The user data passed from the callback registration function
548  * @pre camera_start_preview() will invoke this callback function if you register this callback using camera_set_preview_cb().
549  * @see camera_start_preview()
550  * @see camera_set_preview_cb()
551  * @see camera_unset_preview_cb()
552  */
553 typedef void (*camera_preview_cb)(camera_preview_data_s *frame, void *user_data);
554
555 /**
556  * @brief Called to register for notifications about delivering media packet when every preview frame is displayed.
557  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
558  *
559  * @remarks This function is issued in the context of gstreamer so the UI update code should not be directly invoked.\n
560  *          If the camera is used as a recorder then this callback function won't be called.\n
561  *          and the packet should be released by media_packet_destroy() after use.
562  *
563  * @param[in] pkt Reference pointer to media packet
564  * @param[in] user_data The user data passed from the callback registration function
565  * @pre camera_start_preview() will invoke this callback function if you register this callback using camera_set_media_packet_preview_cb().
566  * @see camera_start_preview()
567  * @see camera_set_media_packet_preview_cb()
568  * @see camera_unset_media_packet_preview_cb()
569  */
570 typedef void (*camera_media_packet_preview_cb)(media_packet_h pkt, void *user_data);
571
572 /**
573  * @brief Called to get information about image data taken by the camera once per frame while capturing.
574  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
575  *
576  * @remarks This function is issued in the context of gstreamer (video source thread) so the UI update code should not be directly invoked.
577  *          You must not call camera_start_preview() within this callback.
578  *
579  * @param[in] image The image data of the captured picture
580  * @param[in] postview The image data of the postview
581  * @param[in] thumbnail The image data of the thumbnail (it should be @c NULL if the available thumbnail data does not exist)
582  * @param[in] user_data The user data passed from the callback registration function
583  * @pre camera_start_capture() or camera_start_continuous_capture() will invoke this callback function if it is registered using camera_start_capture() or camera_start_continuous_capture().
584  * @see camera_start_capture()
585  * @see camera_start_continuous_capture()
586  * @see camera_capture_completed_cb()
587  */
588 typedef void (*camera_capturing_cb)(camera_image_data_s* image, camera_image_data_s* postview, camera_image_data_s* thumbnail, void *user_data);
589
590 /**
591  * @brief Called when the camera capturing completes.
592  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
593  *
594  * @remarks The callback is called after camera_capturing_cb() is completed.\n
595  *          If you want to show the user a preview after capturing is finished, an application can use camera_start_preview() after calling this callback.
596  *
597  * @param[in] user_data The user data passed from the callback registration function
598  * @pre This callback function is invoked if it is registered using camera_start_capture() or camera_start_continuous_capture().
599  * @see camera_start_capture()
600  * @see camera_start_continuous_capture()
601  * @see camera_capturing_cb()
602  */
603 typedef void (*camera_capture_completed_cb)(void *user_data);
604
605 /**
606  * @brief Called when an error occurs.
607  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
608  *
609  * @remarks This callback informs about a critical error situation.\n
610  *          When this callback is invoked, the user should release the resource and terminate the application.\n
611  *          In case of errors, one of these codes occur:\n
612  * #CAMERA_ERROR_DEVICE,\n
613  * #CAMERA_ERROR_INVALID_OPERATION,\n
614  * #CAMERA_ERROR_OUT_OF_MEMORY.\n
615  *
616  * @param[in] error The error code
617  * @param[in] current_state The current state of the camera
618  * @param[in] user_data The user data passed from the callback registration function
619  * @pre This callback function is invoked if it is registered using camera_set_error_cb().
620  * @see camera_set_error_cb()
621  * @see camera_unset_error_cb()
622  */
623 typedef void (*camera_error_cb)(camera_error_e error, camera_state_e current_state, void *user_data);
624
625 /**
626  * @brief Called when a face is detected in the preview frame.
627  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
628  * @param[in] faces The detected face array
629  * @param[in] count The length of the array
630  * @param[in] user_data The user data passed from the callback registration function
631  * @see camera_start_face_detection()
632  */
633 typedef void (*camera_face_detected_cb)(camera_detected_face_s *faces, int count, void *user_data);
634
635 /**
636  * @}
637  */
638
639 /**
640  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
641  * @{
642  */
643
644 /**
645  * @brief Called once for each supported preview resolution.
646  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
647  * @param[in] width The preview image width
648  * @param[in] height The preview image height
649  * @param[in] user_data The user data passed from the foreach function
650  * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
651  * @pre camera_foreach_supported_preview_resolution() will invoke this callback.
652  * @see camera_foreach_supported_preview_resolution()
653  */
654 typedef bool (*camera_supported_preview_resolution_cb)(int width, int height, void *user_data);
655
656 /**
657  * @brief Called once for each supported capture resolution.
658  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
659  * @param[in] width The capture resolution width
660  * @param[in] height The capture resolution height
661  * @param[in] user_data The user data passed from the foreach function
662  * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
663  * @pre camera_foreach_supported_capture_resolution() will invoke this callback.
664  * @see camera_foreach_supported_capture_resolution()
665  */
666 typedef bool (*camera_supported_capture_resolution_cb)(int width, int height, void *user_data);
667
668 /**
669  * @brief Called once for the pixel format of each supported capture format.
670  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
671  * @param[in] format The supported pixel format
672  * @param[in] user_data The user data passed from the foreach function
673  * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
674  * @pre camera_foreach_supported_capture_format() will invoke this callback.
675  * @see camera_foreach_supported_capture_format()
676  */
677 typedef bool (*camera_supported_capture_format_cb)(camera_pixel_format_e format,
678         void *user_data);
679
680 /**
681  * @brief Called once for the pixel format of each supported preview format.
682  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
683  * @param[in] format The supported preview data format
684  * @param[in] user_data The user data passed from the foreach function
685  * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
686  * @pre camera_foreach_supported_preview_format() will invoke this callback.
687  * @see camera_foreach_supported_preview_format()
688  */
689 typedef bool (*camera_supported_preview_format_cb)(camera_pixel_format_e format,
690         void *user_data);
691
692 /**
693  * @}
694  */
695
696 /**
697  * @addtogroup CAPI_MEDIA_CAMERA_MODULE
698  * @{
699  */
700
701 /**
702  * @brief Creates a new camera handle for controlling a camera.
703  *
704  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
705  * @privlevel public
706  * @privilege %http://tizen.org/privilege/camera
707  * @remarks Multiple handles on a context at the same time are allowed to be created. However,
708  *          camera cannot guarantee proper operation because of limited resources, such as
709  *          camera device, audio device, and display device.\n.
710  *          A @a camera must be released using camera_destroy().
711  * @param[in] device The hardware camera to access
712  * @param[out] camera A newly returned handle to the camera
713  * @return @c 0 on success, otherwise a negative error value
714  * @retval #CAMERA_ERROR_NONE Successful
715  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
716  * @retval #CAMERA_ERROR_OUT_OF_MEMORY Out of memory
717  * @retval #CAMERA_ERROR_SOUND_POLICY Sound policy error
718  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
719  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
720  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
721  * @post If it succeeds, the camera state will be #CAMERA_STATE_CREATED.
722  *
723  * @see camera_destroy()
724  */
725 int camera_create(camera_device_e device, camera_h *camera);
726
727 /**
728  * @brief Destroys the camera handle and releases all its resources.
729  *
730  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
731  * @privlevel public
732  * @privilege %http://tizen.org/privilege/camera
733  * @param[in] camera The handle to the camera
734  * @return @c 0 on success, otherwise a negative error value
735  * @retval #CAMERA_ERROR_NONE Successful
736  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
737  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
738  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
739  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
740  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
741  * @see camera_create()
742  */
743 int camera_destroy(camera_h camera);
744
745 /**
746  * @brief Starts capturing and drawing preview frames on the screen.
747  *
748  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
749  * @privlevel public
750  * @privilege %http://tizen.org/privilege/camera
751  * @param[in] camera The handle to the camera
752  * @return @c 0 on success, otherwise a negative error value
753  * @retval #CAMERA_ERROR_NONE Successful
754  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
755  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
756  * @retval #CAMERA_ERROR_SOUND_POLICY Sound policy error
757  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
758  * @retval #CAMERA_ERROR_DEVICE_BUSY The device is being used in another application or is performing other operations
759  * @retval #CAMERA_ERROR_DEVICE_NOT_FOUND No camera device
760  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
761  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
762  * @pre    The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_CAPTURED.\n
763  *         You must set the display handle. \n
764  *         If needed, modify preview FPS(camera_attr_set_preview_fps()),
765  *         preview resolution(camera_set_preview_resolution()), or preview format(camera_set_preview_format()).
766  * @post   If it succeeds, the camera state will be #CAMERA_STATE_PREVIEW.\n
767  *         camera_preview_cb() will be called when preview image data becomes available.
768  *
769  * @see camera_stop_preview()
770  * @see camera_set_display()
771  * @see camera_set_preview_cb()
772  * @see camera_set_media_packet_preview_cb()
773  * @see camera_foreach_supported_preview_resolution()
774  * @see camera_set_preview_resolution()
775  * @see camera_get_preview_resolution()
776  * @see camera_foreach_supported_preview_format()
777  * @see camera_set_preview_format()
778  * @see camera_get_preview_format()
779  * @see camera_attr_foreach_supported_fps()
780  * @see camera_attr_set_preview_fps()
781  * @see camera_attr_get_preview_fps()
782  */
783 int camera_start_preview(camera_h camera);
784
785 /**
786  * @brief Stops capturing and drawing preview frames.
787  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
788  * @privlevel public
789  * @privilege %http://tizen.org/privilege/camera
790  * @param[in] camera The handle to the camera
791  * @return @c 0 on success, otherwise a negative error value
792  * @retval #CAMERA_ERROR_NONE Successful
793  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
794  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
795  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
796  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
797  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
798  * @pre The camera state must be set to #CAMERA_STATE_PREVIEW.
799  * @post The camera state will be #CAMERA_STATE_CREATED.
800  * @see camera_start_preview()
801  * @see camera_unset_preview_cb()
802  * @see camera_unset_media_packet_preview_cb()
803  */
804 int camera_stop_preview(camera_h camera);
805
806 /**
807  * @brief Starts capturing of still images.
808  *
809  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
810  * @privlevel public
811  * @privilege %http://tizen.org/privilege/camera
812  * @remarks This function causes the transition of the camera state from #CAMERA_STATE_CAPTURING to #CAMERA_STATE_CAPTURED automatically\n
813  *          and the corresponding callback function camera_capturing_cb() and camera_capture_completed_cb() will be invoked\n
814  *          The captured image will be delivered through camera_capturing_cb().\n
815  *          camera_capture_completed_cb() callback notifies about completion of camera_capturing_cb(). \n
816  *          The camera's preview should be restarted by calling camera_start_preview().
817  * @param[in] camera The handle to the camera
818  * @param[in] capturing_cb The callback for capturing data
819  * @param[in] completed_cb The callback for notification of completion
820  * @param[in] user_data The user data
821  * @return @c 0 on success, otherwise a negative error value
822  * @retval #CAMERA_ERROR_NONE Successful
823  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
824  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
825  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
826  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
827  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
828  * @pre The camera state must be set to #CAMERA_STATE_PREVIEW. \n
829  *      If needed, modify capture resolution(camera_set_capture_resolution()),
830  *      capture format(camera_set_capture_format()), or image quality(camera_attr_set_image_quality()).
831  * @post If it succeeds the camera state will be #CAMERA_STATE_CAPTURED.
832  *
833  * @see camera_start_preview()
834  * @see camera_start_continuous_capture();
835  * @see camera_foreach_supported_capture_resolution()
836  * @see camera_set_capture_resolution()
837  * @see camera_get_capture_resolution()
838  * @see camera_foreach_supported_capture_format()
839  * @see camera_set_capture_format()
840  * @see camera_get_capture_format()
841  * @see camera_attr_set_image_quality()
842  * @see camera_attr_get_image_quality()
843  */
844 int camera_start_capture(camera_h camera, camera_capturing_cb capturing_cb , camera_capture_completed_cb completed_cb , void *user_data);
845
846 /**
847  * @brief Starts continuously capturing still images.
848  *
849  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
850  * @privlevel public
851  * @privilege %http://tizen.org/privilege/camera
852  * @remarks If this is not supported zero shutter lag occurs. The capture resolution could be changed to the preview resolution.\n
853  *          This function causes the transition of the camera state from #CAMERA_STATE_CAPTURING to #CAMERA_STATE_CAPTURED automatically\n
854  *          and the corresponding callback function camera_capturing_cb() and camera_capture_completed_cb() will be invoked\n
855  *          Each Captured image will be delivered through camera_capturing_cb().\n
856  *          The camera_capture_completed_cb() callback notifies about the completion of an entire capture.\n
857  *          The camera's preview should be restarted by calling camera_start_preview().\n.
858  * @param[in] camera The handle to the camera
859  * @param[in] count The number of still images
860  * @param[in] interval The interval of the capture (millisecond)
861  * @param[in] capturing_cb The callback for capturing data
862  * @param[in] completed_cb The callback for notification of completion
863  * @param[in] user_data The user data
864  * @return @c 0 on success, otherwise a negative error value
865  * @retval #CAMERA_ERROR_NONE Successful
866  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
867  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
868  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
869  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
870  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
871  * @post   If it succeeds the camera state will be #CAMERA_STATE_CAPTURED.
872  *
873  * @see camera_start_preview()
874  * @see camera_start_capture();
875  * @see camera_stop_continuous_capture()
876  * @see camera_is_supported_zero_shutter_lag()
877  */
878 int camera_start_continuous_capture(camera_h camera, int count, int interval, camera_capturing_cb capturing_cb, camera_capture_completed_cb completed_cb , void *user_data);
879
880 /**
881  * @brief Aborts continuous capturing.
882  *
883  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
884  * @privlevel public
885  * @privilege %http://tizen.org/privilege/camera
886  * @remarks The camera state will be changed to #CAMERA_STATE_CAPTURED.
887  * @param[in] camera The handle to the camera
888  * @return @c 0 on success, otherwise a negative error value
889  * @retval #CAMERA_ERROR_NONE Successful
890  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
891  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
892  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
893  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
894  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
895  * @pre The camera state must be set to #CAMERA_STATE_PREVIEW.
896  *
897  * @see camera_start_continuous_capture()
898  */
899 int camera_stop_continuous_capture(camera_h camera);
900
901 /**
902  * @brief Gets the state of the camera.
903  *
904  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
905  * @param[in] camera The handle to the camera
906  * @param[out] state The current state of the camera
907  * @return @c 0 on success, otherwise a negative error value
908  * @retval #CAMERA_ERROR_NONE Successful
909  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
910  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
911  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
912  * @see camera_create()
913  * @see camera_start_preview()
914  * @see camera_stop_preview()
915  * @see camera_start_capture()
916  */
917 int camera_get_state(camera_h camera, camera_state_e *state);
918
919 /**
920  * @brief Starts camera auto-focusing, asynchronously.
921  *
922  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
923  * @privlevel public
924  * @privilege %http://tizen.org/privilege/camera
925  * @remarks If continuous status is @c true, the camera continuously tries to focus.
926  * @param[in] camera The handle to the camera
927  * @param[in] continuous The status of continuous focusing
928  * @return @c 0 on success, otherwise a negative error value
929  * @retval #CAMERA_ERROR_NONE Successful
930  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
931  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
932  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
933  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
934  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
935  * @pre The camera state must be set to #CAMERA_STATE_PREVIEW.
936  * @post The camera focus state will be #CAMERA_FOCUS_STATE_ONGOING.
937  *
938  * @see camera_cancel_focusing()
939  * @see camera_set_focus_changed_cb()
940  * @see camera_focus_changed_cb()
941  * @see camera_attr_set_af_mode()
942  */
943 int camera_start_focusing(camera_h camera, bool continuous);
944
945 /**
946  * @brief Stops camera auto focusing.
947  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
948  * @privlevel public
949  * @privilege %http://tizen.org/privilege/camera
950  * @param[in] camera The handle to the camera
951  * @return @c 0 on success, otherwise a negative error value
952  * @retval #CAMERA_ERROR_NONE Successful
953  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
954  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
955  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
956  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
957  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
958  * @pre The camera state must be set to #CAMERA_STATE_PREVIEW.
959  *
960  * @see camera_start_focusing()
961  * @see camera_focus_changed_cb()
962  */
963 int camera_cancel_focusing(camera_h camera);
964
965 /**
966  * @brief Sets the display handle to show preview images.
967  *
968  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
969  * @remarks This function must be called before previewing (see camera_start_preview()).
970  * @param[in] camera The handle to the camera
971  * @param[in] type The display type
972  * @param[in] display The display handle from #GET_DISPLAY
973  * @return @c 0 on success, otherwise a negative error value
974  * @retval #CAMERA_ERROR_NONE Successful
975  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
976  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
977  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
978  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
979  * @pre The camera state must be set to #CAMERA_STATE_CREATED.
980  *
981  * @see camera_start_preview()
982  * @see #GET_DISPLAY
983  */
984 int camera_set_display(camera_h camera, camera_display_type_e type, camera_display_h display);
985
986 /**
987  * @brief Sets the resolution of the preview.
988  *
989  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
990  * @privlevel public
991  * @privilege %http://tizen.org/privilege/camera
992  * @remarks This function should be called before previewing (camera_start_preview()).
993  * @param[in] camera The handle to the camera
994  * @param[in] width The preview width
995  * @param[in] height The preview height
996  * @return @c 0 on success, otherwise a negative error value
997  * @retval #CAMERA_ERROR_NONE Successful
998  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
999  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
1000  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1001  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1002  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
1003  *
1004  * @see camera_start_preview()
1005  * @see camera_get_preview_resolution()
1006  * @see camera_foreach_supported_preview_resolution()
1007  */
1008 int camera_set_preview_resolution(camera_h camera, int width, int height);
1009
1010 /**
1011  * @brief Gets the resolution of the preview.
1012  *
1013  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1014  * @param[in] camera The handle to the camera
1015  * @param[out] width The preview width
1016  * @param[out] height The preview height
1017  * @return @c 0 on success, otherwise a negative error value
1018  * @retval #CAMERA_ERROR_NONE Successful
1019  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1020  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1021  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1022  * @see camera_set_preview_resolution()
1023  * @see camera_foreach_supported_preview_resolution()
1024  */
1025 int camera_get_preview_resolution(camera_h camera, int *width, int *height);
1026
1027 /**
1028  * @brief Gets the recommended preview resolution.
1029  *
1030  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1031  * @remarks Depending on the capture resolution aspect ratio and display resolution, the recommended preview resolution is determined.
1032  * @param[in] camera The handle to the camera
1033  * @param[out] width The preview width
1034  * @param[out] height The preview height
1035  * @return @c 0 on success, otherwise a negative error value
1036  * @retval #CAMERA_ERROR_NONE Successful
1037  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1038  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1039  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1040  * @see camera_set_preview_resolution()
1041  * @see camera_foreach_supported_preview_resolution()
1042  */
1043 int camera_get_recommended_preview_resolution(camera_h camera, int *width, int *height);
1044
1045 /**
1046  * @brief Starts face detection.
1047  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1048  * @privlevel public
1049  * @privilege %http://tizen.org/privilege/camera
1050  * @remarks This should be called after the preview is started.\n
1051  *          This callback will be invoked when the face is detected in the preview frame.\n
1052  *          Internally it starts continuous focus and focusing on the detected face.\n
1053  *          When face detection is running, the camera_start_focusing(), camera_cancel_focusing(), camera_attr_set_af_mode(), camera_attr_set_af_area(), camera_attr_set_exposure_mode(), and camera_attr_set_whitebalance() settings are ignored.\n
1054  *          If camera_stop_preview() is invoked, face detection is stopped and then preview is resumed using camera_start_preview(), this method should be called again to resume face detection.
1055  * @param[in] camera The handle to the camera
1056  * @param[in] callback The callback to notify face detection
1057  * @param[in] user_data The user data to be passed to the callback function
1058  *
1059  * @return @c 0 on success, otherwise a negative error value
1060  * @retval #CAMERA_ERROR_NONE Successful
1061  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1062  * @retval #CAMERA_ERROR_INVALID_STATE Not preview state
1063  * @retval #CAMERA_ERROR_INVALID_OPERATION Not supported this feature
1064  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1065  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1066  * @pre The camera state must be #CAMERA_STATE_PREVIEW.
1067  *
1068  * @see camera_stop_face_detection()
1069  * @see camera_face_detected_cb()
1070  * @see camera_is_supported_face_detection()
1071  */
1072 int camera_start_face_detection(camera_h camera, camera_face_detected_cb callback, void * user_data);
1073
1074 /**
1075  * @brief Stops face detection.
1076  *
1077  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1078  * @privlevel public
1079  * @privilege %http://tizen.org/privilege/camera
1080  * @param[in] camera The handle to the camera
1081  * @return @c 0 on success, otherwise a negative error value
1082  * @retval #CAMERA_ERROR_NONE Successful
1083  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1084  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1085  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1086  * @pre This should be called after face detection is started.
1087  *
1088  * @see camera_start_face_detection()
1089  * @see camera_is_supported_face_detection()
1090  */
1091 int camera_stop_face_detection(camera_h camera);
1092
1093 /**
1094  * @}
1095  */
1096
1097 /**
1098  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
1099  * @{
1100  */
1101
1102 /**
1103  * @brief Gets continuous capture feature's supported state.
1104  * @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
1105  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1106  * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
1107  * @param[in] camera The handle to the camera
1108  * @return @c true on supported, otherwise false
1109  * @exception #CAMERA_ERROR_NONE Successful
1110  * @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1111  * @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1112  * @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1113  *
1114  */
1115  bool camera_is_supported_continuous_capture(camera_h camera);
1116
1117 /**
1118  * @brief Retrieves all supported camera preview resolutions by invoking the callback function once for each supported camera preview resolution.
1119  *
1120  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1121  * @param[in] camera The handle to the camera
1122  * @param[in] callback The callback function to be invoked
1123  * @param[in] user_data The user data to be passed to the callback function
1124  * @return @c 0 on success, otherwise a negative error value
1125  * @retval #CAMERA_ERROR_NONE Successful
1126  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1127  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1128  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1129  * @post This function invokes camera_supported_preview_resolution_cb() repeatedly to retrieve each supported preview resolution.
1130  *
1131  * @see camera_set_preview_resolution()
1132  * @see camera_get_preview_resolution()
1133  * @see camera_supported_preview_resolution_cb()
1134  */
1135 int camera_foreach_supported_preview_resolution(camera_h camera,
1136         camera_supported_preview_resolution_cb callback, void *user_data);
1137
1138 /**
1139  * @}
1140  */
1141
1142 /**
1143  * @addtogroup CAPI_MEDIA_CAMERA_MODULE
1144  * @{
1145  */
1146
1147 /**
1148  * @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE
1149  * @brief Sets the display rotation.
1150  *
1151  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1152  * @privlevel public
1153  * @privilege %http://tizen.org/privilege/camera
1154  * @remarks This function should be called before previewing (see camera_start_preview())
1155  * @param[in] camera The handle to the camera
1156  * @param[in] rotation The display rotation
1157  * @return @c 0 on success, otherwise a negative error value
1158  * @retval #CAMERA_ERROR_NONE Successful
1159  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1160  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
1161  * @retval #CAMERA_ERROR_INVALID_OPERATION Display type is incorrect
1162  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1163  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1164  * @see camera_start_preview()
1165  * @see camera_get_display_rotation()
1166  */
1167 int camera_set_display_rotation(camera_h camera, camera_rotation_e rotation);
1168
1169 /**
1170  * @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE
1171  * @brief Gets the display rotation.
1172  *
1173  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1174  * @param[in] camera The handle to the camera
1175  * @param[out] rotation The display rotation
1176  * @return @c 0 on success, otherwise a negative error value
1177  * @retval #CAMERA_ERROR_NONE Successful
1178  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1179  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1180  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1181  * @see camera_set_display_rotation()
1182  */
1183 int camera_get_display_rotation(camera_h camera, camera_rotation_e *rotation);
1184
1185 /**
1186  * @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE
1187  * @brief Sets the display flip.
1188  *
1189  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1190  * @privlevel public
1191  * @privilege %http://tizen.org/privilege/camera
1192  * @param[in] camera The handle to the camera
1193  * @param[in] flip The display flip
1194  * @return @c 0 on success, otherwise a negative error value
1195  * @retval #CAMERA_ERROR_NONE Successful
1196  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1197  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
1198  * @retval #CAMERA_ERROR_INVALID_OPERATION Display type is incorrect
1199  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1200  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1201  * @see camera_get_display_flip()
1202  */
1203 int camera_set_display_flip(camera_h camera, camera_flip_e flip);
1204
1205 /**
1206  * @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE
1207  * @brief Gets the display flip.
1208  *
1209  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1210  * @param[in] camera The handle to the camera
1211  * @param[out] flip The display flip
1212  * @return @c 0 on success, otherwise a negative error value
1213  * @retval #CAMERA_ERROR_NONE Successful
1214  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1215  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1216  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1217  * @see camera_set_display_flip()
1218  */
1219 int camera_get_display_flip(camera_h camera, camera_flip_e *flip);
1220
1221 /**
1222  * @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE
1223  * @brief Sets the visible property for display.
1224  *
1225  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1226  * @privlevel public
1227  * @privilege %http://tizen.org/privilege/camera
1228  * @param[in] camera The handle to the camera
1229  * @param[in] visible The display visibility property
1230  *
1231  * @return @c 0 on success, otherwise a negative error value
1232  * @retval #CAMERA_ERROR_NONE Successful
1233  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1234  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1235  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1236  * @see camera_is_display_visible()
1237  */
1238 int camera_set_display_visible(camera_h camera, bool visible);
1239
1240 /**
1241  * @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE
1242  * @brief Gets the visible property of display.
1243  *
1244  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1245  * @param[in] camera The handle to the camera
1246  * @param[out] visible @c true if camera display is visible, otherwise @c false
1247  *
1248  * @return @c 0 on success, otherwise a negative error value
1249  * @retval #CAMERA_ERROR_NONE Successful
1250  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1251  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1252  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1253  * @see camera_set_display_visible()
1254  */
1255 int camera_is_display_visible(camera_h camera, bool *visible);
1256
1257 /**
1258  * @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE
1259  * @brief Sets the display mode.
1260  *
1261  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1262  * @param[in] camera The handle to the camera
1263  * @param[in] mode The display mode
1264  *
1265  * @return @c 0 on success, otherwise a negative error value
1266  * @retval #CAMERA_ERROR_NONE Successful
1267  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1268  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1269  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1270  * @see camera_get_display_mode()
1271  */
1272 int camera_set_display_mode(camera_h camera , camera_display_mode_e mode);
1273
1274 /**
1275  * @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE
1276  * @brief Gets the display mode.
1277  *
1278  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1279  * @param[in] camera The handle to the camera
1280  * @param[out] mode The display mode
1281  *
1282  * @return @c 0 on success, otherwise a negative error value
1283  * @retval #CAMERA_ERROR_NONE Successful
1284  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1285  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1286  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1287  * @see camera_set_display_mode()
1288  */
1289 int camera_get_display_mode(camera_h camera, camera_display_mode_e *mode);
1290
1291 /**
1292  * @brief Sets the resolution of the captured image.
1293  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1294  * @privlevel public
1295  * @privilege %http://tizen.org/privilege/camera
1296  * @param[in] camera The handle to the camera
1297  * @param[in] width The capture width
1298  * @param[in] height The capture height
1299  * @return @c 0 on success, otherwise a negative error value
1300  * @retval #CAMERA_ERROR_NONE Successful
1301  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1302  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
1303  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1304  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1305  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
1306  * @see camera_start_capture()
1307  * @see camera_get_capture_resolution()
1308  * @see camera_foreach_supported_capture_resolution()
1309  */
1310 int camera_set_capture_resolution(camera_h camera, int width, int height);
1311
1312 /**
1313  * @brief Gets the resolution of the captured image.
1314  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1315  * @param[in] camera The handle to the camera
1316  * @param[out] width The capture width
1317  * @param[out] height The capture height
1318  * @return @c 0 on success, otherwise a negative error value
1319  * @retval #CAMERA_ERROR_NONE Successful
1320  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1321  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1322  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1323  * @see camera_set_capture_resolution()
1324  * @see camera_foreach_supported_capture_resolution()
1325  */
1326 int camera_get_capture_resolution(camera_h camera, int *width, int *height);
1327
1328 /**
1329  * @}
1330  */
1331
1332 /**
1333  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
1334  * @{
1335  */
1336
1337 /**
1338  * @brief Retrieves all supported camera captured resolutions by invoking the callback function once for each supported camera capture resolution.
1339  *
1340  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1341  * @param[in] camera The handle to the camera
1342  * @param[in] callback The callback function to register
1343  * @param[in] user_data The user data to be passed to the callback function
1344  * @return @c 0 on success, otherwise a negative error value
1345  * @retval #CAMERA_ERROR_NONE Successful
1346  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1347  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1348  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1349  * @post This function invokes camera_supported_capture_resolution_cb() repeatedly to retrieve each supported capture resolution.
1350  * @see camera_set_capture_resolution()
1351  * @see camera_get_capture_resolution()
1352  * @see camera_supported_capture_resolution_cb()
1353  */
1354 int camera_foreach_supported_capture_resolution(camera_h camera,
1355         camera_supported_capture_resolution_cb callback, void *user_data);
1356
1357 /**
1358  * @}
1359  */
1360
1361 /**
1362  * @addtogroup CAPI_MEDIA_CAMERA_MODULE
1363  * @{
1364  */
1365
1366 /**
1367  * @brief Sets the format of an image to be captured.
1368  *
1369  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1370  * @remarks This function should be called before capturing (see camera_start_capture()).
1371  * @param[in] camera The handle to the camera
1372  * @param[out] format The format of the image to be captured
1373  * @return @c 0 on success, otherwise a negative error value
1374  * @retval #CAMERA_ERROR_NONE Successful
1375  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1376  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
1377  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1378  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1379  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
1380  * @see camera_start_capture()
1381  * @see camera_get_capture_format()
1382  * @see camera_foreach_supported_capture_format()
1383  */
1384 int camera_set_capture_format(camera_h camera, camera_pixel_format_e format);
1385
1386 /**
1387  * @brief Gets the format of the image to be captured.
1388  *
1389  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1390  * @param[in] camera The handle to the camera
1391  * @param[out] format The format of the image to be captured
1392  * @return @c 0 on success, otherwise a negative error value
1393  * @retval #CAMERA_ERROR_NONE Successful
1394  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1395  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1396  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1397  * @see camera_set_capture_format()
1398  * @see camera_foreach_supported_capture_format()
1399  */
1400 int camera_get_capture_format(camera_h camera, camera_pixel_format_e *format);
1401
1402 /**
1403  * @}
1404  */
1405
1406 /**
1407  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
1408  * @{
1409  */
1410
1411 /**
1412  * @brief Retrieves all supported camera capture formats by invoking the callback function once for each supported camera capture format.
1413  *
1414  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1415  * @param[in] camera The handle to the camera
1416  * @param[in] callback The callback function to be invoked
1417  * @param[in] user_data The user data to be passed to the callback function
1418  * @return @c 0 on success, otherwise a negative error value
1419  * @retval #CAMERA_ERROR_NONE Successful
1420  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1421  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1422  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1423  * @post This function invokes camera_supported_capture_format_cb() repeatedly to retrieve each supported capture format.
1424  * @see camera_set_capture_format()
1425  * @see camera_get_capture_format()
1426  * @see camera_supported_capture_format_cb()
1427  */
1428 int camera_foreach_supported_capture_format(camera_h camera,
1429         camera_supported_capture_format_cb callback, void *user_data);
1430
1431 /**
1432  * @}
1433  */
1434
1435 /**
1436  * @addtogroup CAPI_MEDIA_CAMERA_MODULE
1437  * @{
1438  */
1439
1440 /**
1441  * @brief Sets the preview data format.
1442  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1443  * @remarks This function should be called before previewing (see camera_start_preview()).
1444  * @param[in] camera The handle to the camera
1445  * @param[in] format The preview data format
1446  * @return @c 0 on success, otherwise a negative error value
1447  * @retval #CAMERA_ERROR_NONE Successful
1448  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1449  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
1450  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1451  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1452  * @pre The camera state must be set to #CAMERA_STATE_CREATED.
1453  * @see camera_start_preview()
1454  * @see camera_get_preview_format()
1455  * @see camera_foreach_supported_preview_format()
1456  */
1457 int camera_set_preview_format(camera_h camera, camera_pixel_format_e format);
1458
1459 /**
1460  * @brief Gets the format of the preview stream.
1461  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1462  * @param[in] camera The handle to the camera
1463  * @param[out] format The preview data format
1464  * @return @c 0 on success, otherwise a negative error value
1465  * @retval #CAMERA_ERROR_NONE Successful
1466  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1467  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1468  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1469  * @see camera_set_preview_format()
1470  * @see camera_foreach_supported_preview_format()
1471  */
1472 int camera_get_preview_format(camera_h camera, camera_pixel_format_e *format);
1473
1474 /**
1475  * @}
1476  */
1477
1478 /**
1479  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
1480  * @{
1481  */
1482
1483 /**
1484  * @brief Retrieves all supported camera preview formats by invoking the callback function once for each supported camera preview format.
1485  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1486  * @param[in] camera The handle to the camera
1487  * @param[in] callback The callback function to be invoked
1488  * @param[in] user_data The user data to be passed to the callback function
1489  * @return @c 0 on success, otherwise a negative error value
1490  * @retval #CAMERA_ERROR_NONE Successful
1491  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1492  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1493  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1494  * @post This function invokes camera_supported_preview_format_cb() repeatly to retrieve each supported preview format.
1495  * @see camera_set_preview_format()
1496  * @see camera_get_preview_format()
1497  * @see camera_supported_preview_format_cb()
1498  */
1499 int camera_foreach_supported_preview_format(camera_h camera,
1500         camera_supported_preview_format_cb callback, void *user_data);
1501
1502 /**
1503  * @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
1504  * @brief Gets the face detection feature's supported state.
1505  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1506  * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
1507  * @param[in] camera The handle to the camera
1508  * @return @c true if supported, otherwise @c false
1509  * @see camera_start_face_detection()
1510  * @see camera_stop_face_detection()
1511  * @exception #CAMERA_ERROR_NONE Successful
1512  * @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1513  * @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1514  * @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1515  */
1516 bool camera_is_supported_face_detection(camera_h camera);
1517
1518 /**
1519  * @brief Gets the zero shutter lag feature's supported state.
1520  * @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
1521  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1522  * @remarks If supporting zero shutter lag, continuous shot can be done with full capture size. \n
1523  *                The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
1524  * @param[in] camera The handle to the camera
1525  * @return @c true if supported, otherwise @c false
1526  * @exception #CAMERA_ERROR_NONE Successful
1527  * @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1528  * @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1529  * @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1530  *
1531  */
1532 bool camera_is_supported_zero_shutter_lag(camera_h camera);
1533
1534 /**
1535  * @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
1536  * @brief Gets the camera device count.
1537  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1538  * @remarks If the device supports primary and secondary camera, this returns @c 2. If @c 1 is returned, the device only supports primary camera.
1539  * @param[in] camera The handle to the camera
1540  * @param[out] device_count The device count
1541  * @return @c 0 on success, otherwise a negative error value
1542  * @retval #CAMERA_ERROR_NONE Successful
1543  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1544  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1545  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1546  *
1547  */
1548 int camera_get_device_count(camera_h camera, int *device_count);
1549
1550 /**
1551  * @brief Gets the media packet preview callback feature's supported state.
1552  * @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
1553  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1554  * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
1555  * @param[in] camera The handle to the camera
1556  * @return @c true if supported, otherwise @c false
1557  * @exception #CAMERA_ERROR_NONE Successful
1558  * @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1559  * @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1560  * @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1561  *
1562  */
1563 bool camera_is_supported_media_packet_preview_cb(camera_h camera);
1564
1565 /**
1566  * @}
1567  */
1568
1569 /**
1570  * @addtogroup CAPI_MEDIA_CAMERA_MODULE
1571  * @{
1572  */
1573
1574 /**
1575  * @brief Registers a callback function to be called once per frame when previewing.
1576  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1577  * @remarks This callback does not work in the video recorder mode.\n
1578  *          This function should be called before previewing (see camera_start_preview()).\n
1579  *          A registered callback is called on the internal thread of the camera.\n
1580  *          A video frame can be retrieved using a registered callback.\n
1581  *          The callback function holds the same buffer that will be drawn on the display device.\n
1582  *          So if you change the buffer in a registerd callback, it will be displayed on the device\n
1583  *          and the buffer is only available in a registerd callback.
1584  * @param[in] camera The handle to the camera
1585  * @param[in] callback The callback function to be registered
1586  * @param[in] user_data The user data to be passed to the callback function
1587  * @return @c 0 on success, otherwise a negative error value
1588  * @retval #CAMERA_ERROR_NONE Successful
1589  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1590  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1591  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1592  * @pre The camera's state must be set to #CAMERA_STATE_CREATED.
1593  * @see camera_start_preview()
1594  * @see camera_unset_preview_cb()
1595  * @see camera_preview_cb()
1596  */
1597 int camera_set_preview_cb(camera_h camera, camera_preview_cb callback, void *user_data);
1598
1599 /**
1600  * @brief Unregisters the callback function.
1601  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1602  * @param[in] camera The handle to the camera
1603  * @return @c 0 on success, otherwise a negative error value
1604  * @retval #CAMERA_ERROR_NONE Successful
1605  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1606  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1607  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1608  * @see camera_set_preview_cb()
1609  */
1610 int camera_unset_preview_cb(camera_h camera);
1611
1612 /**
1613  * @brief Registers a media packet callback function to be called once per frame when previewing.
1614  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1615  * @remarks This callback does not work in video recorder mode.\n
1616  *          This function should be called before previewing (see camera_start_preview())\n
1617  *          A registered callback is called on the internal thread of the camera.\n
1618  *          A video frame can be retrieved using a registered callback as a media packet.\n
1619  *          The callback function holds the same buffer that will be drawn on the display device.\n
1620  *          So if you change the media packet in a registerd callback, it will be displayed on the device\n
1621  *          and the media packet is available until it's destroyed by media_packet_destroy().
1622  * @param[in] camera The handle to the camera
1623  * @param[in] callback The callback function to be registered
1624  * @param[in] user_data The user data to be passed to the callback function
1625  * @return 0 on success, otherwise a negative error value
1626  * @retval #CAMERA_ERROR_NONE Successful
1627  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1628  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1629  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1630  * @pre The camera's state should be #CAMERA_STATE_CREATED.
1631  * @see camera_start_preview()
1632  * @see camera_unset_media_packet_preview_cb()
1633  * @see camera_media_packet_preview_cb()
1634  */
1635 int camera_set_media_packet_preview_cb(camera_h camera, camera_media_packet_preview_cb callback, void *user_data);
1636
1637 /**
1638  * @brief Unregisters the media packet callback function.
1639  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1640  * @param[in] camera The handle to the camera
1641  * @return @c 0 on success, otherwise a negative error value
1642  * @retval #CAMERA_ERROR_NONE Successful
1643  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1644  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1645  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1646  * @see camera_set_media_packet_preview_cb()
1647  */
1648 int camera_unset_media_packet_preview_cb(camera_h camera);
1649
1650 /**
1651  * @brief Registers a callback function to be called when the camera state changes.
1652  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1653  * @param[in] camera The handle to the camera
1654  * @param[in] callback The callback function to register
1655  * @param[in] user_data The user data to be passed to the callback function
1656  * @return @c 0 on success, otherwise a negative error value
1657  * @retval #CAMERA_ERROR_NONE Successful
1658  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1659  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1660  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1661  * @post This function will invoke camera_state_changed_cb() when the camera state changes.
1662  * @see camera_unset_state_changed_cb()
1663  * @see camera_state_changed_cb()
1664  */
1665 int camera_set_state_changed_cb(camera_h camera, camera_state_changed_cb callback,
1666         void *user_data);
1667
1668 /**
1669  * @brief Unregisters the callback function.
1670  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1671  * @param[in] camera The handle to the camera
1672  * @return @c 0 on success, otherwise a negative error value
1673  * @retval #CAMERA_ERROR_NONE Successful
1674  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1675  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1676  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1677  * @see camera_set_state_changed_cb()
1678  */
1679 int camera_unset_state_changed_cb(camera_h camera);
1680
1681 /**
1682  * @brief Registers a callback function to be called when the camera is interrupted by policy.
1683  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1684  * @param[in] camera The handle to the camera
1685  * @param[in] callback The callback function to register
1686  * @param[in] user_data The user data to be passed to the callback function
1687  * @return @c 0 on success, otherwise a negative error value
1688  * @retval #CAMERA_ERROR_NONE Successful
1689  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1690  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1691  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1692  * @see camera_unset_interrupted_cb()
1693  * @see camera_interrupted_cb()
1694  */
1695 int camera_set_interrupted_cb(camera_h camera, camera_interrupted_cb callback,
1696             void *user_data);
1697
1698 /**
1699  * @brief Unregisters the callback function.
1700  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1701  * @param[in] camera The handle to the camera
1702  * @return @c 0 on success, otherwise a negative error value
1703  * @retval #CAMERA_ERROR_NONE Successful
1704  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1705  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1706  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1707  * @see camera_set_interrupted_cb()
1708  */
1709 int camera_unset_interrupted_cb(camera_h camera);
1710
1711 /**
1712  * @brief Registers a callback function to be called when the auto-focus state changes.
1713  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1714  * @param[in] camera The handle to the camera
1715  * @param[in] callback The callback function to register
1716  * @param[in] user_data The user data to be passed to the callback function
1717  * @return @c 0 on success, otherwise a negative error value
1718  * @retval #CAMERA_ERROR_NONE Successful
1719  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1720  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1721  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1722  * @post This function will invoke camera_focus_changed_cb() when the auto-focus state changes.
1723  * @see camera_start_focusing()
1724  * @see camera_cancel_focusing()
1725  * @see camera_unset_focus_changed_cb()
1726  * @see camera_focus_changed_cb()
1727  */
1728 int camera_set_focus_changed_cb(camera_h camera, camera_focus_changed_cb callback,
1729         void *user_data);
1730
1731 /**
1732  * @brief Unregisters the callback function.
1733  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1734  * @param[in] camera The handle to the camera
1735  * @return @c 0 on success, otherwise a negative error value
1736  * @retval #CAMERA_ERROR_NONE Successful
1737  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1738  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1739  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1740  * @see camera_set_focus_changed_cb()
1741  */
1742 int camera_unset_focus_changed_cb(camera_h camera);
1743
1744 /**
1745  * @brief Registers a callback function to be called when an asynchronous operation error occurs.
1746  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1747  * @remarks This callback informs about a critical error situation.\n
1748  *          When this callback is invoked, the user should release the resource and terminate the application.\n
1749  *          In case of errors, one of the following codes will occur:\n
1750  *          #CAMERA_ERROR_DEVICE,\n
1751  *          #CAMERA_ERROR_INVALID_OPERATION,\n
1752  *          #CAMERA_ERROR_OUT_OF_MEMORY.
1753  * @param[in] camera The handle to the camera
1754  * @param[in] callback The callback function to register
1755  * @param[in] user_data The user data to be passed to the callback function
1756  * @return @c 0 on success, otherwise a negative error value
1757  * @retval #CAMERA_ERROR_NONE Successful
1758  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1759  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1760  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1761  * @post This function will invoke camera_error_cb() when an asynchronous operation error occurs.
1762
1763  * @see camera_unset_error_cb()
1764  * @see camera_error_cb()
1765  */
1766 int camera_set_error_cb(camera_h camera, camera_error_cb callback, void *user_data);
1767
1768 /**
1769  * @brief Unregisters the callback function.
1770  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1771  * @param[in] camera The handle to the camera
1772  * @return @c 0 on success, otherwise a negative error value
1773  * @retval #CAMERA_ERROR_NONE Successful
1774  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1775  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1776  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1777  * @see camera_set_error_cb()
1778  */
1779 int camera_unset_error_cb(camera_h camera);
1780
1781 /**
1782  * @}
1783  */
1784
1785 /**
1786  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
1787  * @{
1788  */
1789
1790 /**
1791  * @brief Called to get each supported auto-focus mode.
1792  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1793  * @param[in] mode The supported auto-focus mode
1794  * @param[in] user_data The user data passed from the foreach function
1795  * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
1796  * @pre camera_attr_foreach_supported_af_mode() will invoke this callback.
1797  * @see camera_attr_foreach_supported_af_mode()
1798  */
1799 typedef bool (*camera_attr_supported_af_mode_cb)(camera_attr_af_mode_e mode, void *user_data);
1800
1801 /**
1802  * @brief Called to get each supported exposure mode.
1803  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1804  * @param[in] mode The supported exposure mode
1805  * @param[in] user_data The user data passed from the foreach function
1806  * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
1807  * @pre camera_attr_foreach_supported_exposure_mode() will invoke this callback.
1808  * @see camera_attr_foreach_supported_exposure_mode()
1809  * @see #camera_attr_exposure_mode_e
1810  */
1811 typedef bool (*camera_attr_supported_exposure_mode_cb)(camera_attr_exposure_mode_e mode,
1812         void *user_data);
1813
1814 /**
1815  * @brief Called to get each supported ISO mode.
1816  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1817  * @param[in] iso The supported ISO mode
1818  * @param[in] user_data The user data passed from the foreach function
1819  * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
1820  * @pre camera_attr_foreach_supported_iso() will invoke this callback.
1821  * @see camera_attr_foreach_supported_iso()
1822  */
1823 typedef bool (*camera_attr_supported_iso_cb)(camera_attr_iso_e iso, void *user_data);
1824
1825 /**
1826  * @brief Called to get each supported white balance.
1827  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1828  * @param[in] wb The supported white balance mode
1829  * @param[in] user_data The user data passed from the foreach function
1830  * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
1831  * @pre camera_attr_foreach_supported_whitebalance() will invoke this callback.
1832  * @see camera_attr_foreach_supported_whitebalance()
1833  * @see #camera_attr_whitebalance_e
1834  */
1835 typedef bool (*camera_attr_supported_whitebalance_cb)(camera_attr_whitebalance_e wb,
1836         void *user_data);
1837
1838 /**
1839  * @brief Called to get each supported effect mode.
1840  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1841  * @param[in] effect The supported effect mode
1842  * @param[in] user_data The user data passed from the foreach function
1843  * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
1844  * @pre camera_attr_foreach_supported_effect() will invoke this callback.
1845  * @see camera_attr_foreach_supported_effect()
1846  */
1847 typedef bool (*camera_attr_supported_effect_cb)(camera_attr_effect_mode_e effect,
1848         void *user_data);
1849
1850 /**
1851  * @brief Called to get each supported scene mode.
1852  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1853  * @param[in] mode The supported scene mode
1854  * @param[in] user_data The user data passed from the foreach function
1855  * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
1856  * @pre camera_attr_foreach_supported_scene_mode() will invoke this callback.
1857  * @see camera_attr_foreach_supported_scene_mode()
1858  * @see #camera_attr_scene_mode_e
1859  */
1860 typedef bool (*camera_attr_supported_scene_mode_cb)(camera_attr_scene_mode_e mode,
1861         void *user_data);
1862
1863 /**
1864  * @brief Called to get each supported flash mode.
1865  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1866  * @param[in] mode The supported flash mode
1867  * @param[in] user_data The user data passed from the foreach function
1868  * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
1869  * @pre camera_attr_foreach_supported_flash_mode() will invoke this callback.
1870  * @see camera_attr_foreach_supported_flash_mode()
1871  */
1872 typedef bool (*camera_attr_supported_flash_mode_cb)(camera_attr_flash_mode_e mode,
1873         void *user_data);
1874
1875 /**
1876  * @brief Called to get each supported FPS mode.
1877  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1878  * @param[in] mode The supported FPS mode
1879  * @param[in] user_data The user data passed from the foreach function
1880  * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
1881  * @pre camera_attr_foreach_supported_fps() will invoke this callback.
1882  * @see camera_attr_foreach_supported_fps()
1883  */
1884 typedef bool (*camera_attr_supported_fps_cb)(camera_attr_fps_e fps, void *user_data);
1885
1886 /**
1887  * @brief Called to get each supported stream flip mode.
1888  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1889  * @param[in] mode The supported stream flip mode
1890  * @param[in] user_data The user data passed from the foreach function
1891  * @return @c true to continue with the next iteration of the loop, \n @c false to break out of the loop
1892  * @pre camera_attr_foreach_supported_stream_flip() will invoke this callback.
1893  * @see camera_attr_foreach_supported_stream_flip()
1894  */
1895 typedef bool (*camera_attr_supported_stream_flip_cb)(camera_flip_e flip, void *user_data);
1896
1897 /**
1898  * @brief Called to get each supported stream rotation mode.
1899  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1900  * @param[in] mode The supported stream rotation mode
1901  * @param[in] user_data The user data passed from the foreach function
1902  * @return @c true to continue with the next iteration of the loop, \n @c false to break out of the loop
1903  * @pre camera_attr_foreach_supported_stream_rotation() will invoke this callback.
1904  * @see camera_attr_foreach_supported_stream_rotation()
1905  */
1906 typedef bool (*camera_attr_supported_stream_rotation_cb)(camera_rotation_e rotation, void *user_data);
1907
1908 /**
1909  * @brief Called to get each supported theater mode.
1910  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1911  * @param[in] mode The supported theater mode
1912  * @param[in] user_data The user data passed from the foreach function
1913  * @return @c true to continue with the next iteration of the loop, \n @c false to break out of the loop
1914  * @pre camera_attr_foreach_supported_theater_mode() will invoke this callback.
1915  * @see camera_attr_foreach_supported_theater_mode()
1916  */
1917 typedef bool (*camera_attr_supported_theater_mode_cb)(camera_attr_theater_mode_e mode, void *user_data);
1918
1919 /**
1920  * @}
1921  */
1922
1923 /**
1924  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
1925  * @{
1926  */
1927
1928 /**
1929  * @brief Sets the preview frame rate.
1930  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1931  * @remarks This function should be called before previewing (see camera_start_preview()).
1932  * @param[in] camera The handle to the camera
1933  * @param[in] fps The frame rate
1934  * @return @c 0 on success, otherwise a negative error value
1935  * @retval #CAMERA_ERROR_NONE Successful
1936  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1937  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
1938  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1939  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1940  * @see camera_start_preview()
1941  * @see camera_attr_get_preview_fps()
1942  * @see camera_attr_foreach_supported_fps()
1943  */
1944 int camera_attr_set_preview_fps(camera_h camera, camera_attr_fps_e fps);
1945
1946 /**
1947  * @brief Gets the frames per second of a preview video stream.
1948  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1949  * @param[in] camera The handle to the camera
1950  * @param[out] fps The frames per second of the preview video stream
1951  * @return @c 0 on success, otherwise a negative error value
1952  * @retval #CAMERA_ERROR_NONE Successful
1953  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1954  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1955  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1956  * @see camera_attr_set_preview_fps()
1957  * @see camera_attr_foreach_supported_fps()
1958  */
1959 int camera_attr_get_preview_fps(camera_h camera, camera_attr_fps_e *fps);
1960
1961 /**
1962  * @}
1963  */
1964
1965 /**
1966  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
1967  * @{
1968  */
1969
1970 /**
1971  * @brief Retrieves all supported FPS modes by invoking the callback function once for each supported FPS mode.
1972  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1973  * @param[in] camera The handle to the camera
1974  * @param[in] callback The callback function to invoke
1975  * @param[in] user_data The user data to be passed to the callback function
1976  * @return @c 0 on success, otherwise a negative error value
1977  * @retval #CAMERA_ERROR_NONE Successful
1978  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1979  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1980  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1981  * @post This function invokes camera_attr_supported_fps_cb() repeatly to get each supported FPS mode.
1982  * @see camera_attr_set_preview_fps()
1983  * @see camera_attr_get_preview_fps()
1984  * @see camera_attr_supported_fps_cb()
1985  */
1986 int camera_attr_foreach_supported_fps(camera_h camera, camera_attr_supported_fps_cb callback,
1987         void *user_data);
1988
1989 /**
1990  * @brief Retrieves all supported FPS modes by invoking the callback function once for each supported FPS mode.
1991  * @since_tizen 2.4
1992  * @param[in] camera The handle to the camera
1993  * @privlevel public
1994  * @privilege %http://tizen.org/privilege/camera
1995  * @param[in] width Required preview resolution's width
1996  * @param[in] height Required preview resolution's height
1997  * @param[in] callback The callback function to invoke
1998  * @param[in] user_data The user data to be passed to the callback function
1999  * @return @c 0 on success, otherwise a negative error value
2000  * @retval #CAMERA_ERROR_NONE Successful
2001  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2002  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2003  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2004  * @post This function invokes camera_attr_supported_fps_cb() repeatly to get each supported FPS mode.
2005  * @see camera_attr_set_preview_fps()
2006  * @see camera_attr_get_preview_fps()
2007  * @see camera_attr_supported_fps_cb()
2008  */
2009 int camera_attr_foreach_supported_fps_by_resolution(camera_h camera,  int width, int height,
2010         camera_attr_supported_fps_cb callback ,void *user_data);
2011
2012 /**
2013  * @}
2014  */
2015
2016 /**
2017  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
2018  * @{
2019  */
2020
2021 /**
2022  * @brief Sets quality of the image.
2023  * @details The range for image quality is 1 to 100. If @a quality is out of range, #CAMERA_ERROR_INVALID_PARAMETER error occurred.
2024  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2025  * @privlevel public
2026  * @privilege %http://tizen.org/privilege/camera
2027  * @param[in] camera The handle to the camera
2028  * @param[in] quality The quality of image (1 ~ 100)
2029  * @return @c 0 on success, otherwise a negative error value
2030  * @retval #CAMERA_ERROR_NONE Successful
2031  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2032  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
2033  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2034  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2035  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
2036  * @see camera_start_preview()
2037  * @see camera_attr_get_image_quality()
2038  */
2039 int camera_attr_set_image_quality(camera_h camera, int quality);
2040
2041 /**
2042  * @brief Gets the quality of a still image, which is captured.
2043  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2044  * @param[in] camera The handle to the camera
2045  * @param[out] quality The quality of the image(1 ~ 100)
2046  * @return @c 0 on success, otherwise a negative error value
2047  * @retval #CAMERA_ERROR_NONE Successful
2048  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2049  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2050  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2051  * @see camera_attr_set_image_quality()
2052  */
2053 int camera_attr_get_image_quality(camera_h camera, int *quality);
2054
2055 /**
2056  * @brief Sets the zoom level.
2057  * @details The range for the zoom level is received from camera_attr_get_zoom_range(). If @a zoom is out of range, the #CAMERA_ERROR_INVALID_PARAMETER error occurs.
2058  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2059  * @privlevel public
2060  * @privilege %http://tizen.org/privilege/camera
2061  * @param[in] camera The handle to the camera
2062  * @param[in] zoom The zoom level
2063  * @return @c 0 on success, otherwise a negative error value
2064  * @retval #CAMERA_ERROR_NONE Successful
2065  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2066  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2067  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2068  * @see camera_attr_get_zoom()
2069  * @see camera_attr_get_zoom_range()
2070  */
2071 int camera_attr_set_zoom(camera_h camera, int zoom);
2072
2073 /**
2074  * @brief Gets the zoom level.
2075  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2076  * @param[in] camera The handle to the camera
2077  * @param[out] zoom The zoom level
2078  * @return @c 0 on success, otherwise a negative error value
2079  * @retval #CAMERA_ERROR_NONE Successful
2080  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2081  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2082  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2083  * @see camera_attr_set_zoom()
2084  * @see camera_attr_get_zoom_range()
2085  */
2086 int camera_attr_get_zoom(camera_h camera, int *zoom);
2087
2088 /**
2089  * @brief Gets the available zoom level.
2090  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2091  * @remarks If the min value is greater than the max value, it means that this feature is not supported.
2092  * @param[in] camera The handle to the camera
2093  * @param[out] min The minimum zoom level
2094  * @param[out] max The maximum zoom level
2095  * @return @c 0 on success, otherwise a negative error value
2096  * @retval #CAMERA_ERROR_NONE Successful
2097  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2098  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2099  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2100  * @see camera_attr_set_zoom()
2101  * @see camera_attr_get_zoom()
2102  */
2103 int camera_attr_get_zoom_range(camera_h camera , int *min , int *max);
2104
2105
2106 /**
2107  * @brief Sets the auto focus mode.
2108  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2109  * @privlevel public
2110  * @privilege %http://tizen.org/privilege/camera
2111  * @param[in] camera The handle to the camera
2112  * @param[in] mode The auto focus mode
2113  * @return @c 0 on success, otherwise a negative error value
2114  * @retval #CAMERA_ERROR_NONE Successful
2115  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2116  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2117  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2118  * @see camera_attr_get_af_mode()
2119  * @see camera_attr_foreach_supported_af_mode()
2120  * @see #camera_attr_af_mode_e
2121  */
2122 int camera_attr_set_af_mode(camera_h camera, camera_attr_af_mode_e mode);
2123
2124 /**
2125  * @brief Gets the auto focus mode.
2126  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2127  * @privlevel public
2128  * @privilege %http://tizen.org/privilege/camera
2129  * @param[in] camera The handle to the camera
2130  * @param[out] mode The auto focus mode
2131  * @return @c 0 on success, otherwise a negative error value
2132  * @retval #CAMERA_ERROR_NONE Successful
2133  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2134  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2135  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2136  * @see camera_attr_foreach_supported_af_mode()
2137  * @see camera_attr_set_af_mode()
2138  * @see #camera_attr_af_mode_e
2139  */
2140 int camera_attr_get_af_mode(camera_h camera, camera_attr_af_mode_e *mode);
2141
2142 /**
2143  * @brief Sets auto focus area.
2144  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2145  * @privlevel public
2146  * @privilege %http://tizen.org/privilege/camera
2147  * @remarks This API is invalid in the #CAMERA_ATTR_AF_NONE mode.\n
2148  *          The coordinates are mapped to preview area.
2149  * @param[in] camera The handle to the camera
2150  * @param[in] x The x coordinates of the focus area
2151  * @param[in] y The y coordinates of the focus area
2152  * @return @c 0 on success, otherwise a negative error value
2153  * @retval #CAMERA_ERROR_NONE Successful
2154  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2155  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
2156  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2157  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2158  * @see camera_attr_set_af_mode()
2159  * @see camera_attr_clear_af_area()
2160  */
2161 int camera_attr_set_af_area(camera_h camera, int x, int y);
2162
2163 /**
2164  * @brief Clears the auto focus area.
2165  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2166  * @privlevel public
2167  * @privilege %http://tizen.org/privilege/camera
2168  * @remarks The focusing area is set to the center.
2169  * @param[in] camera The handle to the camera
2170  * @return @c 0 on success, otherwise a negative error value
2171  * @retval #CAMERA_ERROR_NONE Successful
2172  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2173  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
2174  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2175  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2176  * @see camera_attr_set_af_mode()
2177  * @see camera_attr_set_af_area()
2178  */
2179 int camera_attr_clear_af_area(camera_h camera);
2180
2181 /**
2182  * @}
2183  */
2184
2185 /**
2186  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
2187  * @{
2188  */
2189
2190 /**
2191  * @brief Retrieves all supported auto focus modes by invoking the callback function once for each supported auto focus mode.
2192  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2193  * @param[in] camera The handle to the camera
2194  * @param[in] callback The callback function to invoke
2195  * @param[in] user_data The user data to be passed to the callback function
2196  * @return @c 0 on success, otherwise a negative error value
2197  * @retval #CAMERA_ERROR_NONE Successful
2198  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2199  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2200  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2201  * @post This function invokes camera_attr_supported_af_mode_cb() to get all the supported auto focus modes.
2202  * @see camera_attr_set_af_mode()
2203  * @see camera_attr_get_af_mode()
2204  * @see camera_attr_supported_af_mode_cb()
2205  */
2206 int camera_attr_foreach_supported_af_mode(camera_h camera,
2207         camera_attr_supported_af_mode_cb callback, void *user_data);
2208
2209 /**
2210  * @}
2211  */
2212
2213 /**
2214  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
2215  * @{
2216  */
2217
2218 /**
2219  * @brief Sets the exposure mode.
2220  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2221  * @privlevel public
2222  * @privilege %http://tizen.org/privilege/camera
2223  * @param[in] camera The handle to the camera
2224  * @param[in] mode The exposure mode
2225  * @return @c 0 on success, otherwise a negative error value
2226  * @retval #CAMERA_ERROR_NONE Successful
2227  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2228  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2229  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2230  * @see camera_attr_get_exposure_mode()
2231  * @see camera_attr_foreach_supported_exposure_mode()
2232  */
2233 int camera_attr_set_exposure_mode(camera_h camera, camera_attr_exposure_mode_e mode);
2234
2235 /**
2236  * @brief Gets the exposure mode.
2237  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2238  * @param[in] camera The handle to the camera
2239  * @param[out] mode The exposure mode
2240  * @return @c 0 on success, otherwise a negative error value
2241  * @retval #CAMERA_ERROR_NONE Successful
2242  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2243  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2244  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2245  * @see camera_attr_set_exposure_mode()
2246  * @see camera_attr_foreach_supported_exposure_mode()
2247  */
2248 int camera_attr_get_exposure_mode(camera_h camera, camera_attr_exposure_mode_e *mode);
2249
2250 /**
2251  * @}
2252  */
2253
2254 /**
2255  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
2256  * @{
2257  */
2258
2259 /**
2260  * @brief Retrieves all supported exposure modes by invoking the callback function once for each supported exposure mode.
2261  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2262  * @param[in] camera The handle to the camera
2263  * @param[in] callback The callback function to be invoked
2264  * @param[in] user_data The user data to be passed to the callback function
2265  * @return @c 0 on success, otherwise a negative error value
2266  * @retval #CAMERA_ERROR_NONE Successful
2267  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2268  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2269  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2270  * @post This function invokes camera_attr_supported_exposure_mode_cb() to get all the supported exposure modes.
2271  * @see camera_attr_set_exposure_mode()
2272  * @see camera_attr_get_exposure_mode()
2273  * @see camera_attr_supported_exposure_mode_cb()
2274  */
2275 int camera_attr_foreach_supported_exposure_mode(camera_h camera,
2276         camera_attr_supported_exposure_mode_cb callback, void *user_data);
2277
2278 /**
2279  * @}
2280  */
2281
2282 /**
2283  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
2284  * @{
2285  */
2286
2287 /**
2288  * @brief Sets the exposure value.
2289  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2290  * @privlevel public
2291  * @privilege %http://tizen.org/privilege/camera
2292  * @param[in] camera The handle to the camera
2293  * @param[in] value The exposure value
2294  * @return @c 0 on success, otherwise a negative error value
2295  * @retval #CAMERA_ERROR_NONE Successful
2296  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2297  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2298  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2299  * @see camera_attr_get_exposure()
2300  */
2301 int camera_attr_set_exposure(camera_h camera, int value);
2302
2303 /**
2304  * @brief Gets the exposure value.
2305  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2306  * @param[in] camera The handle to the camera
2307  * @param[out] value The exposure value
2308  * @return @c 0 on success, otherwise a negative error value
2309  * @retval #CAMERA_ERROR_NONE Successful
2310  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2311  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2312  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2313  * @see camera_attr_set_exposure()
2314  */
2315 int camera_attr_get_exposure(camera_h camera, int *value);
2316
2317 /**
2318  * @brief Gets the available exposure value.
2319  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2320  * @remarks If the min value is greater than the max value, it means that this feature is not supported.
2321  * @param[in] camera The handle to the camera
2322  * @param[out] min The minimum exposure value
2323  * @param[out] max The maximum exposure value
2324  * @return @c 0 on success, otherwise a negative error value
2325  * @retval #CAMERA_ERROR_NONE Successful
2326  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2327  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2328  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2329  * @see camera_attr_set_exposure()
2330  */
2331 int camera_attr_get_exposure_range(camera_h camera, int *min, int *max);
2332
2333 /**
2334  * @brief Sets the ISO level.
2335  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2336  * @privlevel public
2337  * @privilege %http://tizen.org/privilege/camera
2338  * @param[in] camera The handle to the camera
2339  * @param[in] iso The ISO level
2340  * @return @c 0 on success, otherwise a negative error value
2341  * @retval #CAMERA_ERROR_NONE Successful
2342  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2343  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2344  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2345  * @see camera_attr_get_iso()
2346  * @see camera_attr_foreach_supported_iso()
2347  */
2348 int camera_attr_set_iso(camera_h camera, camera_attr_iso_e iso);
2349
2350 /**
2351  * @brief Gets the ISO level.
2352  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2353  * @param[in] camera The handle to the camera
2354  * @param[out] iso The ISO level
2355  * @return @c 0 on success, otherwise a negative error value
2356  * @retval #CAMERA_ERROR_NONE Successful
2357  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2358  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2359  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2360  * @see camera_attr_set_iso()
2361  * @see camera_attr_foreach_supported_iso()
2362  */
2363 int camera_attr_get_iso(camera_h camera, camera_attr_iso_e *iso);
2364
2365 /**
2366  * @}
2367  */
2368
2369 /**
2370  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
2371  * @{
2372  */
2373
2374 /**
2375  * @brief Retrieves all supported ISO levels by invoking the callback function once for each supported ISO level.
2376  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2377  * @param[in] camera The handle to the camera
2378  * @param[in] callback The callback function to be invoked
2379  * @param[in] user_data The user data to be passed to the callback function
2380  * @return @c 0 on success, otherwise a negative error value
2381  * @retval #CAMERA_ERROR_NONE Successful
2382  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2383  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2384  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2385  * @post This function invokes camera_attr_supported_iso_cb() to get all the supported ISO levels.
2386  * @see camera_attr_set_iso()
2387  * @see camera_attr_get_iso()
2388  * @see camera_attr_supported_iso_cb()
2389  */
2390 int camera_attr_foreach_supported_iso(camera_h camera, camera_attr_supported_iso_cb callback,
2391         void *user_data);
2392
2393 /**
2394  * @}
2395  */
2396
2397 /**
2398  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
2399  * @{
2400  */
2401
2402 /**
2403  * @brief Sets the theater mode.
2404  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2405  * @privlevel public
2406  * @privilege %http://tizen.org/privilege/camera
2407  * @remarks If you want to display the preview image on the external display with the full screen mode, use this function.
2408  * @param[in] camera The handle to the camera
2409  * @param[in] mode The mode to change
2410  * @return @c 0 on success, otherwise a negative error value
2411  * @retval #CAMERA_ERROR_NONE Successful
2412  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2413  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2414  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2415  * @pre This function is valid only when the external display is connected.
2416  * @see camera_attr_get_theater_mode()
2417  */
2418 int camera_attr_set_theater_mode(camera_h camera, camera_attr_theater_mode_e mode);
2419
2420 /**
2421  * @brief Gets the theater mode.
2422  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2423  * @param[in] camera The handle to the camera
2424  * @param[in] mode Currnet theater mode
2425  * @return @c 0 on success, otherwise a negative error value
2426  * @retval #CAMERA_ERROR_NONE Successful
2427  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2428  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2429  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2430  * @see camera_attr_get_theater_mode()
2431  */
2432 int camera_attr_get_theater_mode(camera_h camera, camera_attr_theater_mode_e *mode);
2433
2434 /**
2435  * @}
2436  */
2437
2438 /**
2439  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
2440  * @{
2441  */
2442
2443 /**
2444  * @brief Retrieves all supported theater modes by invoking callback function once for each supported theater modes.
2445  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2446  * @param[in] camera The handle to the camera
2447  * @param[in] callback The callback function to be invoked
2448  * @param[in] user_data The user data to be passed to the callback function
2449  * @return @c 0 on success, otherwise a negative error value
2450  * @retval #CAMERA_ERROR_NONE Successful
2451  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2452  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2453  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2454  * @post This function invokes camera_attr_supported_theater_mode_cb() to get all supported theater modes.
2455  * @see camera_attr_set_theater_mode()
2456  * @see camera_attr_get_theater_mode()
2457  * @see camera_attr_supported_theater_mode_cb()
2458  */
2459 int camera_attr_foreach_supported_theater_mode(camera_h camera,
2460         camera_attr_supported_theater_mode_cb callback, void *user_data);
2461
2462 /**
2463  * @}
2464  */
2465
2466
2467 /**
2468  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
2469  * @{
2470  */
2471
2472 /**
2473  * @brief Sets the brightness level.
2474  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2475  * @privlevel public
2476  * @privilege %http://tizen.org/privilege/camera
2477  * @param[in] camera The handle to the camera
2478  * @param[in] level The brightness level
2479  * @return @c 0 on success, otherwise a negative error value
2480  * @retval #CAMERA_ERROR_NONE Successful
2481  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2482  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2483  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2484  * @see camera_attr_get_brightness()
2485  * @see camera_attr_get_brightness_range()
2486  */
2487 int camera_attr_set_brightness(camera_h camera, int level);
2488
2489 /**
2490  * @brief Gets the brightness level.
2491  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2492  * @param[in] camera The handle to the camera
2493  * @param[out] level The brightness level
2494  * @return @c 0 on success, otherwise a negative error value
2495  * @retval #CAMERA_ERROR_NONE Successful
2496  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2497  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2498  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2499  * @see camera_attr_set_brightness()
2500  * @see camera_attr_get_brightness_range()
2501  */
2502 int camera_attr_get_brightness(camera_h camera, int *level);
2503
2504 /**
2505  * @brief Gets the available brightness level.
2506  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2507  * @remarks If the min value is greater than the max value, it means that this feature is not supported.
2508  * @param[in] camera The handle to the camera
2509  * @param[out] min The minimum brightness level
2510  * @param[out] max The maximum brightness level
2511  * @return @c 0 on success, otherwise a negative error value
2512  * @retval #CAMERA_ERROR_NONE Successful
2513  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2514  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2515  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2516  * @see camera_attr_set_brightness()
2517  * @see camera_attr_get_brightness()
2518  */
2519 int camera_attr_get_brightness_range(camera_h camera, int *min, int *max);
2520
2521 /**
2522  * @brief Sets the contrast level.
2523  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2524  * @privlevel public
2525  * @privilege %http://tizen.org/privilege/camera
2526  * @param[in] camera The handle to the camera
2527  * @param[in] level The contrast level
2528  * @return @c 0 on success, otherwise a negative error value
2529  * @retval #CAMERA_ERROR_NONE Successful
2530  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2531  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2532  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2533  * @see camera_attr_get_contrast()
2534  * @see camera_attr_get_contrast_range()
2535  */
2536 int camera_attr_set_contrast(camera_h camera, int level);
2537
2538 /**
2539  * @brief Gets the contrast level.
2540  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2541  * @param[in] camera The handle to the camera
2542  * @param[out] level The contrast level
2543  * @return @c 0 on success, otherwise a negative error value
2544  * @retval #CAMERA_ERROR_NONE Successful
2545  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2546  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2547  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2548  * @see camera_attr_set_contrast()
2549  * @see camera_attr_get_contrast_range()
2550  */
2551 int camera_attr_get_contrast(camera_h camera, int *level);
2552
2553 /**
2554  * @brief Gets the available contrast level.
2555  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2556  * @remarks If the min value is greater than the max value, it means that this feature is not supported.
2557  * @param[in] camera The handle to the camera
2558  * @param[out] min The minimum contrast level
2559  * @param[out] max The maximum contrast level
2560  * @return @c 0 on success, otherwise a negative error value
2561  * @retval #CAMERA_ERROR_NONE Successful
2562  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2563  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2564  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2565  * @see camera_attr_set_contrast()
2566  * @see camera_attr_get_contrast()
2567  */
2568 int camera_attr_get_contrast_range(camera_h camera, int *min , int *max);
2569
2570 /**
2571  * @brief Sets the white balance mode.
2572  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2573  * @privlevel public
2574  * @privilege %http://tizen.org/privilege/camera
2575  * @param[in] camera The handle to the camera
2576  * @param[in] whitebalance The white balance mode
2577  * @return @c 0 on success, otherwise a negative error value
2578  * @retval #CAMERA_ERROR_NONE Successful
2579  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2580  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2581  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2582  * @see camera_attr_foreach_supported_whitebalance()
2583  * @see camera_attr_get_whitebalance()
2584  */
2585 int camera_attr_set_whitebalance(camera_h camera, camera_attr_whitebalance_e whitebalance);
2586
2587 /**
2588  * @brief Gets the white balance mode.
2589  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2590  * @param[in] camera The handle to the camera
2591  * @param[out] whitebalance The white balance mode
2592  * @return @c 0 on success, otherwise a negative error value
2593  * @retval #CAMERA_ERROR_NONE Successful
2594  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2595  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2596  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2597  * @see camera_attr_foreach_supported_whitebalance()
2598  * @see camera_attr_set_whitebalance()
2599  */
2600 int camera_attr_get_whitebalance(camera_h camera, camera_attr_whitebalance_e *whitebalance);
2601
2602 /**
2603  * @}
2604  */
2605
2606 /**
2607  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
2608  * @{
2609  */
2610
2611 /**
2612  * @brief Retrieves all supported white balances by invoking the callback function once for each supported white balance.
2613  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2614  * @param[in] camera The handle to the camera
2615  * @param[in] callback The callback function to be invoked
2616  * @param[in] user_data The user data to be passed to the callback function
2617  * @return @c 0 on success, otherwise a negative error value
2618  * @retval #CAMERA_ERROR_NONE Successful
2619  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2620  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2621  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2622  * @post This function invokes camera_attr_supported_whitebalance_cb() to get all the supported white balances.
2623  * @see camera_attr_set_whitebalance()
2624  * @see camera_attr_get_whitebalance()
2625  * @see camera_attr_supported_whitebalance_cb()
2626  */
2627 int camera_attr_foreach_supported_whitebalance(camera_h camera,
2628         camera_attr_supported_whitebalance_cb callback, void *user_data);
2629
2630 /**
2631  * @}
2632  */
2633
2634 /**
2635  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
2636  * @{
2637  */
2638
2639 /**
2640  * @brief Sets the camera effect mode.
2641  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2642  * @privlevel public
2643  * @privilege %http://tizen.org/privilege/camera
2644  * @param[in] camera The handle to the camera
2645  * @param[in] effect The camera effect mode
2646  * @return @c 0 on success, otherwise a negative error value
2647  * @retval #CAMERA_ERROR_NONE Successful
2648  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2649  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2650  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2651  * @see camera_attr_foreach_supported_effect()
2652  * @see camera_attr_get_effect()
2653  */
2654 int camera_attr_set_effect(camera_h camera, camera_attr_effect_mode_e effect);
2655
2656
2657 /**
2658  * @brief Gets the camera effect mode.
2659  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2660  * @param[in] camera The handle to the camera
2661  * @param[out] effect The camera effect mode
2662  * @return @c 0 on success, otherwise a negative error value
2663  * @retval #CAMERA_ERROR_NONE Successful
2664  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2665  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2666  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2667  * @see camera_attr_foreach_supported_effect()
2668  * @see camera_attr_set_effect()
2669  */
2670 int camera_attr_get_effect(camera_h camera, camera_attr_effect_mode_e *effect);
2671
2672 /**
2673  * @}
2674  */
2675
2676 /**
2677  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
2678  * @{
2679  */
2680
2681 /**
2682  * @brief Retrieves all supported effect modes by invoking the callback function once for each supported effect mode.
2683  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2684  * @param[in] camera The handle to the camera
2685  * @param[in] callback The callback function to invoke
2686  * @param[in] user_data The user data to be passed to the callback function
2687  * @return @c 0 on success, otherwise a negative error value
2688  * @retval #CAMERA_ERROR_NONE Successful
2689  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2690  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2691  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2692  * @post This function invokes camera_attr_supported_effect_cb() to get all the supported effect modes.
2693  * @see camera_attr_set_effect()
2694  * @see camera_attr_get_effect()
2695  * @see camera_attr_supported_effect_cb()
2696  */
2697 int camera_attr_foreach_supported_effect(camera_h camera,
2698         camera_attr_supported_effect_cb callback, void *user_data);
2699
2700 /**
2701  * @}
2702  */
2703
2704 /**
2705  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
2706  * @{
2707  */
2708
2709 /**
2710  * @brief Sets the scene mode.
2711  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2712  * @privlevel public
2713  * @privilege %http://tizen.org/privilege/camera
2714  * @param[in] camera The handle to the camera
2715  * @param[in] mode The scene mode
2716  * @return @c 0 on success, otherwise a negative error value
2717  * @retval #CAMERA_ERROR_NONE Successful
2718  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2719  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2720  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2721  * @see camera_attr_foreach_supported_scene_mode()
2722  * @see camera_attr_get_scene_mode()
2723  */
2724 int camera_attr_set_scene_mode(camera_h camera, camera_attr_scene_mode_e mode);
2725
2726 /**
2727  * @brief Gets the scene mode.
2728  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2729  * @param[in] camera The handle to the camera
2730  * @param[out] mode The scene mode
2731  * @return @c 0 on success, otherwise a negative error value
2732  * @retval #CAMERA_ERROR_NONE Successful
2733  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2734  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2735  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2736  * @see camera_attr_foreach_supported_scene_mode()
2737  * @see camera_attr_set_scene_mode()
2738  */
2739 int camera_attr_get_scene_mode(camera_h camera, camera_attr_scene_mode_e *mode);
2740
2741 /**
2742  * @}
2743  */
2744
2745 /**
2746  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
2747  * @{
2748  */
2749
2750 /**
2751  * @brief Retrieves all supported scene modes by invoking the callback function once for each supported scene mode.
2752  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2753  * @param[in] camera The handle to the camera
2754  * @param[in] callback The callback function to invoke
2755  * @param[in] user_data The user data to be passed to the callback function
2756  * @return @c 0 on success, otherwise a negative error value
2757  * @retval #CAMERA_ERROR_NONE Successful
2758  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2759  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2760  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2761  * @post This function invokes camera_attr_supported_scene_mode_cb() to get all the supported scene modes.
2762  * @see camera_attr_set_scene_mode()
2763  * @see camera_attr_get_scene_mode()
2764  * @see camera_attr_supported_scene_mode_cb()
2765  */
2766 int camera_attr_foreach_supported_scene_mode(camera_h camera,
2767         camera_attr_supported_scene_mode_cb callback, void *user_data);
2768
2769 /**
2770  * @}
2771  */
2772
2773 /**
2774  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
2775  * @{
2776  */
2777
2778 /**
2779  * @brief Enables to write EXIF(Exchangeable image file format) tags in a JPEG file.
2780  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2781  * @param[in] camera The handle to the camera
2782  * @param[in] enable If @c true writing EXIF tags in a JPEG file is enabled, otherwise @c false
2783  * @return @c 0 on success, otherwise a negative error value
2784  * @retval #CAMERA_ERROR_NONE Successful
2785  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2786  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2787  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2788  * @see         camera_attr_is_enabled_tag()
2789  */
2790 int camera_attr_enable_tag(camera_h camera, bool enable);
2791
2792 /**
2793  * @brief Gets the value that indicates whether writing EXIF(Exchangeable image file format) tags in a JPEG file is enabled.
2794  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2795  * @param[in] camera The handle to the camera
2796  * @param[out] enabled  If @c true camera information is enabled, otherwise @c false
2797  * @return @c 0 on success, otherwise a negative error value
2798  * @retval #CAMERA_ERROR_NONE Successful
2799  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2800  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2801  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2802  * @see         camera_attr_enable_tag()
2803  */
2804 int camera_attr_is_enabled_tag(camera_h camera, bool *enabled);
2805
2806 /**
2807  * @brief Sets the camera image description in the EXIF(Exchangeable image file format) tag.
2808  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2809  * @param[in] camera The handle to the camera
2810  * @param[in] description The string with description
2811  * @return @c 0 on success, otherwise a negative error value
2812  * @retval #CAMERA_ERROR_NONE Successful
2813  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2814  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2815  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2816  * @see camera_attr_get_tag_image_description()
2817  */
2818 int camera_attr_set_tag_image_description(camera_h camera, const char *description);
2819
2820 /**
2821  * @brief Gets the camera image description in EXIF(Exchangeable image file format) tag.
2822  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2823  * @remarks You must release @a description using free().
2824  * @param[in] camera The handle to the camera
2825  * @param[out] description A pointer to a string
2826  * @return @c 0 on success, otherwise a negative error value
2827  * @retval #CAMERA_ERROR_NONE Successful
2828  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2829  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2830  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2831  * @see camera_attr_set_tag_image_description()
2832  */
2833 int camera_attr_get_tag_image_description(camera_h camera, char **description);
2834
2835 /**
2836  * @brief Sets the camera orientation in the EXIF(Exchangeable image file format) tag.
2837  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2838  * @param[in] camera The handle to the camera
2839  * @param[in] orientation The camera orientation
2840  * @return @c 0 on success, otherwise a negative error value
2841  * @retval #CAMERA_ERROR_NONE Successful
2842  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2843  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2844  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2845  * @see camera_attr_get_tag_orientation()
2846  */
2847 int camera_attr_set_tag_orientation(camera_h camera, camera_attr_tag_orientation_e orientation);
2848
2849 /**
2850  * @brief Gets the camera orientation in the EXIF(Exchangeable image file format) tag.
2851  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2852  * @param[in] camera The handle to the camera
2853  * @param[out] orientation The camera orientation
2854  * @return @c 0 on success, otherwise a negative error value
2855  * @retval #CAMERA_ERROR_NONE Successful
2856  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2857  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2858  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2859  * @see camera_attr_set_tag_orientation()
2860  */
2861 int camera_attr_get_tag_orientation(camera_h camera, camera_attr_tag_orientation_e *orientation);
2862
2863 /**
2864  * @brief Sets the software information in the EXIF(Exchangeable image file format) tag.
2865  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2866  * @param[in] camera The handle to the camera
2867  * @param[in] software The software information tag
2868  * @return @c 0 on success, otherwise a negative error value
2869  * @retval #CAMERA_ERROR_NONE Successful
2870  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2871  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2872  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2873  * @see camera_attr_get_tag_software()
2874  */
2875 int camera_attr_set_tag_software(camera_h camera, const char *software);
2876
2877 /**
2878  * @brief Gets the software information in the EXIF(Exchangeable image file format) tag.
2879  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2880  * @remarks You must release @a software using free().
2881  * @param[in] camera The handle to the camera
2882  * @param[out] software A pointer to a string
2883  * @return @c 0 on success, otherwise a negative error value
2884  * @retval #CAMERA_ERROR_NONE Successful
2885  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2886  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2887  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2888  * @see camera_attr_set_tag_software()
2889  */
2890 int camera_attr_get_tag_software(camera_h camera, char **software);
2891
2892 /**
2893  * @brief Sets the geotag(GPS data) in the EXIF(Exchangeable image file format) tag.
2894  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2895  * @param[in] camera The handle to the camera
2896  * @param[in] latitude The latitude data
2897  * @param[in] longitude The longitude data
2898  * @param[in] altitude The altitude data
2899  * @return @c 0 on success, otherwise a negative error value
2900  * @retval #CAMERA_ERROR_NONE Successful
2901  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2902  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2903  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2904  * @see camera_attr_get_geotag()
2905  * @see camera_attr_remove_geotag()
2906  */
2907 int camera_attr_set_geotag(camera_h camera, double latitude , double longitude, double altitude);
2908
2909 /**
2910  * @brief Gets the geotag(GPS data) in the EXIF(Exchangeable image file format) tag.
2911  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2912  * @param[in] camera The handle to the camera
2913  * @param[out] latitude The latitude data
2914  * @param[out] longitude The longitude data
2915  * @param[out] altitude The altitude data
2916  * @return @c 0 on success, otherwise a negative error value
2917  * @retval #CAMERA_ERROR_NONE Successful
2918  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2919  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2920  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2921  * @see camera_attr_set_geotag()
2922  * @see camera_attr_remove_geotag()
2923  */
2924 int camera_attr_get_geotag(camera_h camera, double *latitude , double *longitude, double *altitude);
2925
2926 /**
2927  * @brief Removes the geotag(GPS data) in the EXIF(Exchangeable image file format) tag.
2928  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2929  * @param[in] camera The handle to the camera
2930  * @return @c 0 on success, otherwise a negative error value
2931  * @retval #CAMERA_ERROR_NONE Successful
2932  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2933  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2934  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2935  * @see camera_attr_set_geotag()
2936  * @see camera_attr_get_geotag()
2937  */
2938 int camera_attr_remove_geotag(camera_h camera);
2939
2940 /**
2941  * @brief Sets the camera's flash mode.
2942  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2943  * @privlevel public
2944  * @privilege %http://tizen.org/privilege/camera
2945  * @remarks Since 2.4, while setting the flash mode, if the flash was preempted by other APIs,\n
2946             then this function returns #CAMERA_ERROR_DEVICE_BUSY error.
2947  * @param[in] camera The handle to the camera
2948  * @param[in] mode The flash mode
2949  * @return @c 0 on success, otherwise a negative error value
2950  * @retval #CAMERA_ERROR_NONE Successful
2951  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2952  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2953  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2954  * @retval #CAMERA_ERROR_DEVICE_BUSY The flash was preempted by other API
2955  * @see camera_attr_foreach_supported_flash_mode()
2956  * @see camera_attr_get_flash_mode()
2957  */
2958 int camera_attr_set_flash_mode(camera_h camera, camera_attr_flash_mode_e mode);
2959
2960 /**
2961  * @brief Gets the camera's flash mode.
2962  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2963  * @param[in] camera The handle to the camera
2964  * @param[out] mode The flash mode
2965  * @return @c 0 on success, otherwise a negative error value
2966  * @retval #CAMERA_ERROR_NONE Successful
2967  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2968  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2969  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2970  * @see camera_attr_foreach_supported_flash_mode()
2971  * @see camera_attr_set_flash_mode()
2972  */
2973 int camera_attr_get_flash_mode(camera_h camera, camera_attr_flash_mode_e *mode);
2974
2975 /**
2976  * @}
2977  */
2978
2979 /**
2980  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
2981  * @{
2982  */
2983
2984 /**
2985  * @brief Retrieves all supported flash modes by invoking the callback function once for each supported flash mode.
2986  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2987  * @param[in] camera The handle to the camera
2988  * @param[in] callback The callback function to invoke
2989  * @param[in] user_data The user data passed to the callback registration function
2990  * @return @c 0 on success, otherwise a negative error value
2991  * @retval #CAMERA_ERROR_NONE Successful
2992  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2993  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2994  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2995  * @post This function invokes camera_attr_supported_flash_mode_cb() to get all supported flash modes.
2996  * @see camera_attr_set_flash_mode()
2997  * @see camera_attr_get_flash_mode()
2998  * @see camera_attr_supported_flash_mode_cb()
2999  */
3000 int camera_attr_foreach_supported_flash_mode(camera_h camera,
3001         camera_attr_supported_flash_mode_cb callback, void *user_data);
3002
3003 /**
3004  * @}
3005  */
3006
3007 /**
3008  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
3009  * @{
3010  */
3011
3012 /**
3013  * @brief Gets the camera len's orientation angle.
3014  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3015  * @param[in] camera The handle to the camera
3016  * @param[out] angle The orientation angle
3017  * @return @c 0 on success, otherwise a negative error value
3018  * @retval #CAMERA_ERROR_NONE Successful
3019  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3020  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3021  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3022  * @see camera_set_display_rotation()
3023  */
3024 int camera_attr_get_lens_orientation(camera_h camera, int *angle);
3025
3026 /**
3027  * @brief Sets the stream rotation.
3028  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3029  * @param[in] camera The handle to the camera
3030  * @param[in] rotation The stream rotation
3031  * @return @c 0 on success, otherwise a negative error value
3032  * @retval #CAMERA_ERROR_NONE Successful
3033  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3034  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3035  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3036  * @pre The camera state must be set to #CAMERA_STATE_CREATED.
3037  * @see camera_attr_get_stream_rotation()
3038  */
3039 int camera_attr_set_stream_rotation(camera_h camera , camera_rotation_e rotation);
3040
3041 /**
3042  * @brief Gets the stream rotation.
3043  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3044  * @param[in] camera The handle to the camera
3045  * @param[out] rotation The stream rotation
3046  * @return @c 0 on success, otherwise a negative error value
3047  * @retval #CAMERA_ERROR_NONE Successful
3048  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3049  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3050  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3051  * @pre The camera state must be set to #CAMERA_STATE_CREATED.
3052  * @see camera_attr_set_stream_rotation()
3053  */
3054 int camera_attr_get_stream_rotation(camera_h camera , camera_rotation_e *rotation);
3055
3056 /**
3057  * @}
3058  */
3059
3060 /**
3061  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
3062  * @{
3063  */
3064
3065 /**
3066  * @brief Retrieves all supported stream rotation modes by invoking callback function once for each supported stream rotation mode.
3067  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3068  * @param[in] camera The handle to the camera
3069  * @param[in] callback The callback function to invoke
3070  * @param[in] user_data The user data to be passed to the callback function
3071  * @return @c 0 on success, otherwise a negative error value
3072  * @retval #CAMERA_ERROR_NONE Successful
3073  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3074  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3075  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3076  * @post This function invokes camera_attr_supported_stream_rotation_cb() to get all supported stream rotation mode.
3077  * @see camera_attr_set_stream_rotation()
3078  * @see camera_attr_get_stream_rotation()
3079  * @see camera_attr_supported_stream_rotation_cb()
3080  */
3081 int camera_attr_foreach_supported_stream_rotation(camera_h camera,
3082         camera_attr_supported_stream_rotation_cb callback, void *user_data);
3083
3084 /**
3085  * @}
3086  */
3087
3088 /**
3089  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
3090  * @{
3091  */
3092
3093 /**
3094  * @brief Sets the stream flip.
3095  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3096  * @param[in] camera The handle to the camera
3097  * @param[in] flip The stream flip
3098  * @return @c 0 on success, otherwise a negative error value
3099  * @retval #CAMERA_ERROR_NONE Successful
3100  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3101  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3102  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3103  * @pre The camera state must be set to #CAMERA_STATE_CREATED.
3104  * @see camera_attr_set_stream_rotation()
3105  */
3106 int camera_attr_set_stream_flip(camera_h camera , camera_flip_e flip);
3107
3108 /**
3109  * @brief Gets the stream flip.
3110  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3111  * @param[in] camera The handle to the camera
3112  * @param[out] flip  The stream flip
3113  * @return @c 0 on success, otherwise a negative error value
3114  * @retval #CAMERA_ERROR_NONE Successful
3115  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3116  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3117  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3118  * @pre The camera state must be set to #CAMERA_STATE_CREATED.
3119  * @see camera_attr_set_stream_rotation()
3120  */
3121 int camera_attr_get_stream_flip(camera_h camera , camera_flip_e *flip);
3122
3123 /**
3124  * @}
3125  */
3126
3127 /**
3128  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
3129  * @{
3130  */
3131
3132 /**
3133  * @brief Retrieves all supported stream flip modes by invoking callback function once for each supported stream flip mode.
3134  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3135  * @param[in] camera The handle to the camera
3136  * @param[in] callback The callback function to invoke
3137  * @param[in] user_data The user data to be passed to the callback function
3138  * @return @c 0 on success, otherwise a negative error value
3139  * @retval #CAMERA_ERROR_NONE Successful
3140  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3141  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3142  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3143  * @post This function invokes camera_attr_supported_stream_flip_cb() to get all supported stream flip mode.
3144  * @see camera_attr_set_stream_flip()
3145  * @see camera_attr_get_stream_flip()
3146  * @see camera_attr_supported_stream_flip_cb()
3147  */
3148 int camera_attr_foreach_supported_stream_flip(camera_h camera,
3149         camera_attr_supported_stream_flip_cb callback, void *user_data);
3150
3151 /**
3152  * @}
3153  */
3154
3155 /**
3156  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
3157  * @{
3158  */
3159
3160 /**
3161  * @brief Called when the HDR capture process is updated.
3162  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3163  * @param[in] percent The progress percentage of HDR capture
3164  * @param[in] user_data The user data passed from the callback registration function
3165  * @pre camera_start_capture() will invoke this callback if you register it using camera_attr_set_hdr_capture_progress_cb().
3166  * @see camera_attr_get_hdr_mode()
3167  * @see camera_attr_set_hdr_capture_progress_cb()
3168  * @see camera_attr_unset_hdr_capture_progress_cb()
3169  * @see camera_attr_is_supported_hdr_capture()
3170  */
3171 typedef void (*camera_attr_hdr_progress_cb)(int percent, void *user_data);
3172
3173 /**
3174  * @brief Sets the mode of HDR(High dynamic range) capture.
3175  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3176  * @privlevel public
3177  * @privilege %http://tizen.org/privilege/camera
3178  * @remarks Taking multiple pictures at different exposure levels and intelligently stitching them together so that we eventually arrive at a picture that is representative in both dark and bright areas.\n
3179  *          If this attribute is set to @c true. camera_attr_hdr_progress_cb() is invoked during capture.\n
3180  *          If you set #CAMERA_ATTR_HDR_MODE_KEEP_ORIGINAL, the capturing callback is invoked twice. The first callback is delivering origin image data. The second callback is delivering improved image data.
3181  * @param[in] camera The handle to the camera
3182  * @param[in] mode The mode of HDR capture
3183  * @return @c 0 on success, otherwise a negative error value
3184  * @retval #CAMERA_ERROR_NONE Successful
3185  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3186  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3187  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3188  * @see camera_attr_get_hdr_mode()
3189  * @see camera_attr_set_hdr_capture_progress_cb()
3190  * @see camera_attr_unset_hdr_capture_progress_cb()
3191  * @see camera_attr_is_supported_hdr_capture()
3192  *
3193  */
3194 int camera_attr_set_hdr_mode(camera_h camera, camera_attr_hdr_mode_e mode);
3195
3196 /**
3197  * @brief Gets the mode of HDR(High dynamic range) capture.
3198  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3199  * @param[in] camera The handle to the camera
3200  * @param[out] mode The mode of HDR capture
3201  * @return @c 0 on success, otherwise a negative error value
3202  * @retval #CAMERA_ERROR_NONE Successful
3203  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3204  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3205  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3206  * @see camera_attr_set_hdr_mode()
3207  * @see camera_attr_set_hdr_capture_progress_cb()
3208  * @see camera_attr_unset_hdr_capture_progress_cb()
3209  * @see camera_attr_is_supported_hdr_capture()
3210  */
3211 int camera_attr_get_hdr_mode(camera_h camera, camera_attr_hdr_mode_e *mode);
3212
3213 /**
3214  * @brief Registers a callback function to be called when HDR capture is progressing.
3215  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3216  * @remarks This callback notifies progress of the HDR process.
3217  * @param[in] camera The handle to the camera
3218  * @param[in] callback The callback function to invoke
3219  * @param[in] user_data The user data passed to the callback registration function
3220  * @return @c 0 on success, otherwise a negative error value
3221  * @retval #CAMERA_ERROR_NONE Successful
3222  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3223  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3224  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3225  * @see camera_attr_set_hdr_mode()
3226  * @see camera_attr_get_hdr_mode()
3227  * @see camera_attr_unset_hdr_capture_progress_cb()
3228  * @see camera_attr_is_supported_hdr_capture()
3229  */
3230 int camera_attr_set_hdr_capture_progress_cb(camera_h camera, camera_attr_hdr_progress_cb callback, void* user_data);
3231
3232 /**
3233  * @brief Unregisters the callback function.
3234  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3235  * @param[in] camera The handle to the camera
3236  * @return @c 0 on success, otherwise a negative error value
3237  * @retval #CAMERA_ERROR_NONE Successful
3238  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3239  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3240  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3241  * @see camera_attr_set_hdr_mode()
3242  * @see camera_attr_get_hdr_mode()
3243  * @see camera_attr_set_hdr_capture_progress_cb()
3244  * @see camera_attr_is_supported_hdr_capture()
3245  */
3246 int camera_attr_unset_hdr_capture_progress_cb(camera_h camera);
3247
3248 /**
3249  * @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
3250  * @brief Gets the support state of HDR capture.
3251  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3252  * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
3253  * @param[in] camera The handle to the camera
3254  * @return @c true if supported, otherwise @c false
3255  * @exception #CAMERA_ERROR_NONE Successful
3256  * @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3257  * @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3258  * @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3259  * @see camera_attr_set_hdr_mode()
3260  * @see camera_attr_get_hdr_mode()
3261  * @see camera_attr_set_hdr_capture_progress_cb()
3262  * @see camera_attr_unset_hdr_capture_progress_cb()
3263  */
3264 bool camera_attr_is_supported_hdr_capture(camera_h camera);
3265
3266 /**
3267  * @brief Enables/Disables the anti-shake feature.
3268  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3269  * @privlevel public
3270  * @privilege %http://tizen.org/privilege/camera
3271  * @remarks This feature is used for image capture.
3272  * @param[in] camera The handle to the camera
3273  * @param[in] enable If @c true the anti-shake feature is enabled, otherwise @c false
3274  * @return @c 0 on success, otherwise a negative error value
3275  * @retval #CAMERA_ERROR_NONE Successful
3276  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3277  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3278  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3279  * @see camera_attr_is_enabled_anti_shake()
3280  * @see camera_attr_is_supported_anti_shake()
3281  *
3282  */
3283 int camera_attr_enable_anti_shake(camera_h camera, bool enable);
3284
3285 /**
3286  * @brief Gets the state of the anti-shake feature.
3287  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3288  * @param[in] camera The handle to the camera
3289  * @param[out] enabled The state of anti-shake
3290  * @return @c 0 on success, otherwise a negative error value
3291  * @retval #CAMERA_ERROR_NONE Successful
3292  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3293  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3294  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3295  * @see camera_attr_enable_anti_shake()
3296  * @see camera_attr_is_supported_anti_shake()
3297  */
3298 int camera_attr_is_enabled_anti_shake(camera_h camera , bool *enabled);
3299
3300 /**
3301  * @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
3302  * @brief Gets the support state of the anti-shake feature.
3303  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3304  * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
3305  * @param[in] camera The handle to the camera
3306  * @return @c true if supported, otherwise @c false
3307  * @exception #CAMERA_ERROR_NONE Successful
3308  * @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3309  * @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3310  * @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3311  * @see camera_attr_enable_anti_shake()
3312  * @see camera_attr_is_enabled_anti_shake()
3313  */
3314 bool camera_attr_is_supported_anti_shake(camera_h camera);
3315
3316 /**
3317  * @brief Enables/Disables the video stabilization feature.
3318  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3319  * @privlevel public
3320  * @privilege %http://tizen.org/privilege/camera
3321  * @remarks If video stabilization is enabled, zero shutter lag is disabled.\n
3322  *          This feature is used to record a video.
3323  * @param[in] camera The handle to the camera
3324  * @param[in] enable If @c true video stabilization is enabled, otherwise @c false
3325  * @return @c 0 on success, otherwise a negative error value
3326  * @retval #CAMERA_ERROR_NONE Successful
3327  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3328  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3329  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3330  * @see camera_attr_is_enabled_video_stabilization()
3331  * @see camera_attr_is_supported_video_stabilization()
3332  *
3333  */
3334 int camera_attr_enable_video_stabilization(camera_h camera, bool enable);
3335
3336 /**
3337  * @brief Gets the state of the video stabilization feature.
3338  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3339  * @param[in] camera The handle to the camera
3340  * @param[out] enabled The state of video stabilization
3341  * @return @c 0 on success, otherwise a negative error value
3342  * @retval #CAMERA_ERROR_NONE Successful
3343  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3344  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3345  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3346  * @see camera_attr_enable_video_stabilization()
3347  * @see camera_attr_is_supported_video_stabilization()
3348  */
3349 int camera_attr_is_enabled_video_stabilization(camera_h camera, bool *enabled);
3350
3351 /**
3352  * @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
3353  * @brief Gets the support state of the video stabilization feature.
3354  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3355  * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
3356  * @param[in] camera The handle to the camera
3357  * @return @c true if supported, otherwise @c false
3358  * @exception #CAMERA_ERROR_NONE Successful
3359  * @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3360  * @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3361  * @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3362  * @see camera_attr_enable_video_stabilization()
3363  * @see camera_attr_is_enabled_video_stabilization()
3364  */
3365 bool camera_attr_is_supported_video_stabilization(camera_h camera);
3366
3367 /**
3368  * @brief Enables/Disables auto contrast.
3369  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3370  * @privlevel public
3371  * @privilege %http://tizen.org/privilege/camera
3372  * @param[in] camera The handle to the camera
3373  * @param[in] enable If @c true auto contrast is enabled, otherwise @c false
3374  * @return @c 0 on success, otherwise a negative error value
3375  * @retval #CAMERA_ERROR_NONE Successful
3376  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3377  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3378  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3379  * @see camera_attr_is_enabled_auto_contrast()
3380  */
3381 int camera_attr_enable_auto_contrast(camera_h camera, bool enable);
3382
3383 /**
3384  * @brief Gets the state of auto contrast.
3385  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3386  * @param[in] camera The handle to the camera
3387  * @param[out] enabled The state of auto contrast
3388  * @return @c 0 on success, otherwise a negative error value
3389  * @retval #CAMERA_ERROR_NONE Successful
3390  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3391  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3392  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3393  * @see camera_attr_enable_auto_contrast()
3394  */
3395 int camera_attr_is_enabled_auto_contrast(camera_h camera, bool *enabled);
3396
3397 /**
3398  * @}
3399  */
3400
3401 /**
3402  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
3403  * @{
3404  */
3405
3406 /**
3407  * @brief Gets state of support of auto contrast feature.
3408  * @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
3409  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3410  * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
3411  * @param[in] camera The handle to the camera
3412  * @return true on supported, otherwise false
3413  * @exception #CAMERA_ERROR_NONE Successful
3414  * @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3415  * @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3416  * @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3417  * @see camera_attr_enable_auto_contrast()
3418  * @see camera_attr_is_enabled_auto_contrast()
3419  */
3420 bool camera_attr_is_supported_auto_contrast(camera_h camera);
3421
3422 /**
3423  * @}
3424  */
3425
3426 /**
3427  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
3428  * @{
3429  */
3430
3431 /**
3432  * @brief Disables shutter sound.
3433  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3434  * @remarks In some countries, this operation is not permitted.
3435  * @param[in] camera The handle to the camera
3436  * @param[in] disable If @c true shutter sound is disabled, otherwise @c false
3437  * @return @c 0 on success, otherwise a negative error value
3438  * @retval #CAMERA_ERROR_NONE Successful
3439  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3440  * @retval #CAMERA_ERROR_INVALID_OPERATION Disabling shutter sound is not permitted
3441  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3442  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3443  */
3444 int camera_attr_disable_shutter_sound(camera_h camera, bool disable);
3445
3446 /**
3447  * @}
3448  */
3449 #ifdef __cplusplus
3450 }
3451 #endif
3452
3453 #endif /* __TIZEN_MULTIMEDIA_CAMERA_H__ */
3454