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