int camera_device_manager_remove_device_list_changed_cb(camera_device_manager_h manager, int cb_id);
/**
+ * @internal
+ * @brief Sets the brightness level of flash.
+ * @since_tizen 6.5
+ * @remarks If the min value is greater than the max value from camera_attr_get_flash_brightness_range(), \n
+ * it means that this feature is not supported.
+ * @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_INVALID_STATE Invalid state
+ * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
+ * @see camera_attr_get_flash_brightness()
+ * @see camera_attr_get_flash_brightness_range()
+ */
+int camera_attr_set_flash_brightness(camera_h camera, int level);
+
+/**
+ * @internal
+ * @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
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @see camera_attr_set_flash_brightness()
+ * @see camera_attr_get_flash_brightness_range()
+ */
+int camera_attr_get_flash_brightness(camera_h camera, int *level);
+
+/**
+ * @internal
+ * @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
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @see camera_attr_set_flash_brightness()
+ * @see camera_attr_get_flash_brightness()
+ */
+int camera_attr_get_flash_brightness_range(camera_h camera, int *min, int *max);
+
+/**
* @}
*/
#ifdef __cplusplus
int _camera_independent_request(int api, int device_type, const char *key, int *value);
int _camera_set_display(camera_h camera, mm_display_type_e type, void *display);
int _camera_create_private(camera_device_e device, bool is_network, camera_h *camera);
+void _camera_msg_send(int api, int *fds, camera_cb_info_s *cb_info,
+ int *ret, int timeout);
+void _camera_msg_send_param1(int api, camera_cb_info_s *cb_info,
+ int *ret, camera_msg_param *param, int timeout);
+void _camera_msg_send_param2_int(int api, camera_cb_info_s *cb_info,
+ int *ret, camera_msg_param *param0, camera_msg_param *param1, int timeout);
+void _camera_msg_return_buffer(int ret_fd, camera_cb_info_s *cb_info);
typedef bool (*camera_supported_cb_param1)(int param, void *user_data);
typedef bool (*camera_supported_cb_param2)(int param1, int param2, void *user_data);
Name: capi-media-camera
Summary: A Camera API
-Version: 0.4.44
+Version: 0.4.45
Release: 0
Group: Multimedia/API
License: Apache-2.0
/* log level */
int g_mmcam_log_level = CAMERA_LOG_LEVEL_INFO;
-static void _camera_msg_send(int api, int *fds, camera_cb_info_s *cb_info,
- int *ret, int timeout);
-static void _camera_msg_send_param1(int api, camera_cb_info_s *cb_info,
- int *ret, camera_msg_param *param, int timeout);
-static void _camera_msg_send_param2_int(int api, camera_cb_info_s *cb_info,
- int *ret, camera_msg_param *param0, camera_msg_param *param1, int timeout);
-static void _camera_msg_return_buffer(int ret_fd, camera_cb_info_s *cb_info);
static bool _camera_import_tbm_fd(tbm_bufmgr bufmgr, int fd, tbm_bo *bo, tbm_bo_handle *bo_handle);
static void _camera_release_imported_bo(tbm_bo *bo);
static int _camera_media_packet_create(camera_cb_info_s *cb_info, camera_stream_data_s *stream,
}
-static void _camera_msg_send(int api, int *fds, camera_cb_info_s *cb_info,
+void _camera_msg_send(int api, int *fds, camera_cb_info_s *cb_info,
int *ret, int timeout)
{
int send_ret = 0;
}
-static void _camera_msg_send_param1(int api, camera_cb_info_s *cb_info,
+void _camera_msg_send_param1(int api, camera_cb_info_s *cb_info,
int *ret, camera_msg_param *param, int timeout)
{
int send_ret = 0;
}
-static void _camera_msg_send_param2_int(int api, camera_cb_info_s *cb_info,
+void _camera_msg_send_param2_int(int api, camera_cb_info_s *cb_info,
int *ret, camera_msg_param *param0, camera_msg_param *param1, int timeout)
{
int func_ret = CAMERA_ERROR_NONE;
}
-static void _camera_msg_return_buffer(int ret_fd, camera_cb_info_s *cb_info)
+void _camera_msg_return_buffer(int ret_fd, camera_cb_info_s *cb_info)
{
camera_msg_param param;
return ret;
}
+
+
+int camera_attr_set_flash_brightness(camera_h camera, int level)
+{
+ int ret = CAMERA_ERROR_NONE;
+ camera_cli_s *pc = (camera_cli_s *)camera;
+ muse_camera_api_e api = MUSE_CAMERA_API_ATTR_SET_FLASH_BRIGHTNESS;
+ camera_msg_param param;
+
+ if (!pc || !pc->cb_info) {
+ CAM_LOG_ERROR("NULL handle");
+ return CAMERA_ERROR_INVALID_PARAMETER;
+ }
+
+ CAM_LOG_INFO("Enter");
+
+ CAMERA_MSG_PARAM_SET(param, INT, level);
+
+ _camera_msg_send_param1(api, pc->cb_info, &ret, ¶m, CAMERA_CB_TIMEOUT);
+
+ CAM_LOG_INFO("ret : 0x%x", ret);
+
+ return ret;
+}
+
+
+int camera_attr_get_flash_brightness(camera_h camera, int *level)
+{
+ int ret = CAMERA_ERROR_NONE;
+ camera_cli_s *pc = (camera_cli_s *)camera;
+ muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_FLASH_BRIGHTNESS;
+
+ if (!pc || !pc->cb_info || !level) {
+ CAM_LOG_ERROR("NULL pointer %p %p", pc, level);
+ return CAMERA_ERROR_INVALID_PARAMETER;
+ }
+
+ CAM_LOG_INFO("Enter");
+
+ _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
+
+ if (ret == CAMERA_ERROR_NONE)
+ *level = pc->cb_info->get_int[MUSE_CAMERA_GET_INT_FLASH_BRIGHTNESS];
+
+ CAM_LOG_INFO("ret : 0x%x", ret);
+
+ return ret;
+}
+
+
+int camera_attr_get_flash_brightness_range(camera_h camera, int *min, int *max)
+{
+ int ret = CAMERA_ERROR_NONE;
+ camera_cli_s *pc = (camera_cli_s *)camera;
+ muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_FLASH_BRIGHTNESS_RANGE;
+
+ if (!pc || !pc->cb_info || !min || !max) {
+ CAM_LOG_ERROR("NULL pointer %p %p %p", pc, min, max);
+ return CAMERA_ERROR_INVALID_PARAMETER;
+ }
+
+ CAM_LOG_INFO("Enter");
+
+ _camera_msg_send(api, NULL, pc->cb_info, &ret, CAMERA_CB_TIMEOUT);
+
+ if (ret == CAMERA_ERROR_NONE) {
+ *min = pc->cb_info->get_int_pair[MUSE_CAMERA_GET_INT_PAIR_FLASH_BRIGHTNESS_RANGE][0];
+ *max = pc->cb_info->get_int_pair[MUSE_CAMERA_GET_INT_PAIR_FLASH_BRIGHTNESS_RANGE][1];
+ }
+
+ CAM_LOG_INFO("ret : 0x%x", ret);
+
+ return ret;
+}
g_print("\t >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> [etc.]\n");
g_print("\t 'z' Strobe (Flash) \n");
g_print("\t 'S' Strobe (Flash) state\n");
+ g_print("\t 'G' Strobe (Flash) brightness\n");
g_print("\t 'x' Capture mode (Still/Multishot/HDR)\n");
g_print("\t 'l' Face detection \n");
g_print("\t 'k' Anti-handshake \n");
else
g_print("* Error : %d\n", err);
break;
+ case 'G': /* Setting > flash brightness */
+ g_print("*Flash brightness !\n");
+ camera_attr_get_flash_brightness_range(hcamcorder->camera, &min, &max);
+ g_print("\n Select flash brightness min(%d) - max(%d) > ", min, max);
+ err = scanf("%d", &idx);
+ flush_stdin();
+ bret = camera_attr_set_flash_brightness(hcamcorder->camera, idx);
+ break;
case 'x': /* Setting > Capture mode ,Muitishot? */
g_print("*Select Capture mode!\n");
g_print(" \n\t1. Stillshot mode\n\t2. Multishot mode\n\t3. HDR capture\n");