camera_pixel_format_e capture_format;
camera_resolution_s capture_resolution;
uint32_t capture_quality;
+ uint32_t stream_bitrate;
} camera_format_s;
/**
int (*release_extra_preview_buffer)(void *camera_handle, int stream_id, int buffer_index);
int (*set_extra_preview_stream_format)(void *camera_handle, int stream_id, camera_format_s *format);
int (*get_extra_preview_stream_format)(void *camera_handle, int stream_id, camera_format_s *format);
+ int (*set_extra_preview_bitrate)(void *camera_handle, int stream_id, int bitrate);
+ int (*get_extra_preview_bitrate)(void *camera_handle, int stream_id, int *bitrate);
} hal_backend_camera_funcs;
/**
*/
int hal_camera_get_extra_preview_stream_format(void *camera_handle, int stream_id, camera_format_s *format);
+/**
+ * @brief Sets the bitrate of the extra preview.
+ * @since_tizen 6.5
+ * @param[in] camera_handle The handle to the camera HAL
+ * @param[in] stream_id The id of extra preview stream
+ * @param[in] bitrate The bitrate(bps) of the extra preview
+ * @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_DEVICE_NOT_SUPPORTED The feature is not supported
+ * @pre The camera state must be set to #CAMERA_STATE_OPENED.
+ * @see hal_camera_get_extra_preview_bitrate()
+ */
+int hal_camera_set_extra_preview_bitrate(void *camera_handle, int stream_id, int bitrate);
+
+/**
+ * @brief Gets the bitrate of the extra preview.
+ * @since_tizen 6.5
+ * @param[in] camera_handle The handle to the camera HAL
+ * @param[in] stream_id The id of extra preview stream
+ * @param[out] bitrate The bitrate(bps) of the extra preview
+ * @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_DEVICE_NOT_SUPPORTED The feature is not supported
+ * @see hal_camera_set_extra_preview_bitrate()
+ */
+int hal_camera_get_extra_preview_bitrate(void *camera_handle, int stream_id, int *bitrate);
+
/**
* @brief Sets a callback function to be called for extra preview frames.
* @since_tizen 6.5
### main package #########
Name: %{name}
Summary: %{name} interface
-Version: 0.0.11
+Version: 0.0.12
Release: 0
Group: Development/Libraries
License: Apache-2.0
}
+int hal_camera_set_extra_preview_bitrate(void *camera_handle, int stream_id, int bitrate)
+{
+ hal_camera_s *handle = (hal_camera_s *)camera_handle;
+
+ HAL_CAMERA_RETURN_IF_FAILED(handle, CAMERA_ERROR_INVALID_PARAMETER);
+ HAL_CAMERA_RETURN_IF_FAILED(handle->funcs, CAMERA_ERROR_INVALID_PARAMETER);
+ HAL_CAMERA_RETURN_IF_FAILED(handle->funcs->set_extra_preview_bitrate, CAMERA_ERROR_NOT_IMPLEMENTED);
+
+ return handle->funcs->set_extra_preview_bitrate(handle->backend, stream_id, bitrate);
+}
+
+
+int hal_camera_get_extra_preview_bitrate(void *camera_handle, int stream_id, int *bitrate)
+{
+ hal_camera_s *handle = (hal_camera_s *)camera_handle;
+
+ HAL_CAMERA_RETURN_IF_FAILED(handle, CAMERA_ERROR_INVALID_PARAMETER);
+ HAL_CAMERA_RETURN_IF_FAILED(handle->funcs, CAMERA_ERROR_INVALID_PARAMETER);
+ HAL_CAMERA_RETURN_IF_FAILED(handle->funcs->get_extra_preview_bitrate, CAMERA_ERROR_NOT_IMPLEMENTED);
+
+ return handle->funcs->get_extra_preview_bitrate(handle->backend, stream_id, bitrate);
+}
+
+
int hal_camera_set_command(void *camera_handle, int64_t command, void *value)
{
hal_camera_s *handle = (hal_camera_s *)camera_handle;