int legacy_camera_attr_get_brightness_range(camera_h camera, int *min, int *max);
/**
+ * @brief Sets the brightness level of flash.
+ * @since_tizen 6.5
+ * @param[in] camera The handle to the camera
+ * @param[in] level The brightness level of flash
+ * @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_flash_brightness()
+ * @see legacy_camera_attr_get_flash_brightness_range()
+ */
+int legacy_camera_attr_set_flash_brightness(camera_h camera, int level);
+
+/**
+ * @brief Gets the brightness level of flash.
+ * @since_tizen 6.5
+ * @param[in] camera The handle to the camera
+ * @param[out] level The brightness level of flash
+ * @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_flash_brightness()
+ * @see legacy_camera_attr_get_flash_brightness_range()
+ */
+int legacy_camera_attr_get_flash_brightness(camera_h camera, int *level);
+
+/**
+ * @brief Gets the available brightness level of flash.
+ * @since_tizen @6.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 brightness level of flash
+ * @param[out] max The maximum brightness level of flash
+ * @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_flash_brightness()
+ * @see legacy_camera_attr_get_flash_brightness()
+ */
+int legacy_camera_attr_get_flash_brightness_range(camera_h camera, int *min, int *max);
+
+/**
* @brief Sets the contrast level.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
return __convert_camera_error_code(__func__, ret);
}
+
+
+int legacy_camera_attr_set_flash_brightness(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_STROBE_BRIGHTNESS, level,
+ NULL);
+
+ return __convert_camera_error_code(__func__, ret);
+}
+
+
+int legacy_camera_attr_get_flash_brightness(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_STROBE_BRIGHTNESS, level,
+ NULL);
+
+ return __convert_camera_error_code(__func__, ret);
+}
+
+
+int legacy_camera_attr_get_flash_brightness_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_STROBE_BRIGHTNESS, &ainfo);
+ if (ret == MM_ERROR_NONE) {
+ *min = ainfo.int_range.min;
+ *max = ainfo.int_range.max;
+ }
+
+ return __convert_camera_error_code(__func__, ret);
+}
MUSE_CAMERA_API_ATTR_SET_HUE,
MUSE_CAMERA_API_ATTR_GET_HUE,
MUSE_CAMERA_API_ATTR_GET_HUE_RANGE,
-
+ MUSE_CAMERA_API_ATTR_SET_FLASH_BRIGHTNESS,
+ MUSE_CAMERA_API_ATTR_GET_FLASH_BRIGHTNESS,
+ MUSE_CAMERA_API_ATTR_GET_FLASH_BRIGHTNESS_RANGE,
MUSE_CAMERA_API_MAX
} muse_camera_api_e;
MUSE_CAMERA_GET_INT_ENCODED_PREVIEW_BITRATE,
MUSE_CAMERA_GET_INT_ENCODED_PREVIEW_GOP_INTERVAL,
MUSE_CAMERA_GET_INT_HUE,
+ MUSE_CAMERA_GET_INT_FLASH_BRIGHTNESS,
MUSE_CAMERA_GET_INT_NUM
} muse_camera_get_int_e;
MUSE_CAMERA_GET_INT_PAIR_PAN_RANGE,
MUSE_CAMERA_GET_INT_PAIR_TILT_RANGE,
MUSE_CAMERA_GET_INT_PAIR_HUE_RANGE,
+ MUSE_CAMERA_GET_INT_PAIR_FLASH_BRIGHTNESS_RANGE,
MUSE_CAMERA_GET_INT_PAIR_NUM
} muse_camera_get_int_pair_e;
return MUSE_CAMERA_ERROR_NONE;
}
+int camera_dispatcher_attr_set_flash_brightness(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_FLASH_BRIGHTNESS;
+ 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_flash_brightness(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_get_flash_brightness(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_FLASH_BRIGHTNESS;
+ 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_flash_brightness(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_FLASH_BRIGHTNESS, "get_value", get_value, NULL);
+ } else {
+ muse_camera_msg_return(api, class, ret, module);
+ }
+
+ return MUSE_CAMERA_ERROR_NONE;
+}
+
+
+int camera_dispatcher_attr_get_flash_brightness_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_FLASH_BRIGHTNESS_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_FLASH_BRIGHTNESS_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_flash_brightness_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;
+}
+
static tbm_bo __camera_normal_buffer_bo_new(MMCamcorderVideoStreamDataType *stream, tbm_bufmgr bufmgr)
{
camera_dispatcher_get_display_reuse_hint, /* MUSE_CAMERA_API_GET_DISPLAY_REUSE_HINT */
camera_dispatcher_change_device, /* MUSE_CAMERA_API_CHANGE_DEVICE */
camera_dispatcher_get_device_state, /* MUSE_CAMERA_API_GET_DEVICE_STATE */
- camera_dispatcher_set_interrupt_started_cb, /* MUSE_CAMERA_API_SET_INTERRUPT_STARTED_CB, */
- camera_dispatcher_unset_interrupt_started_cb, /* MUSE_CAMERA_API_UNSET_INTERRUPT_STARTED_CB, */
- camera_dispatcher_attr_set_hue, /* MUSE_CAMERA_API_ATTR_SET_HUE, */
- camera_dispatcher_attr_get_hue, /* MUSE_CAMERA_API_ATTR_GET_HUE, */
- camera_dispatcher_attr_get_hue_range /* MUSE_CAMERA_API_ATTR_GET_HUE_RANGE, */
+ camera_dispatcher_set_interrupt_started_cb, /* MUSE_CAMERA_API_SET_INTERRUPT_STARTED_CB */
+ camera_dispatcher_unset_interrupt_started_cb, /* MUSE_CAMERA_API_UNSET_INTERRUPT_STARTED_CB */
+ camera_dispatcher_attr_set_hue, /* MUSE_CAMERA_API_ATTR_SET_HUE */
+ camera_dispatcher_attr_get_hue, /* MUSE_CAMERA_API_ATTR_GET_HUE */
+ camera_dispatcher_attr_get_hue_range, /* MUSE_CAMERA_API_ATTR_GET_HUE_RANGE */
+ camera_dispatcher_attr_set_flash_brightness, /* MUSE_CAMERA_API_ATTR_SET_FLASH_BRIGHTNESS */
+ camera_dispatcher_attr_get_flash_brightness, /* MUSE_CAMERA_API_ATTR_GET_FLASH_BRIGHTNESS */
+ camera_dispatcher_attr_get_flash_brightness_range /* MUSE_CAMERA_API_ATTR_GET_FLASH_BRIGHTNESS_RANGE */
};
Name: mmsvc-camera
Summary: A Camera module for muse server
-Version: 0.3.38
+Version: 0.3.39
Release: 0
Group: Multimedia/Libraries
License: Apache-2.0