Support new APIs for camera settings 47/290347/3 accepted/tizen/unified/20230330.025555
authorJeongmo Yang <jm80.yang@samsung.com>
Mon, 20 Mar 2023 07:25:33 +0000 (16:25 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Tue, 28 Mar 2023 03:01:11 +0000 (12:01 +0900)
- Supported settings
 : saturation
 : sharpness
 : gain
 : white balance temperature

[Version] 0.3.57
[Issue Type] New feature

Change-Id: Ib096e1f494acfe92c9218eae5d4acbc2c55bf328
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
legacy/include/legacy_camera.h
legacy/src/legacy_camera.c
muse/include/muse_camera.h
muse/src/muse_camera_dispatcher.c
packaging/mmsvc-camera.spec

index 85df767..b1fa346 100644 (file)
@@ -2824,6 +2824,215 @@ int legacy_camera_attr_set_whitebalance(camera_h camera, camera_attr_whitebalanc
 int legacy_camera_attr_get_whitebalance(camera_h camera, camera_attr_whitebalance_e *whitebalance);
 
 /**
+ * @brief Sets the white balance temperature.
+ * @since_tizen 7.5
+ * @param[in] camera The handle to the camera
+ * @param[in] temperature The white balance temperature
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @see legacy_camera_attr_get_whitebalance_temperature()
+ * @see legacy_camera_attr_get_whitebalance_temperature_range()
+ * @see legacy_camera_attr_get_whitebalance_temperature_step()
+ */
+int legacy_camera_attr_set_whitebalance_temperature(camera_h camera, int temperature);
+
+/**
+ * @brief Gets the white balance temperature.
+ * @since_tizen 7.5
+ * @param[in] camera The handle to the camera
+ * @param[out] temperature The white balance temperature
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @see legacy_camera_attr_set_whitebalance_temperature()
+ * @see legacy_camera_attr_get_whitebalance_temperature_range()
+ * @see legacy_camera_attr_get_whitebalance_temperature_step()
+ */
+int legacy_camera_attr_get_whitebalance_temperature(camera_h camera, int *temperature);
+
+/**
+ * @brief Gets the available white balance temperature.
+ * @since_tizen 7.5
+ * @remarks If the min value is greater than the max value, it means that this feature is not supported.
+ * @param[in] camera The handle to the camera
+ * @param[out] min The minimum white balance temperature
+ * @param[out] max The maximum white balance temperature
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @see legacy_camera_attr_set_whitebalance_temperature()
+ * @see legacy_camera_attr_get_whitebalance_temperature()
+ * @see legacy_camera_attr_get_whitebalance_temperature_step()
+ */
+int legacy_camera_attr_get_whitebalance_temperature_range(camera_h camera, int *min, int *max);
+
+/**
+ * @brief Gets the step of white balance temperature.
+ * @since_tizen 7.5
+ * @param[in] camera The handle to the camera
+ * @param[out] step The step of white balance temperature
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @see legacy_camera_attr_set_whitebalance_temperature()
+ * @see legacy_camera_attr_get_whitebalance_temperature()
+ * @see legacy_camera_attr_get_whitebalance_temperature_range()
+ */
+int legacy_camera_attr_get_whitebalance_temperature_step(camera_h camera, int *step);
+
+/**
+ * @brief Sets the saturation level.
+ * @since_tizen 7.5
+ * @param[in] level The saturation level
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @see legacy_camera_attr_get_saturation()
+ * @see legacy_camera_attr_get_saturation_range()
+ */
+int legacy_camera_attr_set_saturation(camera_h camera, int level);
+
+/**
+ * @brief Gets the saturation level.
+ * @since_tizen 7.5
+ * @param[in] camera The handle to the camera
+ * @param[out] level The saturation level
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @see legacy_camera_attr_set_saturation()
+ * @see legacy_camera_attr_get_saturation_range()
+ */
+int legacy_camera_attr_get_saturation(camera_h camera, int *level);
+
+/**
+ * @brief Gets the available saturation level.
+ * @since_tizen 7.5
+ * @remarks If the min value is greater than the max value, it means that this feature is not supported.
+ * @param[in] camera The handle to the camera
+ * @param[out] min The minimum saturation level
+ * @param[out] max The maximum saturation level
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @see legacy_camera_attr_set_saturation()
+ * @see legacy_camera_attr_get_saturation()
+ */
+int legacy_camera_attr_get_saturation_range(camera_h camera, int *min, int *max);
+
+/**
+ * @brief Sets the sharpness level.
+ * @since_tizen 7.5
+ * @param[in] level The sharpness level
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @see legacy_camera_attr_get_sharpness()
+ * @see legacy_camera_attr_get_sharpness_range()
+ */
+int legacy_camera_attr_set_sharpness(camera_h camera, int level);
+
+/**
+ * @brief Gets the sharpness level.
+ * @since_tizen 7.5
+ * @param[in] camera The handle to the camera
+ * @param[out] level The sharpness level
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @see legacy_camera_attr_set_sharpness()
+ * @see legacy_camera_attr_get_sharpness_range()
+ */
+int legacy_camera_attr_get_sharpness(camera_h camera, int *level);
+
+/**
+ * @brief Gets the available sharpness level.
+ * @since_tizen 7.5
+ * @remarks If the min value is greater than the max value, it means that this feature is not supported.
+ * @param[in] camera The handle to the camera
+ * @param[out] min The minimum sharpness level
+ * @param[out] max The maximum sharpness level
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @see legacy_camera_attr_set_sharpness()
+ * @see legacy_camera_attr_get_sharpness()
+ */
+int legacy_camera_attr_get_sharpness_range(camera_h camera, int *min, int *max);
+
+/**
+ * @brief Sets the gain level.
+ * @since_tizen 7.5
+ * @param[in] level The gain level
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @see legacy_camera_attr_get_gain()
+ * @see legacy_camera_attr_get_gain_range()
+ * @see legacy_camera_attr_get_gain_step()
+ */
+int legacy_camera_attr_set_gain(camera_h camera, int level);
+
+/**
+ * @brief Gets the gain level.
+ * @since_tizen 7.5
+ * @param[in] camera The handle to the camera
+ * @param[out] level The gain level
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @see legacy_camera_attr_set_gain()
+ * @see legacy_camera_attr_get_gain_range()
+ * @see legacy_camera_attr_get_gain_step()
+ */
+int legacy_camera_attr_get_gain(camera_h camera, int *level);
+
+/**
+ * @brief Gets the available gain level.
+ * @since_tizen 7.5
+ * @remarks If the min value is greater than the max value, it means that this feature is not supported.
+ * @param[in] camera The handle to the camera
+ * @param[out] min The minimum gain level
+ * @param[out] max The maximum gain level
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @see legacy_camera_attr_set_gain()
+ * @see legacy_camera_attr_get_gain()
+ * @see legacy_camera_attr_get_gain_step()
+ */
+int legacy_camera_attr_get_gain_range(camera_h camera, int *min, int *max);
+
+/**
+ * @brief Gets the step of gain level.
+ * @since_tizen 7.5
+ * @param[in] camera The handle to the camera
+ * @param[out] level The step of gain level
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @see legacy_camera_attr_set_gain()
+ * @see legacy_camera_attr_get_gain()
+ * @see legacy_camera_attr_get_gain_range()
+ */
+int legacy_camera_attr_get_gain_step(camera_h camera, int *step);
+
+/**
  * @}
  */
 
index dd4f539..c8fe18c 100644 (file)
@@ -2488,6 +2488,51 @@ int legacy_camera_attr_set_hue(camera_h camera, int level)
 }
 
 
+int legacy_camera_attr_set_saturation(camera_h camera, int level)
+{
+       int ret = MM_ERROR_NONE;
+       camera_s *handle = (camera_s *)camera;
+
+       camera_return_val_if_fail(handle, CAMERA_ERROR_INVALID_PARAMETER);
+
+       ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
+               MMCAM_FILTER_SATURATION, level,
+               NULL);
+
+       return __convert_camera_error_code(__func__, ret);
+}
+
+
+int legacy_camera_attr_set_sharpness(camera_h camera, int level)
+{
+       int ret = MM_ERROR_NONE;
+       camera_s *handle = (camera_s *)camera;
+
+       camera_return_val_if_fail(handle, CAMERA_ERROR_INVALID_PARAMETER);
+
+       ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
+               MMCAM_FILTER_SHARPNESS, level,
+               NULL);
+
+       return __convert_camera_error_code(__func__, ret);
+}
+
+
+int legacy_camera_attr_set_gain(camera_h camera, int level)
+{
+       int ret = MM_ERROR_NONE;
+       camera_s *handle = (camera_s *)camera;
+
+       camera_return_val_if_fail(handle, CAMERA_ERROR_INVALID_PARAMETER);
+
+       ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
+               MMCAM_CAMERA_GAIN, level,
+               NULL);
+
+       return __convert_camera_error_code(__func__, ret);
+}
+
+
 int legacy_camera_attr_set_whitebalance(camera_h camera, camera_attr_whitebalance_e wb)
 {
        int ret = MM_ERROR_NONE;
@@ -2504,6 +2549,21 @@ int legacy_camera_attr_set_whitebalance(camera_h camera, camera_attr_whitebalanc
 }
 
 
+int legacy_camera_attr_set_whitebalance_temperature(camera_h camera, int temperature)
+{
+       int ret = MM_ERROR_NONE;
+       camera_s *handle = (camera_s *)camera;
+
+       camera_return_val_if_fail(handle, CAMERA_ERROR_INVALID_PARAMETER);
+
+       ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
+               MMCAM_FILTER_WB_TEMPERATURE, temperature,
+               NULL);
+
+       return __convert_camera_error_code(__func__, ret);
+}
+
+
 int legacy_camera_attr_set_effect(camera_h camera, camera_attr_effect_mode_e effect)
 {
        int ret = MM_ERROR_NONE;
@@ -2912,6 +2972,119 @@ int legacy_camera_attr_get_hue_range(camera_h camera, int *min, int *max)
 }
 
 
