d9d35b92c0f581b74a4da5f0c58e25ad13134dfe
[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         CAMERA_ERROR_NONE                   = TIZEN_ERROR_NONE,                     /**< Successful */
46         CAMERA_ERROR_INVALID_PARAMETER      = TIZEN_ERROR_INVALID_PARAMETER,        /**< Invalid parameter */
47         CAMERA_ERROR_INVALID_STATE          = CAMERA_ERROR_CLASS | 0x02,            /**< Invalid state */
48         CAMERA_ERROR_OUT_OF_MEMORY          = TIZEN_ERROR_OUT_OF_MEMORY,            /**< Out of memory */
49         CAMERA_ERROR_DEVICE                 = CAMERA_ERROR_CLASS | 0x04,            /**< Device error */
50         CAMERA_ERROR_INVALID_OPERATION      = TIZEN_ERROR_INVALID_OPERATION,        /**< Internal error */
51         CAMERA_ERROR_SECURITY_RESTRICTED    = CAMERA_ERROR_CLASS | 0x07,            /**< Restricted by security system policy */
52         CAMERA_ERROR_DEVICE_BUSY            = CAMERA_ERROR_CLASS | 0x08,            /**< The device is using another application or working on some operation */
53         CAMERA_ERROR_DEVICE_NOT_FOUND       = CAMERA_ERROR_CLASS | 0x09,            /**< No camera device */
54         CAMERA_ERROR_ESD                    = CAMERA_ERROR_CLASS | 0x0c,            /**< ESD situation */
55         CAMERA_ERROR_PERMISSION_DENIED      = TIZEN_ERROR_PERMISSION_DENIED,        /**< The access to the resources can not be granted*/
56         CAMERA_ERROR_NOT_SUPPORTED          = TIZEN_ERROR_NOT_SUPPORTED,            /**< The feature is not supported */
57         CAMERA_ERROR_RESOURCE_CONFLICT      = CAMERA_ERROR_CLASS | 0x0d,            /**< Blocked by resource conflict (Since 3.0) */
58         CAMERA_ERROR_SERVICE_DISCONNECTED   = CAMERA_ERROR_CLASS | 0x0e,            /**< Socket connection lost (Since 3.0) */
59 } camera_error_e;
60
61 /**
62  * @brief Enumeration for the camera state.
63  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
64  */
65 typedef enum {
66         CAMERA_STATE_NONE,       /**< Before creating */
67         CAMERA_STATE_CREATED,    /**< Created, but not initialized yet */
68         CAMERA_STATE_PREVIEW,    /**< Preview */
69         CAMERA_STATE_CAPTURING,  /**< While capturing */
70         CAMERA_STATE_CAPTURED    /**< After capturing */
71 } camera_state_e;
72
73 /**
74  * @brief Enumeration for the camera device state.
75  * @since_tizen 3.0
76  */
77 typedef enum {
78         CAMERA_DEVICE_STATE_NULL,       /**< Not opened */
79         CAMERA_DEVICE_STATE_OPENED,     /**< Opened */
80         CAMERA_DEVICE_STATE_WORKING     /**< Now previewing or capturing or is being used for video recording */
81 } camera_device_state_e;
82
83 /**
84  * @brief Enumeration for the camera device.
85  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
86  */
87 typedef enum {
88         CAMERA_DEVICE_CAMERA0 = 0, /**< Primary camera */
89         CAMERA_DEVICE_CAMERA1,     /**< Secondary camera */
90         CAMERA_DEVICE_CAMERA2,     /**< Third camera (Since 5.0) */
91         CAMERA_DEVICE_CAMERA3,     /**< 4th camera (Since 5.0) */
92         CAMERA_DEVICE_CAMERA4,     /**< 5th camera (Since 5.0) */
93         CAMERA_DEVICE_CAMERA5,     /**< 6th camera (Since 5.0) */
94         CAMERA_DEVICE_CAMERA6,     /**< 7th camera (Since 5.0) */
95         CAMERA_DEVICE_CAMERA7,     /**< 8th camera (Since 5.0) */
96         CAMERA_DEVICE_CAMERA8,     /**< 9th camera (Since 5.0) */
97         CAMERA_DEVICE_CAMERA9      /**< 10th camera (Since 5.0) */
98 } camera_device_e;
99
100 /**
101  * @brief Enumeration for the camera pixel format.
102  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
103  * @remarks If #CAMERA_PIXEL_FORMAT_INVZ is set, the type of display should be #CAMERA_DISPLAY_TYPE_NONE. \n
104  *          Otherwise, camera_start_preview() will return #CAMERA_ERROR_INVALID_OPERATION. (Since 5.0)
105  */
106 typedef enum {
107         CAMERA_PIXEL_FORMAT_INVALID = -1,   /**< Invalid pixel format */
108         CAMERA_PIXEL_FORMAT_NV12,           /**< NV12 pixel format */
109         CAMERA_PIXEL_FORMAT_NV12T,          /**< NV12 Tiled pixel format */
110         CAMERA_PIXEL_FORMAT_NV16,           /**< NV16 pixel format */
111         CAMERA_PIXEL_FORMAT_NV21,           /**< NV21 pixel format */
112         CAMERA_PIXEL_FORMAT_YUYV,           /**< YUYV(YUY2) pixel format */
113         CAMERA_PIXEL_FORMAT_UYVY,           /**< UYVY pixel format */
114         CAMERA_PIXEL_FORMAT_422P,           /**< YUV422(Y:U:V) planar pixel format */
115         CAMERA_PIXEL_FORMAT_I420,           /**< I420 pixel format */
116         CAMERA_PIXEL_FORMAT_YV12,           /**< YV12 pixel format */
117         CAMERA_PIXEL_FORMAT_RGB565,         /**< RGB565 pixel format */
118         CAMERA_PIXEL_FORMAT_RGB888,         /**< RGB888 pixel format */
119         CAMERA_PIXEL_FORMAT_RGBA,           /**< RGBA pixel format */
120         CAMERA_PIXEL_FORMAT_ARGB,           /**< ARGB pixel format */
121         CAMERA_PIXEL_FORMAT_JPEG,           /**< Encoded pixel format */
122         CAMERA_PIXEL_FORMAT_H264 = 15,      /**< Encoded pixel format : H264 (Since 3.0) */
123         CAMERA_PIXEL_FORMAT_INVZ,           /**< Depth pixel format : INVZ (Since 5.0) */
124         CAMERA_PIXEL_FORMAT_MJPEG,          /**< Encoded pixel format : Motion JPEG for preview (Since 6.0) */
125         CAMERA_PIXEL_FORMAT_VP8,            /**< Encoded pixel format : VP8 (Since 6.5) */
126         CAMERA_PIXEL_FORMAT_VP9             /**< Encoded pixel format : VP9 (Since 6.5) */
127 } camera_pixel_format_e;
128
129 /**
130  * @brief Enumeration for the camera display type.
131  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
132  */
133 typedef enum {
134         CAMERA_DISPLAY_TYPE_OVERLAY = 0,    /**< Overlay surface display */
135         CAMERA_DISPLAY_TYPE_EVAS,           /**< Evas object surface display */
136         CAMERA_DISPLAY_TYPE_NONE            /**< This disposes off buffers */
137 } camera_display_type_e;
138
139 /**
140  * @brief Enumeration for the camera policy.
141  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
142  */
143 typedef enum {
144         CAMERA_POLICY_NONE = 0,         /**< None */
145         CAMERA_POLICY_SECURITY = 4,     /**< Security policy */
146         CAMERA_POLICY_RESOURCE_CONFLICT /**< Resource conflict (Since 3.0) */
147 } camera_policy_e;
148
149 /**
150  * @brief Enumeration for the camera rotation type.
151  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
152  */
153 typedef enum {
154         CAMERA_ROTATION_NONE,   /**< No rotation */
155         CAMERA_ROTATION_90,     /**< 90 degree rotation */
156         CAMERA_ROTATION_180,    /**< 180 degree rotation */
157         CAMERA_ROTATION_270,    /**< 270 degree rotation */
158 } camera_rotation_e;
159
160
161 /**
162  * @brief Enumeration for the camera flip type.
163  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
164  */
165 typedef enum {
166         CAMERA_FLIP_NONE,       /**< No Flip */
167         CAMERA_FLIP_HORIZONTAL, /**< Horizontal flip */
168         CAMERA_FLIP_VERTICAL,   /**< Vertical flip */
169         CAMERA_FLIP_BOTH        /**< Horizontal and vertical flip */
170 } camera_flip_e;
171
172 /**
173  * @brief Enumeration for the camera focus state.
174  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
175  */
176 typedef enum {
177         CAMERA_FOCUS_STATE_RELEASED = 0, /**< Focus released */
178         CAMERA_FOCUS_STATE_ONGOING,      /**< Focus in progress */
179         CAMERA_FOCUS_STATE_FOCUSED,      /**< Focus succeeded */
180         CAMERA_FOCUS_STATE_FAILED,       /**< Focus failed */
181 } camera_focus_state_e;
182
183 /**
184  * @brief Enumeration for the facing direction of camera module.
185  * @since_tizen 3.0
186  */
187 typedef enum {
188         CAMERA_FACING_DIRECTION_REAR = 0, /**< Rear */
189         CAMERA_FACING_DIRECTION_FRONT,    /**< Front */
190 } camera_facing_direction_e;
191
192 /**
193  * @brief Enumeration for the current flash state.
194  * @since_tizen 3.0
195  */
196 typedef enum {
197         CAMERA_FLASH_STATE_NOT_USED = 0,  /**< Flash is not used now through camera API */
198         CAMERA_FLASH_STATE_USED,          /**< Flash is used now through camera API */
199 } camera_flash_state_e;
200
201 /**
202  * @brief Enumeration for the device type.
203  * @since_tizen 7.0
204  */
205 typedef enum {
206         CAMERA_DEVICE_TYPE_BUILTIN = 0, /**< Built-in camera */
207         CAMERA_DEVICE_TYPE_USB,         /**< USB camera */
208         CAMERA_DEVICE_TYPE_NETWORK      /**< Network camera */
209 } camera_device_type_e;
210
211 /**
212  * @brief The structure type of the image data.
213  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
214  */
215 typedef struct {
216         unsigned char *data;            /**< The image buffer */
217         unsigned int size;              /**< The size of the buffer */
218         int width;                      /**< The width of the image */
219         int height;                     /**< The height of the image */
220         camera_pixel_format_e format;   /**< The format of the image pixel */
221         unsigned char *exif;            /**< The exif raw data */
222         unsigned int exif_size;         /**< The size of the exif data */
223 } camera_image_data_s;
224
225 /**
226  * @brief The structure type for face detection.
227  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
228  */
229 typedef struct {
230         int id;     /**< The ID of each face */
231         int score;  /**< The confidence level for the detection of the face */
232         int x;      /**< The x coordinates of the face */
233         int y;      /**< The y coordinates of the face */
234         int width;  /**< The width of the face */
235         int height; /**< The height of the face */
236 } camera_detected_face_s;
237
238 /**
239  * @brief The structure type to preview stream data.
240  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
241  */
242 typedef struct {
243         camera_pixel_format_e format;   /**< The format of the frame pixel */
244         int width;                      /**< The width of the frame */
245         int height;                     /**< The height of the frame */
246         int num_of_planes;              /**< The number of planes */
247         unsigned int timestamp;         /**< The timestamp of the frame */
248         union {
249                 struct {
250                         unsigned char *yuv;     /**< The yuv data pointer */
251                         unsigned int size;      /**< The size of data */
252                 } single_plane;             /**< Single plane frame data */
253
254                 struct {
255                         unsigned char *y;       /**< The y data pointer */
256                         unsigned char *uv;      /**< The uv data pointer */
257                         unsigned int y_size;    /**< The size of y data */
258                         unsigned int uv_size;   /**< The size of uv data */
259                 } double_plane;             /**< Double plane frame data */
260
261                 struct {
262                         unsigned char *y;       /**< The y data pointer */
263                         unsigned char *u;       /**< The u data pointer */
264                         unsigned char *v;       /**< The v data pointer */
265                         unsigned int y_size;    /**< The size of y data */
266                         unsigned int u_size;    /**< The size of u data */
267                         unsigned int v_size;    /**< The size of v data */
268                 } triple_plane;             /**< Triple plane frame data */
269
270                 struct {
271                         unsigned char *data;    /**< The encoded data pointer */
272                         unsigned int size;      /**< The size of encoded data */
273                         bool is_delta_frame;    /**< The flag indicating whether it's delta frame or not (Since 6.0) */
274                 } encoded_plane;            /**< Encoded plane frame data */
275
276                 struct {
277                         unsigned char *data;    /**< The depth data pointer */
278                         unsigned int size;      /**< The size of depth data */
279                 } depth_plane;              /**< Depth plane frame data (Since 5.0) */
280
281                 struct {
282                         unsigned char *data;    /**< The RGB data pointer */
283                         unsigned int size;      /**< The size of RGB data */
284                 } rgb_plane;                /**< RGB plane frame data (Since 5.0) */
285         } data;
286 } camera_preview_data_s;
287
288
289 /**
290  * @brief Maximum length of the camera device name.
291  * @since_tizen 7.0
292  */
293 #define CAMERA_DEVICE_NAME_MAX_LENGTH   64
294
295 /**
296  * @brief Maximum length of the camera device ID.
297  * @since_tizen 7.0
298  */
299 #define CAMERA_DEVICE_ID_MAX_LENGTH     64
300
301 /**
302  * @brief The structure type for the camera device.
303  * @since_tizen 7.0
304  */
305 typedef struct _camera_device_s {
306         camera_device_type_e type;                  /**< The type of camera device */
307         camera_device_e index;                      /**< The index of camera device */
308         char name[CAMERA_DEVICE_NAME_MAX_LENGTH];   /**< The name of camera device */
309         char id[CAMERA_DEVICE_ID_MAX_LENGTH];       /**< The ID of camera device */
310         int extra_stream_num;                       /**< The extra preview stream number of camera device */
311 } camera_device_s;
312
313 /**
314  * @brief The Camera handle.
315  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
316  * @see recorder_create_videorecorder()
317  */
318 typedef struct camera_cli_s *camera_h;
319
320 /**
321  * @brief The Camera display handle.
322  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
323  */
324 typedef void *camera_display_h;
325
326 #ifndef GET_DISPLAY
327
328 /**
329  * @brief Gets a display handle.
330  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
331  */
332 #define GET_DISPLAY(x) (void*)(x)
333
334 #endif
335
336 /**
337  * @brief The Camera device manager handle.
338  * @since_tizen 7.0
339  */
340 typedef void *camera_device_manager_h;
341
342 /**
343  * @}
344  */
345
346 /**
347  * @addtogroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE
348  * @{
349  */
350
351 /**
352  * @brief Enumeration for the camera display mode.
353  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
354  */
355 typedef enum {
356         CAMERA_DISPLAY_MODE_LETTER_BOX = 0,       /**< Letter box */
357         CAMERA_DISPLAY_MODE_ORIGIN_SIZE,          /**< Origin size */
358         CAMERA_DISPLAY_MODE_FULL,                 /**< Full screen */
359         CAMERA_DISPLAY_MODE_CROPPED_FULL,         /**< Cropped full screen */
360         CAMERA_DISPLAY_MODE_ORIGIN_OR_LETTER_BOX, /**< Original size or letter box (Since 3.0) */
361         CAMERA_DISPLAY_MODE_CUSTOM_ROI,           /**< Custom ROI (Since 3.0) */
362 } camera_display_mode_e;
363
364 /**
365  * @}
366  */
367
368 /**
369  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
370  * @{
371  */
372
373 /**
374  * @brief Enumeration for the color tone, which provides the impression of looking through a tinted glass.
375  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
376  */
377 typedef enum {
378         CAMERA_ATTR_EFFECT_NONE = 0,              /**< None */
379         CAMERA_ATTR_EFFECT_MONO,                  /**< Mono */
380         CAMERA_ATTR_EFFECT_SEPIA,                 /**< Sepia */
381         CAMERA_ATTR_EFFECT_NEGATIVE,              /**< Negative */
382         CAMERA_ATTR_EFFECT_BLUE,                  /**< Blue */
383         CAMERA_ATTR_EFFECT_GREEN,                 /**< Green */
384         CAMERA_ATTR_EFFECT_AQUA,                  /**< Aqua */
385         CAMERA_ATTR_EFFECT_VIOLET,                /**< Violet */
386         CAMERA_ATTR_EFFECT_ORANGE,                /**< Orange */
387         CAMERA_ATTR_EFFECT_GRAY,                  /**< Gray */
388         CAMERA_ATTR_EFFECT_RED,                   /**< Red */
389         CAMERA_ATTR_EFFECT_ANTIQUE,               /**< Antique */
390         CAMERA_ATTR_EFFECT_WARM,                  /**< Warm */
391         CAMERA_ATTR_EFFECT_PINK,                  /**< Pink */
392         CAMERA_ATTR_EFFECT_YELLOW,                /**< Yellow */
393         CAMERA_ATTR_EFFECT_PURPLE,                /**< Purple */
394         CAMERA_ATTR_EFFECT_EMBOSS,                /**< Emboss */
395         CAMERA_ATTR_EFFECT_OUTLINE,               /**< Outline */
396         CAMERA_ATTR_EFFECT_SOLARIZATION,          /**< Solarization */
397         CAMERA_ATTR_EFFECT_SKETCH,                /**< Sketch */
398         CAMERA_ATTR_EFFECT_WASHED,                /**< Washed */
399         CAMERA_ATTR_EFFECT_VINTAGE_WARM,          /**< Vintage warm  */
400         CAMERA_ATTR_EFFECT_VINTAGE_COLD,          /**< Vintage cold */
401         CAMERA_ATTR_EFFECT_POSTERIZATION,         /**< Posterization */
402         CAMERA_ATTR_EFFECT_CARTOON,               /**< Cartoon */
403         CAMERA_ATTR_EFFECT_SELECTIVE_RED,         /**< Selective color - Red */
404         CAMERA_ATTR_EFFECT_SELECTIVE_GREEN,       /**< Selective color - Green */
405         CAMERA_ATTR_EFFECT_SELECTIVE_BLUE,        /**< Selective color - Blue */
406         CAMERA_ATTR_EFFECT_SELECTIVE_YELLOW,      /**< Selective color - Yellow */
407         CAMERA_ATTR_EFFECT_SELECTIVE_RED_YELLOW,  /**< Selective color - Red and Yellow */
408         CAMERA_ATTR_EFFECT_OTHER_GRAPHICS,        /**< Other Graphic effects */
409 } camera_attr_effect_mode_e;
410
411 /**
412  * @brief Enumeration for the white balance levels of the camera.
413  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
414  */
415 typedef enum {
416         CAMERA_ATTR_WHITE_BALANCE_NONE = 0,     /**< None */
417         CAMERA_ATTR_WHITE_BALANCE_AUTOMATIC,    /**< Automatic */
418         CAMERA_ATTR_WHITE_BALANCE_DAYLIGHT,     /**< Daylight */
419         CAMERA_ATTR_WHITE_BALANCE_CLOUDY,       /**< Cloudy */
420         CAMERA_ATTR_WHITE_BALANCE_FLUORESCENT,  /**< Fluorescent */
421         CAMERA_ATTR_WHITE_BALANCE_INCANDESCENT, /**< Incandescent */
422         CAMERA_ATTR_WHITE_BALANCE_SHADE,        /**< Shade */
423         CAMERA_ATTR_WHITE_BALANCE_HORIZON,      /**< Horizon */
424         CAMERA_ATTR_WHITE_BALANCE_FLASH,        /**< Flash */
425         CAMERA_ATTR_WHITE_BALANCE_CUSTOM,       /**< Custom */
426 } camera_attr_whitebalance_e;
427
428 /**
429  * @brief Enumeration for the scene mode.
430  * @details The mode of operation can be in daylight, night, or back-light.
431  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
432  */
433 typedef enum {
434         CAMERA_ATTR_SCENE_MODE_NORMAL = 0,     /**< Normal */
435         CAMERA_ATTR_SCENE_MODE_PORTRAIT,       /**< Portrait */
436         CAMERA_ATTR_SCENE_MODE_LANDSCAPE,      /**< Landscape */
437         CAMERA_ATTR_SCENE_MODE_SPORTS,         /**< Sports */
438         CAMERA_ATTR_SCENE_MODE_PARTY_N_INDOOR, /**< Party & indoor */
439         CAMERA_ATTR_SCENE_MODE_BEACH_N_INDOOR, /**< Beach & indoor */
440         CAMERA_ATTR_SCENE_MODE_SUNSET,         /**< Sunset */
441         CAMERA_ATTR_SCENE_MODE_DUSK_N_DAWN,    /**< Dusk & dawn */
442         CAMERA_ATTR_SCENE_MODE_FALL_COLOR,     /**< Fall */
443         CAMERA_ATTR_SCENE_MODE_NIGHT_SCENE,    /**< Night scene */
444         CAMERA_ATTR_SCENE_MODE_FIREWORK,       /**< Firework */
445         CAMERA_ATTR_SCENE_MODE_TEXT,           /**< Text */
446         CAMERA_ATTR_SCENE_MODE_SHOW_WINDOW,    /**< Show window */
447         CAMERA_ATTR_SCENE_MODE_CANDLE_LIGHT,   /**< Candle light */
448         CAMERA_ATTR_SCENE_MODE_BACKLIGHT,      /**< Backlight */
449         CAMERA_ATTR_SCENE_MODE_AQUA,           /**< Aqua */
450 } camera_attr_scene_mode_e;
451
452 /**
453  * @brief Enumeration for the auto focus mode.
454  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
455  */
456 typedef enum {
457         CAMERA_ATTR_AF_NONE = 0,    /**< auto-focus is not set */
458         CAMERA_ATTR_AF_NORMAL,      /**< auto-focus in the normal mode  */
459         CAMERA_ATTR_AF_MACRO,       /**< auto-focus in the macro mode(close distance)  */
460         CAMERA_ATTR_AF_FULL,        /**< auto-focus in the full mode(all range scan, limited by device spec) */
461 } camera_attr_af_mode_e;
462
463 /**
464  * @brief Enumeration for the ISO levels of the camera.
465  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
466  */
467 typedef enum {
468         CAMERA_ATTR_ISO_AUTO = 0, /**< ISO auto mode */
469         CAMERA_ATTR_ISO_50,       /**< ISO 50 */
470         CAMERA_ATTR_ISO_100,      /**< ISO 100 */
471         CAMERA_ATTR_ISO_200,      /**< ISO 200 */
472         CAMERA_ATTR_ISO_400,      /**< ISO 400 */
473         CAMERA_ATTR_ISO_800,      /**< ISO 800 */
474         CAMERA_ATTR_ISO_1600,     /**< ISO 1600 */
475         CAMERA_ATTR_ISO_3200,     /**< ISO 3200 */
476 } camera_attr_iso_e;
477
478 /**
479  * @brief Enumeration for the camera exposure modes.
480  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
481  */
482 typedef enum {
483         CAMERA_ATTR_EXPOSURE_MODE_OFF = 0,          /**< Off */
484         CAMERA_ATTR_EXPOSURE_MODE_ALL,              /**< All mode */
485         CAMERA_ATTR_EXPOSURE_MODE_CENTER,           /**< Center mode */
486         CAMERA_ATTR_EXPOSURE_MODE_SPOT,             /**< Spot mode */
487         CAMERA_ATTR_EXPOSURE_MODE_CUSTOM,           /**< Custom mode */
488         CAMERA_ATTR_EXPOSURE_MODE_SHUTTER_PRIORITY, /**< Shutter priority mode (Since 7.5) */
489         CAMERA_ATTR_EXPOSURE_MODE_APERTURE_PRIORITY /**< Aperture priority mode (Since 7.5) */
490 } camera_attr_exposure_mode_e;
491
492 /**
493  * @brief Enumeration for the orientation values of tag.
494  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
495  */
496 typedef enum {
497         CAMERA_ATTR_TAG_ORIENTATION_TOP_LEFT = 1,      /**< Row #0 is at the top, Column #0 is to the left */
498         CAMERA_ATTR_TAG_ORIENTATION_TOP_RIGHT = 2,     /**< Row #0 is at the top, Column #0 is to the right (flipped) */
499         CAMERA_ATTR_TAG_ORIENTATION_BOTTOM_RIGHT = 3,  /**< Row #0 is at the bottom, Column #0 is to the right */
500         CAMERA_ATTR_TAG_ORIENTATION_BOTTOM_LEFT = 4,   /**< Row #0 is at the bottom, Column #0 is to the left (flipped) */
501         CAMERA_ATTR_TAG_ORIENTATION_LEFT_TOP = 5,      /**< Row #0 is to the left, Column #0 is at the top (flipped) */
502         CAMERA_ATTR_TAG_ORIENTATION_RIGHT_TOP = 6,     /**< Row #0 is to the right, Column #0 is at the top */
503         CAMERA_ATTR_TAG_ORIENTATION_RIGHT_BOTTOM = 7,  /**< Row #0 is to the right, Column #0 is at the bottom (flipped) */
504         CAMERA_ATTR_TAG_ORIENTATION_LEFT_BOTTOM = 8,   /**< Row #0 is to the left, Column #0 is at the bottom */
505 } camera_attr_tag_orientation_e;
506
507 /**
508  * @brief Enumeration for the flash mode.
509  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
510  */
511 typedef enum {
512         CAMERA_ATTR_FLASH_MODE_OFF = 0,          /**< Always off */
513         CAMERA_ATTR_FLASH_MODE_ON,               /**< Always splashes */
514         CAMERA_ATTR_FLASH_MODE_AUTO,             /**< Depending on intensity of light, strobe starts to flash */
515         CAMERA_ATTR_FLASH_MODE_REDEYE_REDUCTION, /**< Red eye reduction. Multiple flash before capturing */
516         CAMERA_ATTR_FLASH_MODE_SLOW_SYNC,        /**< Slow sync curtain synchronization */
517         CAMERA_ATTR_FLASH_MODE_FRONT_CURTAIN,    /**< Front curtain synchronization */
518         CAMERA_ATTR_FLASH_MODE_REAR_CURTAIN,     /**< Rear curtain synchronization */
519         CAMERA_ATTR_FLASH_MODE_PERMANENT,        /**< Keep turned on until turning off */
520 } camera_attr_flash_mode_e;
521
522 /**
523  * @brief Enumeration to preview FPS.
524  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
525  */
526 typedef enum {
527         CAMERA_ATTR_FPS_AUTO = 0, /**< AUTO FPS */
528         CAMERA_ATTR_FPS_7 = 7,    /**< 7 FPS */
529         CAMERA_ATTR_FPS_8 = 8,    /**< 8 FPS */
530         CAMERA_ATTR_FPS_15 = 15,  /**< 15 FPS */
531         CAMERA_ATTR_FPS_20 = 20,  /**< 20 FPS */
532         CAMERA_ATTR_FPS_24 = 24,  /**< 24 FPS */
533         CAMERA_ATTR_FPS_25 = 25,  /**< 25 FPS */
534         CAMERA_ATTR_FPS_30 = 30,  /**< 30 FPS */
535         CAMERA_ATTR_FPS_60 = 60,  /**< 60 FPS */
536         CAMERA_ATTR_FPS_90 = 90,  /**< 90 FPS */
537         CAMERA_ATTR_FPS_120 = 120 /**< 120 FPS */
538 } camera_attr_fps_e;
539
540 /**
541  * @brief Enumeration for the theater mode.
542  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
543  */
544 typedef enum {
545         CAMERA_ATTR_THEATER_MODE_DISABLE = 0, /**< Disable theater mode - External display shows same image as device display */
546         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 */
547         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 */
548 } camera_attr_theater_mode_e;
549
550 /**
551  * @brief Enumeration for HDR capture mode.
552  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
553  */
554 typedef enum {
555         CAMERA_ATTR_HDR_MODE_DISABLE = 0,  /**< Disable HDR capture */
556         CAMERA_ATTR_HDR_MODE_ENABLE,       /**< Enable HDR capture */
557         CAMERA_ATTR_HDR_MODE_KEEP_ORIGINAL /**< Enable HDR capture and keep original image data */
558 } camera_attr_hdr_mode_e;
559
560 /**
561  * @brief Enumeration for PTZ (Pan Tilt Zoom) type.
562  * @since_tizen 3.0
563  */
564 typedef enum {
565         CAMERA_ATTR_PTZ_TYPE_MECHANICAL = 0,  /**< Move the camera device physically */
566         CAMERA_ATTR_PTZ_TYPE_ELECTRONIC       /**< Zoom digitally and move into portion of the image */
567 } camera_attr_ptz_type_e;
568
569 /**
570  * @brief Enumeration for PTZ (Pan Tilt Zoom) movement type.
571  * @since_tizen 3.0
572  */
573 typedef enum {
574         CAMERA_ATTR_PTZ_MOVE_ABSOLUTE = 0,  /**< Move to a specific coordinate position */
575         CAMERA_ATTR_PTZ_MOVE_RELATIVE       /**< Move a specific distance from the current position */
576 } camera_attr_ptz_move_type_e;
577
578
579 /**
580  * @}
581  */
582
583 /**
584  * @addtogroup CAPI_MEDIA_CAMERA_MODULE
585  * @{
586  */
587
588 /**
589  * @brief Called when the camera state is changed.
590  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
591  * @param[in] previous  The previous state of the camera
592  * @param[in] current   The current state of the camera
593  * @param[in] by_policy If @c true the state is changed by policy, otherwise @c false
594  * @param[in] user_data The user data passed from the callback registration function
595  * @pre camera_start_preview(), camera_start_capture() or camera_stop_preview()
596  *      will invoke this callback if you register this callback using camera_set_state_changed_cb().
597  * @see camera_set_state_changed_cb()
598  */
599 typedef void (*camera_state_changed_cb)(camera_state_e previous, camera_state_e current, bool by_policy, void *user_data);
600
601 /**
602  * @brief Called when the camera device state is changed.
603  * @since_tizen 3.0
604  * @param[in] device    The hardware camera type
605  * @param[in] state     The state of the camera device
606  * @param[in] user_data The user data passed from the callback registration function
607  * @see camera_add_device_state_changed_cb()
608  */
609 typedef void (*camera_device_state_changed_cb)(camera_device_e device, camera_device_state_e state, void *user_data);
610
611 /**
612  * @brief Called when the camera is interrupted by policy.
613  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
614  * @remarks This callback is called after interrupt handling is completed.
615  * @param[in] policy    The policy that interrupted the camera
616  * @param[in] previous  The previous state of the camera
617  * @param[in] current   The current state of the camera
618  * @param[in] user_data The user data passed from the callback registration function
619  * @see camera_set_interrupted_cb()
620  */
621 typedef void (*camera_interrupted_cb)(camera_policy_e policy, camera_state_e previous, camera_state_e current, void *user_data);
622
623 /**
624  * @brief Called when the camera interrupt is started by policy.
625  * @since_tizen 4.0
626  * @remarks This callback is called before interrupt handling is started.
627  * @param[in] policy    The policy that is interrupting the camera
628  * @param[in] state     The current state of the camera
629  * @param[in] user_data The user data passed from the callback registration function
630  * @see camera_set_interrupt_started_cb()
631  */
632 typedef void (*camera_interrupt_started_cb)(camera_policy_e policy, camera_state_e state, void *user_data);
633
634 /**
635  * @brief Called when the camera focus state is changed.
636  * @details When the camera auto focus completes or a change to the focus state occurs,
637  *          this callback is invoked. \n \n
638  *          Changes of focus state are as follows: \n
639  *          #CAMERA_FOCUS_STATE_RELEASED -> start focusing -> #CAMERA_FOCUS_STATE_ONGOING -> working ->
640  *          #CAMERA_FOCUS_STATE_FOCUSED or #CAMERA_FOCUS_STATE_FAILED.
641  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
642  *
643  * @param[in] state     The current state of the auto-focus
644  * @param[in] user_data The user data passed from the callback registration function
645  * @pre camera_start_focusing() will invoke this callback if you register it using camera_set_focus_changed_cb().
646  * @see camera_set_focus_changed_cb()
647  * @see camera_unset_focus_changed_cb()
648  * @see camera_start_focusing()
649  * @see camera_cancel_focusing()
650  */
651 typedef void (*camera_focus_changed_cb)(camera_focus_state_e state, void *user_data);
652
653 /**
654  * @brief Called to register for notifications about delivering a copy of the new preview frame when every preview frame is displayed.
655  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
656  *
657  * @remarks This function is issued in the context of internal framework so the UI update code should not be directly invoked.\n
658  *          If the camera is used as a recorder then this callback function won't be called.
659  * @remarks The @a frame should not be released and it's available until the callback returns.
660  *
661  * @param[in] frame     The reference pointer to preview stream data
662  * @param[in] user_data The user data passed from the callback registration function
663  * @pre camera_start_preview() will invoke this callback function if you register this callback using camera_set_preview_cb().
664  * @see camera_start_preview()
665  * @see camera_set_preview_cb()
666  * @see camera_unset_preview_cb()
667  */
668 typedef void (*camera_preview_cb)(camera_preview_data_s *frame, void *user_data);
669
670 /**
671  * @brief Called to register for notifications about delivering media packet when every preview frame is displayed.
672  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
673  *
674  * @remarks This function is issued in the context of internal framework so the UI update code should not be directly invoked.\n
675  *          If the camera is used as a recorder then this callback function won't be called.\n
676  *          and the packet should be released by media_packet_destroy() after use.
677  *
678  * @param[in] pkt       Reference pointer to media packet
679  * @param[in] user_data The user data passed from the callback registration function
680  * @pre camera_start_preview() will invoke this callback function if you register this callback using camera_set_media_packet_preview_cb().
681  * @see camera_start_preview()
682  * @see camera_set_media_packet_preview_cb()
683  * @see camera_unset_media_packet_preview_cb()
684  */
685 typedef void (*camera_media_packet_preview_cb)(media_packet_h pkt, void *user_data);
686
687 /**
688  * @brief Called to get information about image data taken by the camera once per frame while capturing.
689  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
690  *
691  * @remarks This function is issued in the context of internal framework so the UI update code should not be directly invoked.
692  *          You must not call camera_start_preview() within this callback.
693  *
694  * @param[in] image     The image data of the captured picture
695  * @param[in] postview  The image data of the postview
696  * @param[in] thumbnail The image data of the thumbnail (it should be @c NULL if the available thumbnail data does not exist)
697  * @param[in] user_data The user data passed from the callback registration function
698  * @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().
699  * @see camera_start_capture()
700  * @see camera_start_continuous_capture()
701  * @see camera_capture_completed_cb()
702  */
703 typedef void (*camera_capturing_cb)(camera_image_data_s *image, camera_image_data_s *postview, camera_image_data_s *thumbnail, void *user_data);
704
705 /**
706  * @brief Called when the camera capturing completes.
707  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
708  *
709  * @remarks The callback is called after camera_capturing_cb() is completed.\n
710  *          If you want to show the user a preview after capturing is finished, \n
711  *          an application can use camera_start_preview() after calling this callback.
712  * @param[in] user_data The user data passed from the callback registration function
713  * @pre This callback function is invoked if it is registered using camera_start_capture() or camera_start_continuous_capture().
714  * @see camera_start_capture()
715  * @see camera_start_continuous_capture()
716  * @see camera_capturing_cb()
717  */
718 typedef void (*camera_capture_completed_cb)(void *user_data);
719
720 /**
721  * @brief Called when an error occurs.
722  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
723  *
724  * @remarks This callback informs about a critical error situation.\n
725  *          When this callback is invoked, the user should release the resource and terminate the application.\n
726  *          In case of errors, one of these codes occur:\n
727  * #CAMERA_ERROR_DEVICE,\n
728  * #CAMERA_ERROR_INVALID_OPERATION,\n
729  * #CAMERA_ERROR_OUT_OF_MEMORY.
730  * @param[in] error         The error code
731  * @param[in] current_state The current state of the camera
732  * @param[in] user_data     The user data passed from the callback registration function
733  * @pre This callback function is invoked if it is registered using camera_set_error_cb().
734  * @see camera_set_error_cb()
735  * @see camera_unset_error_cb()
736  */
737 typedef void (*camera_error_cb)(camera_error_e error, camera_state_e current_state, void *user_data);
738
739 /**
740  * @brief Called when a face is detected in the preview frame.
741  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
742  * @param[in] faces     The detected face array
743  * @param[in] count     The length of the array
744  * @param[in] user_data The user data passed from the callback registration function
745  * @see camera_start_face_detection()
746  */
747 typedef void (*camera_face_detected_cb)(camera_detected_face_s *faces, int count, void *user_data);
748
749 /**
750  * @brief Called when the connection state of a camera device was changed.
751  * @since_tizen 7.0
752  * @param[in] device                    The camera device
753  * @param[in] is_connected              The state of device connection: (@c true = connected, @c false = disconnected)
754  * @param[in] user_data                 The user data passed from the callback registration function
755  * @see camera_device_manager_add_device_connection_changed_cb()
756  * @see camera_device_manager_remove_device_connection_changed_cb()
757  */
758 typedef void (*camera_device_connection_changed_cb)(camera_device_s *device, bool is_connected, void *user_data);
759
760 /**
761  * @brief Called when the extra preview frame is delivered from the camera device.
762  * @since_tizen 7.0
763  * @param[in] frame     The reference pointer to extra preview stream data
764  * @param[in] stream_id The ID of the preview stream
765  * @param[in] user_data The user data passed from the callback registration function
766  * @pre camera_start_preview() will invoke this callback function if you register this callback using camera_set_extra_preview_cb().
767  * @see camera_start_preview()
768  * @see camera_set_extra_preview_cb()
769  * @see camera_unset_extra_preview_cb()
770  */
771 typedef void (*camera_extra_preview_cb)(camera_preview_data_s *frame, int stream_id, void *user_data);
772
773 /**
774  * @}
775  */
776
777 /**
778  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
779  * @{
780  */
781
782 /**
783  * @brief Called once for each supported preview resolution.
784  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
785  * @param[in] width     The preview image width
786  * @param[in] height    The preview image height
787  * @param[in] user_data The user data passed from the foreach function
788  * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
789  * @pre camera_foreach_supported_preview_resolution() will invoke this callback.
790  * @see camera_foreach_supported_preview_resolution()
791  */
792 typedef bool (*camera_supported_preview_resolution_cb)(int width, int height, void *user_data);
793
794 /**
795  * @brief Called once for each supported capture resolution.
796  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
797  * @param[in] width     The capture resolution width
798  * @param[in] height    The capture resolution height
799  * @param[in] user_data The user data passed from the foreach function
800  * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
801  * @pre camera_foreach_supported_capture_resolution() will invoke this callback.
802  * @see camera_foreach_supported_capture_resolution()
803  */
804 typedef bool (*camera_supported_capture_resolution_cb)(int width, int height, void *user_data);
805
806 /**
807  * @brief Called once for the pixel format of each supported capture format.
808  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
809  * @param[in] format    The supported pixel format
810  * @param[in] user_data The user data passed from the foreach function
811  * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
812  * @pre camera_foreach_supported_capture_format() will invoke this callback.
813  * @see camera_foreach_supported_capture_format()
814  */
815 typedef bool (*camera_supported_capture_format_cb)(camera_pixel_format_e format, void *user_data);
816
817 /**
818  * @brief Called once for the pixel format of each supported preview format.
819  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
820  * @param[in] format    The supported preview data format
821  * @param[in] user_data The user data passed from the foreach function
822  * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
823  * @pre camera_foreach_supported_preview_format() will invoke this callback.
824  * @see camera_foreach_supported_preview_format()
825  */
826 typedef bool (*camera_supported_preview_format_cb)(camera_pixel_format_e format, void *user_data);
827
828 /**
829  * @brief Called once for the each supported device.
830  * @since_tizen 7.0
831  * @param[in] device    The camera device
832  * @param[in] user_data The user data passed from the foreach function
833  * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
834  * @pre camera_device_manager_foreach_supported_device() will invoke this callback.
835  * @see camera_device_manager_foreach_supported_device()
836  */
837 typedef bool (*camera_supported_device_cb)(camera_device_s *device, void *user_data);
838
839 /**
840  * @}
841  */
842
843 /**
844  * @addtogroup CAPI_MEDIA_CAMERA_MODULE
845  * @{
846  */
847
848 /**
849  * @brief Creates a new camera handle for controlling a camera.
850  *
851  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
852  * @remarks Multiple handles on a context at the same time are allowed to be created. However,
853  *          camera cannot guarantee proper operation because of limited resources, such as
854  *          camera device, audio device, and display device.\n.
855  *          A @a camera must be released using camera_destroy().
856  * @remarks The privilege %http://tizen.org/privilege/camera is not required since 4.0,\n
857  *          but it is required in all earlier versions.
858  * @param[in]  device The hardware camera to access
859  * @param[out] camera A newly returned handle to the camera
860  * @return @c 0 on success, otherwise a negative error value
861  * @retval #CAMERA_ERROR_NONE Successful
862  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
863  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
864  * @retval #CAMERA_ERROR_OUT_OF_MEMORY Out of memory
865  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
866  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
867  * @post If it succeeds, the camera state will be #CAMERA_STATE_CREATED.
868  *
869  * @see camera_destroy()
870  */
871 int camera_create(camera_device_e device, camera_h *camera);
872
873 /**
874  * @brief Changes the camera device.
875  *
876  * @since_tizen 3.0
877  * @remarks This function can be used to change camera device simply without camera_destroy() and camera_create().\n
878  *          If display reuse hint is set by camera_set_display_reuse_hint() before stopping the preview,\n
879  *          display handle will be reused and last frame on display can be kept even though camera device is changed.
880  * @param[in] camera The handle to the camera
881  * @param[in] device The hardware camera to access
882  * @return @c 0 on success, otherwise a negative error value
883  * @retval #CAMERA_ERROR_NONE Successful
884  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
885  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
886  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
887  * @retval #CAMERA_ERROR_OUT_OF_MEMORY Out of memory
888  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
889  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
890  * @pre    The camera state must be set to #CAMERA_STATE_CREATED.
891  * @post   If it succeeds, the camera attributes and settings will be reset.
892  *
893  * @see camera_set_display_reuse_hint()
894  * @see camera_get_display_reuse_hint()
895  */
896 int camera_change_device(camera_h camera, camera_device_e device);
897
898 /**
899  * @brief Destroys the camera handle and releases all its resources.
900  *
901  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
902  * @param[in] camera The handle to the camera
903  * @return @c 0 on success, otherwise a negative error value
904  * @retval #CAMERA_ERROR_NONE Successful
905  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
906  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
907  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
908  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
909  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
910  * @see camera_create()
911  * @see camera_create_network()
912  */
913 int camera_destroy(camera_h camera);
914
915 /**
916  * @brief Creates a new camera handle for controlling a network camera.
917  * @since_tizen 7.0
918  * @remarks A @a camera must be released using camera_destroy().
919  * @param[in]  device The network camera to access
920  * @param[out] camera A newly returned handle to the camera
921  * @return @c 0 on success, otherwise a negative error value
922  * @retval #CAMERA_ERROR_NONE Successful
923  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
924  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
925  * @retval #CAMERA_ERROR_OUT_OF_MEMORY Out of memory
926  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
927  * @post If it succeeds, the camera state will be #CAMERA_STATE_CREATED.
928  * @see camera_destroy()
929  */
930 int camera_create_network(camera_device_e device, camera_h *camera);
931
932 /**
933  * @brief Initializes a camera device manager.
934  * @since_tizen 7.0
935  * @remarks A @a manager must be released with camera_device_manager_deinitialize().
936  * @param[out] manager A newly returned handle to the camera device manager
937  * @return @c 0 on success, otherwise a negative error value
938  * @retval #CAMERA_ERROR_NONE Successful
939  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
940  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
941  * @retval #CAMERA_ERROR_OUT_OF_MEMORY Out of memory
942  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
943  * @see camera_device_manager_deinitialize()
944  */
945 int camera_device_manager_initialize(camera_device_manager_h *manager);
946
947 /**
948  * @brief Deinitializes the camera device manager handle.
949  * @since_tizen 7.0
950  * @param[in] manager The handle to the camera device manager
951  * @return @c 0 on success, otherwise a negative error value
952  * @retval #CAMERA_ERROR_NONE Successful
953  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
954  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
955  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
956  * @see camera_device_manager_initialize()
957  */
958 int camera_device_manager_deinitialize(camera_device_manager_h manager);
959
960 /**
961  * @}
962  */
963
964 /**
965  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
966  * @{
967  */
968
969 /**
970  * @brief Retrieves all supported devices by invoking the callback function once for each supported device.
971  * @since_tizen 7.0
972  * @param[in] manager   The handle to the camera device manager
973  * @param[in] callback  The callback function to register
974  * @param[in] user_data The user data to be passed to the callback function
975  * @return @c 0 on success, otherwise a negative error value
976  * @retval #CAMERA_ERROR_NONE Successful
977  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
978  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
979  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
980  * @post This function invokes camera_supported_device_cb() repeatedly to retrieve each supported device.
981  * @see camera_supported_device_cb()
982  * @see camera_device_manager_initialize()
983  * @see camera_device_manager_deinitialize()
984  */
985 int camera_device_manager_foreach_supported_device(camera_device_manager_h manager, camera_supported_device_cb callback, void *user_data);
986
987 /**
988  * @}
989  */
990
991 /**
992  * @addtogroup CAPI_MEDIA_CAMERA_MODULE
993  * @{
994  */
995
996 /**
997  * @brief Adds a callback function to be called when the connection state of camera device is changed.
998  * @since_tizen 7.0
999  * @param[in]  manager   The handle to the camera device manager
1000  * @param[in]  callback  The callback function to register
1001  * @param[in]  user_data The user data to be passed to the callback function
1002  * @param[out] cb_id     The id of registered callback
1003  * @return @c 0 on success, otherwise a negative error value
1004  * @retval #CAMERA_ERROR_NONE Successful
1005  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1006  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1007  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
1008  * @post camera_device_connection_changed_cb() will be invoked when the connection state of camera device is changed.
1009  * @see camera_device_manager_remove_device_connection_changed_cb()
1010  * @see camera_device_connection_changed_cb()
1011  */
1012 int camera_device_manager_add_device_connection_changed_cb(camera_device_manager_h manager, camera_device_connection_changed_cb callback, void *user_data, int *cb_id);
1013
1014 /**
1015  * @brief Removes the callback function.
1016  * @since_tizen 7.0
1017  * @param[in] manager The handle to the camera device manager
1018  * @param[in] cb_id   The id of registered callback
1019  * @return @c 0 on success, otherwise a negative error value
1020  * @retval #CAMERA_ERROR_NONE Successful
1021  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1022  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1023  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
1024  * @see camera_device_manager_add_device_changed_cb()
1025  */
1026 int camera_device_manager_remove_device_connection_changed_cb(camera_device_manager_h manager, int cb_id);
1027
1028 /**
1029  * @brief Starts capturing and drawing preview frames on the screen.
1030  *
1031  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1032  * @privlevel public
1033  * @privilege %http://tizen.org/privilege/camera
1034  * @param[in] camera The handle to the camera
1035  * @return @c 0 on success, otherwise a negative error value
1036  * @retval #CAMERA_ERROR_NONE Successful
1037  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1038  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1039  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
1040  * @retval #CAMERA_ERROR_RESOURCE_CONFLICT Resource conflict error
1041  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
1042  * @retval #CAMERA_ERROR_DEVICE_BUSY The device is being used in another application or is performing other operations
1043  * @retval #CAMERA_ERROR_DEVICE_NOT_FOUND No camera device
1044  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1045  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1046  * @pre    The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_CAPTURED.\n
1047  *         You must set the display handle. \n
1048  *         If needed, modify preview FPS(camera_attr_set_preview_fps()),
1049  *         preview resolution(camera_set_preview_resolution()), or preview format(camera_set_preview_format()).
1050  * @post   If it succeeds, the camera state will be #CAMERA_STATE_PREVIEW.\n
1051  *         camera_preview_cb() will be called when preview image data becomes available.
1052  *
1053  * @see camera_stop_preview()
1054  * @see camera_set_display()
1055  * @see camera_set_preview_cb()
1056  * @see camera_set_media_packet_preview_cb()
1057  * @see camera_foreach_supported_preview_resolution()
1058  * @see camera_set_preview_resolution()
1059  * @see camera_get_preview_resolution()
1060  * @see camera_foreach_supported_preview_format()
1061  * @see camera_set_preview_format()
1062  * @see camera_get_preview_format()
1063  * @see camera_attr_foreach_supported_fps()
1064  * @see camera_attr_set_preview_fps()
1065  * @see camera_attr_get_preview_fps()
1066  */
1067 int camera_start_preview(camera_h camera);
1068
1069 /**
1070  * @brief Stops capturing and drawing preview frames.
1071  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1072  * @privlevel public
1073  * @privilege %http://tizen.org/privilege/camera
1074  * @param[in] camera The handle to the camera
1075  * @return @c 0 on success, otherwise a negative error value
1076  * @retval #CAMERA_ERROR_NONE Successful
1077  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1078  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1079  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
1080  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
1081  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1082  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1083  * @pre The camera state must be set to #CAMERA_STATE_PREVIEW.
1084  * @post The camera state will be #CAMERA_STATE_CREATED.
1085  * @see camera_start_preview()
1086  * @see camera_unset_preview_cb()
1087  * @see camera_unset_media_packet_preview_cb()
1088  */
1089 int camera_stop_preview(camera_h camera);
1090
1091 /**
1092  * @brief Starts capturing of still images.
1093  *
1094  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1095  * @privlevel public
1096  * @privilege %http://tizen.org/privilege/camera
1097  * @remarks This function causes the transition of the camera state from #CAMERA_STATE_CAPTURING to #CAMERA_STATE_CAPTURED automatically\n
1098  *          and the corresponding callback function camera_capturing_cb() and camera_capture_completed_cb() will be invoked\n
1099  *          The captured image will be delivered through camera_capturing_cb().\n
1100  *          camera_capture_completed_cb() callback notifies about completion of camera_capturing_cb(). \n
1101  *          The camera's preview should be restarted by calling camera_start_preview().
1102  * @param[in] camera       The handle to the camera
1103  * @param[in] capturing_cb The callback for capturing data
1104  * @param[in] completed_cb The callback for notification of completion
1105  * @param[in] user_data    The user data
1106  * @return @c 0 on success, otherwise a negative error value
1107  * @retval #CAMERA_ERROR_NONE Successful
1108  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1109  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1110  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
1111  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
1112  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1113  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1114  * @pre The camera state must be set to #CAMERA_STATE_PREVIEW. \n
1115  *      If needed, modify capture resolution(camera_set_capture_resolution()),
1116  *      capture format(camera_set_capture_format()), or image quality(camera_attr_set_image_quality()).
1117  * @post If it succeeds the camera state will be #CAMERA_STATE_CAPTURED.
1118  *
1119  * @see camera_start_preview()
1120  * @see camera_start_continuous_capture();
1121  * @see camera_foreach_supported_capture_resolution()
1122  * @see camera_set_capture_resolution()
1123  * @see camera_get_capture_resolution()
1124  * @see camera_foreach_supported_capture_format()
1125  * @see camera_set_capture_format()
1126  * @see camera_get_capture_format()
1127  * @see camera_attr_set_image_quality()
1128  * @see camera_attr_get_image_quality()
1129  */
1130 int camera_start_capture(camera_h camera, camera_capturing_cb capturing_cb, camera_capture_completed_cb completed_cb, void *user_data);
1131
1132 /**
1133  * @brief Starts continuously capturing still images.
1134  *
1135  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1136  * @privlevel public
1137  * @privilege %http://tizen.org/privilege/camera
1138  * @remarks If this is not supported zero shutter lag occurs. The capture resolution could be changed to the preview resolution.\n
1139  *          This function causes the transition of the camera state from #CAMERA_STATE_CAPTURING to #CAMERA_STATE_CAPTURED automatically\n
1140  *          and the corresponding callback function camera_capturing_cb() and camera_capture_completed_cb() will be invoked\n
1141  *          Each Captured image will be delivered through camera_capturing_cb().\n
1142  *          The camera_capture_completed_cb() callback notifies about the completion of an entire capture.\n
1143  *          The camera's preview should be restarted by calling camera_start_preview().\n.
1144  * @param[in] camera       The handle to the camera
1145  * @param[in] count        The number of still images
1146  * @param[in] interval     The interval of the capture (millisecond)
1147  * @param[in] capturing_cb The callback for capturing data
1148  * @param[in] completed_cb The callback for notification of completion
1149  * @param[in] user_data    The user data
1150  * @return @c 0 on success, otherwise a negative error value
1151  * @retval #CAMERA_ERROR_NONE Successful
1152  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1153  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1154  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
1155  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
1156  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1157  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1158  * @post   If it succeeds the camera state will be #CAMERA_STATE_CAPTURED.
1159  *
1160  * @see camera_start_preview()
1161  * @see camera_start_capture();
1162  * @see camera_stop_continuous_capture()
1163  * @see camera_is_supported_zero_shutter_lag()
1164  */
1165 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);
1166
1167 /**
1168  * @brief Aborts continuous capturing.
1169  *
1170  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1171  * @privlevel public
1172  * @privilege %http://tizen.org/privilege/camera
1173  * @remarks The camera state will be changed to #CAMERA_STATE_CAPTURED.
1174  * @param[in] camera The handle to the camera
1175  * @return @c 0 on success, otherwise a negative error value
1176  * @retval #CAMERA_ERROR_NONE Successful
1177  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1178  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1179  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
1180  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
1181  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1182  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1183  * @pre The camera state must be set to #CAMERA_STATE_PREVIEW.
1184  *
1185  * @see camera_start_continuous_capture()
1186  */
1187 int camera_stop_continuous_capture(camera_h camera);
1188
1189 /**
1190  * @brief Gets the state of the camera.
1191  *
1192  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1193  * @param[in]  camera The handle to the camera
1194  * @param[out] state  The current state of the camera
1195  * @return @c 0 on success, otherwise a negative error value
1196  * @retval #CAMERA_ERROR_NONE Successful
1197  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1198  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1199  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1200  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1201  * @see camera_create()
1202  * @see camera_start_preview()
1203  * @see camera_stop_preview()
1204  * @see camera_start_capture()
1205  */
1206 int camera_get_state(camera_h camera, camera_state_e *state);
1207
1208 /**
1209  * @brief Starts camera auto-focusing, asynchronously.
1210  *
1211  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1212  * @privlevel public
1213  * @privilege %http://tizen.org/privilege/camera
1214  * @remarks If continuous status is @c true, the camera continuously tries to focus.
1215  * @param[in] camera     The handle to the camera
1216  * @param[in] continuous The status of continuous focusing
1217  * @return @c 0 on success, otherwise a negative error value
1218  * @retval #CAMERA_ERROR_NONE Successful
1219  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1220  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1221  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
1222  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
1223  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1224  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1225  * @pre The camera state must be set to #CAMERA_STATE_PREVIEW.
1226  * @post The camera focus state will be #CAMERA_FOCUS_STATE_ONGOING.
1227  *
1228  * @see camera_cancel_focusing()
1229  * @see camera_set_focus_changed_cb()
1230  * @see camera_focus_changed_cb()
1231  * @see camera_attr_set_af_mode()
1232  */
1233 int camera_start_focusing(camera_h camera, bool continuous);
1234
1235 /**
1236  * @brief Stops camera auto focusing.
1237  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1238  * @privlevel public
1239  * @privilege %http://tizen.org/privilege/camera
1240  * @param[in] camera The handle to the camera
1241  * @return @c 0 on success, otherwise a negative error value
1242  * @retval #CAMERA_ERROR_NONE Successful
1243  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1244  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1245  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
1246  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
1247  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1248  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1249  * @pre The camera state must be set to #CAMERA_STATE_PREVIEW.
1250  *
1251  * @see camera_start_focusing()
1252  * @see camera_focus_changed_cb()
1253  */
1254 int camera_cancel_focusing(camera_h camera);
1255
1256 /**
1257  * @brief Sets the display handle to show preview images.
1258  *
1259  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1260  * @remarks This function must be called before previewing (see camera_start_preview()).
1261  *          In Custom ROI display mode, camera_attr_set_display_roi_area() function must be called before calling this function.
1262  * @remarks This function must be called in main thread of the application.
1263  *          Otherwise, it will return #CAMERA_ERROR_INVALID_OPERATION by internal restriction.
1264  *          To avoid #CAMERA_ERROR_INVALID_OPERATION in sub thread, ecore_thread_main_loop_begin() and
1265  *          ecore_thread_main_loop_end() can be used, but deadlock can occur if the main thread is busy.
1266  *          So, it's not recommended to use them. (Since 5.0)
1267  * @param[in] camera  The handle to the camera
1268  * @param[in] type    The display type
1269  * @param[in] display The display handle from #GET_DISPLAY
1270  * @return @c 0 on success, otherwise a negative error value
1271  * @retval #CAMERA_ERROR_NONE Successful
1272  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1273  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1274  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
1275  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
1276  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1277  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1278  * @pre The camera state must be set to #CAMERA_STATE_CREATED.
1279  *
1280  * @see camera_start_preview()
1281  * @see #GET_DISPLAY
1282  * @see ecore_thread_main_loop_begin()
1283  * @see ecore_thread_main_loop_end()
1284  */
1285 int camera_set_display(camera_h camera, camera_display_type_e type, camera_display_h display);
1286
1287 /**
1288  * @brief Sets the resolution of the preview.
1289  *
1290  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1291  * @remarks This function should be called before previewing (camera_start_preview()).
1292  * @param[in] camera The handle to the camera
1293  * @param[in] width  The preview width
1294  * @param[in] height The preview height
1295  * @return @c 0 on success, otherwise a negative error value
1296  * @retval #CAMERA_ERROR_NONE Successful
1297  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1298  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1299  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
1300  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1301  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1302  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
1303  *
1304  * @see camera_start_preview()
1305  * @see camera_get_preview_resolution()
1306  * @see camera_foreach_supported_preview_resolution()
1307  */
1308 int camera_set_preview_resolution(camera_h camera, int width, int height);
1309
1310 /**
1311  * @brief Gets the resolution of the preview.
1312  *
1313  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1314  * @param[in]  camera The handle to the camera
1315  * @param[out] width  The preview width
1316  * @param[out] height The preview height
1317  * @return @c 0 on success, otherwise a negative error value
1318  * @retval #CAMERA_ERROR_NONE Successful
1319  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1320  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1321  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1322  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1323  * @see camera_set_preview_resolution()
1324  * @see camera_foreach_supported_preview_resolution()
1325  */
1326 int camera_get_preview_resolution(camera_h camera, int *width, int *height);
1327
1328 /**
1329  * @brief Gets the recommended preview resolution.
1330  *
1331  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1332  * @remarks Depending on the capture resolution aspect ratio and display resolution, the recommended preview resolution is determined.
1333  * @param[in]  camera The handle to the camera
1334  * @param[out] width  The preview width
1335  * @param[out] height The preview height
1336  * @return @c 0 on success, otherwise a negative error value
1337  * @retval #CAMERA_ERROR_NONE Successful
1338  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1339  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1340  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1341  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1342  * @see camera_set_preview_resolution()
1343  * @see camera_foreach_supported_preview_resolution()
1344  */
1345 int camera_get_recommended_preview_resolution(camera_h camera, int *width, int *height);
1346
1347 /**
1348  * @brief Starts face detection.
1349  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1350  * @privlevel public
1351  * @privilege %http://tizen.org/privilege/camera
1352  * @remarks This should be called after the preview is started.\n
1353  *          This callback will be invoked when the face is detected in the preview frame.\n
1354  *          Internally it starts continuous focus and focusing on the detected face.\n
1355  *          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
1356  *          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.
1357  * @param[in] camera    The handle to the camera
1358  * @param[in] callback  The callback to notify face detection
1359  * @param[in] user_data The user data to be passed to the callback function
1360  *
1361  * @return @c 0 on success, otherwise a negative error value
1362  * @retval #CAMERA_ERROR_NONE Successful
1363  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1364  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1365  * @retval #CAMERA_ERROR_INVALID_STATE Not preview state
1366  * @retval #CAMERA_ERROR_INVALID_OPERATION Not supported this feature
1367  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1368  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1369  * @pre The camera state must be #CAMERA_STATE_PREVIEW.
1370  *
1371  * @see camera_stop_face_detection()
1372  * @see camera_face_detected_cb()
1373  * @see camera_is_supported_face_detection()
1374  */
1375 int camera_start_face_detection(camera_h camera, camera_face_detected_cb callback, void *user_data);
1376
1377 /**
1378  * @brief Stops face detection.
1379  *
1380  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1381  * @privlevel public
1382  * @privilege %http://tizen.org/privilege/camera
1383  * @param[in] camera The handle to the camera
1384  * @return @c 0 on success, otherwise a negative error value
1385  * @retval #CAMERA_ERROR_NONE Successful
1386  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1387  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1388  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1389  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1390  * @pre This should be called after face detection is started.
1391  *
1392  * @see camera_start_face_detection()
1393  * @see camera_is_supported_face_detection()
1394  */
1395 int camera_stop_face_detection(camera_h camera);
1396
1397 /**
1398  * @}
1399  */
1400
1401 /**
1402  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
1403  * @{
1404  */
1405
1406 /**
1407  * @brief Gets continuous capture feature's supported state.
1408  * @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
1409  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1410  * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
1411  * @param[in] camera The handle to the camera
1412  * @return @c true on supported, otherwise false
1413  * @exception #CAMERA_ERROR_NONE Successful
1414  * @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1415  * @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1416  * @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1417  *
1418  */
1419 bool camera_is_supported_continuous_capture(camera_h camera);
1420
1421 /**
1422  * @brief Retrieves all supported camera preview resolutions by invoking the callback function once for each supported camera preview resolution.
1423  *
1424  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1425  * @param[in] camera    The handle to the camera
1426  * @param[in] callback  The callback function to be invoked
1427  * @param[in] user_data The user data to be passed to the callback function
1428  * @return @c 0 on success, otherwise a negative error value
1429  * @retval #CAMERA_ERROR_NONE Successful
1430  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1431  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1432  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1433  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1434  * @post This function invokes camera_supported_preview_resolution_cb() repeatedly to retrieve each supported preview resolution.
1435  *
1436  * @see camera_set_preview_resolution()
1437  * @see camera_get_preview_resolution()
1438  * @see camera_supported_preview_resolution_cb()
1439  */
1440 int camera_foreach_supported_preview_resolution(camera_h camera, camera_supported_preview_resolution_cb callback, void *user_data);
1441
1442 /**
1443  * @}
1444  */
1445
1446 /**
1447  * @addtogroup CAPI_MEDIA_CAMERA_MODULE
1448  * @{
1449  */
1450
1451 /**
1452  * @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE
1453  * @brief Sets the display rotation.
1454  *
1455  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1456  * @remarks This function should be called before previewing (see camera_start_preview())
1457  * @param[in] camera   The handle to the camera
1458  * @param[in] rotation The display rotation
1459  * @return @c 0 on success, otherwise a negative error value
1460  * @retval #CAMERA_ERROR_NONE Successful
1461  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1462  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1463  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
1464  * @retval #CAMERA_ERROR_INVALID_OPERATION Display type is incorrect
1465  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1466  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1467  * @see camera_start_preview()
1468  * @see camera_get_display_rotation()
1469  */
1470 int camera_set_display_rotation(camera_h camera, camera_rotation_e rotation);
1471
1472 /**
1473  * @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE
1474  * @brief Gets the display rotation.
1475  *
1476  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1477  * @param[in]  camera   The handle to the camera
1478  * @param[out] rotation The display rotation
1479  * @return @c 0 on success, otherwise a negative error value
1480  * @retval #CAMERA_ERROR_NONE Successful
1481  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1482  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1483  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1484  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1485  * @see camera_set_display_rotation()
1486  */
1487 int camera_get_display_rotation(camera_h camera, camera_rotation_e *rotation);
1488
1489 /**
1490  * @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE
1491  * @brief Sets the display flip.
1492  *
1493  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1494  * @param[in] camera The handle to the camera
1495  * @param[in] flip   The display flip
1496  * @return @c 0 on success, otherwise a negative error value
1497  * @retval #CAMERA_ERROR_NONE Successful
1498  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1499  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1500  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
1501  * @retval #CAMERA_ERROR_INVALID_OPERATION Display type is incorrect
1502  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1503  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1504  * @see camera_get_display_flip()
1505  */
1506 int camera_set_display_flip(camera_h camera, camera_flip_e flip);
1507
1508 /**
1509  * @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE
1510  * @brief Gets the display flip.
1511  *
1512  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1513  * @param[in]  camera The handle to the camera
1514  * @param[out] flip   The display flip
1515  * @return @c 0 on success, otherwise a negative error value
1516  * @retval #CAMERA_ERROR_NONE Successful
1517  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1518  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1519  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1520  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1521  * @see camera_set_display_flip()
1522  */
1523 int camera_get_display_flip(camera_h camera, camera_flip_e *flip);
1524
1525 /**
1526  * @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE
1527  * @brief Sets the visible property for display.
1528  *
1529  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1530  * @param[in] camera  The handle to the camera
1531  * @param[in] visible The display visibility property
1532  *
1533  * @return @c 0 on success, otherwise a negative error value
1534  * @retval #CAMERA_ERROR_NONE Successful
1535  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1536  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1537  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1538  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1539  * @see camera_is_display_visible()
1540  */
1541 int camera_set_display_visible(camera_h camera, bool visible);
1542
1543 /**
1544  * @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE
1545  * @brief Gets the visible property of display.
1546  *
1547  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1548  * @param[in]  camera  The handle to the camera
1549  * @param[out] visible @c true if camera display is visible, otherwise @c false
1550  *
1551  * @return @c 0 on success, otherwise a negative error value
1552  * @retval #CAMERA_ERROR_NONE Successful
1553  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1554  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1555  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1556  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1557  * @see camera_set_display_visible()
1558  */
1559 int camera_is_display_visible(camera_h camera, bool *visible);
1560
1561 /**
1562  * @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE
1563  * @brief Sets the display mode.
1564  *
1565  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1566  * @param[in] camera The handle to the camera
1567  * @param[in] mode   The display mode
1568  *
1569  * @return @c 0 on success, otherwise a negative error value
1570  * @retval #CAMERA_ERROR_NONE Successful
1571  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1572  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1573  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1574  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1575  * @see camera_get_display_mode()
1576  */
1577 int camera_set_display_mode(camera_h camera, camera_display_mode_e mode);
1578
1579 /**
1580  * @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE
1581  * @brief Gets the display mode.
1582  *
1583  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1584  * @param[in]  camera The handle to the camera
1585  * @param[out] mode   The display mode
1586  *
1587  * @return @c 0 on success, otherwise a negative error value
1588  * @retval #CAMERA_ERROR_NONE Successful
1589  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1590  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1591  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1592  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1593  * @see camera_set_display_mode()
1594  */
1595 int camera_get_display_mode(camera_h camera, camera_display_mode_e *mode);
1596
1597 /**
1598  * @brief Sets the hint for display reuse.
1599  * @details If the hint is set to true, the display will be reused when the camera device is changed with camera_change_device().
1600  * @since_tizen 3.0
1601  * @remarks If the current display type is #CAMERA_DISPLAY_TYPE_NONE, this function will return #CAMERA_ERROR_INVALID_OPERATION.
1602  * @param[in] camera The handle to the camera
1603  * @param[in] hint   The hint for display reuse; true - reuse the display, false - do not reuse
1604  * @return @c 0 on success, otherwise a negative error value
1605  * @retval #CAMERA_ERROR_NONE Successful
1606  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1607  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
1608  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
1609  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1610  * @pre    The camera state must be set to #CAMERA_STATE_PREVIEW.
1611  * @see camera_get_display_reuse_hint()
1612  * @see camera_change_device()
1613  */
1614 int camera_set_display_reuse_hint(camera_h camera, bool hint);
1615
1616 /**
1617  * @brief Gets the hint for display reuse.
1618  * @since_tizen 3.0
1619  * @remarks If the current display type is #CAMERA_DISPLAY_TYPE_NONE, this function will return #CAMERA_ERROR_INVALID_OPERATION.
1620  * @param[in]  camera The handle to the camera
1621  * @param[out] hint   The hint for display reuse; true - reuse the display, false - do not reuse
1622  * @return @c 0 on success, otherwise a negative error value
1623  * @retval #CAMERA_ERROR_NONE Successful
1624  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1625  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
1626  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1627  * @see camera_set_display_reuse_hint()
1628  * @see camera_change_device()
1629  */
1630 int camera_get_display_reuse_hint(camera_h camera, bool *hint);
1631
1632 /**
1633  * @brief Sets the resolution of the captured image.
1634  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1635  * @param[in] camera The handle to the camera
1636  * @param[in] width  The capture width
1637  * @param[in] height The capture height
1638  * @return @c 0 on success, otherwise a negative error value
1639  * @retval #CAMERA_ERROR_NONE Successful
1640  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1641  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1642  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
1643  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1644  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1645  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
1646  * @see camera_start_capture()
1647  * @see camera_get_capture_resolution()
1648  * @see camera_foreach_supported_capture_resolution()
1649  */
1650 int camera_set_capture_resolution(camera_h camera, int width, int height);
1651
1652 /**
1653  * @brief Gets the resolution of the captured image.
1654  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1655  * @param[in]  camera The handle to the camera
1656  * @param[out] width  The capture width
1657  * @param[out] height The capture height
1658  * @return @c 0 on success, otherwise a negative error value
1659  * @retval #CAMERA_ERROR_NONE Successful
1660  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
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_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1664  * @see camera_set_capture_resolution()
1665  * @see camera_foreach_supported_capture_resolution()
1666  */
1667 int camera_get_capture_resolution(camera_h camera, int *width, int *height);
1668
1669 /**
1670  * @}
1671  */
1672
1673 /**
1674  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
1675  * @{
1676  */
1677
1678 /**
1679  * @brief Retrieves all supported camera captured resolutions by invoking the callback function once for each supported camera capture resolution.
1680  *
1681  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1682  * @param[in] camera    The handle to the camera
1683  * @param[in] callback  The callback function to register
1684  * @param[in] user_data The user data to be passed to the callback function
1685  * @return @c 0 on success, otherwise a negative error value
1686  * @retval #CAMERA_ERROR_NONE Successful
1687  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1688  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1689  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1690  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1691  * @post This function invokes camera_supported_capture_resolution_cb() repeatedly to retrieve each supported capture resolution.
1692  * @see camera_set_capture_resolution()
1693  * @see camera_get_capture_resolution()
1694  * @see camera_supported_capture_resolution_cb()
1695  */
1696 int camera_foreach_supported_capture_resolution(camera_h camera, camera_supported_capture_resolution_cb callback, void *user_data);
1697
1698 /**
1699  * @}
1700  */
1701
1702 /**
1703  * @addtogroup CAPI_MEDIA_CAMERA_MODULE
1704  * @{
1705  */
1706
1707 /**
1708  * @brief Sets the format of an image to be captured.
1709  *
1710  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1711  * @remarks This function should be called before capturing (see camera_start_capture()).
1712  * @param[in]  camera The handle to the camera
1713  * @param[out] format The format of the image to be captured
1714  * @return @c 0 on success, otherwise a negative error value
1715  * @retval #CAMERA_ERROR_NONE Successful
1716  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1717  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1718  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
1719  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1720  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1721  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
1722  * @see camera_start_capture()
1723  * @see camera_get_capture_format()
1724  * @see camera_foreach_supported_capture_format()
1725  */
1726 int camera_set_capture_format(camera_h camera, camera_pixel_format_e format);
1727
1728 /**
1729  * @brief Gets the format of the image to be captured.
1730  *
1731  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1732  * @param[in]  camera The handle to the camera
1733  * @param[out] format The format of the image to be captured
1734  * @return @c 0 on success, otherwise a negative error value
1735  * @retval #CAMERA_ERROR_NONE Successful
1736  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1737  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1738  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1739  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1740  * @see camera_set_capture_format()
1741  * @see camera_foreach_supported_capture_format()
1742  */
1743 int camera_get_capture_format(camera_h camera, camera_pixel_format_e *format);
1744
1745 /**
1746  * @}
1747  */
1748
1749 /**
1750  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
1751  * @{
1752  */
1753
1754 /**
1755  * @brief Retrieves all supported camera capture formats by invoking the callback function once for each supported camera capture format.
1756  *
1757  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1758  * @param[in] camera    The handle to the camera
1759  * @param[in] callback  The callback function to be invoked
1760  * @param[in] user_data The user data to be passed to the callback function
1761  * @return @c 0 on success, otherwise a negative error value
1762  * @retval #CAMERA_ERROR_NONE Successful
1763  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1764  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1765  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1766  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1767  * @post This function invokes camera_supported_capture_format_cb() repeatedly to retrieve each supported capture format.
1768  * @see camera_set_capture_format()
1769  * @see camera_get_capture_format()
1770  * @see camera_supported_capture_format_cb()
1771  */
1772 int camera_foreach_supported_capture_format(camera_h camera, camera_supported_capture_format_cb callback, void *user_data);
1773
1774 /**
1775  * @}
1776  */
1777
1778 /**
1779  * @addtogroup CAPI_MEDIA_CAMERA_MODULE
1780  * @{
1781  */
1782
1783 /**
1784  * @brief Sets the preview data format.
1785  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1786  * @remarks This function should be called before previewing (see camera_start_preview()).
1787  * @param[in] camera The handle to the camera
1788  * @param[in] format The preview data format
1789  * @return @c 0 on success, otherwise a negative error value
1790  * @retval #CAMERA_ERROR_NONE Successful
1791  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1792  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1793  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
1794  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1795  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1796  * @pre The camera state must be set to #CAMERA_STATE_CREATED.
1797  * @see camera_start_preview()
1798  * @see camera_get_preview_format()
1799  * @see camera_foreach_supported_preview_format()
1800  */
1801 int camera_set_preview_format(camera_h camera, camera_pixel_format_e format);
1802
1803 /**
1804  * @brief Gets the format of the preview stream.
1805  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1806  * @param[in]  camera The handle to the camera
1807  * @param[out] format The preview data format
1808  * @return @c 0 on success, otherwise a negative error value
1809  * @retval #CAMERA_ERROR_NONE Successful
1810  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1811  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1812  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1813  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1814  * @see camera_set_preview_format()
1815  * @see camera_foreach_supported_preview_format()
1816  */
1817 int camera_get_preview_format(camera_h camera, camera_pixel_format_e *format);
1818
1819 /**
1820  * @brief Gets the facing direction of camera module.
1821  * @since_tizen 3.0
1822  * @param[in]  camera           The handle to the camera
1823  * @param[out] facing_direction The facing direction of camera module
1824  * @return @c 0 on success, otherwise a negative error value
1825  * @retval #CAMERA_ERROR_NONE Successful
1826  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1827  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
1828  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1829  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1830  */
1831 int camera_get_facing_direction(camera_h camera, camera_facing_direction_e *facing_direction);
1832
1833 /**
1834  * @brief Gets the camera's flash state.
1835  * @since_tizen 3.0
1836  * @param[in]  device The hardware camera to access
1837  * @param[out] state  The current flash state
1838  * @return @c 0 on success, otherwise a negative error value
1839  * @retval #CAMERA_ERROR_NONE Successful
1840  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1841  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
1842  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1843  * @see camera_attr_set_flash_mode()
1844  * @see camera_attr_get_flash_mode()
1845  */
1846 int camera_get_flash_state(camera_device_e device, camera_flash_state_e *state);
1847
1848 /**
1849  * @brief Sets a callback function to be called for extra preview frames.
1850  * @since_tizen 7.0
1851  * @param[in] camera    The handle to the camera
1852  * @param[in] callback  The callback function to be registered
1853  * @param[in] user_data The user data to be passed to the callback function
1854  * @return @c 0 on success, otherwise a negative error value
1855  * @retval #CAMERA_ERROR_NONE Successful
1856  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1857  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1858  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1859  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
1860  * @see camera_start_preview()
1861  * @see camera_unset_extra_preview_cb()
1862  * @see camera_extra_preview_cb()
1863  */
1864 int camera_set_extra_preview_cb(camera_h camera, camera_extra_preview_cb callback, void *user_data);
1865
1866 /**
1867  * @brief Unsets the callback function.
1868  * @since_tizen 7.0
1869  * @param[in] camera The handle to the camera
1870  * @return @c 0 on success, otherwise a negative error value
1871  * @retval #CAMERA_ERROR_NONE Successful
1872  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1873  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1874  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1875  * @see camera_set_extra_preview_cb()
1876  */
1877 int camera_unset_extra_preview_cb(camera_h camera);
1878
1879 /**
1880  * @brief Sets the extra preview stream format.
1881  * @since_tizen 7.0
1882  * @param[in] camera       The handle to the camera
1883  * @param[in] stream_id    The id of extra preview stream
1884  * @param[in] pixel_format The pixel format of extra preview stream
1885  * @param[in] width        The width of extra preview stream
1886  * @param[in] height       The height of extra preview stream
1887  * @param[in] fps          The fps of extra preview stream
1888  * @return @c 0 on success, otherwise a negative error value
1889  * @retval #CAMERA_ERROR_NONE Successful
1890  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1891  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1892  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
1893  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1894  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
1895  * @see camera_start_preview()
1896  * @see camera_set_extra_preview_cb()
1897  * @see camera_unset_extra_preview_cb()
1898  * @see camera_get_extra_preview_stream_format()
1899  */
1900 int camera_set_extra_preview_stream_format(camera_h camera, int stream_id, camera_pixel_format_e pixel_format, int width, int height, int fps);
1901
1902 /**
1903  * @brief Gets the extra preview stream format.
1904  * @since_tizen 7.0
1905  * @param[in] camera        The handle to the camera
1906  * @param[in] stream_id     The id of extra preview stream
1907  * @param[out] pixel_format The pixel format of extra preview stream
1908  * @param[out] width        The width of extra preview stream
1909  * @param[out] height       The height of extra preview stream
1910  * @param[out] fps          The fps of extra preview stream
1911  * @return @c 0 on success, otherwise a negative error value
1912  * @retval #CAMERA_ERROR_NONE Successful
1913  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1914  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1915  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
1916  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1917  * @pre The camera state must be set to #CAMERA_STATE_PREVIEW.
1918  * @see camera_start_preview()
1919  * @see camera_set_extra_preview_cb()
1920  * @see camera_unset_extra_preview_cb()
1921  * @see camera_set_extra_preview_stream_format()
1922  */
1923 int camera_get_extra_preview_stream_format(camera_h camera, int stream_id, camera_pixel_format_e *pixel_format, int *width, int *height, int *fps);
1924
1925 /**
1926  * @}
1927  */
1928
1929 /**
1930  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
1931  * @{
1932  */
1933
1934 /**
1935  * @brief Retrieves all supported camera preview formats by invoking the callback function once for each supported camera preview format.
1936  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1937  * @param[in] camera    The handle to the camera
1938  * @param[in] callback  The callback function to be invoked
1939  * @param[in] user_data The user data to be passed to the callback function
1940  * @return @c 0 on success, otherwise a negative error value
1941  * @retval #CAMERA_ERROR_NONE Successful
1942  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1943  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1944  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1945  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1946  * @post This function invokes camera_supported_preview_format_cb() repeatedly to retrieve each supported preview format.
1947  * @see camera_set_preview_format()
1948  * @see camera_get_preview_format()
1949  * @see camera_supported_preview_format_cb()
1950  */
1951 int camera_foreach_supported_preview_format(camera_h camera, camera_supported_preview_format_cb callback, void *user_data);
1952
1953 /**
1954  * @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
1955  * @brief Gets the face detection feature's supported state.
1956  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1957  * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
1958  * @param[in] camera The handle to the camera
1959  * @return @c true if supported, otherwise @c false
1960  * @exception #CAMERA_ERROR_NONE Successful
1961  * @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1962  * @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1963  * @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1964  * @see camera_start_face_detection()
1965  * @see camera_stop_face_detection()
1966  */
1967 bool camera_is_supported_face_detection(camera_h camera);
1968
1969 /**
1970  * @brief Gets the zero shutter lag feature's supported state.
1971  * @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
1972  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1973  * @remarks If supporting zero shutter lag, continuous shot can be done with full capture size. \n
1974  *                The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
1975  * @param[in] camera The handle to the camera
1976  * @return @c true if supported, otherwise @c false
1977  * @exception #CAMERA_ERROR_NONE Successful
1978  * @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1979  * @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1980  * @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1981  */
1982 bool camera_is_supported_zero_shutter_lag(camera_h camera);
1983
1984 /**
1985  * @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
1986  * @brief Gets the camera device count.
1987  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
1988  * @remarks If the device supports primary and secondary camera, this returns @c 2. If @c 1 is returned, the device only supports primary camera.
1989  * @param[in]  camera       The handle to the camera
1990  * @param[out] device_count The device count
1991  * @return @c 0 on success, otherwise a negative error value
1992  * @retval #CAMERA_ERROR_NONE Successful
1993  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
1994  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1995  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
1996  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
1997  */
1998 int camera_get_device_count(camera_h camera, int *device_count);
1999
2000 /**
2001  * @brief Gets the media packet preview callback feature's supported state.
2002  * @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
2003  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2004  * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
2005  * @param[in] camera The handle to the camera
2006  * @return @c true if supported, otherwise @c false
2007  * @exception #CAMERA_ERROR_NONE Successful
2008  * @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2009  * @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2010  * @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2011  *
2012  */
2013 bool camera_is_supported_media_packet_preview_cb(camera_h camera);
2014
2015 /**
2016  * @brief Gets the extra preview feature's supported state.
2017  * @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
2018  * @since_tizen 7.0
2019  * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
2020  * @param[in] camera The handle to the camera
2021  * @return @c true if supported, otherwise @c false
2022  * @exception #CAMERA_ERROR_NONE Successful
2023  * @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2024  */
2025 bool camera_is_supported_extra_preview(camera_h camera);
2026
2027 /**
2028  * @}
2029  */
2030
2031 /**
2032  * @addtogroup CAPI_MEDIA_CAMERA_MODULE
2033  * @{
2034  */
2035
2036 /**
2037  * @brief Registers a callback function to be called once per frame when previewing.
2038  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2039  * @remarks This callback does not work in the video recorder mode.\n
2040  *          Before 4.0, the only allowed state for calling this function was #CAMERA_STATE_CREATED.\n
2041  *          Since 4.0, #CAMERA_STATE_PREVIEW has been added as an allowed state,\n
2042  *          so that this function could be called before previewing or even while previewing.\n
2043  *          A registered callback is called on the internal thread of the camera.\n
2044  *          A video frame can be retrieved using a registered callback,\n
2045  *          and the buffer is only available in a registered callback.\n
2046  *          Since tizen 3.0, if you change the buffer in a registered callback,\n
2047  *          it could not be displayed on the device in case of copied buffer.\n
2048  *          and if camera_is_supported_media_packet_preview_cb() returns false,\n
2049  *          it's copied buffer case.
2050  * @param[in] camera    The handle to the camera
2051  * @param[in] callback  The callback function to be registered
2052  * @param[in] user_data The user data to be passed to the callback function
2053  * @return @c 0 on success, otherwise a negative error value
2054  * @retval #CAMERA_ERROR_NONE Successful
2055  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2056  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2057  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2058  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2059  * @pre Before 4.0 : The camera state must be set to #CAMERA_STATE_CREATED.\n
2060  *      Since  4.0 : The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
2061  * @see camera_start_preview()
2062  * @see camera_unset_preview_cb()
2063  * @see camera_preview_cb()
2064  */
2065 int camera_set_preview_cb(camera_h camera, camera_preview_cb callback, void *user_data);
2066
2067 /**
2068  * @brief Unregisters the callback function.
2069  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2070  * @param[in] camera The handle to the camera
2071  * @return @c 0 on success, otherwise a negative error value
2072  * @retval #CAMERA_ERROR_NONE Successful
2073  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2074  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2075  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2076  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2077  * @see camera_set_preview_cb()
2078  */
2079 int camera_unset_preview_cb(camera_h camera);
2080
2081 /**
2082  * @brief Registers a media packet callback function to be called once per frame when previewing.
2083  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2084  * @remarks This callback does not work in video recorder mode.\n
2085  *          This function should be called before previewing (see camera_start_preview())\n
2086  *          A registered callback is called on the internal thread of the camera.\n
2087  *          A video frame can be retrieved using a registered callback as a media packet.\n
2088  *          The callback function holds the same buffer that will be drawn on the display device.\n
2089  *          So if you change the media packet in a registered callback, it will be displayed on the device\n
2090  *          and the media packet is available until it's destroyed by media_packet_destroy().
2091  * @param[in] camera    The handle to the camera
2092  * @param[in] callback  The callback function to be registered
2093  * @param[in] user_data The user data to be passed to the callback function
2094  * @return 0 on success, otherwise a negative error value
2095  * @retval #CAMERA_ERROR_NONE Successful
2096  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2097  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2098  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2099  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2100  * @pre The camera's state should be #CAMERA_STATE_CREATED.
2101  * @see camera_start_preview()
2102  * @see camera_unset_media_packet_preview_cb()
2103  * @see camera_media_packet_preview_cb()
2104  */
2105 int camera_set_media_packet_preview_cb(camera_h camera, camera_media_packet_preview_cb callback, void *user_data);
2106
2107 /**
2108  * @brief Unregisters the media packet callback function.
2109  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2110  * @param[in] camera The handle to the camera
2111  * @return @c 0 on success, otherwise a negative error value
2112  * @retval #CAMERA_ERROR_NONE Successful
2113  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2114  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2115  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2116  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2117  * @see camera_set_media_packet_preview_cb()
2118  */
2119 int camera_unset_media_packet_preview_cb(camera_h camera);
2120
2121 /**
2122  * @brief Registers a callback function to be called when the camera state changes.
2123  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2124  * @param[in] camera    The handle to the camera
2125  * @param[in] callback  The callback function to register
2126  * @param[in] user_data The user data to be passed to the callback function
2127  * @return @c 0 on success, otherwise a negative error value
2128  * @retval #CAMERA_ERROR_NONE Successful
2129  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2130  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2131  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2132  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2133  * @post This function will invoke camera_state_changed_cb() when the camera state changes.
2134  * @see camera_unset_state_changed_cb()
2135  * @see camera_state_changed_cb()
2136  */
2137 int camera_set_state_changed_cb(camera_h camera, camera_state_changed_cb callback, void *user_data);
2138
2139 /**
2140  * @brief Unregisters the callback function.
2141  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2142  * @param[in] camera The handle to the camera
2143  * @return @c 0 on success, otherwise a negative error value
2144  * @retval #CAMERA_ERROR_NONE Successful
2145  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2146  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2147  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2148  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2149  * @see camera_set_state_changed_cb()
2150  */
2151 int camera_unset_state_changed_cb(camera_h camera);
2152
2153 /**
2154  * @brief Registers a callback function to be called when the camera is interrupted by policy.
2155  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2156  * @param[in] camera    The handle to the camera
2157  * @param[in] callback  The callback function to register
2158  * @param[in] user_data The user data to be passed to the callback function
2159  * @return @c 0 on success, otherwise a negative error value
2160  * @retval #CAMERA_ERROR_NONE Successful
2161  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2162  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2163  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2164  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2165  * @see camera_unset_interrupted_cb()
2166  * @see camera_interrupted_cb()
2167  */
2168 int camera_set_interrupted_cb(camera_h camera, camera_interrupted_cb callback, void *user_data);
2169
2170 /**
2171  * @brief Unregisters the callback function.
2172  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2173  * @param[in] camera The handle to the camera
2174  * @return @c 0 on success, otherwise a negative error value
2175  * @retval #CAMERA_ERROR_NONE Successful
2176  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2177  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2178  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2179  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2180  * @see camera_set_interrupted_cb()
2181  */
2182 int camera_unset_interrupted_cb(camera_h camera);
2183
2184 /**
2185  * @brief Registers a callback function to be called when the camera interrupt is started by policy.
2186  * @since_tizen 4.0
2187  * @param[in] camera    The handle to the camera
2188  * @param[in] callback  The callback function to register
2189  * @param[in] user_data The user data to be passed to the callback function
2190  * @return @c 0 on success, otherwise a negative error value
2191  * @retval #CAMERA_ERROR_NONE Successful
2192  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2193  * @see camera_unset_interrupt_started_cb()
2194  * @see camera_interrupt_started_cb()
2195  */
2196 int camera_set_interrupt_started_cb(camera_h camera, camera_interrupt_started_cb callback, void *user_data);
2197
2198 /**
2199  * @brief Unregisters the callback function.
2200  * @since_tizen 4.0
2201  * @param[in] camera The handle to the camera
2202  * @return @c 0 on success, otherwise a negative error value
2203  * @retval #CAMERA_ERROR_NONE Successful
2204  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2205  * @see camera_set_interrupt_started_cb()
2206  */
2207 int camera_unset_interrupt_started_cb(camera_h camera);
2208
2209 /**
2210  * @brief Registers a callback function to be called when the auto-focus state changes.
2211  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2212  * @param[in] camera    The handle to the camera
2213  * @param[in] callback  The callback function to register
2214  * @param[in] user_data The user data to be passed to the callback function
2215  * @return @c 0 on success, otherwise a negative error value
2216  * @retval #CAMERA_ERROR_NONE Successful
2217  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2218  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2219  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2220  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2221  * @post This function will invoke camera_focus_changed_cb() when the auto-focus state changes.
2222  * @see camera_start_focusing()
2223  * @see camera_cancel_focusing()
2224  * @see camera_unset_focus_changed_cb()
2225  * @see camera_focus_changed_cb()
2226  */
2227 int camera_set_focus_changed_cb(camera_h camera, camera_focus_changed_cb callback, void *user_data);
2228
2229 /**
2230  * @brief Unregisters the callback function.
2231  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2232  * @param[in] camera The handle to the camera
2233  * @return @c 0 on success, otherwise a negative error value
2234  * @retval #CAMERA_ERROR_NONE Successful
2235  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2236  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2237  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2238  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2239  * @see camera_set_focus_changed_cb()
2240  */
2241 int camera_unset_focus_changed_cb(camera_h camera);
2242
2243 /**
2244  * @brief Registers a callback function to be called when an asynchronous operation error occurs.
2245  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2246  * @remarks This callback informs about a critical error situation.\n
2247  *          When this callback is invoked, the user should release the resource and terminate the application.\n
2248  *          In case of errors, one of the following codes will occur:\n
2249  *          #CAMERA_ERROR_DEVICE,\n
2250  *          #CAMERA_ERROR_INVALID_OPERATION,\n
2251  *          #CAMERA_ERROR_OUT_OF_MEMORY.
2252  * @param[in] camera    The handle to the camera
2253  * @param[in] callback  The callback function to register
2254  * @param[in] user_data The user data to be passed to the callback function
2255  * @return @c 0 on success, otherwise a negative error value
2256  * @retval #CAMERA_ERROR_NONE Successful
2257  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2258  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2259  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2260  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2261  * @post This function will invoke camera_error_cb() when an asynchronous operation error occurs.
2262
2263  * @see camera_unset_error_cb()
2264  * @see camera_error_cb()
2265  */
2266 int camera_set_error_cb(camera_h camera, camera_error_cb callback, void *user_data);
2267
2268 /**
2269  * @brief Unregisters the callback function.
2270  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2271  * @param[in] camera The handle to the camera
2272  * @return @c 0 on success, otherwise a negative error value
2273  * @retval #CAMERA_ERROR_NONE Successful
2274  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2275  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2276  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2277  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2278  * @see camera_set_error_cb()
2279  */
2280 int camera_unset_error_cb(camera_h camera);
2281
2282 /**
2283  * @brief Gets the state of camera device.
2284  * @since_tizen 3.0
2285  * @param[in]  device The hardware camera type
2286  * @param[out] state  The current state of the device
2287  * @return @c 0 on success, otherwise a negative error value
2288  * @retval #CAMERA_ERROR_NONE Successful
2289  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2290  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2291  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
2292  */
2293 int camera_get_device_state(camera_device_e device, camera_device_state_e *state);
2294
2295 /**
2296  * @brief Registers a callback function to be called when the camera device state changes.
2297  * @since_tizen 3.0
2298  * @param[in]  callback  The callback function to register
2299  * @param[in]  user_data The user data to be passed to the callback function
2300  * @param[out] cb_id     The id of registered callback
2301  * @return @c 0 on success, otherwise a negative error value
2302  * @retval #CAMERA_ERROR_NONE Successful
2303  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2304  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2305  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
2306  * @retval #CAMERA_ERROR_OUT_OF_MEMORY Out of memory
2307  * @post This function will invoke camera_device_state_changed_cb() when the camera device's state changes.
2308  * @see camera_remove_device_state_changed_cb()
2309  * @see camera_device_state_changed_cb()
2310  */
2311 int camera_add_device_state_changed_cb(camera_device_state_changed_cb callback, void *user_data, int *cb_id);
2312
2313 /**
2314  * @brief Unregisters the callback function.
2315  * @since_tizen 3.0
2316  * @param[in] cb_id The id of registered callback
2317  * @return @c 0 on success, otherwise a negative error value
2318  * @retval #CAMERA_ERROR_NONE Successful
2319  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2320  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2321  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
2322  * @see camera_add_device_state_changed_cb()
2323  */
2324 int camera_remove_device_state_changed_cb(int cb_id);
2325
2326 /**
2327  * @}
2328  */
2329
2330 /**
2331  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
2332  * @{
2333  */
2334
2335 /**
2336  * @brief Called to get each supported auto-focus mode.
2337  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2338  * @param[in] mode      The supported auto-focus mode
2339  * @param[in] user_data The user data passed from the foreach function
2340  * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
2341  * @pre camera_attr_foreach_supported_af_mode() will invoke this callback.
2342  * @see camera_attr_foreach_supported_af_mode()
2343  */
2344 typedef bool (*camera_attr_supported_af_mode_cb)(camera_attr_af_mode_e mode, void *user_data);
2345
2346 /**
2347  * @brief Called to get each supported exposure mode.
2348  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2349  * @param[in] mode      The supported exposure mode
2350  * @param[in] user_data The user data passed from the foreach function
2351  * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
2352  * @pre camera_attr_foreach_supported_exposure_mode() will invoke this callback.
2353  * @see camera_attr_foreach_supported_exposure_mode()
2354  * @see #camera_attr_exposure_mode_e
2355  */
2356 typedef bool (*camera_attr_supported_exposure_mode_cb)(camera_attr_exposure_mode_e mode, void *user_data);
2357
2358 /**
2359  * @brief Called to get each supported ISO mode.
2360  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2361  * @param[in] iso       The supported ISO mode
2362  * @param[in] user_data The user data passed from the foreach function
2363  * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
2364  * @pre camera_attr_foreach_supported_iso() will invoke this callback.
2365  * @see camera_attr_foreach_supported_iso()
2366  */
2367 typedef bool (*camera_attr_supported_iso_cb)(camera_attr_iso_e iso, void *user_data);
2368
2369 /**
2370  * @brief Called to get each supported white balance.
2371  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2372  * @param[in] wb        The supported white balance mode
2373  * @param[in] user_data The user data passed from the foreach function
2374  * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
2375  * @pre camera_attr_foreach_supported_whitebalance() will invoke this callback.
2376  * @see camera_attr_foreach_supported_whitebalance()
2377  * @see #camera_attr_whitebalance_e
2378  */
2379 typedef bool (*camera_attr_supported_whitebalance_cb)(camera_attr_whitebalance_e wb, void *user_data);
2380
2381 /**
2382  * @brief Called to get each supported effect mode.
2383  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2384  * @param[in] effect    The supported effect mode
2385  * @param[in] user_data The user data passed from the foreach function
2386  * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
2387  * @pre camera_attr_foreach_supported_effect() will invoke this callback.
2388  * @see camera_attr_foreach_supported_effect()
2389  */
2390 typedef bool (*camera_attr_supported_effect_cb)(camera_attr_effect_mode_e effect, void *user_data);
2391
2392 /**
2393  * @brief Called to get each supported scene mode.
2394  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2395  * @param[in] mode      The supported scene mode
2396  * @param[in] user_data The user data passed from the foreach function
2397  * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
2398  * @pre camera_attr_foreach_supported_scene_mode() will invoke this callback.
2399  * @see camera_attr_foreach_supported_scene_mode()
2400  * @see #camera_attr_scene_mode_e
2401  */
2402 typedef bool (*camera_attr_supported_scene_mode_cb)(camera_attr_scene_mode_e mode, void *user_data);
2403
2404 /**
2405  * @brief Called to get each supported flash mode.
2406  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2407  * @param[in] mode      The supported flash mode
2408  * @param[in] user_data The user data passed from the foreach function
2409  * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
2410  * @pre camera_attr_foreach_supported_flash_mode() will invoke this callback.
2411  * @see camera_attr_foreach_supported_flash_mode()
2412  */
2413 typedef bool (*camera_attr_supported_flash_mode_cb)(camera_attr_flash_mode_e mode, void *user_data);
2414
2415 /**
2416  * @brief Called to get each supported FPS mode.
2417  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2418  * @param[in] fps       The supported FPS mode
2419  * @param[in] user_data The user data passed from the foreach function
2420  * @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
2421  * @pre camera_attr_foreach_supported_fps() will invoke this callback.
2422  * @see camera_attr_foreach_supported_fps()
2423  */
2424 typedef bool (*camera_attr_supported_fps_cb)(camera_attr_fps_e fps, void *user_data);
2425
2426 /**
2427  * @brief Called to get each supported stream flip mode.
2428  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2429  * @param[in] flip      The supported stream flip mode
2430  * @param[in] user_data The user data passed from the foreach function
2431  * @return @c true to continue with the next iteration of the loop, \n @c false to break out of the loop
2432  * @pre camera_attr_foreach_supported_stream_flip() will invoke this callback.
2433  * @see camera_attr_foreach_supported_stream_flip()
2434  */
2435 typedef bool (*camera_attr_supported_stream_flip_cb)(camera_flip_e flip, void *user_data);
2436
2437 /**
2438  * @brief Called to get each supported stream rotation mode.
2439  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2440  * @param[in] rotation  The supported stream rotation mode
2441  * @param[in] user_data The user data passed from the foreach function
2442  * @return @c true to continue with the next iteration of the loop, \n @c false to break out of the loop
2443  * @pre camera_attr_foreach_supported_stream_rotation() will invoke this callback.
2444  * @see camera_attr_foreach_supported_stream_rotation()
2445  */
2446 typedef bool (*camera_attr_supported_stream_rotation_cb)(camera_rotation_e rotation, void *user_data);
2447
2448 /**
2449  * @brief Called to get each supported theater mode.
2450  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2451  * @param[in] mode      The supported theater mode
2452  * @param[in] user_data The user data passed from the foreach function
2453  * @return @c true to continue with the next iteration of the loop, \n @c false to break out of the loop
2454  * @pre camera_attr_foreach_supported_theater_mode() will invoke this callback.
2455  * @see camera_attr_foreach_supported_theater_mode()
2456  */
2457 typedef bool (*camera_attr_supported_theater_mode_cb)(camera_attr_theater_mode_e mode, void *user_data);
2458
2459 /**
2460  * @brief Called to get each supported PTZ (Pan Tilt Zoom) type.
2461  * @since_tizen 3.0
2462  * @param[in] type      The supported ptz type
2463  * @param[in] user_data The user data passed from the foreach function
2464  * @return @c true to continue with the next iteration of the loop, \n @c false to break out of the loop
2465  * @pre camera_attr_foreach_supported_ptz_mode() will invoke this callback.
2466  * @see camera_attr_foreach_supported_ptz_mode()
2467  */
2468 typedef bool (*camera_attr_supported_ptz_type_cb)(camera_attr_ptz_type_e type, void *user_data);
2469
2470
2471 /**
2472  * @}
2473  */
2474
2475 /**
2476  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
2477  * @{
2478  */
2479
2480 /**
2481  * @brief Sets the preview frame rate.
2482  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2483  * @remarks This function should be called before previewing (see camera_start_preview()).
2484  * @param[in] camera The handle to the camera
2485  * @param[in] fps    The frame rate
2486  * @return @c 0 on success, otherwise a negative error value
2487  * @retval #CAMERA_ERROR_NONE Successful
2488  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2489  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2490  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
2491  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2492  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2493  * @pre The camera state must be set to #CAMERA_STATE_CREATED.
2494  * @see camera_start_preview()
2495  * @see camera_attr_get_preview_fps()
2496  * @see camera_attr_foreach_supported_fps()
2497  */
2498 int camera_attr_set_preview_fps(camera_h camera, camera_attr_fps_e fps);
2499
2500 /**
2501  * @brief Gets the frames per second of a preview video stream.
2502  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2503  * @param[in]  camera The handle to the camera
2504  * @param[out] fps    The frames per second of the preview video stream
2505  * @return @c 0 on success, otherwise a negative error value
2506  * @retval #CAMERA_ERROR_NONE Successful
2507  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2508  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2509  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2510  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2511  * @see camera_attr_set_preview_fps()
2512  * @see camera_attr_foreach_supported_fps()
2513  */
2514 int camera_attr_get_preview_fps(camera_h camera, camera_attr_fps_e *fps);
2515
2516 /**
2517  * @brief Sets the bitrate of extra preview.
2518  * @since_tizen 7.0
2519  * @param[in] camera    The handle to the camera
2520  * @param[in] stream_id The id of extra preview stream
2521  * @param[in] bitrate   The bitrate(bps) of extra preview
2522  * @return @c 0 on success, otherwise a negative error value
2523  * @retval #CAMERA_ERROR_NONE Successful
2524  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2525  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
2526  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2527  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2528  * @see camera_attr_get_extra_preview_bitrate()
2529  */
2530 int camera_attr_set_extra_preview_bitrate(camera_h camera, int stream_id, int bitrate);
2531
2532 /**
2533  * @brief Gets the bitrate of extra preview.
2534  * @since_tizen 7.0
2535  * @param[in] camera    The handle to the camera
2536  * @param[in] stream_id The id of extra preview stream
2537  * @param[out] bitrate  The bitrate(bps) of extra preview stream
2538  * @return @c 0 on success, otherwise a negative error value
2539  * @retval #CAMERA_ERROR_NONE Successful
2540  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2541  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
2542  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2543  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2544  * @see camera_attr_set_extra_preview_bitrate()
2545  */
2546 int camera_attr_get_extra_preview_bitrate(camera_h camera, int stream_id, int *bitrate);
2547
2548 /**
2549  * @brief Sets the GOP (Group Of Pictures) interval of extra preview.
2550  * @since_tizen 7.0
2551  * @remarks The recommended range is from 1,000 (1 second) to 600,000 (10 minutes). \n
2552  *          But, due to codec limitations, it may not apply.
2553  * @param[in] camera    The handle to the camera
2554  * @param[in] stream_id The id of extra preview stream
2555  * @param[in] interval  The GOP interval of extra preview (millisecond)
2556  * @return @c 0 on success, otherwise a negative error value
2557  * @retval #CAMERA_ERROR_NONE Successful
2558  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2559  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
2560  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2561  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2562  * @see camera_attr_get_extra_preview_gop_interval()
2563  */
2564 int camera_attr_set_extra_preview_gop_interval(camera_h camera, int stream_id, int interval);
2565
2566 /**
2567  * @brief Gets the GOP (Group Of Pictures) interval of extra preview.
2568  * @since_tizen 7.0
2569  * @param[in] camera    The handle to the camera
2570  * @param[in] stream_id The id of extra preview stream
2571  * @param[out] interval The GOP interval of extra preview (millisecond)
2572  * @return @c 0 on success, otherwise a negative error value
2573  * @retval #CAMERA_ERROR_NONE Successful
2574  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2575  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
2576  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2577  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2578  * @see camera_attr_set_extra_preview_gop_interval()
2579  */
2580 int camera_attr_get_extra_preview_gop_interval(camera_h camera, int stream_id, int *interval);
2581
2582 /**
2583  * @brief Gets the rotation of preview frame.
2584  * @since_tizen 7.0
2585  * @remarks The function should be called in camera_preview_cb(),\n
2586  *          otherwise, it will return #CAMERA_ERROR_INVALID_OPERATION.
2587  * @param[in] camera    The handle to the camera
2588  * @param[out] rotation The rotation of preview frame
2589  * @return @c 0 on success, otherwise a negative error value
2590  * @retval #CAMERA_ERROR_NONE Successful
2591  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
2592  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2593  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2594  */
2595 int camera_attr_get_preview_frame_rotation(camera_h camera, camera_rotation_e *rotation);
2596
2597 /**
2598  * @}
2599  */
2600
2601 /**
2602  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
2603  * @{
2604  */
2605
2606 /**
2607  * @brief Retrieves all supported FPS modes by invoking the callback function once for each supported FPS mode.
2608  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2609  * @param[in] camera    The handle to the camera
2610  * @param[in] callback  The callback function to invoke
2611  * @param[in] user_data The user data to be passed to the callback function
2612  * @return @c 0 on success, otherwise a negative error value
2613  * @retval #CAMERA_ERROR_NONE Successful
2614  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2615  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2616  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2617  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2618  * @post This function invokes camera_attr_supported_fps_cb() repeatedly to get each supported FPS mode.
2619  * @see camera_attr_set_preview_fps()
2620  * @see camera_attr_get_preview_fps()
2621  * @see camera_attr_supported_fps_cb()
2622  */
2623 int camera_attr_foreach_supported_fps(camera_h camera, camera_attr_supported_fps_cb callback, void *user_data);
2624
2625 /**
2626  * @brief Retrieves all supported FPS modes by invoking the callback function once for each supported FPS mode.
2627  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
2628  * @param[in] camera    The handle to the camera
2629  * @param[in] width     Required preview resolution's width
2630  * @param[in] height    Required preview resolution's height
2631  * @param[in] callback  The callback function to invoke
2632  * @param[in] user_data The user data to be passed to the callback function
2633  * @return @c 0 on success, otherwise a negative error value
2634  * @retval #CAMERA_ERROR_NONE Successful
2635  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2636  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2637  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2638  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2639  * @post This function invokes camera_attr_supported_fps_cb() repeatedly to get each supported FPS mode.
2640  * @see camera_attr_set_preview_fps()
2641  * @see camera_attr_get_preview_fps()
2642  * @see camera_attr_supported_fps_cb()
2643  */
2644 int camera_attr_foreach_supported_fps_by_resolution(camera_h camera, int width, int height, camera_attr_supported_fps_cb callback, void *user_data);
2645
2646 /**
2647  * @}
2648  */
2649
2650 /**
2651  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
2652  * @{
2653  */
2654
2655 /**
2656  * @brief Sets quality of the image.
2657  * @details The range for image quality is 1 to 100. If @a quality is out of range, #CAMERA_ERROR_INVALID_PARAMETER error occurred.
2658  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2659  * @param[in] camera  The handle to the camera
2660  * @param[in] quality The quality of image (1 ~ 100)
2661  * @return @c 0 on success, otherwise a negative error value
2662  * @retval #CAMERA_ERROR_NONE Successful
2663  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2664  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2665  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
2666  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2667  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2668  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
2669  * @see camera_start_preview()
2670  * @see camera_attr_get_image_quality()
2671  */
2672 int camera_attr_set_image_quality(camera_h camera, int quality);
2673
2674 /**
2675  * @brief Gets the quality of a still image, which is captured.
2676  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2677  * @param[in]  camera  The handle to the camera
2678  * @param[out] quality The quality of the image(1 ~ 100)
2679  * @return @c 0 on success, otherwise a negative error value
2680  * @retval #CAMERA_ERROR_NONE Successful
2681  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2682  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2683  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2684  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2685  * @see camera_attr_set_image_quality()
2686  */
2687 int camera_attr_get_image_quality(camera_h camera, int *quality);
2688
2689 /**
2690  * @brief Gets the bit rate of encoded preview.
2691  * @since_tizen 3.0
2692  * @param[in]  camera  The handle to the camera
2693  * @param[out] bitrate The bit rate of encoded preview
2694  * @return @c 0 on success, otherwise a negative error value
2695  * @retval #CAMERA_ERROR_NONE Successful
2696  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2697  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
2698  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2699  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2700  * @see camera_attr_set_encoded_preview_bitrate()
2701  */
2702 int camera_attr_get_encoded_preview_bitrate(camera_h camera, int *bitrate);
2703
2704 /**
2705  * @brief Sets the bit rate of encoded preview.
2706  * @since_tizen 3.0
2707  * @remarks The recommended range is from 1,000 (1 kbps) to 100,000,000 (100 Mbps). \n
2708  *          But, due to codec limitations, it may not apply.
2709  * @param[in] camera  The handle to the camera
2710  * @param[in] bitrate The bit rate of encoded preview
2711  * @return @c 0 on success, otherwise a negative error value
2712  * @retval #CAMERA_ERROR_NONE Successful
2713  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2714  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
2715  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2716  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2717  * @see camera_attr_get_encoded_preview_bitrate()
2718  */
2719 int camera_attr_set_encoded_preview_bitrate(camera_h camera, int bitrate);
2720
2721 /**
2722  * @brief Gets the GOP (Group Of Pictures) interval of encoded preview.
2723  * @since_tizen 3.0
2724  * @param[in]  camera   The handle to the camera
2725  * @param[out] interval The GOP interval of encoded preview (millisecond)
2726  * @return @c 0 on success, otherwise a negative error value
2727  * @retval #CAMERA_ERROR_NONE Successful
2728  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2729  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
2730  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2731  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2732  * @see camera_attr_set_encoded_preview_gop_interval()
2733  */
2734 int camera_attr_get_encoded_preview_gop_interval(camera_h camera, int *interval);
2735
2736 /**
2737  * @brief Sets the GOP (Group Of Pictures) interval of encoded preview.
2738  * @since_tizen 3.0
2739  * @remarks The recommended range is from 1,000 (1 second) to 600,000 (10 minutes). \n
2740  *          But, due to codec limitations, it may not apply.
2741  * @param[in] camera   The handle to the camera
2742  * @param[in] interval The GOP interval of encoded preview (millisecond)
2743  * @return @c 0 on success, otherwise a negative error value
2744  * @retval #CAMERA_ERROR_NONE Successful
2745  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2746  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
2747  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2748  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2749  * @see camera_attr_get_encoded_preview_gop_interval()
2750  */
2751 int camera_attr_set_encoded_preview_gop_interval(camera_h camera, int interval);
2752
2753 /**
2754  * @brief Sets the zoom level.
2755  * @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.
2756  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2757  * @param[in] camera The handle to the camera
2758  * @param[in] zoom   The zoom level
2759  * @return @c 0 on success, otherwise a negative error value
2760  * @retval #CAMERA_ERROR_NONE Successful
2761  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2762  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2763  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
2764  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2765  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2766  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
2767  * @see camera_attr_get_zoom()
2768  * @see camera_attr_get_zoom_range()
2769  */
2770 int camera_attr_set_zoom(camera_h camera, int zoom);
2771
2772 /**
2773  * @brief Gets the zoom level.
2774  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2775  * @param[in]  camera The handle to the camera
2776  * @param[out] zoom   The zoom level
2777  * @return @c 0 on success, otherwise a negative error value
2778  * @retval #CAMERA_ERROR_NONE Successful
2779  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2780  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2781  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2782  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2783  * @see camera_attr_set_zoom()
2784  * @see camera_attr_get_zoom_range()
2785  */
2786 int camera_attr_get_zoom(camera_h camera, int *zoom);
2787
2788 /**
2789  * @brief Gets the available zoom level.
2790  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2791  * @remarks If the min value is greater than the max value, it means that this feature is not supported.
2792  * @param[in]  camera The handle to the camera
2793  * @param[out] min    The minimum zoom level
2794  * @param[out] max    The maximum zoom level
2795  * @return @c 0 on success, otherwise a negative error value
2796  * @retval #CAMERA_ERROR_NONE Successful
2797  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2798  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2799  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2800  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2801  * @see camera_attr_set_zoom()
2802  * @see camera_attr_get_zoom()
2803  */
2804 int camera_attr_get_zoom_range(camera_h camera, int *min, int *max);
2805
2806
2807 /**
2808  * @brief Sets the auto focus mode.
2809  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2810  * @param[in] camera The handle to the camera
2811  * @param[in] mode   The auto focus mode
2812  * @return @c 0 on success, otherwise a negative error value
2813  * @retval #CAMERA_ERROR_NONE Successful
2814  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2815  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2816  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
2817  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2818  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2819  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
2820  * @see camera_attr_get_af_mode()
2821  * @see camera_attr_foreach_supported_af_mode()
2822  * @see #camera_attr_af_mode_e
2823  */
2824 int camera_attr_set_af_mode(camera_h camera, camera_attr_af_mode_e mode);
2825
2826 /**
2827  * @brief Gets the auto focus mode.
2828  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2829  * @param[in]  camera The handle to the camera
2830  * @param[out] mode   The auto focus mode
2831  * @return @c 0 on success, otherwise a negative error value
2832  * @retval #CAMERA_ERROR_NONE Successful
2833  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2834  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2835  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2836  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2837  * @see camera_attr_foreach_supported_af_mode()
2838  * @see camera_attr_set_af_mode()
2839  * @see #camera_attr_af_mode_e
2840  */
2841 int camera_attr_get_af_mode(camera_h camera, camera_attr_af_mode_e *mode);
2842
2843 /**
2844  * @brief Sets auto focus area.
2845  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2846  * @remarks This API is invalid in the #CAMERA_ATTR_AF_NONE mode.\n
2847  *          The coordinates are mapped to preview area.
2848  * @param[in] camera The handle to the camera
2849  * @param[in] x      The x coordinates of the focus area
2850  * @param[in] y      The y coordinates of the focus area
2851  * @return @c 0 on success, otherwise a negative error value
2852  * @retval #CAMERA_ERROR_NONE Successful
2853  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2854  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2855  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
2856  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
2857  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2858  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2859  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
2860  * @see camera_attr_set_af_mode()
2861  * @see camera_attr_clear_af_area()
2862  */
2863 int camera_attr_set_af_area(camera_h camera, int x, int y);
2864
2865 /**
2866  * @brief Clears the auto focus area.
2867  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2868  * @remarks The focusing area is set to the center.
2869  * @param[in] camera The handle to the camera
2870  * @return @c 0 on success, otherwise a negative error value
2871  * @retval #CAMERA_ERROR_NONE Successful
2872  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2873  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2874  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
2875  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2876  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2877  * @see camera_attr_set_af_mode()
2878  * @see camera_attr_set_af_area()
2879  */
2880 int camera_attr_clear_af_area(camera_h camera);
2881
2882 /**
2883  * @}
2884  */
2885
2886 /**
2887  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
2888  * @{
2889  */
2890
2891 /**
2892  * @brief Retrieves all supported auto focus modes by invoking the callback function once for each supported auto focus mode.
2893  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2894  * @param[in] camera    The handle to the camera
2895  * @param[in] callback  The callback function to invoke
2896  * @param[in] user_data The user data to be passed to the callback function
2897  * @return @c 0 on success, otherwise a negative error value
2898  * @retval #CAMERA_ERROR_NONE Successful
2899  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2900  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2901  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2902  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2903  * @post This function invokes camera_attr_supported_af_mode_cb() to get all the supported auto focus modes.
2904  * @see camera_attr_set_af_mode()
2905  * @see camera_attr_get_af_mode()
2906  * @see camera_attr_supported_af_mode_cb()
2907  */
2908 int camera_attr_foreach_supported_af_mode(camera_h camera, camera_attr_supported_af_mode_cb callback, void *user_data);
2909
2910 /**
2911  * @}
2912  */
2913
2914 /**
2915  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
2916  * @{
2917  */
2918
2919 /**
2920  * @brief Sets the exposure mode.
2921  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2922  * @param[in] camera The handle to the camera
2923  * @param[in] mode   The exposure mode
2924  * @return @c 0 on success, otherwise a negative error value
2925  * @retval #CAMERA_ERROR_NONE Successful
2926  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2927  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2928  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
2929  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2930  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2931  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
2932  * @see camera_attr_get_exposure_mode()
2933  * @see camera_attr_foreach_supported_exposure_mode()
2934  */
2935 int camera_attr_set_exposure_mode(camera_h camera, camera_attr_exposure_mode_e mode);
2936
2937 /**
2938  * @brief Gets the exposure mode.
2939  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2940  * @param[in]  camera The handle to the camera
2941  * @param[out] mode   The exposure mode
2942  * @return @c 0 on success, otherwise a negative error value
2943  * @retval #CAMERA_ERROR_NONE Successful
2944  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2945  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2946  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2947  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2948  * @see camera_attr_set_exposure_mode()
2949  * @see camera_attr_foreach_supported_exposure_mode()
2950  */
2951 int camera_attr_get_exposure_mode(camera_h camera, camera_attr_exposure_mode_e *mode);
2952
2953 /**
2954  * @}
2955  */
2956
2957 /**
2958  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
2959  * @{
2960  */
2961
2962 /**
2963  * @brief Retrieves all supported exposure modes by invoking the callback function once for each supported exposure mode.
2964  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2965  * @param[in] camera    The handle to the camera
2966  * @param[in] callback  The callback function to be invoked
2967  * @param[in] user_data The user data to be passed to the callback function
2968  * @return @c 0 on success, otherwise a negative error value
2969  * @retval #CAMERA_ERROR_NONE Successful
2970  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2971  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2972  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
2973  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
2974  * @post This function invokes camera_attr_supported_exposure_mode_cb() to get all the supported exposure modes.
2975  * @see camera_attr_set_exposure_mode()
2976  * @see camera_attr_get_exposure_mode()
2977  * @see camera_attr_supported_exposure_mode_cb()
2978  */
2979 int camera_attr_foreach_supported_exposure_mode(camera_h camera, camera_attr_supported_exposure_mode_cb callback, void *user_data);
2980
2981 /**
2982  * @}
2983  */
2984
2985 /**
2986  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
2987  * @{
2988  */
2989
2990 /**
2991  * @brief Sets the exposure value.
2992  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
2993  * @param[in] camera The handle to the camera
2994  * @param[in] value  The exposure value
2995  * @return @c 0 on success, otherwise a negative error value
2996  * @retval #CAMERA_ERROR_NONE Successful
2997  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
2998  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2999  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3000  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3001  * @see camera_attr_get_exposure()
3002  */
3003 int camera_attr_set_exposure(camera_h camera, int value);
3004
3005 /**
3006  * @brief Gets the exposure value.
3007  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3008  * @param[in]  camera The handle to the camera
3009  * @param[out] value  The exposure value
3010  * @return @c 0 on success, otherwise a negative error value
3011  * @retval #CAMERA_ERROR_NONE Successful
3012  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3013  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3014  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3015  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3016  * @see camera_attr_set_exposure()
3017  */
3018 int camera_attr_get_exposure(camera_h camera, int *value);
3019
3020 /**
3021  * @brief Gets the available exposure value.
3022  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3023  * @remarks If the min value is greater than the max value, it means that this feature is not supported.
3024  * @param[in]  camera The handle to the camera
3025  * @param[out] min    The minimum exposure value
3026  * @param[out] max    The maximum exposure value
3027  * @return @c 0 on success, otherwise a negative error value
3028  * @retval #CAMERA_ERROR_NONE Successful
3029  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3030  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3031  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3032  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3033  * @see camera_attr_set_exposure()
3034  */
3035 int camera_attr_get_exposure_range(camera_h camera, int *min, int *max);
3036
3037 /**
3038  * @brief Sets the ISO level.
3039  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3040  * @param[in] camera The handle to the camera
3041  * @param[in] iso    The ISO level
3042  * @return @c 0 on success, otherwise a negative error value
3043  * @retval #CAMERA_ERROR_NONE Successful
3044  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3045  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3046  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
3047  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3048  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3049  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
3050  * @see camera_attr_get_iso()
3051  * @see camera_attr_foreach_supported_iso()
3052  */
3053 int camera_attr_set_iso(camera_h camera, camera_attr_iso_e iso);
3054
3055 /**
3056  * @brief Gets the ISO level.
3057  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3058  * @param[in]  camera The handle to the camera
3059  * @param[out] iso    The ISO level
3060  * @return @c 0 on success, otherwise a negative error value
3061  * @retval #CAMERA_ERROR_NONE Successful
3062  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3063  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3064  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3065  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3066  * @see camera_attr_set_iso()
3067  * @see camera_attr_foreach_supported_iso()
3068  */
3069 int camera_attr_get_iso(camera_h camera, camera_attr_iso_e *iso);
3070
3071 /**
3072  * @brief Sets the gain level.
3073  * @since_tizen 7.5
3074  * @param[in] camera The handle to the camera
3075  * @param[in] level  The gain level
3076  * @return @c 0 on success, otherwise a negative error value
3077  * @retval #CAMERA_ERROR_NONE Successful
3078  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3079  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3080  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
3081  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3082  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
3083  * @see camera_attr_get_gain()
3084  * @see camera_attr_get_gain_range()
3085  * @see camera_attr_get_gain_step()
3086  */
3087 int camera_attr_set_gain(camera_h camera, int level);
3088
3089 /**
3090  * @brief Gets the gain level.
3091  * @since_tizen 7.5
3092  * @param[in]  camera The handle to the camera
3093  * @param[out] level  The gain level
3094  * @return @c 0 on success, otherwise a negative error value
3095  * @retval #CAMERA_ERROR_NONE Successful
3096  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3097  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3098  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3099  * @see camera_attr_set_gain()
3100  * @see camera_attr_get_gain_range()
3101  * @see camera_attr_get_gain_step()
3102  */
3103 int camera_attr_get_gain(camera_h camera, int *level);
3104
3105 /**
3106  * @brief Gets the available gain level.
3107  * @since_tizen 7.5
3108  * @remarks If the min value is greater than the max value, it means that this feature is not supported.
3109  * @param[in]  camera The handle to the camera
3110  * @param[out] min    The minimum gain level
3111  * @param[out] max    The maximum gain level
3112  * @return @c 0 on success, otherwise a negative error value
3113  * @retval #CAMERA_ERROR_NONE Successful
3114  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3115  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3116  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3117  * @see camera_attr_set_gain()
3118  * @see camera_attr_get_gain()
3119  * @see camera_attr_get_gain_step()
3120  */
3121 int camera_attr_get_gain_range(camera_h camera, int *min, int *max);
3122
3123 /**
3124  * @brief Gets the gain level step.
3125  * @since_tizen 7.5
3126  * @param[in]  camera The handle to the camera
3127  * @param[out] step   The gain level step
3128  * @return @c 0 on success, otherwise a negative error value
3129  * @retval #CAMERA_ERROR_NONE Successful
3130  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3131  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3132  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3133  * @see camera_attr_set_gain()
3134  * @see camera_attr_get_gain()
3135  * @see camera_attr_get_gain_range()
3136  */
3137 int camera_attr_get_gain_step(camera_h camera, int *step);
3138
3139 /**
3140  * @}
3141  */
3142
3143 /**
3144  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
3145  * @{
3146  */
3147
3148 /**
3149  * @brief Retrieves all supported ISO levels by invoking the callback function once for each supported ISO level.
3150  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3151  * @param[in] camera    The handle to the camera
3152  * @param[in] callback  The callback function to be invoked
3153  * @param[in] user_data The user data to be passed to the callback function
3154  * @return @c 0 on success, otherwise a negative error value
3155  * @retval #CAMERA_ERROR_NONE Successful
3156  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3157  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3158  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3159  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3160  * @post This function invokes camera_attr_supported_iso_cb() to get all the supported ISO levels.
3161  * @see camera_attr_set_iso()
3162  * @see camera_attr_get_iso()
3163  * @see camera_attr_supported_iso_cb()
3164  */
3165 int camera_attr_foreach_supported_iso(camera_h camera, camera_attr_supported_iso_cb callback, void *user_data);
3166
3167 /**
3168  * @}
3169  */
3170
3171 /**
3172  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
3173  * @{
3174  */
3175
3176 /**
3177  * @brief Sets the theater mode.
3178  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3179  * @remarks If you want to display the preview image on the external display with the full screen mode, use this function.
3180  * @param[in] camera The handle to the camera
3181  * @param[in] mode   The theater mode
3182  * @return @c 0 on success, otherwise a negative error value
3183  * @retval #CAMERA_ERROR_NONE Successful
3184  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3185  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3186  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3187  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3188  * @pre This function is valid only when the external display is connected.
3189  * @see camera_attr_get_theater_mode()
3190  */
3191 int camera_attr_set_theater_mode(camera_h camera, camera_attr_theater_mode_e mode);
3192
3193 /**
3194  * @brief Gets the theater mode.
3195  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3196  * @param[in]  camera The handle to the camera
3197  * @param[out] mode   The theater mode
3198  * @return @c 0 on success, otherwise a negative error value
3199  * @retval #CAMERA_ERROR_NONE Successful
3200  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3201  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3202  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3203  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3204  * @see camera_attr_set_theater_mode()
3205  */
3206 int camera_attr_get_theater_mode(camera_h camera, camera_attr_theater_mode_e *mode);
3207
3208 /**
3209  * @}
3210  */
3211
3212 /**
3213  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
3214  * @{
3215  */
3216
3217 /**
3218  * @brief Retrieves all supported theater modes by invoking callback function once for each supported theater modes.
3219  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3220  * @param[in] camera    The handle to the camera
3221  * @param[in] callback  The callback function to be invoked
3222  * @param[in] user_data The user data to be passed to the callback function
3223  * @return @c 0 on success, otherwise a negative error value
3224  * @retval #CAMERA_ERROR_NONE Successful
3225  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3226  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3227  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3228  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3229  * @post This function invokes camera_attr_supported_theater_mode_cb() to get all supported theater modes.
3230  * @see camera_attr_set_theater_mode()
3231  * @see camera_attr_get_theater_mode()
3232  * @see camera_attr_supported_theater_mode_cb()
3233  */
3234 int camera_attr_foreach_supported_theater_mode(camera_h camera, camera_attr_supported_theater_mode_cb callback, void *user_data);
3235
3236 /**
3237  * @}
3238  */
3239
3240
3241 /**
3242  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
3243  * @{
3244  */
3245
3246 /**
3247  * @brief Sets the brightness level.
3248  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3249  * @remarks If the min value is greater than the max value from camera_attr_get_brightness_range(), \n
3250  *          it means that this feature is not supported.
3251  * @param[in] camera The handle to the camera
3252  * @param[in] level The brightness level
3253  * @return @c 0 on success, otherwise a negative error value
3254  * @retval #CAMERA_ERROR_NONE Successful
3255  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3256  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3257  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
3258  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3259  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3260  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
3261  * @see camera_attr_get_brightness()
3262  * @see camera_attr_get_brightness_range()
3263  */
3264 int camera_attr_set_brightness(camera_h camera, int level);
3265
3266 /**
3267  * @brief Gets the brightness level.
3268  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3269  * @param[in]  camera The handle to the camera
3270  * @param[out] level  The brightness level
3271  * @return @c 0 on success, otherwise a negative error value
3272  * @retval #CAMERA_ERROR_NONE Successful
3273  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3274  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3275  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3276  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3277  * @see camera_attr_set_brightness()
3278  * @see camera_attr_get_brightness_range()
3279  */
3280 int camera_attr_get_brightness(camera_h camera, int *level);
3281
3282 /**
3283  * @brief Gets the available brightness level.
3284  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3285  * @remarks If the min value is greater than the max value, it means that this feature is not supported.
3286  * @param[in]  camera The handle to the camera
3287  * @param[out] min    The minimum brightness level
3288  * @param[out] max    The maximum brightness level
3289  * @return @c 0 on success, otherwise a negative error value
3290  * @retval #CAMERA_ERROR_NONE Successful
3291  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3292  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3293  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3294  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3295  * @see camera_attr_set_brightness()
3296  * @see camera_attr_get_brightness()
3297  */
3298 int camera_attr_get_brightness_range(camera_h camera, int *min, int *max);
3299
3300 /**
3301  * @brief Sets the contrast level.
3302  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3303  * @param[in] camera The handle to the camera
3304  * @param[in] level  The contrast level
3305  * @return @c 0 on success, otherwise a negative error value
3306  * @retval #CAMERA_ERROR_NONE Successful
3307  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3308  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3309  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
3310  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3311  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3312  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
3313  * @see camera_attr_get_contrast()
3314  * @see camera_attr_get_contrast_range()
3315  */
3316 int camera_attr_set_contrast(camera_h camera, int level);
3317
3318 /**
3319  * @brief Gets the contrast level.
3320  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3321  * @param[in]  camera The handle to the camera
3322  * @param[out] level  The contrast level
3323  * @return @c 0 on success, otherwise a negative error value
3324  * @retval #CAMERA_ERROR_NONE Successful
3325  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3326  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3327  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3328  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3329  * @see camera_attr_set_contrast()
3330  * @see camera_attr_get_contrast_range()
3331  */
3332 int camera_attr_get_contrast(camera_h camera, int *level);
3333
3334 /**
3335  * @brief Gets the available contrast level.
3336  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3337  * @remarks If the min value is greater than the max value, it means that this feature is not supported.
3338  * @param[in]  camera The handle to the camera
3339  * @param[out] min    The minimum contrast level
3340  * @param[out] max    The maximum contrast level
3341  * @return @c 0 on success, otherwise a negative error value
3342  * @retval #CAMERA_ERROR_NONE Successful
3343  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3344  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3345  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3346  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3347  * @see camera_attr_set_contrast()
3348  * @see camera_attr_get_contrast()
3349  */
3350 int camera_attr_get_contrast_range(camera_h camera, int *min, int *max);
3351
3352 /**
3353  * @brief Sets the hue level.
3354  * @since_tizen 5.0
3355  * @param[in] camera The handle to the camera
3356  * @param[in] level  The hue level
3357  * @return @c 0 on success, otherwise a negative error value
3358  * @retval #CAMERA_ERROR_NONE Successful
3359  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3360  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3361  * @see camera_attr_get_hue()
3362  * @see camera_attr_get_hue_range()
3363  */
3364 int camera_attr_set_hue(camera_h camera, int level);
3365
3366 /**
3367  * @brief Gets the hue level.
3368  * @since_tizen 5.0
3369  * @param[in]  camera The handle to the camera
3370  * @param[out] level  The hue level
3371  * @return @c 0 on success, otherwise a negative error value
3372  * @retval #CAMERA_ERROR_NONE Successful
3373  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3374  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3375  * @see camera_attr_set_hue()
3376  * @see camera_attr_get_hue_range()
3377  */
3378 int camera_attr_get_hue(camera_h camera, int *level);
3379
3380 /**
3381  * @brief Gets the available hue level.
3382  * @since_tizen 5.0
3383  * @remarks If the min value is greater than the max value, it means that this feature is not supported.
3384  * @param[in]  camera The handle to the camera
3385  * @param[out] min    The minimum hue level
3386  * @param[out] max    The maximum hue level
3387  * @return @c 0 on success, otherwise a negative error value
3388  * @retval #CAMERA_ERROR_NONE Successful
3389  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3390  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3391  * @see camera_attr_set_hue()
3392  * @see camera_attr_get_hue()
3393  */
3394 int camera_attr_get_hue_range(camera_h camera, int *min, int *max);
3395
3396 /**
3397  * @brief Sets the white balance mode.
3398  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3399  * @param[in] camera       The handle to the camera
3400  * @param[in] whitebalance The white balance mode
3401  * @return @c 0 on success, otherwise a negative error value
3402  * @retval #CAMERA_ERROR_NONE Successful
3403  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3404  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3405  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
3406  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3407  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3408  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
3409  * @see camera_attr_foreach_supported_whitebalance()
3410  * @see camera_attr_get_whitebalance()
3411  */
3412 int camera_attr_set_whitebalance(camera_h camera, camera_attr_whitebalance_e whitebalance);
3413
3414 /**
3415  * @brief Gets the white balance mode.
3416  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3417  * @param[in]  camera       The handle to the camera
3418  * @param[out] whitebalance The white balance mode
3419  * @return @c 0 on success, otherwise a negative error value
3420  * @retval #CAMERA_ERROR_NONE Successful
3421  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3422  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3423  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3424  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3425  * @see camera_attr_foreach_supported_whitebalance()
3426  * @see camera_attr_set_whitebalance()
3427  */
3428 int camera_attr_get_whitebalance(camera_h camera, camera_attr_whitebalance_e *whitebalance);
3429
3430 /**
3431  * @brief Sets the white balance temperature.
3432  * @since_tizen 7.5
3433  * @param[in] camera      The handle to the camera
3434  * @param[in] temperature The white balance temperature
3435  * @return @c 0 on success, otherwise a negative error value
3436  * @retval #CAMERA_ERROR_NONE Successful
3437  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3438  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3439  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3440  * @see camera_attr_get_whitebalance_temperature()
3441  * @see camera_attr_get_whitebalance_temperature_range()
3442  * @see camera_attr_get_whitebalance_temperature_step()
3443  */
3444 int camera_attr_set_whitebalance_temperature(camera_h camera, int temperature);
3445
3446 /**
3447  * @brief Gets the white balance temperature.
3448  * @since_tizen 7.5
3449  * @param[in]  camera      The handle to the camera
3450  * @param[out] temperature The white balance temperature
3451  * @return @c 0 on success, otherwise a negative error value
3452  * @retval #CAMERA_ERROR_NONE Successful
3453  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3454  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3455  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3456  * @see camera_attr_set_whitebalance_temperature()
3457  * @see camera_attr_get_whitebalance_temperature_range()
3458  * @see camera_attr_get_whitebalance_temperature_step()
3459  */
3460 int camera_attr_get_whitebalance_temperature(camera_h camera, int *temperature);
3461
3462 /**
3463  * @brief Gets the available white balance temperature.
3464  * @since_tizen 7.5
3465  * @remarks If the min value is greater than the max value, it means that this feature is not supported.
3466  * @param[in]  camera The handle to the camera
3467  * @param[out] min    The minimum white balance temperature
3468  * @param[out] max    The maximum white balance temperature
3469  * @return @c 0 on success, otherwise a negative error value
3470  * @retval #CAMERA_ERROR_NONE Successful
3471  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3472  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3473  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3474  * @see camera_attr_set_whitebalance_temperature()
3475  * @see camera_attr_get_whitebalance_temperature()
3476  * @see camera_attr_get_whitebalance_temperature_step()
3477  */
3478 int camera_attr_get_whitebalance_temperature_range(camera_h camera, int *min, int *max);
3479
3480 /**
3481  * @brief Gets the step of white balance temperature.
3482  * @since_tizen 7.5
3483  * @param[in]  camera The handle to the camera
3484  * @param[out] step   The step of white balance temperature
3485  * @return @c 0 on success, otherwise a negative error value
3486  * @retval #CAMERA_ERROR_NONE Successful
3487  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3488  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3489  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3490  * @see camera_attr_set_whitebalance_temperature()
3491  * @see camera_attr_get_whitebalance_temperature()
3492  * @see camera_attr_get_whitebalance_temperature_range()
3493  */
3494 int camera_attr_get_whitebalance_temperature_step(camera_h camera, int *step);
3495
3496 /**
3497  * @brief Sets the saturation level.
3498  * @since_tizen 7.5
3499  * @param[in] camera The handle to the camera
3500  * @param[in] level  The saturation level
3501  * @return @c 0 on success, otherwise a negative error value
3502  * @retval #CAMERA_ERROR_NONE Successful
3503  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3504  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3505  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3506  * @see camera_attr_get_saturation()
3507  * @see camera_attr_get_saturation_range()
3508  */
3509 int camera_attr_set_saturation(camera_h camera, int level);
3510
3511 /**
3512  * @brief Gets the saturation level.
3513  * @since_tizen 7.5
3514  * @param[in]  camera The handle to the camera
3515  * @param[out] level  The saturation level
3516  * @return @c 0 on success, otherwise a negative error value
3517  * @retval #CAMERA_ERROR_NONE Successful
3518  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3519  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3520  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3521  * @see camera_attr_set_saturation()
3522  * @see camera_attr_get_saturation_range()
3523  */
3524 int camera_attr_get_saturation(camera_h camera, int *level);
3525
3526 /**
3527  * @brief Gets the available saturation level.
3528  * @since_tizen 7.5
3529  * @remarks If the min value is greater than the max value, it means that this feature is not supported.
3530  * @param[in]  camera The handle to the camera
3531  * @param[out] min    The minimum saturation level
3532  * @param[out] max    The maximum saturation level
3533  * @return @c 0 on success, otherwise a negative error value
3534  * @retval #CAMERA_ERROR_NONE Successful
3535  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3536  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3537  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3538  * @see camera_attr_set_saturation()
3539  * @see camera_attr_get_saturation()
3540  */
3541 int camera_attr_get_saturation_range(camera_h camera, int *min, int *max);
3542
3543 /**
3544  * @brief Sets the sharpness level.
3545  * @since_tizen 7.5
3546  * @param[in] camera The handle to the camera
3547  * @param[in] level  The sharpness level
3548  * @return @c 0 on success, otherwise a negative error value
3549  * @retval #CAMERA_ERROR_NONE Successful
3550  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3551  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3552  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3553  * @see camera_attr_get_sharpness()
3554  * @see camera_attr_get_sharpness_range()
3555  */
3556 int camera_attr_set_sharpness(camera_h camera, int level);
3557
3558 /**
3559  * @brief Gets the sharpness level.
3560  * @since_tizen 7.5
3561  * @param[in]  camera The handle to the camera
3562  * @param[out] level  The sharpness level
3563  * @return @c 0 on success, otherwise a negative error value
3564  * @retval #CAMERA_ERROR_NONE Successful
3565  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3566  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3567  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3568  * @see camera_attr_set_sharpness()
3569  * @see camera_attr_get_sharpness_range()
3570  */
3571 int camera_attr_get_sharpness(camera_h camera, int *level);
3572
3573 /**
3574  * @brief Gets the available sharpness level.
3575  * @since_tizen 7.5
3576  * @remarks If the min value is greater than the max value, it means that this feature is not supported.
3577  * @param[in]  camera The handle to the camera
3578  * @param[out] min    The minimum sharpness level
3579  * @param[out] max    The maximum sharpness level
3580  * @return @c 0 on success, otherwise a negative error value
3581  * @retval #CAMERA_ERROR_NONE Successful
3582  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3583  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3584  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3585  * @see camera_attr_set_sharpness()
3586  * @see camera_attr_get_sharpness()
3587  */
3588 int camera_attr_get_sharpness_range(camera_h camera, int *min, int *max);
3589
3590 /**
3591  * @}
3592  */
3593
3594 /**
3595  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
3596  * @{
3597  */
3598
3599 /**
3600  * @brief Retrieves all supported white balances by invoking the callback function once for each supported white balance.
3601  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3602  * @param[in] camera    The handle to the camera
3603  * @param[in] callback  The callback function to be invoked
3604  * @param[in] user_data The user data to be passed to the callback function
3605  * @return @c 0 on success, otherwise a negative error value
3606  * @retval #CAMERA_ERROR_NONE Successful
3607  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3608  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3609  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3610  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3611  * @post This function invokes camera_attr_supported_whitebalance_cb() to get all the supported white balances.
3612  * @see camera_attr_set_whitebalance()
3613  * @see camera_attr_get_whitebalance()
3614  * @see camera_attr_supported_whitebalance_cb()
3615  */
3616 int camera_attr_foreach_supported_whitebalance(camera_h camera, camera_attr_supported_whitebalance_cb callback, void *user_data);
3617
3618 /**
3619  * @}
3620  */
3621
3622 /**
3623  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
3624  * @{
3625  */
3626
3627 /**
3628  * @brief Sets the camera effect mode.
3629  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3630  * @param[in] camera The handle to the camera
3631  * @param[in] effect The camera effect mode
3632  * @return @c 0 on success, otherwise a negative error value
3633  * @retval #CAMERA_ERROR_NONE Successful
3634  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3635  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3636  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
3637  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3638  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3639  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
3640  * @see camera_attr_foreach_supported_effect()
3641  * @see camera_attr_get_effect()
3642  */
3643 int camera_attr_set_effect(camera_h camera, camera_attr_effect_mode_e effect);
3644
3645
3646 /**
3647  * @brief Gets the camera effect mode.
3648  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3649  * @param[in]  camera The handle to the camera
3650  * @param[out] effect The camera effect mode
3651  * @return @c 0 on success, otherwise a negative error value
3652  * @retval #CAMERA_ERROR_NONE Successful
3653  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3654  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3655  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3656  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3657  * @see camera_attr_foreach_supported_effect()
3658  * @see camera_attr_set_effect()
3659  */
3660 int camera_attr_get_effect(camera_h camera, camera_attr_effect_mode_e *effect);
3661
3662 /**
3663  * @}
3664  */
3665
3666 /**
3667  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
3668  * @{
3669  */
3670
3671 /**
3672  * @brief Retrieves all supported effect modes by invoking the callback function once for each supported effect mode.
3673  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3674  * @param[in] camera    The handle to the camera
3675  * @param[in] callback  The callback function to invoke
3676  * @param[in] user_data The user data to be passed to the callback function
3677  * @return @c 0 on success, otherwise a negative error value
3678  * @retval #CAMERA_ERROR_NONE Successful
3679  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3680  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3681  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3682  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3683  * @post This function invokes camera_attr_supported_effect_cb() to get all the supported effect modes.
3684  * @see camera_attr_set_effect()
3685  * @see camera_attr_get_effect()
3686  * @see camera_attr_supported_effect_cb()
3687  */
3688 int camera_attr_foreach_supported_effect(camera_h camera, camera_attr_supported_effect_cb callback, void *user_data);
3689
3690 /**
3691  * @}
3692  */
3693
3694 /**
3695  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
3696  * @{
3697  */
3698
3699 /**
3700  * @brief Sets the scene mode.
3701  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3702  * @param[in] camera The handle to the camera
3703  * @param[in] mode   The scene mode
3704  * @return @c 0 on success, otherwise a negative error value
3705  * @retval #CAMERA_ERROR_NONE Successful
3706  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3707  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3708  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
3709  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3710  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3711  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
3712  * @see camera_attr_foreach_supported_scene_mode()
3713  * @see camera_attr_get_scene_mode()
3714  */
3715 int camera_attr_set_scene_mode(camera_h camera, camera_attr_scene_mode_e mode);
3716
3717 /**
3718  * @brief Gets the scene mode.
3719  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3720  * @param[in]  camera The handle to the camera
3721  * @param[out] mode   The scene mode
3722  * @return @c 0 on success, otherwise a negative error value
3723  * @retval #CAMERA_ERROR_NONE Successful
3724  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3725  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3726  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3727  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3728  * @see camera_attr_foreach_supported_scene_mode()
3729  * @see camera_attr_set_scene_mode()
3730  */
3731 int camera_attr_get_scene_mode(camera_h camera, camera_attr_scene_mode_e *mode);
3732
3733 /**
3734  * @}
3735  */
3736
3737 /**
3738  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
3739  * @{
3740  */
3741
3742 /**
3743  * @brief Retrieves all supported scene modes by invoking the callback function once for each supported scene mode.
3744  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3745  * @param[in] camera    The handle to the camera
3746  * @param[in] callback  The callback function to invoke
3747  * @param[in] user_data The user data to be passed to the callback function
3748  * @return @c 0 on success, otherwise a negative error value
3749  * @retval #CAMERA_ERROR_NONE Successful
3750  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3751  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3752  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3753  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3754  * @post This function invokes camera_attr_supported_scene_mode_cb() to get all the supported scene modes.
3755  * @see camera_attr_set_scene_mode()
3756  * @see camera_attr_get_scene_mode()
3757  * @see camera_attr_supported_scene_mode_cb()
3758  */
3759 int camera_attr_foreach_supported_scene_mode(camera_h camera, camera_attr_supported_scene_mode_cb callback, void *user_data);
3760
3761 /**
3762  * @}
3763  */
3764
3765 /**
3766  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
3767  * @{
3768  */
3769
3770 /**
3771  * @brief Enables to write EXIF(Exchangeable image file format) tags in a JPEG file.
3772  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3773  * @param[in] camera The handle to the camera
3774  * @param[in] enable If @c true writing EXIF tags in a JPEG file is enabled, otherwise @c false
3775  * @return @c 0 on success, otherwise a negative error value
3776  * @retval #CAMERA_ERROR_NONE Successful
3777  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3778  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3779  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3780  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3781  * @see         camera_attr_is_enabled_tag()
3782  */
3783 int camera_attr_enable_tag(camera_h camera, bool enable);
3784
3785 /**
3786  * @brief Gets the value that indicates whether writing EXIF(Exchangeable image file format) tags in a JPEG file is enabled.
3787  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3788  * @param[in]  camera   The handle to the camera
3789  * @param[out] enabled  If @c true camera information is enabled, otherwise @c false
3790  * @return @c 0 on success, otherwise a negative error value
3791  * @retval #CAMERA_ERROR_NONE Successful
3792  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3793  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3794  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3795  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3796  * @see         camera_attr_enable_tag()
3797  */
3798 int camera_attr_is_enabled_tag(camera_h camera, bool *enabled);
3799
3800 /**
3801  * @brief Sets the camera image description in the EXIF(Exchangeable image file format) tag.
3802  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3803  * @param[in] camera      The handle to the camera
3804  * @param[in] description The string with description
3805  * @return @c 0 on success, otherwise a negative error value
3806  * @retval #CAMERA_ERROR_NONE Successful
3807  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3808  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3809  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3810  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3811  * @see camera_attr_get_tag_image_description()
3812  */
3813 int camera_attr_set_tag_image_description(camera_h camera, const char *description);
3814
3815 /**
3816  * @brief Gets the camera image description in EXIF(Exchangeable image file format) tag.
3817  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3818  * @remarks You must release @a description using free().
3819  * @param[in]  camera      The handle to the camera
3820  * @param[out] description A pointer to a string
3821  * @return @c 0 on success, otherwise a negative error value
3822  * @retval #CAMERA_ERROR_NONE Successful
3823  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3824  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3825  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3826  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3827  * @see camera_attr_set_tag_image_description()
3828  */
3829 int camera_attr_get_tag_image_description(camera_h camera, char **description);
3830
3831 /**
3832  * @brief Sets the camera orientation in the EXIF(Exchangeable image file format) tag.
3833  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3834  * @param[in] camera      The handle to the camera
3835  * @param[in] orientation The camera orientation
3836  * @return @c 0 on success, otherwise a negative error value
3837  * @retval #CAMERA_ERROR_NONE Successful
3838  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3839  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3840  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3841  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3842  * @see camera_attr_get_tag_orientation()
3843  */
3844 int camera_attr_set_tag_orientation(camera_h camera, camera_attr_tag_orientation_e orientation);
3845
3846 /**
3847  * @brief Gets the camera orientation in the EXIF(Exchangeable image file format) tag.
3848  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3849  * @param[in]  camera      The handle to the camera
3850  * @param[out] orientation The camera orientation
3851  * @return @c 0 on success, otherwise a negative error value
3852  * @retval #CAMERA_ERROR_NONE Successful
3853  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3854  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3855  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3856  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3857  * @see camera_attr_set_tag_orientation()
3858  */
3859 int camera_attr_get_tag_orientation(camera_h camera, camera_attr_tag_orientation_e *orientation);
3860
3861 /**
3862  * @brief Sets the software information in the EXIF(Exchangeable image file format) tag.
3863  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3864  * @param[in] camera   The handle to the camera
3865  * @param[in] software The software information tag
3866  * @return @c 0 on success, otherwise a negative error value
3867  * @retval #CAMERA_ERROR_NONE Successful
3868  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3869  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3870  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3871  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3872  * @see camera_attr_get_tag_software()
3873  */
3874 int camera_attr_set_tag_software(camera_h camera, const char *software);
3875
3876 /**
3877  * @brief Gets the software information in the EXIF(Exchangeable image file format) tag.
3878  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3879  * @remarks You must release @a software using free().
3880  * @param[in]  camera   The handle to the camera
3881  * @param[out] software A pointer to a string
3882  * @return @c 0 on success, otherwise a negative error value
3883  * @retval #CAMERA_ERROR_NONE Successful
3884  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3885  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3886  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3887  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3888  * @see camera_attr_set_tag_software()
3889  */
3890 int camera_attr_get_tag_software(camera_h camera, char **software);
3891
3892 /**
3893  * @brief Sets the geotag(GPS data) in the EXIF(Exchangeable image file format) tag.
3894  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3895  * @param[in] camera    The handle to the camera
3896  * @param[in] latitude  The latitude data
3897  * @param[in] longitude The longitude data
3898  * @param[in] altitude  The altitude data
3899  * @return @c 0 on success, otherwise a negative error value
3900  * @retval #CAMERA_ERROR_NONE Successful
3901  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3902  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3903  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
3904  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3905  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3906  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
3907  * @see camera_attr_get_geotag()
3908  * @see camera_attr_remove_geotag()
3909  */
3910 int camera_attr_set_geotag(camera_h camera, double latitude, double longitude, double altitude);
3911
3912 /**
3913  * @brief Gets the geotag(GPS data) in the EXIF(Exchangeable image file format) tag.
3914  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3915  * @param[in]  camera    The handle to the camera
3916  * @param[out] latitude  The latitude data
3917  * @param[out] longitude The longitude data
3918  * @param[out] altitude  The altitude data
3919  * @return @c 0 on success, otherwise a negative error value
3920  * @retval #CAMERA_ERROR_NONE Successful
3921  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3922  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3923  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3924  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3925  * @see camera_attr_set_geotag()
3926  * @see camera_attr_remove_geotag()
3927  */
3928 int camera_attr_get_geotag(camera_h camera, double *latitude, double *longitude, double *altitude);
3929
3930 /**
3931  * @brief Removes the geotag(GPS data) in the EXIF(Exchangeable image file format) tag.
3932  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3933  * @param[in] camera The handle to the camera
3934  * @return @c 0 on success, otherwise a negative error value
3935  * @retval #CAMERA_ERROR_NONE Successful
3936  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3937  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3938  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
3939  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3940  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3941  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
3942  * @see camera_attr_set_geotag()
3943  * @see camera_attr_get_geotag()
3944  */
3945 int camera_attr_remove_geotag(camera_h camera);
3946
3947 /**
3948  * @brief Sets the camera's flash mode.
3949  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3950  * @remarks Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif, while setting the flash mode, if the flash was preempted by other APIs,\n
3951  *          then this function returns #CAMERA_ERROR_DEVICE_BUSY error.
3952  * @param[in] camera The handle to the camera
3953  * @param[in] mode   The flash mode
3954  * @return @c 0 on success, otherwise a negative error value
3955  * @retval #CAMERA_ERROR_NONE Successful
3956  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3957  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3958  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
3959  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3960  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3961  * @retval #CAMERA_ERROR_DEVICE_BUSY The flash was preempted by other API
3962  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
3963  * @see camera_attr_foreach_supported_flash_mode()
3964  * @see camera_attr_get_flash_mode()
3965  */
3966 int camera_attr_set_flash_mode(camera_h camera, camera_attr_flash_mode_e mode);
3967
3968 /**
3969  * @brief Gets the camera's flash mode.
3970  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3971  * @param[in]  camera The handle to the camera
3972  * @param[out] mode   The flash mode
3973  * @return @c 0 on success, otherwise a negative error value
3974  * @retval #CAMERA_ERROR_NONE Successful
3975  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
3976  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
3977  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
3978  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
3979  * @see camera_attr_foreach_supported_flash_mode()
3980  * @see camera_attr_set_flash_mode()
3981  */
3982 int camera_attr_get_flash_mode(camera_h camera, camera_attr_flash_mode_e *mode);
3983
3984 /**
3985  * @}
3986  */
3987
3988 /**
3989  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
3990  * @{
3991  */
3992
3993 /**
3994  * @brief Retrieves all supported flash modes by invoking the callback function once for each supported flash mode.
3995  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
3996  * @param[in] camera    The handle to the camera
3997  * @param[in] callback  The callback function to invoke
3998  * @param[in] user_data The user data passed to the callback registration function
3999  * @return @c 0 on success, otherwise a negative error value
4000  * @retval #CAMERA_ERROR_NONE Successful
4001  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
4002  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
4003  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
4004  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
4005  * @post This function invokes camera_attr_supported_flash_mode_cb() to get all supported flash modes.
4006  * @see camera_attr_set_flash_mode()
4007  * @see camera_attr_get_flash_mode()
4008  * @see camera_attr_supported_flash_mode_cb()
4009  */
4010 int camera_attr_foreach_supported_flash_mode(camera_h camera, camera_attr_supported_flash_mode_cb callback, void *user_data);
4011
4012 /**
4013  * @}
4014  */
4015
4016 /**
4017  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
4018  * @{
4019  */
4020
4021 /**
4022  * @brief Gets the camera len's orientation angle.
4023  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
4024  * @param[in]  camera The handle to the camera
4025  * @param[out] angle  The orientation angle
4026  * @return @c 0 on success, otherwise a negative error value
4027  * @retval #CAMERA_ERROR_NONE Successful
4028  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
4029  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
4030  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
4031  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
4032  * @see camera_set_display_rotation()
4033  */
4034 int camera_attr_get_lens_orientation(camera_h camera, int *angle);
4035
4036 /**
4037  * @brief Sets the stream rotation.
4038  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
4039  * @param[in] camera   The handle to the camera
4040  * @param[in] rotation The stream rotation
4041  * @return @c 0 on success, otherwise a negative error value
4042  * @retval #CAMERA_ERROR_NONE Successful
4043  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
4044  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
4045  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
4046  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
4047  * @pre The camera state must be set to #CAMERA_STATE_CREATED.
4048  * @see camera_attr_get_stream_rotation()
4049  */
4050 int camera_attr_set_stream_rotation(camera_h camera, camera_rotation_e rotation);
4051
4052 /**
4053  * @brief Gets the stream rotation.
4054  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
4055  * @param[in]  camera   The handle to the camera
4056  * @param[out] rotation The stream rotation
4057  * @return @c 0 on success, otherwise a negative error value
4058  * @retval #CAMERA_ERROR_NONE Successful
4059  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
4060  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
4061  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
4062  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
4063  * @pre The camera state must be set to #CAMERA_STATE_CREATED.
4064  * @see camera_attr_set_stream_rotation()
4065  */
4066 int camera_attr_get_stream_rotation(camera_h camera, camera_rotation_e *rotation);
4067
4068 /**
4069  * @}
4070  */
4071
4072 /**
4073  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
4074  * @{
4075  */
4076
4077 /**
4078  * @brief Retrieves all supported stream rotation modes by invoking callback function once for each supported stream rotation mode.
4079  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
4080  * @param[in] camera    The handle to the camera
4081  * @param[in] callback  The callback function to invoke
4082  * @param[in] user_data The user data to be passed to the callback function
4083  * @return @c 0 on success, otherwise a negative error value
4084  * @retval #CAMERA_ERROR_NONE Successful
4085  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
4086  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
4087  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
4088  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
4089  * @post This function invokes camera_attr_supported_stream_rotation_cb() to get all supported stream rotation mode.
4090  * @see camera_attr_set_stream_rotation()
4091  * @see camera_attr_get_stream_rotation()
4092  * @see camera_attr_supported_stream_rotation_cb()
4093  */
4094 int camera_attr_foreach_supported_stream_rotation(camera_h camera, camera_attr_supported_stream_rotation_cb callback, void *user_data);
4095
4096 /**
4097  * @}
4098  */
4099
4100 /**
4101  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
4102  * @{
4103  */
4104
4105 /**
4106  * @brief Sets the stream flip.
4107  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
4108  * @param[in] camera The handle to the camera
4109  * @param[in] flip   The stream flip
4110  * @return @c 0 on success, otherwise a negative error value
4111  * @retval #CAMERA_ERROR_NONE Successful
4112  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
4113  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
4114  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
4115  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
4116  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
4117  * @pre The camera state must be set to #CAMERA_STATE_CREATED.
4118  * @see camera_attr_set_stream_rotation()
4119  */
4120 int camera_attr_set_stream_flip(camera_h camera, camera_flip_e flip);
4121
4122 /**
4123  * @brief Gets the stream flip.
4124  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
4125  * @param[in]  camera The handle to the camera
4126  * @param[out] flip   The stream flip
4127  * @return @c 0 on success, otherwise a negative error value
4128  * @retval #CAMERA_ERROR_NONE Successful
4129  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
4130  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
4131  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
4132  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
4133  * @pre The camera state must be set to #CAMERA_STATE_CREATED.
4134  * @see camera_attr_set_stream_rotation()
4135  */
4136 int camera_attr_get_stream_flip(camera_h camera, camera_flip_e *flip);
4137
4138 /**
4139  * @}
4140  */
4141
4142 /**
4143  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
4144  * @{
4145  */
4146
4147 /**
4148  * @brief Retrieves all supported stream flip modes by invoking callback function once for each supported stream flip mode.
4149  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
4150  * @param[in] camera    The handle to the camera
4151  * @param[in] callback  The callback function to invoke
4152  * @param[in] user_data The user data to be passed to the callback function
4153  * @return @c 0 on success, otherwise a negative error value
4154  * @retval #CAMERA_ERROR_NONE Successful
4155  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
4156  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
4157  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
4158  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
4159  * @post This function invokes camera_attr_supported_stream_flip_cb() to get all supported stream flip mode.
4160  * @see camera_attr_set_stream_flip()
4161  * @see camera_attr_get_stream_flip()
4162  * @see camera_attr_supported_stream_flip_cb()
4163  */
4164 int camera_attr_foreach_supported_stream_flip(camera_h camera, camera_attr_supported_stream_flip_cb callback, void *user_data);
4165
4166 /**
4167  * @}
4168  */
4169
4170 /**
4171  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
4172  * @{
4173  */
4174
4175 /**
4176  * @brief Called when the HDR capture process is updated.
4177  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
4178  * @param[in] percent   The progress percentage of HDR capture
4179  * @param[in] user_data The user data passed from the callback registration function
4180  * @pre camera_start_capture() will invoke this callback if you register it using camera_attr_set_hdr_capture_progress_cb().
4181  * @see camera_attr_get_hdr_mode()
4182  * @see camera_attr_set_hdr_capture_progress_cb()
4183  * @see camera_attr_unset_hdr_capture_progress_cb()
4184  * @see camera_attr_is_supported_hdr_capture()
4185  */
4186 typedef void (*camera_attr_hdr_progress_cb)(int percent, void *user_data);
4187
4188 /**
4189  * @brief Sets the mode of HDR (High Dynamic Range) capture.
4190  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
4191  * @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
4192  *          If this attribute is set to @c true. camera_attr_hdr_progress_cb() is invoked during capture.\n
4193  *          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.
4194  * @param[in] camera The handle to the camera
4195  * @param[in] mode   The mode of HDR capture
4196  * @return @c 0 on success, otherwise a negative error value
4197  * @retval #CAMERA_ERROR_NONE Successful
4198  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
4199  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
4200  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
4201  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
4202  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
4203  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
4204  * @see camera_attr_get_hdr_mode()
4205  * @see camera_attr_set_hdr_capture_progress_cb()
4206  * @see camera_attr_unset_hdr_capture_progress_cb()
4207  * @see camera_attr_is_supported_hdr_capture()
4208  *
4209  */
4210 int camera_attr_set_hdr_mode(camera_h camera, camera_attr_hdr_mode_e mode);
4211
4212 /**
4213  * @brief Gets the mode of HDR (High Dynamic Range) capture.
4214  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
4215  * @param[in]  camera The handle to the camera
4216  * @param[out] mode   The mode of HDR capture
4217  * @return @c 0 on success, otherwise a negative error value
4218  * @retval #CAMERA_ERROR_NONE Successful
4219  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
4220  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
4221  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
4222  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
4223  * @see camera_attr_set_hdr_mode()
4224  * @see camera_attr_set_hdr_capture_progress_cb()
4225  * @see camera_attr_unset_hdr_capture_progress_cb()
4226  * @see camera_attr_is_supported_hdr_capture()
4227  */
4228 int camera_attr_get_hdr_mode(camera_h camera, camera_attr_hdr_mode_e *mode);
4229
4230 /**
4231  * @brief Registers a callback function to be called when HDR capture is progressing.
4232  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
4233  * @remarks This callback notifies progress of the HDR process.
4234  * @param[in] camera    The handle to the camera
4235  * @param[in] callback  The callback function to invoke
4236  * @param[in] user_data The user data passed to the callback registration function
4237  * @return @c 0 on success, otherwise a negative error value
4238  * @retval #CAMERA_ERROR_NONE Successful
4239  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
4240  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
4241  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
4242  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
4243  * @see camera_attr_set_hdr_mode()
4244  * @see camera_attr_get_hdr_mode()
4245  * @see camera_attr_unset_hdr_capture_progress_cb()
4246  * @see camera_attr_is_supported_hdr_capture()
4247  */
4248 int camera_attr_set_hdr_capture_progress_cb(camera_h camera, camera_attr_hdr_progress_cb callback, void* user_data);
4249
4250 /**
4251  * @brief Unregisters the callback function.
4252  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
4253  * @param[in] camera The handle to the camera
4254  * @return @c 0 on success, otherwise a negative error value
4255  * @retval #CAMERA_ERROR_NONE Successful
4256  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
4257  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
4258  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
4259  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
4260  * @see camera_attr_set_hdr_mode()
4261  * @see camera_attr_get_hdr_mode()
4262  * @see camera_attr_set_hdr_capture_progress_cb()
4263  * @see camera_attr_is_supported_hdr_capture()
4264  */
4265 int camera_attr_unset_hdr_capture_progress_cb(camera_h camera);
4266
4267 /**
4268  * @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
4269  * @brief Gets the support state of HDR capture.
4270  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
4271  * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
4272  * @param[in] camera The handle to the camera
4273  * @return @c true if supported, otherwise @c false
4274  * @exception #CAMERA_ERROR_NONE Successful
4275  * @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
4276  * @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
4277  * @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
4278  * @see camera_attr_set_hdr_mode()
4279  * @see camera_attr_get_hdr_mode()
4280  * @see camera_attr_set_hdr_capture_progress_cb()
4281  * @see camera_attr_unset_hdr_capture_progress_cb()
4282  */
4283 bool camera_attr_is_supported_hdr_capture(camera_h camera);
4284
4285 /**
4286  * @brief Enables/Disables the anti-shake feature.
4287  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
4288  * @remarks This feature is used for image capture.
4289  * @param[in] camera The handle to the camera
4290  * @param[in] enable If @c true the anti-shake feature is enabled, otherwise @c false
4291  * @return @c 0 on success, otherwise a negative error value
4292  * @retval #CAMERA_ERROR_NONE Successful
4293  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
4294  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
4295  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
4296  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
4297  * @see camera_attr_is_enabled_anti_shake()
4298  * @see camera_attr_is_supported_anti_shake()
4299  *
4300  */
4301 int camera_attr_enable_anti_shake(camera_h camera, bool enable);
4302
4303 /**
4304  * @brief Gets the state of the anti-shake feature.
4305  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
4306  * @param[in]  camera  The handle to the camera
4307  * @param[out] enabled The state of anti-shake
4308  * @return @c 0 on success, otherwise a negative error value
4309  * @retval #CAMERA_ERROR_NONE Successful
4310  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
4311  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
4312  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
4313  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
4314  * @see camera_attr_enable_anti_shake()
4315  * @see camera_attr_is_supported_anti_shake()
4316  */
4317 int camera_attr_is_enabled_anti_shake(camera_h camera, bool *enabled);
4318
4319 /**
4320  * @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
4321  * @brief Gets the support state of the anti-shake feature.
4322  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
4323  * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
4324  * @param[in] camera The handle to the camera
4325  * @return @c true if supported, otherwise @c false
4326  * @exception #CAMERA_ERROR_NONE Successful
4327  * @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
4328  * @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
4329  * @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
4330  * @see camera_attr_enable_anti_shake()
4331  * @see camera_attr_is_enabled_anti_shake()
4332  */
4333 bool camera_attr_is_supported_anti_shake(camera_h camera);
4334
4335 /**
4336  * @brief Enables/Disables the video stabilization feature.
4337  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
4338  * @remarks If video stabilization is enabled, zero shutter lag is disabled.\n
4339  *          This feature is used to record a video.
4340  * @param[in] camera The handle to the camera
4341  * @param[in] enable If @c true video stabilization is enabled, otherwise @c false
4342  * @return @c 0 on success, otherwise a negative error value
4343  * @retval #CAMERA_ERROR_NONE Successful
4344  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
4345  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
4346  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
4347  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
4348  * @see camera_attr_is_enabled_video_stabilization()
4349  * @see camera_attr_is_supported_video_stabilization()
4350  *
4351  */
4352 int camera_attr_enable_video_stabilization(camera_h camera, bool enable);
4353
4354 /**
4355  * @brief Gets the state of the video stabilization feature.
4356  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
4357  * @param[in]  camera  The handle to the camera
4358  * @param[out] enabled The state of video stabilization
4359  * @return @c 0 on success, otherwise a negative error value
4360  * @retval #CAMERA_ERROR_NONE Successful
4361  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
4362  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
4363  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
4364  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
4365  * @see camera_attr_enable_video_stabilization()
4366  * @see camera_attr_is_supported_video_stabilization()
4367  */
4368 int camera_attr_is_enabled_video_stabilization(camera_h camera, bool *enabled);
4369
4370 /**
4371  * @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
4372  * @brief Gets the support state of the video stabilization feature.
4373  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
4374  * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
4375  * @param[in] camera The handle to the camera
4376  * @return @c true if supported, otherwise @c false
4377  * @exception #CAMERA_ERROR_NONE Successful
4378  * @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
4379  * @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
4380  * @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
4381  * @see camera_attr_enable_video_stabilization()
4382  * @see camera_attr_is_enabled_video_stabilization()
4383  */
4384 bool camera_attr_is_supported_video_stabilization(camera_h camera);
4385
4386 /**
4387  * @brief Enables/Disables auto contrast.
4388  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
4389  * @param[in] camera The handle to the camera
4390  * @param[in] enable If @c true auto contrast is enabled, otherwise @c false
4391  * @return @c 0 on success, otherwise a negative error value
4392  * @retval #CAMERA_ERROR_NONE Successful
4393  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
4394  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
4395  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
4396  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
4397  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
4398  * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
4399  * @see camera_attr_is_enabled_auto_contrast()
4400  */
4401 int camera_attr_enable_auto_contrast(camera_h camera, bool enable);
4402
4403 /**
4404  * @brief Gets the state of auto contrast.
4405  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
4406  * @param[in]  camera  The handle to the camera
4407  * @param[out] enabled The state of auto contrast
4408  * @return @c 0 on success, otherwise a negative error value
4409  * @retval #CAMERA_ERROR_NONE Successful
4410  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
4411  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
4412  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
4413  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
4414  * @see camera_attr_enable_auto_contrast()
4415  */
4416 int camera_attr_is_enabled_auto_contrast(camera_h camera, bool *enabled);
4417
4418 /**
4419  * @}
4420  */
4421
4422 /**
4423  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
4424  * @{
4425  */
4426
4427 /**
4428  * @brief Gets state of support of auto contrast feature.
4429  * @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
4430  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
4431  * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
4432  * @param[in] camera The handle to the camera
4433  * @return true on supported, otherwise false
4434  * @exception #CAMERA_ERROR_NONE Successful
4435  * @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
4436  * @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
4437  * @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
4438  * @see camera_attr_enable_auto_contrast()
4439  * @see camera_attr_is_enabled_auto_contrast()
4440  */
4441 bool camera_attr_is_supported_auto_contrast(camera_h camera);
4442
4443 /**
4444  * @}
4445  */
4446
4447 /**
4448  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
4449  * @{
4450  */
4451
4452 /**
4453  * @brief Disables shutter sound.
4454  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
4455  * @remarks In some countries, this operation is not permitted.
4456  * @param[in] camera  The handle to the camera
4457  * @param[in] disable If @c true shutter sound is disabled, otherwise @c false
4458  * @return @c 0 on success, otherwise a negative error value
4459  * @retval #CAMERA_ERROR_NONE Successful
4460  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
4461  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
4462  * @retval #CAMERA_ERROR_INVALID_OPERATION Disabling shutter sound is not permitted
4463  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
4464  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
4465  */
4466 int camera_attr_disable_shutter_sound(camera_h camera, bool disable);
4467
4468 /**
4469  * @brief Sets the position to move horizontally.
4470  * @since_tizen 3.0
4471  * @param[in] camera    The handle to the camera
4472  * @param[in] move_type The PTZ(Pan Tilt Zoom) move type
4473  * @param[in] pan_step  The step to move the camera
4474  * @return @c 0 on success, otherwise a negative error value
4475  * @retval #CAMERA_ERROR_NONE Successful
4476  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
4477  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
4478  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
4479  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
4480  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
4481  * @pre The camera state must be set to #CAMERA_STATE_PREVIEW.
4482  * @see camera_attr_get_pan()
4483  * @see camera_attr_get_pan_range()
4484  */
4485 int camera_attr_set_pan(camera_h camera, camera_attr_ptz_move_type_e move_type, int pan_step);
4486
4487 /**
4488  * @brief Gets the current position of the camera.
4489  * @since_tizen 3.0
4490  * @param[in]  camera   The handle to the camera
4491  * @param[out] pan_step The current horizontal distance from the starting point.
4492  * @return @c 0 on success, otherwise a negative error value
4493  * @retval #CAMERA_ERROR_NONE Successful
4494  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
4495  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
4496  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
4497  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
4498  * @see camera_attr_set_pan()
4499  * @see camera_attr_get_pan_range()
4500  */
4501 int camera_attr_get_pan(camera_h camera, int *pan_step);
4502
4503 /**
4504  * @brief Gets lower limit and upper limit for pan position.
4505  * @since_tizen 3.0
4506  * @remarks If the min value is greater than the max value, it means that this feature is not supported.
4507  * @param[in]  camera The handle to the camera
4508  * @param[out] min    The lower limit for pan
4509  * @param[out] max    The upper limit for pan
4510  * @return @c 0 on success, otherwise a negative error value
4511  * @retval #CAMERA_ERROR_NONE Successful
4512  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
4513  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
4514  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
4515  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
4516  * @see camera_attr_set_pan()
4517  * @see camera_attr_get_pan()
4518  */
4519 int camera_attr_get_pan_range(camera_h camera, int *min, int *max);
4520
4521 /**
4522  * @brief Sets the position to move vertically.
4523  * @since_tizen 3.0
4524  * @param[in] camera    The handle to the camera
4525  * @param[in] move_type The PTZ(Pan Tilt Zoom) move type
4526  * @param[in] tilt_step The step to move the camera
4527  * @return @c 0 on success, otherwise a negative error value
4528  * @retval #CAMERA_ERROR_NONE Successful
4529  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
4530  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
4531  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
4532  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
4533  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
4534  * @pre The camera state must be set to #CAMERA_STATE_PREVIEW.
4535  * @see camera_attr_get_tilt()
4536  * @see camera_attr_get_tilt_range()
4537  */
4538 int camera_attr_set_tilt(camera_h camera, camera_attr_ptz_move_type_e move_type, int tilt_step);
4539
4540 /**
4541  * @brief Gets the current position of the camera.
4542  * @since_tizen 3.0
4543  * @param[in]  camera    The handle to the camera
4544  * @param[out] tilt_step The current vertical distance from the starting point.
4545  * @return @c 0 on success, otherwise a negative error value
4546  * @retval #CAMERA_ERROR_NONE Successful
4547  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
4548  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
4549  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
4550  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
4551  * @see camera_attr_set_tilt()
4552  * @see camera_attr_get_tilt_range()
4553  */
4554 int camera_attr_get_tilt(camera_h camera, int *tilt_step);
4555
4556 /**
4557  * @brief Gets lower limit and upper limit for tilt position.
4558  * @since_tizen 3.0
4559  * @remarks If the min value is greater than the max value, it means that this feature is not supported.
4560  * @param[in]  camera The handle to the camera
4561  * @param[out] min    The lower limit for tilt
4562  * @param[out] max    The upper limit for tilt
4563  * @return @c 0 on success, otherwise a negative error value
4564  * @retval #CAMERA_ERROR_NONE Successful
4565  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
4566  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
4567  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
4568  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
4569  * @see camera_attr_set_tilt()
4570  * @see camera_attr_get_tilt()
4571  */
4572 int camera_attr_get_tilt_range(camera_h camera, int *min, int *max);
4573
4574 /**
4575  * @brief Sets the type of PTZ(Pan Tilt Zoom).
4576  * @since_tizen 3.0
4577  * @param[in] camera   The handle to the camera
4578  * @param[in] ptz_type PTZ type
4579  * @return @c 0 on success, otherwise a negative error value
4580  * @retval #CAMERA_ERROR_NONE Successful
4581  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
4582  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
4583  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
4584  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
4585  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
4586  * @pre The camera state must be set to #CAMERA_STATE_PREVIEW.
4587  * @see camera_attr_get_pan()
4588  * @see camera_attr_set_pan()
4589  * @see camera_attr_get_pan_range()
4590  * @see camera_attr_get_tilt()
4591  * @see camera_attr_set_tilt()
4592  * @see camera_attr_get_tilt_range()
4593  * @see camera_attr_foreach_supported_ptz_type()
4594  */
4595 int camera_attr_set_ptz_type(camera_h camera, camera_attr_ptz_type_e ptz_type);
4596
4597 /**
4598  * @}
4599  */
4600
4601 /**
4602  * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
4603  * @{
4604  */
4605
4606 /**
4607  * @brief Retrieves all supported PTZ(Pan Tilt Zoom) types by invoking callback function once for each supported ptz type.
4608  * @since_tizen 3.0
4609  * @param[in] camera    The handle to the camera
4610  * @param[in] callback  The callback function to invoke
4611  * @param[in] user_data The user data to be passed to the callback function
4612  * @return @c 0 on success, otherwise a negative error value
4613  * @retval #CAMERA_ERROR_NONE Successful
4614  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
4615  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
4616  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
4617  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
4618  * @post This function invokes camera_attr_supported_ptz_type_cb() to get all supported ptz type.
4619  * @see camera_attr_set_ptz_type()
4620  */
4621 int camera_attr_foreach_supported_ptz_type(camera_h camera, camera_attr_supported_ptz_type_cb callback, void *user_data);
4622
4623 /**
4624  * @}
4625  */
4626
4627 /**
4628  * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
4629  * @{
4630  */
4631
4632 /**
4633  * @brief Sets the ROI(Region Of Interest) area of display.
4634  * @since_tizen 3.0
4635  * @remarks If no display is set, no operation is performed and
4636  *          the ROI area is valid only in #CAMERA_DISPLAY_MODE_CUSTOM_ROI display mode.
4637  * @remarks The minimum value of width and height are 1.
4638  * @remarks ROI area can be set before setting ROI display mode. (since 4.0)
4639  * @param[in] camera The handle to the camera
4640  * @param[in] x      X coordinate of area
4641  * @param[in] y      Y coordinate of area
4642  * @param[in] width  Width of area
4643  * @param[in] height Height of area
4644  * @return @c 0 on success, otherwise a negative error value
4645  * @retval #CAMERA_ERROR_NONE Successful
4646  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
4647  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
4648  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
4649  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
4650  * @see camera_attr_get_display_roi_area()
4651  */
4652 int camera_attr_set_display_roi_area(camera_h camera, int x, int y, int width, int height);
4653
4654 /**
4655  * @brief Gets the ROI(Region Of Interest) area of display.
4656  * @since_tizen 3.0
4657  * @param[in]  camera The handle to the camera
4658  * @param[out] x      X coordinate of area
4659  * @param[out] y      Y coordinate of area
4660  * @param[out] width  Width of area
4661  * @param[out] height Height of area
4662  * @return @c 0 on success, otherwise a negative error value
4663  * @retval #CAMERA_ERROR_NONE Successful
4664  * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
4665  * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
4666  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
4667  * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
4668  * @see camera_attr_set_display_roi_area()
4669  */
4670 int camera_attr_get_display_roi_area(camera_h camera, int *x, int *y, int *width, int *height);
4671
4672 /**
4673  * @}
4674  */
4675 #ifdef __cplusplus
4676 }
4677 #endif
4678
4679 #endif /* __TIZEN_MULTIMEDIA_CAMERA_H__ */