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