+int legacy_camera_attr_get_saturation(camera_h camera, int *level)
+{
+       int ret = MM_ERROR_NONE;
+       camera_s *handle = (camera_s *)camera;
+
+       camera_return_val_if_fail(handle && level, CAMERA_ERROR_INVALID_PARAMETER);
+
+       ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
+               MMCAM_FILTER_SATURATION, level,
+               NULL);
+
+       return __convert_camera_error_code(__func__, ret);
+}
+
+
+int legacy_camera_attr_get_saturation_range(camera_h camera, int *min, int *max)
+{
+       int ret = MM_ERROR_NONE;
+       camera_s *handle = (camera_s *)camera;
+       MMCamAttrsInfo ainfo;
+
+       camera_return_val_if_fail(handle && min && max, CAMERA_ERROR_INVALID_PARAMETER);
+
+       ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_FILTER_SATURATION, &ainfo);
+       if (ret == MM_ERROR_NONE) {
+               *min = ainfo.int_range.min;
+               *max = ainfo.int_range.max;
+       }
+
+       return __convert_camera_error_code(__func__, ret);
+}
+
+
+int legacy_camera_attr_get_sharpness(camera_h camera, int *level)
+{
+       int ret = MM_ERROR_NONE;
+       camera_s *handle = (camera_s *)camera;
+
+       camera_return_val_if_fail(handle && level, CAMERA_ERROR_INVALID_PARAMETER);
+
+       ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
+               MMCAM_FILTER_SHARPNESS, level,
+               NULL);
+
+       return __convert_camera_error_code(__func__, ret);
+}
+
+
+int legacy_camera_attr_get_sharpness_range(camera_h camera, int *min, int *max)
+{
+       int ret = MM_ERROR_NONE;
+       camera_s *handle = (camera_s *)camera;
+       MMCamAttrsInfo ainfo;
+
+       camera_return_val_if_fail(handle && min && max, CAMERA_ERROR_INVALID_PARAMETER);
+
+       ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_FILTER_SHARPNESS, &ainfo);
+       if (ret == MM_ERROR_NONE) {
+               *min = ainfo.int_range.min;
+               *max = ainfo.int_range.max;
+       }
+
+       return __convert_camera_error_code(__func__, ret);
+}
+
+
+int legacy_camera_attr_get_gain(camera_h camera, int *level)
+{
+       int ret = MM_ERROR_NONE;
+       camera_s *handle = (camera_s *)camera;
+
+       camera_return_val_if_fail(handle && level, CAMERA_ERROR_INVALID_PARAMETER);
+
+       ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
+               MMCAM_CAMERA_GAIN, level,
+               NULL);
+
+       return __convert_camera_error_code(__func__, ret);
+}
+
+
+int legacy_camera_attr_get_gain_range(camera_h camera, int *min, int *max)
+{
+       int ret = MM_ERROR_NONE;
+       camera_s *handle = (camera_s *)camera;
+       MMCamAttrsInfo ainfo;
+
+       camera_return_val_if_fail(handle && min && max, CAMERA_ERROR_INVALID_PARAMETER);
+
+       ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_CAMERA_GAIN, &ainfo);
+       if (ret == MM_ERROR_NONE) {
+               *min = ainfo.int_range.min;
+               *max = ainfo.int_range.max;
+       }
+
+       return __convert_camera_error_code(__func__, ret);
+}
+
+int legacy_camera_attr_get_gain_step(camera_h camera, int *step)
+{
+       int ret = MM_ERROR_NONE;
+       camera_s *handle = (camera_s *)camera;
+
+       camera_return_val_if_fail(handle && step, CAMERA_ERROR_INVALID_PARAMETER);
+
+       ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
+               MMCAM_CAMERA_GAIN_STEP, step,
+               NULL);
+
+       return __convert_camera_error_code(__func__, ret);
+}
+
+
 int legacy_camera_attr_get_whitebalance(camera_h camera, camera_attr_whitebalance_e *wb)
 {
        int ret = MM_ERROR_NONE;
@@ -2927,6 +3100,53 @@ int legacy_camera_attr_get_whitebalance(camera_h camera, camera_attr_whitebalanc
 }
 
 
+int legacy_camera_attr_get_whitebalance_temperature(camera_h camera, int *temperature)
+{
+       int ret = MM_ERROR_NONE;
+       camera_s *handle = (camera_s *)camera;
+
+       camera_return_val_if_fail(handle && temperature, CAMERA_ERROR_INVALID_PARAMETER);
+
+       ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
+               MMCAM_FILTER_WB_TEMPERATURE, temperature,
+               NULL);
+
+       return __convert_camera_error_code(__func__, ret);
+}
+
+
+int legacy_camera_attr_get_whitebalance_temperature_range(camera_h camera, int *min, int *max)
+{
+       int ret = MM_ERROR_NONE;
+       camera_s *handle = (camera_s *)camera;
+       MMCamAttrsInfo ainfo;
+
+       camera_return_val_if_fail(handle && min && max, CAMERA_ERROR_INVALID_PARAMETER);
+
+       ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_FILTER_WB_TEMPERATURE, &ainfo);
+       if (ret == MM_ERROR_NONE) {
+               *min = ainfo.int_range.min;
+               *max = ainfo.int_range.max;
+       }
+
+       return __convert_camera_error_code(__func__, ret);
+}
+
+int legacy_camera_attr_get_whitebalance_temperature_step(camera_h camera, int *step)
+{
+       int ret = MM_ERROR_NONE;
+       camera_s *handle = (camera_s *)camera;
+
+       camera_return_val_if_fail(handle && step, CAMERA_ERROR_INVALID_PARAMETER);
+
+       ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
+               MMCAM_FILTER_WB_TEMPERATURE_STEP, step,
+               NULL);
+
+       return __convert_camera_error_code(__func__, ret);
+}
+
+
 int legacy_camera_attr_get_effect(camera_h camera, camera_attr_effect_mode_e *effect)
 {
        int ret = MM_ERROR_NONE;
index e328735..fa43a3b 100644 (file)
@@ -195,20 +195,34 @@ typedef enum {
        MUSE_CAMERA_API_ATTR_GET_FLASH_BRIGHTNESS_RANGE,
        MUSE_CAMERA_API_SET_MEDIA_BRIDGE,
        MUSE_CAMERA_API_UNSET_MEDIA_BRIDGE,
-       MUSE_CAMERA_API_SET_EXTRA_PREVIEW_CB,      /* 160 */
+       MUSE_CAMERA_API_SET_EXTRA_PREVIEW_CB, /* 160 */
        MUSE_CAMERA_API_UNSET_EXTRA_PREVIEW_CB,
        MUSE_CAMERA_API_ATTR_SET_FOCUS_LEVEL,
        MUSE_CAMERA_API_ATTR_GET_FOCUS_LEVEL,
        MUSE_CAMERA_API_ATTR_GET_FOCUS_LEVEL_RANGE,
-       MUSE_CAMERA_API_SET_EXTRA_PREVIEW_STREAM_FORMAT,    /* 165 */
+       MUSE_CAMERA_API_SET_EXTRA_PREVIEW_STREAM_FORMAT, /* 165 */
        MUSE_CAMERA_API_GET_EXTRA_PREVIEW_STREAM_FORMAT,
        MUSE_CAMERA_API_ATTR_SET_EXTRA_PREVIEW_BITRATE,
        MUSE_CAMERA_API_ATTR_GET_EXTRA_PREVIEW_BITRATE,
        MUSE_CAMERA_API_ATTR_SET_EXTRA_PREVIEW_GOP_INTERVAL,
-       MUSE_CAMERA_API_ATTR_GET_EXTRA_PREVIEW_GOP_INTERVAL,    /* 170 */
+       MUSE_CAMERA_API_ATTR_GET_EXTRA_PREVIEW_GOP_INTERVAL, /* 170 */
        MUSE_CAMERA_API_SUPPORT_EXTRA_PREVIEW,
        MUSE_CAMERA_API_SET_EXTRA_PREVIEW_DEVICE,
        MUSE_CAMERA_API_REQUEST_CODEC_CONFIG,
+       MUSE_CAMERA_API_ATTR_SET_SATURATION,
+       MUSE_CAMERA_API_ATTR_GET_SATURATION, /* 175 */
+       MUSE_CAMERA_API_ATTR_GET_SATURATION_RANGE,
+       MUSE_CAMERA_API_ATTR_SET_SHARPNESS,
+       MUSE_CAMERA_API_ATTR_GET_SHARPNESS,
+       MUSE_CAMERA_API_ATTR_GET_SHARPNESS_RANGE,
+       MUSE_CAMERA_API_ATTR_SET_GAIN, /* 180 */
+       MUSE_CAMERA_API_ATTR_GET_GAIN,
+       MUSE_CAMERA_API_ATTR_GET_GAIN_RANGE,
+       MUSE_CAMERA_API_ATTR_GET_GAIN_STEP,
+       MUSE_CAMERA_API_ATTR_SET_WHITEBALANCE_TEMPERATURE,
+       MUSE_CAMERA_API_ATTR_GET_WHITEBALANCE_TEMPERATURE, /* 185 */
+       MUSE_CAMERA_API_ATTR_GET_WHITEBALANCE_TEMPERATURE_RANGE,
+       MUSE_CAMERA_API_ATTR_GET_WHITEBALANCE_TEMPERATURE_STEP,
        MUSE_CAMERA_API_MAX
 } muse_camera_api_e;
 
@@ -329,6 +343,12 @@ typedef enum {
        MUSE_CAMERA_GET_INT_FOCUS_LEVEL,
        MUSE_CAMERA_GET_INT_EXTRA_PREVIEW_BITRATE,
        MUSE_CAMERA_GET_INT_EXTRA_PREVIEW_GOP_INTERVAL,
+       MUSE_CAMERA_GET_INT_SATURATION,
+       MUSE_CAMERA_GET_INT_SHARPNESS,
+       MUSE_CAMERA_GET_INT_GAIN,
+       MUSE_CAMERA_GET_INT_GAIN_STEP,
+       MUSE_CAMERA_GET_INT_WHITE_BALANCE_TEMPERATURE,
+       MUSE_CAMERA_GET_INT_WHITE_BALANCE_TEMPERATURE_STEP,
        MUSE_CAMERA_GET_INT_NUM
 } muse_camera_get_int_e;
 
@@ -345,6 +365,10 @@ typedef enum {
        MUSE_CAMERA_GET_INT_PAIR_HUE_RANGE,
        MUSE_CAMERA_GET_INT_PAIR_FLASH_BRIGHTNESS_RANGE,
        MUSE_CAMERA_GET_INT_PAIR_FOCUS_LEVEL_RANGE,
+       MUSE_CAMERA_GET_INT_PAIR_SATURATION_RANGE,
+       MUSE_CAMERA_GET_INT_PAIR_SHARPNESS_RANGE,
+       MUSE_CAMERA_GET_INT_PAIR_GAIN_RANGE,
+       MUSE_CAMERA_GET_INT_PAIR_WHITE_BALANCE_TEMPERATURE_RANGE,
        MUSE_CAMERA_GET_INT_PAIR_NUM
 } muse_camera_get_int_pair_e;
 
index fbb2fe9..e3b455d 100644 (file)
@@ -3337,6 +3337,29 @@ int camera_dispatcher_attr_set_whitebalance(muse_module_h module)
        return MUSE_CAMERA_ERROR_NONE;
 }
 
