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