Add new APIs for camera settings 69/290269/6 accepted/tizen/unified/20230330.025553
authorJeongmo Yang <jm80.yang@samsung.com>
Mon, 20 Mar 2023 07:24:50 +0000 (16:24 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Tue, 28 Mar 2023 03:00:32 +0000 (12:00 +0900)
[Version] 0.10.287
[Issue Type] New feature

Change-Id: I4946c7b40e4edb315f5f8906bbbdd03334de4fdf
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
packaging/libmm-camcorder.spec
src/include/mm_camcorder.h
src/include/mm_camcorder_attribute.h
src/include/mm_camcorder_internal.h
src/include/mm_camcorder_platform.h
src/mm_camcorder_attribute.c
src/mm_camcorder_configure.c
src/mm_camcorder_internal.c
src/mm_camcorder_platform.c

index ae57548..ecbb645 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       libmm-camcorder
 Summary:    Camera and recorder library
-Version:    0.10.286
+Version:    0.10.287
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0
index 1570931..4b4d7e7 100644 (file)
@@ -831,6 +831,16 @@ extern "C" {
 #define MMCAM_CAMERA_ISO                        "camera-iso"
 
 /**
+ * Camera gain
+ */
+#define MMCAM_CAMERA_GAIN                       "camera-gain"
+
+/**
+ * Step of camera gain
+ */
+#define MMCAM_CAMERA_GAIN_STEP                  "camera-gain-step"
+
+/**
  * Wide dynamic range.
  * @see                MMCamcorderWDRMode
  */
@@ -902,6 +912,16 @@ extern "C" {
 #define MMCAM_FILTER_WB                         "filter-wb"
 
 /**
+ * White balance temperature
+ */
+#define MMCAM_FILTER_WB_TEMPERATURE             "filter-wb-temperature"
+
+/**
+ * Step of white balance temperature
+ */
+#define MMCAM_FILTER_WB_TEMPERATURE_STEP        "filter-wb-temperature-step"
+
+/**
  * Color tone. (Color effect)
  * @see                MMCamcorderColorToneType
  */
@@ -1564,15 +1584,17 @@ enum MMCamcorderISOType {
  * An enumeration for Automatic exposure.
  */
 enum MMCamcorderAutoExposureType {
-       MM_CAMCORDER_AUTO_EXPOSURE_OFF = 0,     /**< AE off*/
-       MM_CAMCORDER_AUTO_EXPOSURE_ALL,         /**< AE on, XXX mode*/
-       MM_CAMCORDER_AUTO_EXPOSURE_CENTER_1,    /**< AE on, XXX mode*/
-       MM_CAMCORDER_AUTO_EXPOSURE_CENTER_2,    /**< AE on, XXX mode*/
-       MM_CAMCORDER_AUTO_EXPOSURE_CENTER_3,    /**< AE on, XXX mode*/
-       MM_CAMCORDER_AUTO_EXPOSURE_SPOT_1,      /**< AE on, XXX mode*/
-       MM_CAMCORDER_AUTO_EXPOSURE_SPOT_2,      /**< AE on, XXX mode*/
-       MM_CAMCORDER_AUTO_EXPOSURE_CUSTOM_1,    /**< AE on, XXX mode*/
-       MM_CAMCORDER_AUTO_EXPOSURE_CUSTOM_2,    /**< AE on, XXX mode*/
+       MM_CAMCORDER_AUTO_EXPOSURE_OFF = 0,             /**< AE off*/
+       MM_CAMCORDER_AUTO_EXPOSURE_ALL,                 /**< AE default */
+       MM_CAMCORDER_AUTO_EXPOSURE_CENTER_1,            /**< AE center mode*/
+       MM_CAMCORDER_AUTO_EXPOSURE_CENTER_2,            /**< Unused */
+       MM_CAMCORDER_AUTO_EXPOSURE_CENTER_3,            /**< Unused */
+       MM_CAMCORDER_AUTO_EXPOSURE_SPOT_1,              /**< AE spot mode*/
+       MM_CAMCORDER_AUTO_EXPOSURE_SPOT_2,              /**< Unused */
+       MM_CAMCORDER_AUTO_EXPOSURE_CUSTOM_1,            /**< AE manual mode */
+       MM_CAMCORDER_AUTO_EXPOSURE_CUSTOM_2,            /**< Unused */
+       MM_CAMCORDER_AUTO_EXPOSURE_SHUTTER_PRIORITY,    /**< AE shutter priority mode */
+       MM_CAMCORDER_AUTO_EXPOSURE_APERTURE_PRIORITY    /**< AE aperture priority mode */
 };
 
 
index 4141143..9bd5f5c 100644 (file)
@@ -55,7 +55,7 @@ extern "C" {
  * Enumerations for camcorder attribute ID.
  */
 typedef enum {
-       MM_CAM_MODE,                                    /* 0 */
+       MM_CAM_MODE,                        /* 0 */
        MM_CAM_AUDIO_DEVICE,
        MM_CAM_CAMERA_DEVICE_COUNT,
        MM_CAM_AUDIO_ENCODER,
@@ -65,7 +65,7 @@ typedef enum {
        MM_CAM_CAMERA_DEVICE_NAME,
        MM_CAM_AUDIO_SAMPLERATE,
        MM_CAM_AUDIO_FORMAT,
-       MM_CAM_AUDIO_CHANNEL,                           /* 10 */
+       MM_CAM_AUDIO_CHANNEL,               /* 10 */
        MM_CAM_AUDIO_VOLUME,
        MM_CAM_AUDIO_INPUT_ROUTE,
        MM_CAM_FILTER_SCENE_MODE,
@@ -75,7 +75,7 @@ typedef enum {
        MM_CAM_FILTER_COLOR_TONE,
        MM_CAM_FILTER_SATURATION,
        MM_CAM_FILTER_HUE,
-       MM_CAM_FILTER_SHARPNESS,                        /* 20 */
+       MM_CAM_FILTER_SHARPNESS,            /* 20 */
        MM_CAM_CAMERA_FORMAT,
        MM_CAM_CAMERA_RECORDING_MOTION_RATE,
        MM_CAM_CAMERA_FPS,
@@ -85,7 +85,7 @@ typedef enum {
        MM_CAM_CAMERA_OPTICAL_ZOOM,
        MM_CAM_CAMERA_FOCUS_MODE,
        MM_CAM_CAMERA_AF_SCAN_RANGE,
-       MM_CAM_CAMERA_EXPOSURE_MODE,                    /* 30 */
+       MM_CAM_CAMERA_EXPOSURE_MODE,        /* 30 */
        MM_CAM_CAMERA_EXPOSURE_VALUE,
        MM_CAM_CAMERA_F_NUMBER,
        MM_CAM_CAMERA_SHUTTER_SPEED,
@@ -95,7 +95,7 @@ typedef enum {
        MM_CAM_CAMERA_FPS_AUTO,
        MM_CAM_CAMERA_DELAY_ATTR_SETTING,
        MM_CAM_AUDIO_ENCODER_BITRATE,
-       MM_CAM_VIDEO_ENCODER_BITRATE,                   /* 40 */
+       MM_CAM_VIDEO_ENCODER_BITRATE,       /* 40 */
        MM_CAM_IMAGE_ENCODER_QUALITY,
        MM_CAM_CAPTURE_FORMAT,
        MM_CAM_CAPTURE_WIDTH,
@@ -105,7 +105,7 @@ typedef enum {
        MM_CAM_CAPTURE_BREAK_CONTINUOUS_SHOT,
        MM_CAM_DISPLAY_HANDLE,
        MM_CAM_DISPLAY_DEVICE,
-       MM_CAM_DISPLAY_SURFACE,                         /* 50 */
+       MM_CAM_DISPLAY_SURFACE,             /* 50 */
        MM_CAM_DISPLAY_RECT_X,
        MM_CAM_DISPLAY_RECT_Y,
        MM_CAM_DISPLAY_RECT_WIDTH,
@@ -115,7 +115,7 @@ typedef enum {
        MM_CAM_DISPLAY_SOURCE_WIDTH,
        MM_CAM_DISPLAY_SOURCE_HEIGHT,
        MM_CAM_DISPLAY_ROTATION,
-       MM_CAM_DISPLAY_VISIBLE,                         /* 60 */
+       MM_CAM_DISPLAY_VISIBLE,             /* 60 */
        MM_CAM_DISPLAY_SCALE,
        MM_CAM_DISPLAY_GEOMETRY_METHOD,
        MM_CAM_TARGET_FILENAME,
@@ -125,7 +125,7 @@ typedef enum {
        MM_CAM_TAG_IMAGE_DESCRIPTION,
        MM_CAM_TAG_ORIENTATION,
        MM_CAM_TAG_SOFTWARE,
-       MM_CAM_TAG_LATITUDE,                            /* 70 */
+       MM_CAM_TAG_LATITUDE,                /* 70 */
        MM_CAM_TAG_LONGITUDE,
        MM_CAM_TAG_ALTITUDE,
        MM_CAM_STROBE_CONTROL,
@@ -135,7 +135,7 @@ typedef enum {
        MM_CAM_DETECT_NUMBER,
        MM_CAM_DETECT_FOCUS_SELECT,
        MM_CAM_DETECT_SELECT_NUMBER,
-       MM_CAM_DETECT_STATUS,                           /* 80 */
+       MM_CAM_DETECT_STATUS,               /* 80 */
        MM_CAM_CAPTURE_ZERO_SYSTEMLAG,
        MM_CAM_CAMERA_AF_TOUCH_X,
        MM_CAM_CAMERA_AF_TOUCH_Y,
@@ -145,7 +145,7 @@ typedef enum {
        MM_CAM_RECOMMEND_PREVIEW_FORMAT_FOR_CAPTURE,
        MM_CAM_RECOMMEND_PREVIEW_FORMAT_FOR_RECORDING,
        MM_CAM_TAG_GPS_ENABLE,
-       MM_CAM_TAG_GPS_TIME_STAMP,                      /* 90 */
+       MM_CAM_TAG_GPS_TIME_STAMP,          /* 90 */
        MM_CAM_TAG_GPS_DATE_STAMP,
        MM_CAM_TAG_GPS_PROCESSING_METHOD,
        MM_CAM_CAMERA_ROTATION,
@@ -155,7 +155,7 @@ typedef enum {
        MM_CAM_CAMERA_FLIP,
        MM_CAM_CAMERA_HDR_CAPTURE,
        MM_CAM_DISPLAY_MODE,
-       MM_CAM_AUDIO_DISABLE,                           /* 100 */
+       MM_CAM_AUDIO_DISABLE,               /* 100 */
        MM_CAM_RECOMMEND_CAMERA_WIDTH,
        MM_CAM_RECOMMEND_CAMERA_HEIGHT,
        MM_CAM_CAPTURED_EXIF_RAW_DATA,
@@ -165,7 +165,7 @@ typedef enum {
        MM_CAM_DISPLAY_FLIP,
        MM_CAM_CAMERA_VIDEO_STABILIZATION,
        MM_CAM_TAG_VIDEO_ORIENTATION,
-       MM_CAM_CAMERA_PAN_MECHA,                        /* 110 */
+       MM_CAM_CAMERA_PAN_MECHA,            /* 110 */
        MM_CAM_CAMERA_PAN_ELEC,
        MM_CAM_CAMERA_TILT_MECHA,
        MM_CAM_CAMERA_TILT_ELEC,
@@ -175,7 +175,7 @@ typedef enum {
        MM_CAM_SUPPORT_ZSL_CAPTURE,
        MM_CAM_SUPPORT_ZERO_COPY_FORMAT,
        MM_CAM_SUPPORT_MEDIA_PACKET_PREVIEW_CB,
-       MM_CAM_ENCODED_PREVIEW_BITRATE,         /* 120 */
+       MM_CAM_ENCODED_PREVIEW_BITRATE,     /* 120 */
        MM_CAM_ENCODED_PREVIEW_GOP_INTERVAL,
        MM_CAM_RECORDER_TAG_ENABLE,
        MM_CAM_DISPLAY_SOCKET_PATH,
@@ -185,7 +185,7 @@ typedef enum {
        MM_CAM_SOUND_STREAM_TYPE,
        MM_CAM_DISPLAY_REUSE_HINT,
        MM_CAM_DISPLAY_REUSE_ELEMENT,
-       MM_CAM_GDBUS_CONNECTION,                        /* 130 */
+       MM_CAM_GDBUS_CONNECTION,            /* 130 */
        MM_CAM_AUDIO_REPLAY_GAIN_ENABLE,
        MM_CAM_AUDIO_REPLAY_GAIN_REFERENCE_LEVEL,
        MM_CAM_SUPPORT_USER_BUFFER,
@@ -195,9 +195,13 @@ typedef enum {
        MM_CAM_VIDEOSRC_ELEMENT_NAME,
        MM_CAM_AUDIOSRC_ELEMENT_NAME,
        MM_CAM_EXTRA_PREVIEW_ENABLE,
-       MM_CAM_CAMERA_FOCUS_LEVEL,                      /* 140 */
+       MM_CAM_CAMERA_FOCUS_LEVEL,          /* 140 */
        MM_CAM_SUPPORT_EXTRA_PREVIEW,
        MM_CAM_REQUEST_CODEC_CONFIG,
+       MM_CAM_FILTER_WB_TEMPERATURE,
+       MM_CAM_FILTER_WB_TEMPERATURE_STEP,
+       MM_CAM_CAMERA_GAIN,
+       MM_CAM_CAMERA_GAIN_STEP,
        MM_CAM_ATTRIBUTE_NUM
 } MMCamcorderAttrsID;
 
index b984024..8e55fca 100644 (file)
@@ -465,26 +465,26 @@ do { \
  * Total Numbers of Attribute values.
  * If you increase any enum of attribute values, you also have to increase this.
  */
-#define MM_CAMCORDER_MODE_NUM                  3       /**< Number of mode type */
-#define MM_CAMCORDER_COLOR_TONE_NUM            30      /**< Number of color-tone modes */
-#define MM_CAMCORDER_WHITE_BALANCE_NUM         10      /**< Number of WhiteBalance modes*/
-#define MM_CAMCORDER_SCENE_MODE_NUM            16      /**< Number of program-modes */
-#define MM_CAMCORDER_FOCUS_MODE_NUM            6       /**< Number of focus mode*/
-#define MM_CAMCORDER_AUTO_FOCUS_NUM            5       /**< Total count of auto focus type*/
-#define MM_CAMCORDER_FOCUS_STATE_NUM           4       /**< Number of focus state */
-#define MM_CAMCORDER_ISO_NUM                   10      /**< Number of ISO */
-#define MM_CAMCORDER_AUTO_EXPOSURE_NUM         9       /**< Number of Auto exposure type */
-#define MM_CAMCORDER_WDR_NUM                   3       /**< Number of wide dynamic range */
-#define MM_CAMCORDER_FLIP_NUM                  4       /**< Number of Flip mode */
-#define MM_CAMCORDER_ROTATION_NUM              4       /**< Number of Rotation mode */
-#define MM_CAMCORDER_AHS_NUM                   4       /**< Number of anti-handshake */
-#define MM_CAMCORDER_VIDEO_STABILIZATION_NUM   2       /**< Number of video stabilization */
-#define MM_CAMCORDER_HDR_CAPTURE_NUM           3       /**< Number of HDR capture mode */
-#define MM_CAMCORDER_GEOMETRY_METHOD_NUM       5       /**< Number of geometry method */
-#define MM_CAMCORDER_TAG_ORT_NUM               8       /**< Number of tag orientation */
-#define MM_CAMCORDER_STROBE_MODE_NUM           8       /**< Number of strobe mode type */
-#define MM_CAMCORDER_STROBE_CONTROL_NUM                3       /**< Number of strobe control type */
-#define MM_CAMCORDER_DETECT_MODE_NUM           2       /**< Number of detect mode type */
+#define MM_CAMCORDER_MODE_NUM                   3   /**< Number of mode type */
+#define MM_CAMCORDER_COLOR_TONE_NUM             30  /**< Number of color-tone modes */
+#define MM_CAMCORDER_WHITE_BALANCE_NUM          10  /**< Number of WhiteBalance modes*/
+#define MM_CAMCORDER_SCENE_MODE_NUM             16  /**< Number of program-modes */
+#define MM_CAMCORDER_FOCUS_MODE_NUM             6   /**< Number of focus mode*/
+#define MM_CAMCORDER_AUTO_FOCUS_NUM             5   /**< Total count of auto focus type*/
+#define MM_CAMCORDER_FOCUS_STATE_NUM            4   /**< Number of focus state */
+#define MM_CAMCORDER_ISO_NUM                    10  /**< Number of ISO */
+#define MM_CAMCORDER_AUTO_EXPOSURE_NUM          11  /**< Number of Auto exposure type */
+#define MM_CAMCORDER_WDR_NUM                    3   /**< Number of wide dynamic range */
+#define MM_CAMCORDER_FLIP_NUM                   4   /**< Number of Flip mode */
+#define MM_CAMCORDER_ROTATION_NUM               4   /**< Number of Rotation mode */
+#define MM_CAMCORDER_AHS_NUM                    4   /**< Number of anti-handshake */
+#define MM_CAMCORDER_VIDEO_STABILIZATION_NUM    2   /**< Number of video stabilization */
+#define MM_CAMCORDER_HDR_CAPTURE_NUM            3   /**< Number of HDR capture mode */
+#define MM_CAMCORDER_GEOMETRY_METHOD_NUM        5   /**< Number of geometry method */
+#define MM_CAMCORDER_TAG_ORT_NUM                8   /**< Number of tag orientation */
+#define MM_CAMCORDER_STROBE_MODE_NUM            8   /**< Number of strobe mode type */
+#define MM_CAMCORDER_STROBE_CONTROL_NUM         3   /**< Number of strobe control type */
+#define MM_CAMCORDER_DETECT_MODE_NUM            2   /**< Number of detect mode type */
 
 
 /*=======================================================================================
index ad4f7ea..89e07ea 100644 (file)
@@ -134,7 +134,7 @@ extern "C" {
 #define _MMCAMCORDER_SENSOR_ENUM_NONE  -255
 
 /* camera information related */
-#define CAMINFO_CONVERT_NUM            47
+#define CAMINFO_CONVERT_NUM            49
 
 
 /*=======================================================================================
index 2f2cf4d..0e06777 100644 (file)
@@ -1720,6 +1720,50 @@ _mmcamcorder_alloc_attribute(MMHandleType handle)
                        {.int_min = FALSE},
                        {.int_max = TRUE},
                        _mmcamcorder_commit_request_codec_config,
+               },
+               {
+                       MM_CAM_FILTER_WB_TEMPERATURE,
+                       "filter-wb-temperature",
+                       MM_ATTRS_TYPE_INT,
+                       MM_ATTRS_FLAG_RW,
+                       {(void*)0},
+                       MM_ATTRS_VALID_TYPE_INT_RANGE,
+                       {.int_min = 0},
+                       {.int_max = -1},
+                       _mmcamcorder_commit_filter,
+               },
+               {
+                       MM_CAM_FILTER_WB_TEMPERATURE_STEP,
+                       "filter-wb-temperature-step",
+                       MM_ATTRS_TYPE_INT,
+                       MM_ATTRS_FLAG_RW,
+                       {(void*)1},
+                       MM_ATTRS_VALID_TYPE_INT_RANGE,
+                       {.int_min = 1},
+                       {.int_max = _MMCAMCORDER_MAX_INT},
+                       NULL,
+               },
+               {
+                       MM_CAM_CAMERA_GAIN,
+                       "camera-gain",
+                       MM_ATTRS_TYPE_INT,
+                       MM_ATTRS_FLAG_RW,
+                       {(void*)0},
+                       MM_ATTRS_VALID_TYPE_INT_RANGE,
+                       {.int_min = 0},
+                       {.int_max = -1},
+                       _mmcamcorder_commit_camera_capture_mode,
+               },
+               {
+                       MM_CAM_CAMERA_GAIN_STEP,
+                       "camera-gain-step",
+                       MM_ATTRS_TYPE_INT,
+                       MM_ATTRS_FLAG_RW,
+                       {(void*)1},
+                       MM_ATTRS_VALID_TYPE_INT_RANGE,
+                       {.int_min = 1},
+                       {.int_max = _MMCAMCORDER_MAX_INT},
+                       NULL,
                }
        };
 
@@ -3309,27 +3353,40 @@ bool _mmcamcorder_commit_camera_capture_mode(MMHandleType handle, int attr_idx,
 
        ivalue = value->value.i_val;
 
-       if (attr_idx == MM_CAM_CAMERA_F_NUMBER) {
+       switch (attr_idx) {
+       case MM_CAM_CAMERA_F_NUMBER:
                exposure_type = GST_CAMERA_CONTROL_F_NUMBER;
                mslVal1 = newVal1 = MM_CAMCORDER_GET_NUMERATOR(ivalue);
                mslVal2 = newVal2 = MM_CAMCORDER_GET_DENOMINATOR(ivalue);
-       } else if (attr_idx == MM_CAM_CAMERA_SHUTTER_SPEED) {
+               break;
+       case MM_CAM_CAMERA_SHUTTER_SPEED:
                exposure_type = GST_CAMERA_CONTROL_SHUTTER_SPEED;
                mslVal1 = newVal1 = MM_CAMCORDER_GET_NUMERATOR(ivalue);
                mslVal2 = newVal2 = MM_CAMCORDER_GET_DENOMINATOR(ivalue);
-       } else if (attr_idx == MM_CAM_CAMERA_ISO) {
+               break;
+       case MM_CAM_CAMERA_ISO:
                exposure_type = GST_CAMERA_CONTROL_ISO;
                mslVal1 = ivalue;
                newVal1 = _mmcamcorder_convert_msl_to_sensor(handle, attr_idx, mslVal1);
                check_scene_mode = TRUE;
-       } else if (attr_idx == MM_CAM_CAMERA_EXPOSURE_MODE) {
+               break;
+       case MM_CAM_CAMERA_EXPOSURE_MODE:
                exposure_type = GST_CAMERA_CONTROL_EXPOSURE_MODE;
                mslVal1 = ivalue;
                newVal1 =  _mmcamcorder_convert_msl_to_sensor(handle, attr_idx, mslVal1);
                check_scene_mode = TRUE;
-       } else if (attr_idx == MM_CAM_CAMERA_EXPOSURE_VALUE) {
+               break;
+       case MM_CAM_CAMERA_EXPOSURE_VALUE:
                exposure_type = GST_CAMERA_CONTROL_EXPOSURE_VALUE;
                mslVal1 = newVal1 = ivalue;
+               break;
+       case MM_CAM_CAMERA_GAIN:
+               exposure_type = GST_CAMERA_CONTROL_GAIN;
+               mslVal1 = newVal1 = ivalue;
+               break;
+       default:
+               MMCAM_LOG_ERROR("unknown attr idx[%d]", attr_idx);
+               return FALSE;
        }
 
        if (check_scene_mode) {
@@ -3695,6 +3752,10 @@ bool _mmcamcorder_commit_filter(MMHandleType handle, int attr_idx, const MMAttrs
                control_label = "white balance";
                check_scene_mode = TRUE;
                break;
+       case MM_CAM_FILTER_WB_TEMPERATURE:
+               control_label = "white balance temperature";
+               check_scene_mode = TRUE;
+               break;
        case MM_CAM_FILTER_COLOR_TONE:
                control_label = "color tone";
                break;
index 54d2b3d..20618ad 100644 (file)
@@ -843,19 +843,21 @@ int _mmcamcorder_conf_init(MMHandleType handle, int type, camera_conf *configure
 
        /* [Effect] matching table */
        static conf_info_table conf_ctrl_effect_table[] = {
-               { "Brightness",           CONFIGURE_VALUE_INT_RANGE, {NULL} },
-               { "BrightnessStepDenominator", CONFIGURE_VALUE_INT, {.value_int = 2} },
-               { "Contrast",             CONFIGURE_VALUE_INT_RANGE, {NULL} },
-               { "Saturation",           CONFIGURE_VALUE_INT_RANGE, {NULL} },
-               { "Sharpness",            CONFIGURE_VALUE_INT_RANGE, {NULL} },
-               { "Hue",                  CONFIGURE_VALUE_INT_RANGE, {NULL} },
-               { "WhiteBalance",         CONFIGURE_VALUE_INT_ARRAY, {NULL} },
-               { "ColorTone",            CONFIGURE_VALUE_INT_ARRAY, {NULL} },
-               { "Flip",                 CONFIGURE_VALUE_INT_ARRAY, {NULL} },
-               { "Rotation",             CONFIGURE_VALUE_INT_ARRAY, {NULL} },
-               { "WDR",                  CONFIGURE_VALUE_INT_ARRAY, {NULL} },
-               { "PartColorMode",        CONFIGURE_VALUE_INT_ARRAY, {NULL} },
-               { "PartColor",            CONFIGURE_VALUE_INT_ARRAY, {NULL} },
+               { "Brightness",                     CONFIGURE_VALUE_INT_RANGE, {NULL} },
+               { "BrightnessStepDenominator",      CONFIGURE_VALUE_INT, {.value_int = 2} },
+               { "Contrast",                       CONFIGURE_VALUE_INT_RANGE, {NULL} },
+               { "Saturation",                     CONFIGURE_VALUE_INT_RANGE, {NULL} },
+               { "Sharpness",                      CONFIGURE_VALUE_INT_RANGE, {NULL} },
+               { "Hue",                            CONFIGURE_VALUE_INT_RANGE, {NULL} },
+               { "WhiteBalance",                   CONFIGURE_VALUE_INT_ARRAY, {NULL} },
+               { "ColorTone",                      CONFIGURE_VALUE_INT_ARRAY, {NULL} },
+               { "Flip",                           CONFIGURE_VALUE_INT_ARRAY, {NULL} },
+               { "Rotation",                       CONFIGURE_VALUE_INT_ARRAY, {NULL} },
+               { "WDR",                            CONFIGURE_VALUE_INT_ARRAY, {NULL} },
+               { "PartColorMode",                  CONFIGURE_VALUE_INT_ARRAY, {NULL} },
+               { "PartColor",                      CONFIGURE_VALUE_INT_ARRAY, {NULL} },
+               { "WhiteBalanceTemperature",        CONFIGURE_VALUE_INT_RANGE, {NULL} },
+               { "WhiteBalanceTemperatureStep",    CONFIGURE_VALUE_INT, {.value_int = 1} }
        };
 
        /* [Photograph] matching table */
@@ -881,6 +883,8 @@ int _mmcamcorder_conf_init(MMHandleType handle, int type, camera_conf *configure
                { "PanElec",              CONFIGURE_VALUE_INT_RANGE, {NULL} },
                { "TiltMecha",            CONFIGURE_VALUE_INT_RANGE, {NULL} },
                { "TiltElec",             CONFIGURE_VALUE_INT_RANGE, {NULL} },
+               { "Gain",                 CONFIGURE_VALUE_INT_RANGE, {NULL} },
+               { "GainStep",             CONFIGURE_VALUE_INT, {.value_int = 1} }
        };
 
        /* [Capture] matching table */
index eb34cec..53085f9 100644 (file)
@@ -321,6 +321,8 @@ static gint __mmcamcorder_init_configure_video_capture(mmf_camcorder_t *hcamcord
        int play_capture_sound = TRUE;
        int camera_default_flip = MM_FLIP_NONE;
        int camera_facing_direction = MM_CAMCORDER_CAMERA_FACING_DIRECTION_REAR;
+       int wb_temp_step = 1;
+       int gain_step = 1;
        char *err_attr_name = NULL;
        char conf_file_name[__MMCAMCORDER_CONF_FILENAME_LENGTH] = {'\0',};
        const char *platform_privilege_camera = NULL;
@@ -438,11 +440,22 @@ static gint __mmcamcorder_init_configure_video_capture(mmf_camcorder_t *hcamcord
                "SupportZSL",
                &hcamcorder->support_zsl_capture);
 
+       _mmcamcorder_conf_get_value_int((MMHandleType)hcamcorder, hcamcorder->conf_ctrl,
+               CONFIGURE_CATEGORY_CTRL_EFFECT,
+               "WhiteBalanceTemperatureStep",
+               &wb_temp_step);
+
+       _mmcamcorder_conf_get_value_int((MMHandleType)hcamcorder, hcamcorder->conf_ctrl,
+               CONFIGURE_CATEGORY_CTRL_PHOTOGRAPH,
+               "GainStep",
+               &gain_step);
+
        MMCAM_LOG_INFO("Recommend format[capture:%d, recording:%d]", rcmd_fmt_capture, rcmd_fmt_recording);
        MMCAM_LOG_INFO("Recommend display rotation[%d]", rcmd_dpy_rotation);
        MMCAM_LOG_INFO("Camera facing direction[%d]", camera_facing_direction);
        MMCAM_LOG_INFO("Brightness step denominator[%d]", hcamcorder->brightness_step_denominator);
        MMCAM_LOG_INFO("Support ZSL capture[%d]", hcamcorder->support_zsl_capture);
+       MMCAM_LOG_INFO("Step: wb_temp[%d], gain[%d]", wb_temp_step, gain_step);
 
        _mmcamcorder_conf_get_value_int((MMHandleType)hcamcorder, hcamcorder->conf_ctrl,
                CONFIGURE_CATEGORY_CTRL_CAMERA,
@@ -559,6 +572,8 @@ static gint __mmcamcorder_init_configure_video_capture(mmf_camcorder_t *hcamcord
                MMCAM_PLATFORM_PRIVILEGE_CAMERA, platform_privilege_camera,
                        platform_privilege_camera ? strlen(platform_privilege_camera) : 0,
                MMCAM_ENCODED_PREVIEW_BITRATE, hcamcorder->default_encoded_preview_bitrate,
+               MMCAM_FILTER_WB_TEMPERATURE_STEP, wb_temp_step,
+               MMCAM_CAMERA_GAIN_STEP, gain_step,
                NULL);
        if (ret != MM_ERROR_NONE) {
                MMCAM_LOG_ERROR("[0x%x] Set %s FAILED.", ret, err_attr_name ? err_attr_name : "[UNKNOWN]");
index a480548..10dc4fa 100644 (file)
@@ -670,6 +670,24 @@ static _MMCamcorderInfoConverting  g_caminfo_convert[CAMINFO_CONVERT_NUM] = {
                "FocusLevel",
                MM_CAMCONVERT_TYPE_INT_RANGE,
                NULL,
+       },
+       {
+               CONFIGURE_TYPE_CTRL,
+               CONFIGURE_CATEGORY_CTRL_EFFECT,
+               MM_CAM_FILTER_WB_TEMPERATURE,
+               MM_CAMCORDER_ATTR_NONE,
+               "WhiteBalanceTemperature",
+               MM_CAMCONVERT_TYPE_INT_RANGE,
+               NULL,
+       },
+       {
+               CONFIGURE_TYPE_CTRL,
+               CONFIGURE_CATEGORY_CTRL_PHOTOGRAPH,
+               MM_CAM_CAMERA_GAIN,
+               MM_CAMCORDER_ATTR_NONE,
+               "Gain",
+               MM_CAMCONVERT_TYPE_INT_RANGE,
+               NULL,
        }
 };