+int camera_dispatcher_attr_set_whitebalance_temperature(muse_module_h module)
+{
+       int ret = CAMERA_ERROR_NONE;
+       muse_camera_handle_s *muse_camera = NULL;
+       int temperature;
+       muse_camera_api_e api = MUSE_CAMERA_API_ATTR_SET_WHITEBALANCE_TEMPERATURE;
+       muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
+
+       muse_camera = (muse_camera_handle_s *)muse_server_ipc_get_handle(module);
+
+       muse_camera_msg_get(temperature, muse_server_module_get_msg(module));
+
+       CAM_LOG_INFO("handle[%p], temperature[%d]", muse_camera, temperature);
+
+       ret = legacy_camera_attr_set_whitebalance_temperature(muse_camera->camera_handle, temperature);
+
+       CAM_LOG_INFO("ret[0x%x]", ret);
+
+       muse_camera_msg_return(api, class, ret, module);
+
+       return MUSE_CAMERA_ERROR_NONE;
+}
+
 int camera_dispatcher_attr_set_effect(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
@@ -3383,6 +3406,75 @@ int camera_dispatcher_attr_set_scene_mode(muse_module_h module)
        return MUSE_CAMERA_ERROR_NONE;
 }
 
+int camera_dispatcher_attr_set_saturation(muse_module_h module)
+{
+       int ret = CAMERA_ERROR_NONE;
+       muse_camera_handle_s *muse_camera = NULL;
+       int level;
+       muse_camera_api_e api = MUSE_CAMERA_API_ATTR_SET_SATURATION;
+       muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
+
+       muse_camera = (muse_camera_handle_s *)muse_server_ipc_get_handle(module);
+
+       muse_camera_msg_get(level, muse_server_module_get_msg(module));
+
+       CAM_LOG_INFO("handle[%p], level[%d]", muse_camera, level);
+
+       ret = legacy_camera_attr_set_saturation(muse_camera->camera_handle, level);
+
+       CAM_LOG_INFO("ret[0x%x]", ret);
+
+       muse_camera_msg_return(api, class, ret, module);
+
+       return MUSE_CAMERA_ERROR_NONE;
+}
+
+int camera_dispatcher_attr_set_sharpness(muse_module_h module)
+{
+       int ret = CAMERA_ERROR_NONE;
+       muse_camera_handle_s *muse_camera = NULL;
+       int level;
+       muse_camera_api_e api = MUSE_CAMERA_API_ATTR_SET_SHARPNESS;
+       muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
+
+       muse_camera = (muse_camera_handle_s *)muse_server_ipc_get_handle(module);
+
+       muse_camera_msg_get(level, muse_server_module_get_msg(module));
+
+       CAM_LOG_INFO("handle[%p], level[%d]", muse_camera, level);
+
+       ret = legacy_camera_attr_set_sharpness(muse_camera->camera_handle, level);
+
+       CAM_LOG_INFO("ret[0x%x]", ret);
+
+       muse_camera_msg_return(api, class, ret, module);
+
+       return MUSE_CAMERA_ERROR_NONE;
+}
+
+int camera_dispatcher_attr_set_gain(muse_module_h module)
+{
+       int ret = CAMERA_ERROR_NONE;
+       muse_camera_handle_s *muse_camera = NULL;
+       int level;
+       muse_camera_api_e api = MUSE_CAMERA_API_ATTR_SET_GAIN;
+       muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
+
+       muse_camera = (muse_camera_handle_s *)muse_server_ipc_get_handle(module);
+
+       muse_camera_msg_get(level, muse_server_module_get_msg(module));
+
+       CAM_LOG_INFO("handle[%p], level[%d]", muse_camera, level);
+
+       ret = legacy_camera_attr_set_gain(muse_camera->camera_handle, level);
+
+       CAM_LOG_INFO("ret[0x%x]", ret);
+
+       muse_camera_msg_return(api, class, ret, module);
+
+       return MUSE_CAMERA_ERROR_NONE;
+}
+
 int camera_dispatcher_attr_enable_tag(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
@@ -3823,7 +3915,7 @@ int camera_dispatcher_attr_get_hue(muse_module_h module)
        ret = legacy_camera_attr_get_hue(muse_camera->camera_handle, &get_value);
        if (ret == CAMERA_ERROR_NONE) {
                muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
-                       MUSE_CAMERA_GET_INT_CONTRAST, "get_value", get_value, NULL);
+                       MUSE_CAMERA_GET_INT_HUE, "get_value", get_value, NULL);
        } else {
                muse_camera_msg_return(api, class, ret, module);
        }
