int camera_attr_get_focus_level_range(camera_h camera, int *min, int *max);
/**
+ * @brief Sets the bitrate of extra preview.
+ * @since_tizen 6.5
+ * @param[in] camera The handle to the camera
+ * @param[in] stream_id The id of extra preview stream
+ * @param[in] bitrate The bitrate(bps) of extra preview
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
+ * @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_get_extra_preview_bitrate()
+ */
+int camera_attr_set_extra_preview_bitrate(camera_h camera, int stream_id, int bitrate);
+
+/**
+ * @brief Gets the bitrate of extra preview.
+ * @since_tizen 6.5
+ * @param[in] camera The handle to the camera
+ * @param[in] stream_id The id of extra preview stream
+ * @param[out] bitrate The bitrate(bps) of extra preview stream
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
+ * @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_extra_preview_bitrate()
+ */
+int camera_attr_get_extra_preview_bitrate(camera_h camera, int stream_id, int *bitrate);
+
+/**
* @}
*/
#ifdef __cplusplus
Name: capi-media-camera
Summary: A Camera API
-Version: 0.4.61
+Version: 0.4.62
Release: 0
Group: Multimedia/API
License: Apache-2.0
return ret;
}
+
+
+int camera_attr_set_extra_preview_bitrate(camera_h camera, int stream_id, int bitrate)
+{
+ int ret = CAMERA_ERROR_NONE;
+ camera_cli_s *pc = (camera_cli_s *)camera;
+ muse_camera_api_e api = MUSE_CAMERA_API_ATTR_SET_EXTRA_PREVIEW_BITRATE;
+ camera_msg_param param0;
+ camera_msg_param param1;
+
+ if (!pc || !pc->cb_info) {
+ CAM_LOG_ERROR("NULL handle");
+ return CAMERA_ERROR_INVALID_PARAMETER;
+ }
+
+ CAM_LOG_INFO("Enter - stream_id[%d], bitrate[%d]", stream_id, bitrate);
+
+ CAMERA_MSG_PARAM_SET(param0, INT, stream_id);
+ CAMERA_MSG_PARAM_SET(param1, INT, bitrate);
+
+ _camera_msg_send_param2_int(api, pc->cb_info, &ret,
+ ¶m0, ¶m1, CAMERA_CB_TIMEOUT);
+
+ CAM_LOG_INFO("ret : 0x%x", ret);
+
+ return ret;
+}
+
+
+int camera_attr_get_extra_preview_bitrate(camera_h camera, int stream_id, int *bitrate)
+{
+ int ret = CAMERA_ERROR_NONE;
+ camera_cli_s *pc = (camera_cli_s *)camera;
+ muse_camera_api_e api = MUSE_CAMERA_API_ATTR_GET_EXTRA_PREVIEW_BITRATE;
+ camera_msg_param param;
+
+ if (!pc || !pc->cb_info || !bitrate) {
+ CAM_LOG_ERROR("NULL pointer %p %p", pc, bitrate);
+ return CAMERA_ERROR_INVALID_PARAMETER;
+ }
+
+ CAM_LOG_INFO("Enter - stream_id[%d]", stream_id);
+
+ CAMERA_MSG_PARAM_SET(param, INT, stream_id);
+
+ _camera_msg_send_param1(api, pc->cb_info, &ret, ¶m, CAMERA_CB_TIMEOUT);
+
+ if (ret == CAMERA_ERROR_NONE) {
+ *bitrate = pc->cb_info->get_int[MUSE_CAMERA_GET_INT_EXTRA_PREVIEW_BITRATE];
+ CAM_LOG_INFO("get bitrate[%d] for stream[%d]", *bitrate, stream_id);
+ } else {
+ CAM_LOG_ERROR("get bitrate failed for stream[%d] : 0x%x", stream_id, ret);
+ }
+
+ return ret;
+}
+
//LCOV_EXCL_STOP
g_print("\t 'E' EXIF orientation \n");
g_print("\t 'F' Get facing direction of camera module\n");
g_print("\t 's' Extra preview stream format\n");
+ g_print("\t 'B' Extra preview bitrate\n");
g_print("\t >>>>>>>>>>>>>>>>>>>> [Display/Filter]\n");
g_print("\t 'v' Visible \n");
g_print("\t 'o' Output mode \n");
int stream_id;
int pixel_format;
int fps;
+ int bitrate;
switch (buf) {
/* Camera setting */
g_print("\tGet stream_id[%d],pixel format[%d],res[%dx%d],fps[%d]\n",
stream_id, pixel_format, width, height, fps);
break;
+ case 'B': /* Setting > Set extra preview bitrate */
+ g_print("* Set extra preview bitrate\n");
+
+ g_print("\tstream_id,bitrate : ");
+ err = scanf("%d,%d", &stream_id, &bitrate);
+ flush_stdin();
+
+ err = camera_attr_set_extra_preview_bitrate(hcamcorder->camera, stream_id, bitrate);
+ if (err != CAMERA_ERROR_NONE) {
+ g_print("* Set Error : 0x%x\n", err);
+ break;
+ }
+
+ bitrate = -1;
+
+ err = camera_attr_get_extra_preview_bitrate(hcamcorder->camera, stream_id, &bitrate);
+ if (err != CAMERA_ERROR_NONE) {
+ g_print("* Get Error : 0x%x\n", err);
+ break;
+ }
+
+ g_print("\tGet stream_id[%d],bitrate[%d]\n", stream_id, bitrate);
+ break;
/* Display / Filter setting */
case 'v': /* Display visible */
g_print("* Display visible setting !\n");