Release version 0.10.14
[platform/core/multimedia/libmm-camcorder.git] / src / include / mm_camcorder_attribute.h
index 8a499e5..43bf852 100644 (file)
@@ -25,6 +25,7 @@
 /*=======================================================================================
 | INCLUDE FILES                                                                                |
 ========================================================================================*/
+#include <gst/gst.h>
 #include <mm_types.h>
 #include <stdarg.h>
 
@@ -57,7 +58,7 @@ typedef enum
 {
        MM_CAM_MODE,                                    /* 0 */
        MM_CAM_AUDIO_DEVICE,
-       MM_CAM_CAMERA_DEVICE,
+       MM_CAM_CAMERA_DEVICE_COUNT,
        MM_CAM_AUDIO_ENCODER,
        MM_CAM_VIDEO_ENCODER,
        MM_CAM_IMAGE_ENCODER,
@@ -77,7 +78,7 @@ typedef enum
        MM_CAM_FILTER_HUE,
        MM_CAM_FILTER_SHARPNESS,                        /* 20 */
        MM_CAM_CAMERA_FORMAT,
-       MM_CAM_CAMERA_SLOW_MOTION_FPS,
+       MM_CAM_CAMERA_RECORDING_MOTION_RATE,
        MM_CAM_CAMERA_FPS,
        MM_CAM_CAMERA_WIDTH,
        MM_CAM_CAMERA_HEIGHT,
@@ -93,10 +94,9 @@ typedef enum
        MM_CAM_CAMERA_WDR,
        MM_CAM_CAMERA_ANTI_HANDSHAKE,
        MM_CAM_CAMERA_FPS_AUTO,
-       MM_CAM_CAMERA_HOLD_AF_AFTER_CAPTURING,
        MM_CAM_CAMERA_DELAY_ATTR_SETTING,
-       MM_CAM_AUDIO_ENCODER_BITRATE,                   /* 40 */
-       MM_CAM_VIDEO_ENCODER_BITRATE,
+       MM_CAM_AUDIO_ENCODER_BITRATE,
+       MM_CAM_VIDEO_ENCODER_BITRATE,                   /* 40 */
        MM_CAM_IMAGE_ENCODER_QUALITY,
        MM_CAM_CAPTURE_FORMAT,
        MM_CAM_CAPTURE_WIDTH,
@@ -105,8 +105,8 @@ typedef enum
        MM_CAM_CAPTURE_INTERVAL,
        MM_CAM_CAPTURE_BREAK_CONTINUOUS_SHOT,
        MM_CAM_DISPLAY_HANDLE,
-       MM_CAM_DISPLAY_DEVICE,                          /* 50 */
-       MM_CAM_DISPLAY_SURFACE,
+       MM_CAM_DISPLAY_DEVICE,
+       MM_CAM_DISPLAY_SURFACE,                         /* 50 */
        MM_CAM_DISPLAY_RECT_X,
        MM_CAM_DISPLAY_RECT_Y,
        MM_CAM_DISPLAY_RECT_WIDTH,
@@ -115,8 +115,8 @@ typedef enum
        MM_CAM_DISPLAY_SOURCE_Y,
        MM_CAM_DISPLAY_SOURCE_WIDTH,
        MM_CAM_DISPLAY_SOURCE_HEIGHT,
-       MM_CAM_DISPLAY_ROTATION,                        /* 60 */
-       MM_CAM_DISPLAY_VISIBLE,
+       MM_CAM_DISPLAY_ROTATION,
+       MM_CAM_DISPLAY_VISIBLE,                         /* 60 */
        MM_CAM_DISPLAY_SCALE,
        MM_CAM_DISPLAY_GEOMETRY_METHOD,
        MM_CAM_TARGET_FILENAME,
@@ -125,8 +125,8 @@ typedef enum
        MM_CAM_TAG_ENABLE,
        MM_CAM_TAG_IMAGE_DESCRIPTION,
        MM_CAM_TAG_ORIENTATION,
-       MM_CAM_TAG_SOFTWARE,                            /* 70 */
-       MM_CAM_TAG_LATITUDE,
+       MM_CAM_TAG_SOFTWARE,
+       MM_CAM_TAG_LATITUDE,                            /* 70 */
        MM_CAM_TAG_LONGITUDE,
        MM_CAM_TAG_ALTITUDE,
        MM_CAM_STROBE_CONTROL,
@@ -135,8 +135,8 @@ typedef enum
        MM_CAM_DETECT_MODE,
        MM_CAM_DETECT_NUMBER,
        MM_CAM_DETECT_FOCUS_SELECT,
-       MM_CAM_DETECT_SELECT_NUMBER,                    /* 80 */
-       MM_CAM_DETECT_STATUS,
+       MM_CAM_DETECT_SELECT_NUMBER,
+       MM_CAM_DETECT_STATUS,                           /* 80 */
        MM_CAM_CAPTURE_ZERO_SYSTEMLAG,
        MM_CAM_CAMERA_AF_TOUCH_X,
        MM_CAM_CAMERA_AF_TOUCH_Y,
@@ -145,18 +145,37 @@ typedef enum
        MM_CAM_CAMERA_FOCAL_LENGTH,
        MM_CAM_RECOMMEND_PREVIEW_FORMAT_FOR_CAPTURE,
        MM_CAM_RECOMMEND_PREVIEW_FORMAT_FOR_RECORDING,
-       MM_CAM_CAPTURE_THUMBNAIL,                       /* 90 */
        MM_CAM_TAG_GPS_ENABLE,
-       MM_CAM_TAG_GPS_TIME_STAMP,
+       MM_CAM_TAG_GPS_TIME_STAMP,                      /* 90 */
        MM_CAM_TAG_GPS_DATE_STAMP,
        MM_CAM_TAG_GPS_PROCESSING_METHOD,
        MM_CAM_CAMERA_ROTATION,
-       MM_CAM_ENABLE_CONVERTED_STREAM_CALLBACK,
        MM_CAM_CAPTURED_SCREENNAIL,
        MM_CAM_CAPTURE_SOUND_ENABLE,
        MM_CAM_RECOMMEND_DISPLAY_ROTATION,
-       MM_CAM_CAMCORDER_ROTATION,                      /* 100 */
-       MM_CAM_NUM
+       MM_CAM_CAMERA_FLIP,
+       MM_CAM_CAMERA_HDR_CAPTURE,
+       MM_CAM_DISPLAY_MODE,
+       MM_CAM_AUDIO_DISABLE,                   /* 100 */
+       MM_CAM_RECOMMEND_CAMERA_WIDTH,
+       MM_CAM_RECOMMEND_CAMERA_HEIGHT,
+       MM_CAM_CAPTURED_EXIF_RAW_DATA,
+       MM_CAM_DISPLAY_EVAS_SURFACE_SINK,
+       MM_CAM_DISPLAY_EVAS_DO_SCALING,
+       MM_CAM_CAMERA_FACING_DIRECTION,
+       MM_CAM_DISPLAY_FLIP,
+       MM_CAM_CAMERA_VIDEO_STABILIZATION,
+       MM_CAM_TAG_VIDEO_ORIENTATION,
+       MM_CAM_VIDEO_WIDTH,                     /* 110 */
+       MM_CAM_VIDEO_HEIGHT,
+       MM_CAM_SUPPORT_ZSL_CAPTURE,
+       MM_CAM_SUPPORT_ZERO_COPY_FORMAT,
+       MM_CAM_SUPPORT_MEDIA_PACKET_PREVIEW_CB,
+       MM_CAM_RECORDER_TAG_ENABLE,
+       MM_CAM_DISPLAY_SHM_SOCKET_PATH,
+       MM_CAM_PID_FOR_SOUND_FOCUS,
+       MM_CAM_ROOT_DIRECTORY,
+       MM_CAM_ATTRIBUTE_NUM
 }MMCamcorderAttrsID;
 
 /*=======================================================================================
@@ -169,13 +188,27 @@ typedef bool (*mmf_cam_commit_func_t)(MMHandleType handle, int attr_idx, const m
 ========================================================================================*/
 typedef struct {
        MMCamcorderAttrsID attrid;
-       char *name;
+       const char *name;
        int value_type;
        int flags;
-       void* default_value;
+       union {
+               void *value_void;
+               char *value_string;
+               int value_int;
+               double value_double;
+       } default_value;              /* default value */
        MMCamAttrsValidType validity_type;
-       int validity_value1;    /* can be int min, int *array, double *array, or cast to double min. */
-       int validity_value2;    /* can be int max, int count, int count, or cast to double max. */
+       union {
+               int *int_array;
+               int int_min;
+               double *double_array;
+               double double_min;
+       } validity_value_1;
+       union {
+               int int_max;
+               double double_max;
+               int count;
+       } validity_value_2;
        mmf_cam_commit_func_t attr_commit;
 } mm_cam_attr_construct_info;
 