@@ -3855,6 +3947,170 @@ int camera_dispatcher_attr_get_hue_range(muse_module_h module)
        return MUSE_CAMERA_ERROR_NONE;
 }
 
+int camera_dispatcher_attr_get_saturation(muse_module_h module)
+{
+       int ret = CAMERA_ERROR_NONE;
+       muse_camera_handle_s *muse_camera = NULL;
+       int get_value = 0;
+       muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_SATURATION;
+       muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
+
+       muse_camera = (muse_camera_handle_s *)muse_server_ipc_get_handle(module);
+
+       CAM_LOG_INFO("handle[%p]", muse_camera);
+
+       ret = legacy_camera_attr_get_saturation(muse_camera->camera_handle, &get_value);
+       if (ret == CAMERA_ERROR_NONE) {
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_SATURATION, "get_value", get_value, NULL);
+       } else {
+               muse_camera_msg_return(api, class, ret, module);
+       }
+
+       return MUSE_CAMERA_ERROR_NONE;
+}
+
+int camera_dispatcher_attr_get_saturation_range(muse_module_h module)
+{
+       int ret = CAMERA_ERROR_NONE;
+       muse_camera_handle_s *muse_camera = NULL;
+       int get_value0 = 0;
+       int get_value1 = 0;
+       muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_SATURATION_RANGE;
+       muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
+       muse_camera_get_type_e get_type = MUSE_CAMERA_GET_TYPE_INT_PAIR;
+       muse_camera_get_int_pair_e index = MUSE_CAMERA_GET_INT_PAIR_SATURATION_RANGE;
+
+       muse_camera = (muse_camera_handle_s *)muse_server_ipc_get_handle(module);
+
+       CAM_LOG_INFO("handle[%p]", muse_camera);
+
+       ret = legacy_camera_attr_get_saturation_range(muse_camera->camera_handle, &get_value0, &get_value1);
+       if (ret == CAMERA_ERROR_NONE)
+               muse_camera_msg_return2(api, class, ret, module, get_type, index, get_value0, get_value1);
+       else
+               muse_camera_msg_return(api, class, ret, module);
+
+       return MUSE_CAMERA_ERROR_NONE;
+}
+
+int camera_dispatcher_attr_get_sharpness(muse_module_h module)
+{
+       int ret = CAMERA_ERROR_NONE;
+       muse_camera_handle_s *muse_camera = NULL;
+       int get_value = 0;
+       muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_SHARPNESS;
+       muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
+
+       muse_camera = (muse_camera_handle_s *)muse_server_ipc_get_handle(module);
+
+       CAM_LOG_INFO("handle[%p]", muse_camera);
+
+       ret = legacy_camera_attr_get_sharpness(muse_camera->camera_handle, &get_value);
+       if (ret == CAMERA_ERROR_NONE) {
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_SHARPNESS, "get_value", get_value, NULL);
+       } else {
+               muse_camera_msg_return(api, class, ret, module);
+       }
+
+       return MUSE_CAMERA_ERROR_NONE;
+}
+
+int camera_dispatcher_attr_get_sharpness_range(muse_module_h module)
+{
+       int ret = CAMERA_ERROR_NONE;
+       muse_camera_handle_s *muse_camera = NULL;
+       int get_value0 = 0;
+       int get_value1 = 0;
+       muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_SHARPNESS_RANGE;
+       muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
+       muse_camera_get_type_e get_type = MUSE_CAMERA_GET_TYPE_INT_PAIR;
+       muse_camera_get_int_pair_e index = MUSE_CAMERA_GET_INT_PAIR_SHARPNESS_RANGE;
+
+       muse_camera = (muse_camera_handle_s *)muse_server_ipc_get_handle(module);
+
+       CAM_LOG_INFO("handle[%p]", muse_camera);
+
+       ret = legacy_camera_attr_get_sharpness_range(muse_camera->camera_handle, &get_value0, &get_value1);
+       if (ret == CAMERA_ERROR_NONE)
+               muse_camera_msg_return2(api, class, ret, module, get_type, index, get_value0, get_value1);
+       else
+               muse_camera_msg_return(api, class, ret, module);
+
+       return MUSE_CAMERA_ERROR_NONE;
+}
+
+int camera_dispatcher_attr_get_gain(muse_module_h module)
+{
+       int ret = CAMERA_ERROR_NONE;
+       muse_camera_handle_s *muse_camera = NULL;
+       int get_value = 0;
+       muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_GAIN;
+       muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
+
+       muse_camera = (muse_camera_handle_s *)muse_server_ipc_get_handle(module);
+
+       CAM_LOG_INFO("handle[%p]", muse_camera);
+
+       ret = legacy_camera_attr_get_gain(muse_camera->camera_handle, &get_value);
+       if (ret == CAMERA_ERROR_NONE) {
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_GAIN, "get_value", get_value, NULL);
+       } else {
+               muse_camera_msg_return(api, class, ret, module);
+       }
+
+       return MUSE_CAMERA_ERROR_NONE;
+}
+
+int camera_dispatcher_attr_get_gain_range(muse_module_h module)
+{
+       int ret = CAMERA_ERROR_NONE;
+       muse_camera_handle_s *muse_camera = NULL;
+       int get_value0 = 0;
+       int get_value1 = 0;
+       muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_GAIN_RANGE;
+       muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
+       muse_camera_get_type_e get_type = MUSE_CAMERA_GET_TYPE_INT_PAIR;
+       muse_camera_get_int_pair_e index = MUSE_CAMERA_GET_INT_PAIR_GAIN_RANGE;
+
+       muse_camera = (muse_camera_handle_s *)muse_server_ipc_get_handle(module);
+
+       CAM_LOG_INFO("handle[%p]", muse_camera);
+
+       ret = legacy_camera_attr_get_gain_range(muse_camera->camera_handle, &get_value0, &get_value1);
+       if (ret == CAMERA_ERROR_NONE)
+               muse_camera_msg_return2(api, class, ret, module, get_type, index, get_value0, get_value1);
+       else
+               muse_camera_msg_return(api, class, ret, module);
+
+       return MUSE_CAMERA_ERROR_NONE;
+}
+
+int camera_dispatcher_attr_get_gain_step(muse_module_h module)
+{
+       int ret = CAMERA_ERROR_NONE;
+       muse_camera_handle_s *muse_camera = NULL;
+       int get_value = 0;
+       muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_GAIN_STEP;
+       muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
+
+       muse_camera = (muse_camera_handle_s *)muse_server_ipc_get_handle(module);
+
+       CAM_LOG_INFO("handle[%p]", muse_camera);
+
+       ret = legacy_camera_attr_get_gain_step(muse_camera->camera_handle, &get_value);
+       if (ret == CAMERA_ERROR_NONE) {
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_GAIN_STEP, "get_value", get_value, NULL);
+       } else {
+               muse_camera_msg_return(api, class, ret, module);
+       }
+
+       return MUSE_CAMERA_ERROR_NONE;
+}
+
 int camera_dispatcher_attr_get_whitebalance(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
@@ -3878,6 +4134,76 @@ int camera_dispatcher_attr_get_whitebalance(muse_module_h module)
        return MUSE_CAMERA_ERROR_NONE;
 }
 
