int camera_attr_get_focus_level_range(camera_h camera, int *min, int *max);
/**
+ * @internal
+ * @brief Sets device for the extra preview stream.
+ * @since_tizen 7.0
+ * @param[in] camera The handle to the camera
+ * @param[in] stream_id The id of extra preview stream
+ * @param[in] device The camera type
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @pre The camera state must be set to #CAMERA_STATE_CREATED.
+ * @see camera_set_extra_preview_cb()
+ * @see camera_unset_extra_preview_cb()
+ */
+int camera_set_extra_preview_device(camera_h camera, int stream_id, camera_device_e device);
+
+/**
* @}
*/
#ifdef __cplusplus
LOGD("[V] "format, ##args); \
} while (0)
+#define CAMERA_CHECK_HANDLE_RETURN(pc) \
+ do {\
+ if (!pc || !pc->cb_info) {\
+ CAM_LOG_ERROR("NULL handle[%p]", pc);\
+ return;\
+ }\
+ } while (0)
+
+#define CAMERA_CHECK_HANDLE_RETURN_VAL(pc, val) \
+ do {\
+ if (!pc || !pc->cb_info) {\
+ CAM_LOG_ERROR("NULL handle[%p]", pc);\
+ return (val);\
+ }\
+ } while (0)
+
enum {
CAMERA_MESSAGE_HANDLER_TYPE_GENERAL,
void _camera_msg_return_buffer(int ret_fd, camera_cb_info_s *cb_info);
int _camera_client_wait_for_cb_return(muse_camera_api_e api, camera_cb_info_s *cb_info, int time_out);
void _camera_update_api_waiting(camera_cb_info_s *cb_info, int api, int value);
+void _camera_send_message_get_return(camera_cb_info_s *cb_info, muse_camera_api_e api, char *msg,
+ int time_out, int *ret);
int _camera_get_log_level(void);
typedef bool (*camera_supported_cb_param1)(int param, void *user_data);
Name: capi-media-camera
Summary: A Camera API
-Version: 0.4.89
+Version: 0.4.90
Release: 0
Group: Multimedia/API
License: Apache-2.0
return CAMERA_ERROR_NOT_SUPPORTED;\
}\
} while (0)
-#define CAMERA_CHECK_HANDLE_RETURN(pc) \
- do {\
- if (!pc || !pc->cb_info) {\
- CAM_LOG_ERROR("NULL handle[%p]", pc);\
- return;\
- }\
- } while (0)
-#define CAMERA_CHECK_HANDLE_RETURN_VAL(pc, val) \
- do {\
- if (!pc || !pc->cb_info) {\
- CAM_LOG_ERROR("NULL handle[%p]", pc);\
- return (val);\
- }\
- } while (0)
+
/* for camera device manager */
typedef struct _cdm_symbol_table {
}
-static void __send_message_get_return(camera_cb_info_s *cb_info, muse_camera_api_e api, char *msg, int time_out, int *ret)
+void _camera_send_message_get_return(camera_cb_info_s *cb_info, muse_camera_api_e api, char *msg, int time_out, int *ret)
{
int send_ret = 0;
msg = muse_core_msg_new(api, NULL);
- __send_message_get_return(cb_info, api, msg, timeout, ret);
+ _camera_send_message_get_return(cb_info, api, msg, timeout, ret);
}
break;
}
- __send_message_get_return(cb_info, api, msg, timeout, ret);
+ _camera_send_message_get_return(cb_info, api, msg, timeout, ret);
}
param1->type, param1->name, param1->value.value_INT,
NULL);
- __send_message_get_return(cb_info, api, msg, timeout, ret);
+ _camera_send_message_get_return(cb_info, api, msg, timeout, ret);
}
MUSE_TYPE_ARRAY, "set_geotag", length, (int *)set_geotag,
NULL);
- __send_message_get_return(pc->cb_info, api, msg, CAMERA_CB_TIMEOUT, &ret);
+ _camera_send_message_get_return(pc->cb_info, api, msg, CAMERA_CB_TIMEOUT, &ret);
return ret;
}
MUSE_TYPE_ARRAY, "set_display_roi_area", length, (int *)set_display_roi_area,
NULL);
- __send_message_get_return(pc->cb_info, api, msg, CAMERA_CB_TIMEOUT, &ret);
+ _camera_send_message_get_return(pc->cb_info, api, msg, CAMERA_CB_TIMEOUT, &ret);
return ret;
}
MUSE_TYPE_ARRAY, "stream_format", 4, stream_format,
NULL);
- __send_message_get_return(pc->cb_info, api, msg, CAMERA_CB_TIMEOUT, &ret);
+ _camera_send_message_get_return(pc->cb_info, api, msg, CAMERA_CB_TIMEOUT, &ret);
return ret;
}
return ret;
}
+
+
+int camera_set_extra_preview_device(camera_h camera, int stream_id, camera_device_e device)
+{
+ int ret = CAMERA_ERROR_NONE;
+ char *msg = NULL;
+ camera_cli_s *pc = (camera_cli_s *)camera;
+ muse_camera_api_e api = MUSE_CAMERA_API_SET_EXTRA_PREVIEW_DEVICE;
+
+ CAMERA_CHECK_HANDLE_RETURN_VAL(pc, CAMERA_ERROR_INVALID_PARAMETER);
+
+ CAM_LOG_INFO("Enter - stream[%d], device[%d]", stream_id, device);
+
+ msg = muse_core_msg_new(api,
+ MUSE_TYPE_INT, "stream_id", stream_id,
+ MUSE_TYPE_INT, "device", device,
+ NULL);
+
+ _camera_send_message_get_return(pc->cb_info, api, msg, CAMERA_CB_TIMEOUT, &ret);
+
+ return ret;
+}
//LCOV_EXCL_STOP
int height = 0;
int fps = 0;
int pixel_format = 0;
+ int camera_device = 0;
g_print("\n\t- Format list");
g_print("\n\t0:NV12, 1:NV12T, 2:NV16, 3:NV21, 4:YUYV, 5:UYVY, 6:422P, 7:I420, 8:YV12, 9:RGB565, 10:RGB888");
return;
}
+ g_print("\n\t## for MM_CAMCORDER_EXTRA_PREVIEW_MODE_PIPELINE_ELEMENT ##\n");
+ g_print("\n\tSet device for extra preview[0 ~ 9] : ");
+ err = scanf("%d", (int *)&camera_device);
+ flush_stdin();
+
+ err = camera_set_extra_preview_device(hcamcorder->camera, 0, camera_device);
+ g_print("\n\tcamera_set_extra_preview_device(device:%d) 0x%x\n", camera_device, err);
+
g_print("\n\tDump extra preview data to file - NO[0], YES[Others] : ");
err = scanf("%d", &g_camera_extra_preview_cb_dump);
flush_stdin();