2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 #ifndef __TIZEN_MULTIMEDIA_CAMERA_H__
20 #define __TIZEN_MULTIMEDIA_CAMERA_H__
29 #define CAMERA_ERROR_CLASS TIZEN_ERROR_MULTIMEDIA_CLASS | 0x00
34 * @brief This file contains the Camera API, related structures and enumerations
39 * @addtogroup CAPI_MEDIA_CAMERA_MODULE
45 * @brief Enumerations of the error code for Camera.
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 */
63 * @brief Enumerations of the camera state.
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 */
76 * @brief Enumerations of the camera device.
80 CAMERA_DEVICE_CAMERA0 = 0, /**< Primary camera */
81 CAMERA_DEVICE_CAMERA1 /**< Secondary camera */
86 * @brief Enumerations of the camera pixel format.
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;
109 * @brief Enumerations of the camera display type.
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;
120 * @brief The handle to the camera.
121 * @see recorder_create_videorecorder()
123 typedef struct camera_s *camera_h;
127 * @brief The handle to the camera display.
129 typedef void *camera_display_h;
135 * @brief Gets a display handle from x window id or evas object
137 #define GET_DISPLAY(x) (void*)(x)
147 * @addtogroup CAPI_MEDIA_CAMERA_X11_DISPLAY_MODULE
153 * @brief Enumerations of the camera rotation type.
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 */
165 * @brief Enumerations of the camera flip type.
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 */
176 * @brief Enumerations of the camera display mode.
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;
187 * @brief Enumerations of the camera policy.
191 CAMERA_POLICY_NONE = 0, /**< None */
192 CAMERA_POLICY_SOUND, /**< Sound policy */
193 CAMERA_POLICY_SECURITY /**< Security policy */
198 * @brief Struct of the image data
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;
213 * @brief Struct of the face detection
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;
227 * @brief Struct of the preview stream data
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 */
238 unsigned char *yuv; /**< The yuv data pointer*/
239 unsigned int size; /**< The size of data*/
240 } single_plane; /**< single plane frame data */
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 */
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 */
258 }camera_preview_data_s;
267 * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
273 * @brief Enumerations of the color tone which provides an impression of looking through a tinted glass.
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;
311 * @brief Enumerations of the white balance levels of the camera.
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;
329 * @brief Enumerations of the scene mode.
330 * The mode of operation can be in daylight, night and back-light.
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;
353 * @brief Enumerations of the auto focus mode.
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;
365 * @brief Enumerations of the camera focus state.
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;
377 * @brief Enumerations for the ISO levels of the camera.
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*/
393 * @brief Enumerations of the camera exposure modes.
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;
406 * @brief Enumerations for the orientation values of tag.
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;
422 * @brief Enumerations of the flash mode.
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;
438 * @brief Enumerations of the preview fps.
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 */
453 * @brief Enumerations of the theater mode
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;
463 * @brief Enumerations of HDR capture mode
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;
478 * @addtogroup CAPI_MEDIA_CAMERA_MODULE
484 * @brief Called when the camera state changes.
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()
494 typedef void (*camera_state_changed_cb)(camera_state_e previous, camera_state_e current,
495 bool by_policy, void *user_data);
498 * @brief Called when the camera interrupted by policy
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()
506 typedef void (*camera_interrupted_cb)(camera_policy_e policy, camera_state_e previous, camera_state_e current, void *user_data);
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
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()
526 typedef void (*camera_focus_changed_cb)(camera_focus_state_e state, void *user_data);
530 * @brief Called to be notified for delivering copy of new preview frame when every preview frame is displayed.
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.
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()
542 typedef void (*camera_preview_cb)(camera_preview_data_s *frame, void *user_data);
545 * @brief Called to get information about image data taken by the camera once per frame while capturing.
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.
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()
559 typedef void (*camera_capturing_cb)(camera_image_data_s* image, camera_image_data_s* postview, camera_image_data_s* thumbnail, void *user_data);
564 * @brief Called when the camera capturing completes.
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.
569 * @param[in] user_data The user data passed from the callback registration function
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()
576 typedef void (*camera_capture_completed_cb)(void *user_data);
580 * @brief Called when the error occurred.
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
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
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()
598 typedef void (*camera_error_cb)(camera_error_e error, camera_state_e current_state, void *user_data);
601 * @brief Called when face detected in the preview frame
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
607 * @see camera_start_face_detection()
609 typedef void (*camera_face_detected_cb)(camera_detected_face_s *faces, int count, void *user_data);
616 * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
621 * @brief Called once for each supported preview resolution.
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
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.
630 * @see camera_foreach_supported_preview_resolution()
632 typedef bool (*camera_supported_preview_resolution_cb)(int width, int height, void *user_data);
636 * @brief Called once for each supported capture resolution.
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
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.
645 * @see camera_foreach_supported_capture_resolution()
647 typedef bool (*camera_supported_capture_resolution_cb)(int width, int height, void *user_data);
651 * @brief Called once for the pixel format of each supported capture format.
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.
658 * @see camera_foreach_supported_capture_format()
660 typedef bool (*camera_supported_capture_format_cb)(camera_pixel_format_e format,
664 * @brief Called once for the pixel format of each supported preview format.
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.
671 * @see camera_foreach_supported_preview_format()
673 typedef bool (*camera_supported_preview_format_cb)(camera_pixel_format_e format,
681 * @addtogroup CAPI_MEDIA_CAMERA_MODULE
686 * @brief Creates a new camera handle for controlling a camera.
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.
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.
703 * @see camera_destroy()
705 int camera_create(camera_device_e device, camera_h *camera);
708 * @brief Destroys the camera handle and releases all its resources.
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
717 * @see camera_create()
719 int camera_destroy(camera_h camera);
722 * @brief Starts capturing and drawing preview frames on the screen.
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.
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()
753 int camera_start_preview(camera_h camera);
756 * @brief Stops capturing and drawing preview frames.
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.
767 * @see camera_start_preview()
768 * @see camera_unset_preview_cb()
770 int camera_stop_preview(camera_h camera);
773 * @brief Starts capturing of still images.
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().
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
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.
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()
807 int camera_start_capture(camera_h camera, camera_capturing_cb capturing_cb , camera_capture_completed_cb completed_cb , void *user_data);
810 * @brief Starts continuous capturing of still images.
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
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
832 * @post If it succeeds the camera state will be #CAMERA_STATE_CAPTURED.
834 * @see camera_start_preview()
835 * @see camera_start_capture();
836 * @see camera_stop_continuous_capture()
837 * @see camera_is_supported_zero_shutter_lag()
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);
842 * @brief Abort continuous capturing.
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
853 * @see camera_start_continuous_capture()
855 int camera_stop_continuous_capture(camera_h camera);
859 * @brief Gets the state of the camera.
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
867 * @see camera_create()
868 * @see camera_start_preview()
869 * @see camera_stop_preview()
870 * @see camera_start_capture()
872 int camera_get_state(camera_h camera, camera_state_e *state);
875 * @brief Starts camera auto-focusing, Asynchronously
877 * @remarks If continuous status is true, the camera continuously tries to focus
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.
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()
894 int camera_start_focusing(camera_h camera, bool continuous);
897 * @brief Stops camera auto focusing.
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
907 * @see camera_start_focusing()
908 * @see camera_focus_changed_cb()
910 int camera_cancel_focusing(camera_h camera);
913 * @brief Sets the display handle to show preview images
915 * @remarks This function must be called before previewing (see camera_start_preview()).
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
926 * @see camera_start_preview()
929 int camera_set_display(camera_h camera, camera_display_type_e type, camera_display_h display);
932 * @brief Sets the resolution of preview.
934 * @remarks This function should be called before previewing (camera_start_preview()).
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
945 * @see camera_start_preview()
946 * @see camera_get_preview_resolution()
947 * @see camera_foreach_supported_preview_resolution()
949 int camera_set_preview_resolution(camera_h camera, int width, int height);
952 * @brief Gets the resolution of preview.
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
961 * @see camera_set_preview_resolution()
962 * @see camera_foreach_supported_preview_resolution()
964 int camera_get_preview_resolution(camera_h camera, int *width, int *height);
967 * @brief Gets the recommended preview resolution
969 * @remarks Depend on capture resolution aspect ratio and display resolution, the recommended preview resolution is determined.
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
978 * @see camera_set_preview_resolution()
979 * @see camera_foreach_supported_preview_resolution()
981 int camera_get_recommended_preview_resolution(camera_h camera, int *width, int *height);
984 * @brief Starts the face detection.
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.
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
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
1002 * @pre The camera state must be #CAMERA_STATE_PREVIEW
1004 * @see camera_stop_face_detection()
1005 * @see camera_face_detected_cb()
1006 * @see camera_is_supported_face_detection()
1008 int camera_start_face_detection(camera_h camera, camera_face_detected_cb callback, void * user_data);
1011 * @brief Stops the face detection.
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
1018 * @pre This should be called after face detection was started.
1020 * @see camera_start_face_detection()
1021 * @see camera_is_supported_face_detection()
1023 int camera_stop_face_detection(camera_h camera);
1026 * @brief Zooming on the detected face
1028 * @remarks The face id is getting from camera_face_detected_cb().\n
1030 * @param[in] camera The handle to the camera
1031 * @param[in] face_id The face id to zoom
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
1039 * @pre This should be called after face detection was started.
1041 * @see camera_cancel_face_zoom()
1042 * @see camera_start_face_detection()
1044 int camera_face_zoom(camera_h camera, int face_id);
1047 * @brief Cancel zooming on the face
1049 * @param[in] camera The handle to the camera
1051 * @retval #CAMERA_ERROR_NONE Successful
1052 * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1054 * @see camera_face_zoom()
1055 * @see camera_start_face_detection()
1057 int camera_cancel_face_zoom(camera_h camera);
1064 * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
1069 * @brief Retrieves all supported camera preview resolutions by invoking callback function once for each supported camera preview resolution.
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.
1079 * @see camera_set_preview_resolution()
1080 * @see camera_get_preview_resolution()
1081 * @see camera_supported_preview_resolution_cb()
1083 int camera_foreach_supported_preview_resolution(camera_h camera,
1084 camera_supported_preview_resolution_cb callback, void *user_data);
1091 * @addtogroup CAPI_MEDIA_CAMERA_MODULE
1097 * @brief Sets the display rotation.
1098 * @ingroup CAPI_MEDIA_CAMERA_X11_DISPLAY_MODULE
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
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
1112 * @see camera_start_preview()
1113 * @see camera_get_x11_display_rotation()
1115 int camera_set_x11_display_rotation(camera_h camera, camera_rotation_e rotation);
1118 * @brief Gets the display rotation.
1119 * @ingroup CAPI_MEDIA_CAMERA_X11_DISPLAY_MODULE
1121 * @remarks This function is valid only for #CAMERA_DISPLAY_TYPE_X11.
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
1129 * @see camera_set_x11_display_rotation()
1131 int camera_get_x11_display_rotation(camera_h camera, camera_rotation_e *rotation);
1134 * @brief Sets the display flip.
1135 * @ingroup CAPI_MEDIA_CAMERA_X11_DISPLAY_MODULE
1138 * @remarks This function is valid only for #CAMERA_DISPLAY_TYPE_X11
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
1148 * @see camera_get_x11_display_flip()
1150 int camera_set_x11_display_flip(camera_h camera, camera_flip_e flip);
1153 * @brief Gets the display flip.
1154 * @ingroup CAPI_MEDIA_CAMERA_X11_DISPLAY_MODULE
1156 * @remarks This function is valid only for #CAMERA_DISPLAY_TYPE_X11.
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
1164 * @see camera_set_x11_display_flip()
1166 int camera_get_x11_display_flip(camera_h camera, camera_flip_e *flip);
1170 * @brief Sets the visible property for X11 display.
1171 * @ingroup CAPI_MEDIA_CAMERA_X11_DISPLAY_MODULE
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
1177 * @return 0 on success, otherwise a negative error value.
1178 * @retval #CAMERA_ERROR_NONE Successful
1179 * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1181 * @see camera_is_x11_display_visible()
1183 int camera_set_x11_display_visible(camera_h camera, bool visible);
1186 * @brief Gets the visible property of X11 display.
1187 * @ingroup CAPI_MEDIA_CAMERA_X11_DISPLAY_MODULE
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
1193 * @return 0 on success, otherwise a negative error value.
1194 * @retval #CAMERA_ERROR_NONE Successful
1195 * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1197 * @see camera_set_x11_display_visible()
1199 int camera_is_x11_display_visible(camera_h camera, bool *visible);
1203 * @brief Sets the X11 display aspect ratio.
1204 * @ingroup CAPI_MEDIA_CAMERA_X11_DISPLAY_MODULE
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
1210 * @return 0 on success, otherwise a negative error value.
1211 * @retval #CAMERA_ERROR_NONE Successful
1212 * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1214 * @see camera_get_x11_display_mode()
1216 int camera_set_x11_display_mode(camera_h camera , camera_display_mode_e mode);
1220 * @brief Gets the X11 display aspect ratio.
1221 * @ingroup CAPI_MEDIA_CAMERA_X11_DISPLAY_MODULE
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
1227 * @return 0 on success, otherwise a negative error value.
1228 * @retval #CAMERA_ERROR_NONE Successful
1229 * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1231 * @see camera_set_x11_display_mode()
1233 int camera_get_x11_display_mode(camera_h camera, camera_display_mode_e *mode);
1237 * @brief Sets the resolution of capture image.
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.
1248 * @see camera_start_capture()
1249 * @see camera_get_capture_resolution()
1250 * @see camera_foreach_supported_capture_resolution()
1252 int camera_set_capture_resolution(camera_h camera, int width, int height);
1256 * @brief Gets the resolution of capture image.
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
1266 * @see camera_set_capture_resolution()
1267 * @see camera_foreach_supported_capture_resolution()
1269 int camera_get_capture_resolution(camera_h camera, int *width, int *height);
1276 * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
1281 * @brief Retrieves all supported camera capture resolutions by invoking the callback function once for each supported camera capture resolution.
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.
1291 * @see camera_set_capture_resolution()
1292 * @see camera_get_capture_resolution()
1293 * @see camera_supported_capture_resolution_cb()
1295 int camera_foreach_supported_capture_resolution(camera_h camera,
1296 camera_supported_capture_resolution_cb callback, void *user_data);
1303 * @addtogroup CAPI_MEDIA_CAMERA_MODULE
1309 * @brief Sets the format of an image to capture.
1311 * @remarks This function should be called before capturing (see camera_start_capture()).
1313 * @param[in] camera The handle to the camera
1314 * @param[out] format The format of capture image
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
1321 * @pre The camera state must be CAMERA_STATE_CREATED or CAMERA_STATE_PREVIEW.
1323 * @see camera_start_capture()
1324 * @see camera_get_capture_format()
1325 * @see camera_foreach_supported_capture_format()
1327 int camera_set_capture_format(camera_h camera, camera_pixel_format_e format);
1330 * @brief Gets the format of capture image to capture.
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
1338 * @see camera_set_capture_format()
1339 * @see camera_foreach_supported_capture_format()
1341 int camera_get_capture_format(camera_h camera, camera_pixel_format_e *format);
1348 * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
1353 * @brief Retrieves all supported camera capture formats by invoking callback function once for each supported camera capture format.
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.
1364 * @see camera_set_capture_format()
1365 * @see camera_get_capture_format()
1366 * @see camera_supported_capture_format_cb()
1368 int camera_foreach_supported_capture_format(camera_h camera,
1369 camera_supported_capture_format_cb callback, void *user_data);
1376 * @addtogroup CAPI_MEDIA_CAMERA_MODULE
1381 * @brief Sets the preview data format.
1384 * @remarks This function should be called before previewing (see camera_start_preview()).
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
1394 * @see camera_start_preview()
1395 * @see camera_get_preview_format()
1396 * @see camera_foreach_supported_preview_format()
1398 int camera_set_preview_format(camera_h camera, camera_pixel_format_e format);
1401 * @brief Gets the format of preview stream.
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
1409 * @see camera_set_preview_format()
1410 * @see camera_foreach_supported_preview_format()
1412 int camera_get_preview_format(camera_h camera, camera_pixel_format_e *format);
1419 * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
1424 * @brief Retrieves all supported camera preview formats by invoking callback function once for each supported camera preview format.
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.
1434 * @see camera_set_preview_format()
1435 * @see camera_get_preview_format()
1436 * @see camera_supported_preview_format_cb()
1438 int camera_foreach_supported_preview_format(camera_h camera,
1439 camera_supported_preview_format_cb callback, void *user_data);
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
1448 * @see camera_start_face_detection()
1449 * @see camera_stop_face_detection()
1451 bool camera_is_supported_face_detection(camera_h camera);
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
1461 bool camera_is_supported_zero_shutter_lag(camera_h camera);
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
1474 int camera_get_device_count(camera_h camera, int *device_count);
1481 * @addtogroup CAPI_MEDIA_CAMERA_MODULE
1486 * @brief Registers a callback function to be called once per frame when previewing.
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.
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.
1503 * @see camera_start_preview()
1504 * @see camera_unset_preview_cb()
1505 * @see camera_preview_cb()
1507 int camera_set_preview_cb(camera_h camera, camera_preview_cb callback, void *user_data);
1510 * @brief Unregisters the callback function.
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
1517 * @see camera_set_preview_cb()
1519 int camera_unset_preview_cb(camera_h camera);
1522 * @brief Registers a callback function to be called when camera state changes.
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
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.
1533 * @see camera_unset_state_changed_cb()
1534 * @see camera_state_changed_cb()
1536 int camera_set_state_changed_cb(camera_h camera, camera_state_changed_cb callback,
1540 * @brief Unregisters the callback function.
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
1547 * @see camera_set_state_changed_cb()
1549 int camera_unset_state_changed_cb(camera_h camera);
1552 * @brief Registers a callback function to be called when camera interrupted by policy.
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
1558 * @return 0 on success, otherwise a negative error value.
1559 * @retval #CAMERA_ERROR_NONE Successful
1560 * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
1562 * @see camera_unset_interrupted_cb()
1563 * @see camera_interrupted_cb()
1565 int camera_set_interrupted_cb(camera_h camera, camera_interrupted_cb callback,
1569 * @brief Unregisters the callback function.
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
1576 * @see camera_set_interrupted_cb()
1578 int camera_unset_interrupted_cb(camera_h camera);
1582 * @brief Registers a callback function to be called when auto-focus state changes.
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.
1592 * @see camera_start_focusing()
1593 * @see camera_cancel_focusing()
1594 * @see camera_unset_focus_changed_cb()
1595 * @see camera_focus_changed_cb()
1597 int camera_set_focus_changed_cb(camera_h camera, camera_focus_changed_cb callback,
1602 * @brief Unregisters the callback function.
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
1609 * @see camera_set_focus_changed_cb()
1611 int camera_unset_focus_changed_cb(camera_h camera);
1614 * @brief Registers a callback function to be called when an asynchronous operation error occurred.
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
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.
1632 * @see camera_unset_error_cb()
1633 * @see camera_error_cb()
1635 int camera_set_error_cb(camera_h camera, camera_error_cb callback, void *user_data);
1639 * @brief Unregisters the callback function.
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
1646 * @see camera_set_error_cb()
1648 int camera_unset_error_cb(camera_h camera);
1655 * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
1660 * @brief Called to get each supported auto-focus mode.
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()
1668 typedef bool (*camera_attr_supported_af_mode_cb)(camera_attr_af_mode_e mode, void *user_data);
1671 * @brief Called to get each supported exposure mode.
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
1680 typedef bool (*camera_attr_supported_exposure_mode_cb)(camera_attr_exposure_mode_e mode,
1684 * @brief Called to get each supported ISO mode.
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()
1692 typedef bool (*camera_attr_supported_iso_cb)(camera_attr_iso_e iso, void *user_data);
1695 * @brief Called to get each supported white balance.
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
1704 typedef bool (*camera_attr_supported_whitebalance_cb)(camera_attr_whitebalance_e wb,
1708 * @brief Called to get each supported effect mode.
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()
1716 typedef bool (*camera_attr_supported_effect_cb)(camera_attr_effect_mode_e effect,
1720 * @brief Called to get each supported scene mode.
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
1729 typedef bool (*camera_attr_supported_scene_mode_cb)(camera_attr_scene_mode_e mode,
1733 * @brief Called to get each supported flash mode.
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()
1741 typedef bool (*camera_attr_supported_flash_mode_cb)(camera_attr_flash_mode_e mode,
1745 * @brief Called to get each supported FPS mode.
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()
1753 typedef bool (*camera_attr_supported_fps_cb)(camera_attr_fps_e fps, void *user_data);
1760 * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
1765 * @brief Sets the preview frame rate.
1767 * @remarks This function should be called before previewing (see camera_start_preview()).
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
1776 * @see camera_start_preview()
1777 * @see camera_attr_get_preview_fps()
1778 * @see camera_attr_foreach_supported_fps()
1780 int camera_attr_set_preview_fps(camera_h camera, camera_attr_fps_e fps);
1783 * @brief Gets the frames per second of a preview video stream.
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
1791 * @see camera_attr_set_preview_fps()
1792 * @see camera_attr_foreach_supported_fps()
1794 int camera_attr_get_preview_fps(camera_h camera, camera_attr_fps_e *fps);
1801 * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
1806 * @brief Retrieves all supported FPS modes by invoking callback function once for each supported FPS mode.
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.
1816 * @see camera_attr_set_preview_fps()
1817 * @see camera_attr_get_preview_fps()
1818 * @see camera_attr_supported_fps_cb()
1820 int camera_attr_foreach_supported_fps(camera_h camera, camera_attr_supported_fps_cb callback,
1828 * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
1833 * @brief Sets the image quality.
1835 * @details The range for image quality is 1 to 100. If @a quality is out of range, #CAMERA_ERROR_INVALID_PARAMETER error occurred.
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.
1845 * @see camera_start_preview()
1846 * @see camera_attr_get_image_quality()
1848 int camera_attr_set_image_quality(camera_h camera, int quality);
1851 * @brief Gets the quality of capturing a still image.
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
1859 * @see camera_attr_set_image_quality()
1861 int camera_attr_get_image_quality(camera_h camera, int *quality);
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.
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
1873 * @see camera_attr_get_zoom()
1874 * @see camera_attr_get_zoom_range()
1876 int camera_attr_set_zoom(camera_h camera, int zoom);
1879 * @brief Gets the zoom level.
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
1887 * @see camera_attr_set_zoom()
1888 * @see camera_attr_get_zoom_range()
1890 int camera_attr_get_zoom(camera_h camera, int *zoom);
1893 * @brief Gets the available zoom level.
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
1902 * @see camera_attr_set_zoom()
1903 * @see camera_attr_get_zoom()
1905 int camera_attr_get_zoom_range(camera_h camera , int *min , int *max);
1909 * @brief Sets the auto focus mode.
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
1917 * @see camera_attr_get_af_mode()
1918 * @see camera_attr_foreach_supported_af_mode()
1919 * @see #camera_attr_af_mode_e
1921 int camera_attr_set_af_mode(camera_h camera, camera_attr_af_mode_e mode);
1924 * @brief Gets the auto focus mode.
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
1932 * @see camera_attr_foreach_supported_af_mode()
1933 * @see camera_attr_set_af_mode()
1934 * @see #camera_attr_af_mode_e
1936 int camera_attr_get_af_mode(camera_h camera, camera_attr_af_mode_e *mode);
1939 * @brief Sets auto focus area
1941 * @remarks This API is invalid in CAMERA_ATTR_AF_NONE mode.\n
1942 * The coordinates are mapped into preview area
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
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
1953 * @see camera_attr_set_af_mode()
1954 * @see camera_attr_clear_af_area()
1956 int camera_attr_set_af_area(camera_h camera, int x, int y);
1959 * @brief Clear the auto focus area.
1961 * @remarks The focusing area set to the center area
1963 * @param[in] camera The handle to the camera
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
1970 * @see camera_attr_set_af_mode()
1971 * @see camera_attr_set_af_area()
1974 int camera_attr_clear_af_area(camera_h camera);
1981 * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
1986 * @brief Retrieves all supported auto focus modes by invoking callback function once for each supported auto focus mode.
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.
1996 * @see camera_attr_set_af_mode()
1997 * @see camera_attr_get_af_mode()
1998 * @see camera_attr_supported_af_mode_cb()
2000 int camera_attr_foreach_supported_af_mode(camera_h camera,
2001 camera_attr_supported_af_mode_cb callback, void *user_data);
2008 * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
2013 * @brief Sets the exposure mode.
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
2021 * @see camera_attr_get_exposure_mode()
2022 * @see camera_attr_foreach_supported_exposure_mode()
2024 int camera_attr_set_exposure_mode(camera_h camera, camera_attr_exposure_mode_e mode);
2027 * @brief Gets the exposure mode.
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
2035 * @see camera_attr_set_exposure_mode()
2036 * @see camera_attr_foreach_supported_exposure_mode()
2038 int camera_attr_get_exposure_mode(camera_h camera, camera_attr_exposure_mode_e *mode);
2045 * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
2050 * @brief Retrieves all supported exposure modes by invoking callback function once for each supported exposure mode.
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.
2060 * @see camera_attr_set_exposure_mode()
2061 * @see camera_attr_get_exposure_mode()
2062 * @see camera_attr_supported_exposure_mode_cb()
2064 int camera_attr_foreach_supported_exposure_mode(camera_h camera,
2065 camera_attr_supported_exposure_mode_cb callback, void *user_data);
2072 * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
2077 * @brief Sets the exposure value.
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
2085 * @see camera_attr_get_exposure()
2087 int camera_attr_set_exposure(camera_h camera, int value);
2090 * @brief Gets the exposure value.
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
2098 * @see camera_attr_set_exposure()
2100 int camera_attr_get_exposure(camera_h camera, int *value);
2103 * @brief Gets the available exposure value.
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
2112 * @see camera_attr_set_exposure()
2114 int camera_attr_get_exposure_range(camera_h camera, int *min, int *max);
2117 * @brief Sets the ISO level.
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
2125 * @see camera_attr_get_iso()
2126 * @see camera_attr_foreach_supported_iso()
2128 int camera_attr_set_iso(camera_h camera, camera_attr_iso_e iso);
2131 * @brief Gets the ISO level.
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
2139 * @see camera_attr_set_iso()
2140 * @see camera_attr_foreach_supported_iso()
2142 int camera_attr_get_iso(camera_h camera, camera_attr_iso_e *iso);
2149 * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
2154 * @brief Retrieves all supported ISO levels by invoking callback function once for each supported ISO level.
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.
2164 * @see camera_attr_set_iso()
2165 * @see camera_attr_get_iso()
2166 * @see camera_attr_supported_iso_cb()
2168 int camera_attr_foreach_supported_iso(camera_h camera, camera_attr_supported_iso_cb callback,
2176 * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
2182 * @brief Sets the theater mode
2184 * @remarks If you want to display preview image on external display with full screen mode, use this function.
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.
2193 * @see camera_attr_get_theater_mode()
2195 int camera_attr_set_theater_mode(camera_h camera, camera_attr_theater_mode_e mode);
2198 * @brief Gets the theater mode
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
2206 * @see camera_attr_get_theater_mode()
2208 int camera_attr_get_theater_mode(camera_h camera, camera_attr_theater_mode_e *mode);
2212 * @brief Sets the brightness level.
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
2221 * @see camera_attr_get_brightness()
2222 * @see camera_attr_get_brightness_range()
2224 int camera_attr_set_brightness(camera_h camera, int level);
2227 * @brief Gets the brightness level.
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
2235 * @see camera_attr_set_brightness()
2236 * @see camera_attr_get_brightness_range()
2238 int camera_attr_get_brightness(camera_h camera, int *level);
2241 * @brief Gets the available brightness level.
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
2250 * @see camera_attr_set_brightness()
2251 * @see camera_attr_get_brightness()
2253 int camera_attr_get_brightness_range(camera_h camera, int *min, int *max);
2256 * @brief Sets the contrast level.
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
2264 * @see camera_attr_get_contrast()
2265 * @see camera_attr_get_contrast_range()
2267 int camera_attr_set_contrast(camera_h camera, int level);
2271 * @brief Gets the contrast level.
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
2279 * @see camera_attr_set_contrast()
2280 * @see camera_attr_get_contrast_range()
2282 int camera_attr_get_contrast(camera_h camera, int *level);
2285 * @brief Gets the available contrast level.
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
2294 * @see camera_attr_set_contrast()
2295 * @see camera_attr_get_contrast()
2297 int camera_attr_get_contrast_range(camera_h camera, int *min , int *max);
2300 * @brief Sets the white balance mode.
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
2308 * @see camera_attr_foreach_supported_whitebalance()
2309 * @see camera_attr_get_whitebalance()
2311 int camera_attr_set_whitebalance(camera_h camera, camera_attr_whitebalance_e whitebalance);
2315 * @brief Gets the white balance mode.
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
2323 * @see camera_attr_foreach_supported_whitebalance()
2324 * @see camera_attr_set_whitebalance()
2326 int camera_attr_get_whitebalance(camera_h camera, camera_attr_whitebalance_e *whitebalance);
2333 * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
2338 * @brief Retrieves all supported white balances by invoking callback function once for each supported white balance.
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.
2348 * @see camera_attr_set_whitebalance()
2349 * @see camera_attr_get_whitebalance()
2350 * @see camera_attr_supported_whitebalance_cb()
2352 int camera_attr_foreach_supported_whitebalance(camera_h camera,
2353 camera_attr_supported_whitebalance_cb callback, void *user_data);
2360 * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
2365 * @brief Sets the camera effect mode.
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
2373 * @see camera_attr_foreach_supported_effect()
2374 * @see camera_attr_get_effect()
2376 int camera_attr_set_effect(camera_h camera, camera_attr_effect_mode_e effect);
2380 * @brief Gets the camera effect mode.
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
2388 * @see camera_attr_foreach_supported_effect()
2389 * @see camera_attr_set_effect()
2391 int camera_attr_get_effect(camera_h camera, camera_attr_effect_mode_e *effect);
2398 * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
2403 * @brief Retrieves all supported effect modes by invoking callback function once for each supported effect mode.
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.
2413 * @see camera_attr_set_effect()
2414 * @see camera_attr_get_effect()
2415 * @see camera_attr_supported_effect_cb()
2417 int camera_attr_foreach_supported_effect(camera_h camera,
2418 camera_attr_supported_effect_cb callback, void *user_data);
2425 * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
2430 * @brief Sets the scene mode.
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
2438 * @see camera_attr_foreach_supported_scene_mode()
2439 * @see camera_attr_get_scene_mode()
2441 int camera_attr_set_scene_mode(camera_h camera, camera_attr_scene_mode_e mode);
2444 * @brief Gets the scene mode.
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
2452 * @see camera_attr_foreach_supported_scene_mode()
2453 * @see camera_attr_set_scene_mode()
2455 int camera_attr_get_scene_mode(camera_h camera, camera_attr_scene_mode_e *mode);
2462 * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
2467 * @brief Retrieves all supported scene modes by invoking callback function once for each supported scene mode.
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.
2477 * @see camera_attr_set_scene_mode()
2478 * @see camera_attr_get_scene_mode()
2479 * @see camera_attr_supported_scene_mode_cb()
2481 int camera_attr_foreach_supported_scene_mode(camera_h camera,
2482 camera_attr_supported_scene_mode_cb callback, void *user_data);
2489 * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
2494 * @brief Enables to write EXIF(Exchangeable image file format) tags in a JPEG file.
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
2502 * @see camera_attr_is_enabled_tag()
2504 int camera_attr_enable_tag(camera_h camera, bool enable);
2507 * @brief Gets the value that indicates whether to write EXIF(Exchangeable image file format) tags in a JPEG file is enabled.
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
2515 * @see camera_attr_enable_tag()
2517 int camera_attr_is_enabled_tag(camera_h camera, bool *enabled);
2520 * @brief Sets a camera image description in EXIF(Exchangeable image file format) tag.
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
2528 * @see camera_attr_get_tag_image_description()
2530 int camera_attr_set_tag_image_description(camera_h camera, const char *description);
2533 * @brief Gets the camera image description in EXIF(Exchangeable image file format) tag.
2535 * @remarks @a description must be released with free() by you.
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
2543 * @see camera_attr_set_tag_image_description()
2545 int camera_attr_get_tag_image_description(camera_h camera, char **description);
2548 * @brief Sets the camera orientation in EXIF(Exchangeable image file format) tag.
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
2556 * @see camera_attr_get_tag_orientation()
2558 int camera_attr_set_tag_orientation(camera_h camera, camera_attr_tag_orientation_e orientation);
2561 * @brief Gets the camera orientation in EXIF(Exchangeable image file format) tag.
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
2569 * @see camera_attr_set_tag_orientation()
2571 int camera_attr_get_tag_orientation(camera_h camera, camera_attr_tag_orientation_e *orientation);
2574 * @brief Sets the software information in EXIF(Exchangeable image file format) tag.
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
2582 * @see camera_attr_get_tag_software()
2584 int camera_attr_set_tag_software(camera_h camera, const char *software);
2587 * @brief Gets the software information in EXIF(Exchangeable image file format) tag.
2589 * @remarks @a software must be released with free() by you.
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
2597 * @see camera_attr_set_tag_software()
2599 int camera_attr_get_tag_software(camera_h camera, char **software);
2602 * @brief Sets the geotag(GPS data) in EXIF(Exchangeable image file format) tag.
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
2612 * @see camera_attr_get_geotag()
2613 * @see camera_attr_remove_geotag()
2615 int camera_attr_set_geotag(camera_h camera, double latitude , double longitude, double altitude);
2618 * @brief Gets the geotag(GPS data) in EXIF(Exchangeable image file format) tag.
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
2628 * @see camera_attr_set_geotag()
2629 * @see camera_attr_remove_geotag()
2631 int camera_attr_get_geotag(camera_h camera, double *latitude , double *longitude, double *altitude);
2634 * @brief Remove the geotag(GPS data) in EXIF(Exchangeable image file format) tag.
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
2641 * @see camera_attr_set_geotag()
2642 * @see camera_attr_get_geotag()
2644 int camera_attr_remove_geotag(camera_h camera);
2647 * @brief Sets the camera flash mode.
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
2655 * @see camera_attr_foreach_supported_flash_mode()
2656 * @see camera_attr_get_flash_mode()
2658 int camera_attr_set_flash_mode(camera_h camera, camera_attr_flash_mode_e mode);
2661 * @brief Gets the camera flash mode.
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
2669 * @see camera_attr_foreach_supported_flash_mode()
2670 * @see camera_attr_set_flash_mode()
2672 int camera_attr_get_flash_mode(camera_h camera, camera_attr_flash_mode_e *mode);
2679 * @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
2684 * @brief Retrieves all supported flash modes by invoking callback funcion once for each supported flash mode.
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.
2694 * @see camera_attr_set_flash_mode()
2695 * @see camera_attr_get_flash_mode()
2696 * @see camera_attr_supported_flash_mode_cb()
2698 int camera_attr_foreach_supported_flash_mode(camera_h camera,
2699 camera_attr_supported_flash_mode_cb callback, void *user_data);
2706 * @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
2711 * @brief Gets the camera lens orientation angle.
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
2719 * @see camera_set_x11_display_rotation()
2721 int camera_attr_get_lens_orientation(camera_h camera, int *angle);
2725 * @brief Sets stream rotation
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
2733 * @pre The camera state must be CAMERA_STATE_CREATED.
2735 * @see camera_attr_get_stream_rotation()
2737 int camera_attr_set_stream_rotation(camera_h camera , camera_rotation_e rotation);
2740 * @brief Gets stream rotation
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
2748 * @pre The camera state must be CAMERA_STATE_CREATED.
2750 * @see camera_attr_set_stream_rotation()
2752 int camera_attr_get_stream_rotation(camera_h camera , camera_rotation_e *rotation);
2757 * @brief Sets stream flip
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
2765 * @pre The camera state must be CAMERA_STATE_CREATED.
2767 * @see camera_attr_set_stream_rotation()
2769 int camera_attr_set_stream_flip(camera_h camera , camera_flip_e flip);
2772 * @brief Gets stream flip
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
2780 * @pre The camera state must be CAMERA_STATE_CREATED.
2782 * @see camera_attr_set_stream_rotation()
2784 int camera_attr_get_stream_flip(camera_h camera , camera_flip_e *flip);
2789 * @brief Called when HDR capture process was updated
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().
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()
2800 typedef void (*camera_attr_hdr_progress_cb)(int percent, void *user_data);
2804 * @brief Sets the mode of HDR(High dynamic range) capture.
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.
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
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()
2822 int camera_attr_set_hdr_mode(camera_h camera, camera_attr_hdr_mode_e mode);
2825 * @brief Gets the mode of HDR(High dynamic range) capture.
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
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()
2839 int camera_attr_get_hdr_mode(camera_h camera, camera_attr_hdr_mode_e *mode);
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);
2845 * @brief Registers a callback function to be called when HDR capture is progressing.
2846 * @remarks This callback notify progress of HDR process.
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
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()
2860 int camera_attr_set_hdr_capture_progress_cb(camera_h camera, camera_attr_hdr_progress_cb callback, void* user_data);
2865 * @brief Unregisters the callback function.
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
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()
2877 int camera_attr_unset_hdr_capture_progress_cb(camera_h camera);
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
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()
2890 bool camera_attr_is_supported_hdr_capture(camera_h camera);
2893 * @brief Enable/Disable Anti-shake feature
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
2902 * @see camera_attr_is_enabled_anti_shake()
2903 * @see camera_attr_is_supported_anti_shake()
2906 int camera_attr_enable_anti_shake(camera_h camera, bool enable);
2909 * @brief Gets state of Anti-shake feature
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
2917 * @see camera_attr_enable_anti_shake()
2918 * @see camera_attr_is_supported_anti_shake()
2921 int camera_attr_is_enabled_anti_shake(camera_h camera , bool *enabled);
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
2929 * @see camera_attr_enable_anti_shake()
2930 * @see camera_attr_is_enabled_anti_shake()
2932 bool camera_attr_is_supported_anti_shake(camera_h camera);
2935 * @brief Enable/Disable video stabilization feature
2937 * If enabling video stabilization, zero shutter lag is disabling.\n
2938 * This feature used for video recording.
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
2946 * @see camera_attr_is_enabled_video_stabilization()
2947 * @see camera_attr_is_supported_video_stabilization()
2950 int camera_attr_enable_video_stabilization(camera_h camera, bool enable);
2953 * @brief Gets state of video stabilization feature
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
2961 * @see camera_attr_enable_video_stabilization()
2962 * @see camera_attr_is_supported_video_stabilization()
2965 int camera_attr_is_enabled_video_stabilization(camera_h camera, bool *enabled);
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
2973 * @see camera_attr_enable_video_stabilization()
2974 * @see camera_attr_is_enabled_video_stabilization()
2976 bool camera_attr_is_supported_video_stabilization(camera_h camera);
2982 * @brief Enable/Disable auto contrast
2984 * @param[in] camera The handle to the camera
2985 * @param[in] enable The state of auto contrast
2987 * @return 0 on success, otherwise a negative error value.
2988 * @retval #CAMERA_ERROR_NONE Successful
2989 * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
2991 * @see camera_attr_is_enabled_auto_contrast()
2993 int camera_attr_enable_auto_contrast(camera_h camera, bool enable);
2996 * @brief Gets state of auto contrast
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
3004 * @see camera_attr_enable_auto_contrast()
3007 int camera_attr_is_enabled_auto_contrast(camera_h camera, bool *enabled);
3010 * @brief Disable shutter sound.
3011 * @remarks In some country, this operation was not permitted.
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
3020 int camera_attr_disable_shutter_sound(camera_h camera, bool disable);
3029 #endif /* __TIZEN_MULTIMEDIA_CAMERA_H__ */