+int camera_dispatcher_attr_get_whitebalance_temperature(muse_module_h module)
+{
+       int ret = CAMERA_ERROR_NONE;
+       muse_camera_handle_s *muse_camera = NULL;
+       int get_value = 0;
+       muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_WHITEBALANCE_TEMPERATURE;
+       muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
+
+       muse_camera = (muse_camera_handle_s *)muse_server_ipc_get_handle(module);
+
+       CAM_LOG_INFO("handle[%p]", muse_camera);
+
+       ret = legacy_camera_attr_get_whitebalance_temperature(muse_camera->camera_handle, &get_value);
+       if (ret == CAMERA_ERROR_NONE) {
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_WHITE_BALANCE_TEMPERATURE, "get_value", get_value, NULL);
+       } else {
+               muse_camera_msg_return(api, class, ret, module);
+       }
+
+       return MUSE_CAMERA_ERROR_NONE;
+}
+
+int camera_dispatcher_attr_get_whitebalance_temperature_range(muse_module_h module)
+{
+       int ret = CAMERA_ERROR_NONE;
+       muse_camera_handle_s *muse_camera = NULL;
+       int get_value0 = 0;
+       int get_value1 = 0;
+       muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_WHITEBALANCE_TEMPERATURE_RANGE;
+       muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
+       muse_camera_get_type_e get_type = MUSE_CAMERA_GET_TYPE_INT_PAIR;
+       muse_camera_get_int_pair_e index = MUSE_CAMERA_GET_INT_PAIR_WHITE_BALANCE_TEMPERATURE_RANGE;
+
+       muse_camera = (muse_camera_handle_s *)muse_server_ipc_get_handle(module);
+
+       CAM_LOG_INFO("handle[%p]", muse_camera);
+
+       ret = legacy_camera_attr_get_whitebalance_temperature_range(muse_camera->camera_handle, &get_value0, &get_value1);
+       if (ret == CAMERA_ERROR_NONE)
+               muse_camera_msg_return2(api, class, ret, module, get_type, index, get_value0, get_value1);
+       else
+               muse_camera_msg_return(api, class, ret, module);
+
+       return MUSE_CAMERA_ERROR_NONE;
+}
+
+int camera_dispatcher_attr_get_whitebalance_temperature_step(muse_module_h module)
+{
+       int ret = CAMERA_ERROR_NONE;
+       muse_camera_handle_s *muse_camera = NULL;
+       int get_value = 0;
+       muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_WHITEBALANCE_TEMPERATURE_STEP;
+       muse_camera_api_class_e class = MUSE_CAMERA_API_CLASS_IMMEDIATE;
+
+       muse_camera = (muse_camera_handle_s *)muse_server_ipc_get_handle(module);
+
+       CAM_LOG_INFO("handle[%p]", muse_camera);
+
+       ret = legacy_camera_attr_get_whitebalance_temperature_step(muse_camera->camera_handle, &get_value);
+       if (ret == CAMERA_ERROR_NONE) {
+               muse_camera_msg_return1(api, class, ret, module, MUSE_CAMERA_GET_TYPE_INT,
+                       MUSE_CAMERA_GET_INT_WHITE_BALANCE_TEMPERATURE_STEP, "get_value", get_value, NULL);
+       } else {
+               muse_camera_msg_return(api, class, ret, module);
+       }
+
+       return MUSE_CAMERA_ERROR_NONE;
+}
+
 int camera_dispatcher_attr_get_effect(muse_module_h module)
 {
        int ret = CAMERA_ERROR_NONE;
@@ -6016,7 +6342,21 @@ int (*dispatcher[MUSE_CAMERA_API_MAX]) (muse_module_h module) = {
        camera_dispatcher_attr_get_extra_preview_gop_interval, /* MUSE_CAMERA_API_ATTR_GET_EXTRA_PREVIEW_GOP_INTERVAL */
        camera_dispatcher_is_supported_extra_preview, /* MUSE_CAMERA_API_SUPPORT_EXTRA_PREVIEW, */
        camera_dispatcher_set_extra_preview_device, /* MUSE_CAMERA_API_SET_EXTRA_PREVIEW_DEVICE */
-       camera_dispatcher_request_codec_config /* MUSE_CAMERA_API_REQUEST_CODEC_CONFIG */
+       camera_dispatcher_request_codec_config, /* MUSE_CAMERA_API_REQUEST_CODEC_CONFIG */
+       camera_dispatcher_attr_set_saturation, /* MUSE_CAMERA_API_ATTR_SET_SATURATION */
+       camera_dispatcher_attr_get_saturation, /* MUSE_CAMERA_API_ATTR_GET_SATURATION */
+       camera_dispatcher_attr_get_saturation_range, /* MUSE_CAMERA_API_ATTR_GET_SATURATION_RANGE */
+       camera_dispatcher_attr_set_sharpness, /* MUSE_CAMERA_API_ATTR_SET_SHARPNESS */
+       camera_dispatcher_attr_get_sharpness, /* MUSE_CAMERA_API_ATTR_GET_SHARPNESS */
+       camera_dispatcher_attr_get_sharpness_range, /* MUSE_CAMERA_API_ATTR_GET_SHARPNESS_RANGE */
+       camera_dispatcher_attr_set_gain, /* MUSE_CAMERA_API_ATTR_SET_GAIN */
+       camera_dispatcher_attr_get_gain, /* MUSE_CAMERA_API_ATTR_GET_GAIN */
+       camera_dispatcher_attr_get_gain_range, /* MUSE_CAMERA_API_ATTR_GET_GAIN_RANGE */
+       camera_dispatcher_attr_get_gain_step, /* MUSE_CAMERA_API_ATTR_GET_GAIN_STEP */
+       camera_dispatcher_attr_set_whitebalance_temperature, /* MUSE_CAMERA_API_ATTR_SET_WHITEBALANCE_TEMPERATURE */
+       camera_dispatcher_attr_get_whitebalance_temperature, /* MUSE_CAMERA_API_ATTR_GET_WHITEBALANCE_TEMPERATURE */
+       camera_dispatcher_attr_get_whitebalance_temperature_range, /* MUSE_CAMERA_API_ATTR_GET_WHITEBALANCE_TEMPERATURE_RANGE */
+       camera_dispatcher_attr_get_whitebalance_temperature_step /* MUSE_CAMERA_API_ATTR_GET_WHITEBALANCE_TEMPERATURE_STEP */
 };
 
 
index 842d377..431e7cd 100644 (file)
@@ -1,6 +1,6 @@
 Name:       mmsvc-camera
 Summary:    A Camera module for muse server
-Version:    0.3.56
+Version:    0.3.57
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0