@@ -209,13 +242,14 @@ MMHandleType _mmcamcorder_alloc_attribute(MMHandleType handle, MMCamPreset *info
 /**
  * This function release structure of attributes.
  *
+ * @param[in]  handle          Handle of camcorder.
  * @param[in]  attrs           Handle of camcorder attribute.
  * @return     void
  * @remarks
  * @see                _mmcamcorder_alloc_attribute()
  *
  */
-void _mmcamcorder_dealloc_attribute(MMHandleType attrs);
+void _mmcamcorder_dealloc_attribute(MMHandleType handle, MMHandleType attrs);
 
 /**
  * This is a meta  function to get attributes of camcorder with given attribute names.
@@ -296,11 +330,15 @@ bool _mmcamcorder_commit_capture_width(MMHandleType handle, int attr_idx, const
 bool _mmcamcorder_commit_capture_height(MMHandleType handle, int attr_idx, const mmf_value_t *value);
 bool _mmcamcorder_commit_capture_break_cont_shot(MMHandleType handle, int attr_idx, const mmf_value_t *value);
 bool _mmcamcorder_commit_capture_count(MMHandleType handle, int attr_idx, const mmf_value_t *value);
+bool _mmcamcorder_commit_capture_sound_enable(MMHandleType handle, int attr_idx, const mmf_value_t *value);
 bool _mmcamcorder_commit_audio_volume(MMHandleType handle, int attr_idx, const mmf_value_t *value);
 bool _mmcamcorder_commit_audio_input_route(MMHandleType handle, int attr_idx, const mmf_value_t *value);
+bool _mmcamcorder_commit_audio_disable(MMHandleType handle, int attr_idx, const mmf_value_t *value);
 bool _mmcamcorder_commit_camera_fps(MMHandleType handle, int attr_idx, const mmf_value_t *value);
+bool _mmcamcorder_commit_camera_recording_motion_rate(MMHandleType handle, int attr_idx, const mmf_value_t *value);
 bool _mmcamcorder_commit_camera_width(MMHandleType handle, int attr_idx, const mmf_value_t *value);
 bool _mmcamcorder_commit_camera_height(MMHandleType handle, int attr_idx, const mmf_value_t *value);
+bool _mmcamcorder_commit_video_size(MMHandleType handle, int attr_idx, const mmf_value_t *value);
 bool _mmcamcorder_commit_camera_zoom(MMHandleType handle, int attr_idx, const mmf_value_t *value);
 bool _mmcamcorder_commit_camera_focus_mode(MMHandleType handle, int attr_idx, const mmf_value_t *value);
 bool _mmcamcorder_commit_camera_af_scan_range(MMHandleType handle, int attr_idx, const mmf_value_t *value);
@@ -308,7 +346,7 @@ bool _mmcamcorder_commit_camera_af_touch_area(MMHandleType handle, int attr_idx,
 bool _mmcamcorder_commit_camera_capture_mode(MMHandleType handle, int attr_idx, const mmf_value_t *value);
 bool _mmcamcorder_commit_camera_wdr(MMHandleType handle, int attr_idx, const mmf_value_t *value);
 bool _mmcamcorder_commit_camera_anti_handshake(MMHandleType handle, int attr_idx, const mmf_value_t *value);
-bool _mmcamcorder_commit_camera_hold_af_after_capturing(MMHandleType handle, int attr_idx, const mmf_value_t *value);
+bool _mmcamcorder_commit_camera_video_stabilization(MMHandleType handle, int attr_idx, const mmf_value_t *value);
 bool _mmcamcorder_commit_camera_rotate(MMHandleType handle, int attr_idx, const mmf_value_t *value);
 bool _mmcamcorder_commit_image_encoder_quality(MMHandleType handle, int attr_idx, const mmf_value_t *value);
 bool _mmcamcorder_commit_target_filename(MMHandleType handle, int attr_idx, const mmf_value_t *value);
@@ -316,23 +354,25 @@ bool _mmcamcorder_commit_filter(MMHandleType handle, int attr_idx, const mmf_val
 bool _mmcamcorder_commit_filter_scene_mode(MMHandleType handle, int attr_idx, const mmf_value_t *value);
 bool _mmcamcorder_commit_filter_flip(MMHandleType handle, int attr_idx, const mmf_value_t *value);
 bool _mmcamcorder_commit_display_handle(MMHandleType handle, int attr_idx, const mmf_value_t *value);
+bool _mmcamcorder_commit_display_mode(MMHandleType handle, int attr_idx, const mmf_value_t *value);
 bool _mmcamcorder_commit_display_rotation(MMHandleType handle, int attr_idx, const mmf_value_t *value);
+bool _mmcamcorder_commit_display_flip(MMHandleType handle, int attr_idx, const mmf_value_t *value);
 bool _mmcamcorder_commit_display_visible(MMHandleType handle, int attr_idx, const mmf_value_t *value);
 bool _mmcamcorder_commit_display_geometry_method(MMHandleType handle, int attr_idx, const mmf_value_t *value);
 bool _mmcamcorder_commit_display_rect(MMHandleType handle, int attr_idx, const mmf_value_t *value);
 bool _mmcamcorder_commit_display_scale(MMHandleType handle, int attr_idx, const mmf_value_t *value);
+bool _mmcamcorder_commit_display_evas_do_scaling(MMHandleType handle, int attr_idx, const mmf_value_t *value);
 bool _mmcamcorder_commit_strobe(MMHandleType handle, int attr_idx, const mmf_value_t *value);
 bool _mmcamcorder_commit_detect(MMHandleType handle, int attr_idx, const mmf_value_t *value);
-bool _mmcamcorder_commit_camcorder_rotate(MMHandleType handle, int attr_idx, const mmf_value_t *value);
+bool _mmcamcorder_commit_camera_flip(MMHandleType handle, int attr_idx, const mmf_value_t *value);
+bool _mmcamcorder_commit_camera_hdr_capture(MMHandleType handle, int attr_idx, const mmf_value_t *value);
+bool _mmcamcorder_commit_pid_for_sound_focus(MMHandleType handle, int attr_idx, const mmf_value_t *value);
 
 /**
  * This function initialize effect setting.
  *
  * @param[in]  handle          Handle of camcorder.
- * @return     bool
- * @remarks
- * @see
- *
+ * @return     bool            Success on TRUE or return FALSE
  */
 bool _mmcamcorder_set_attribute_to_camsensor(MMHandleType handle);
 
@@ -340,10 +380,7 @@ bool _mmcamcorder_set_attribute_to_camsensor(MMHandleType handle);
  * This function removes writable flag from pre-defined attributes.
  *
  * @param[in]  handle          Handle of camcorder.
- * @return     void
- * @remarks
- * @see
- *
+ * @return     int             Success on MM_ERROR_NONE or return ERROR with error code
  */
 int _mmcamcorder_lock_readonly_attributes(MMHandleType handle);
 
@@ -351,13 +388,19 @@ int _mmcamcorder_lock_readonly_attributes(MMHandleType handle);
  * This function disable pre-defined attributes.
  *
  * @param[in]  handle          Handle of camcorder.
- * @return     void
- * @remarks
- * @see
- *
+ * @return     int             Success on MM_ERROR_NONE or return ERROR with error code
  */
 int _mmcamcorder_set_disabled_attributes(MMHandleType handle);
 
+/**
+ * check whether supported or not
+ *
+ * @param[in]  handle          Handle of camcorder.
+ * @param[in]  attr_index      index of attribute to check.
+ * @return     bool            TRUE if supported or FALSE
+ */
+bool _mmcamcorder_check_supported_attribute(MMHandleType handle, int attr_index);
+
 #ifdef __cplusplus
 }
 #endif