int (*set_extra_preview_frame_cb)(void *camera_handle, hal_camera_extra_preview_frame_cb callback, void *user_data);
int (*unset_extra_preview_frame_cb)(void *camera_handle);
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);
} hal_backend_camera_funcs;
/**
*/
int hal_camera_stop_preview(void *camera_handle);
+/**
+ * @brief Sets the format of the extra preview stream.
+ * @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] format The format of the extra preview stream
+ * @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_stream_format()
+ */
+int hal_camera_set_extra_preview_stream_format(void *camera_handle, int stream_id, camera_format_s *format);
+
+/**
+ * @brief Gets the format of the extra preview stream.
+ * @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] format The format of the extra preview stream
+ * @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_stream_format()
+ */
+int hal_camera_get_extra_preview_stream_format(void *camera_handle, int stream_id, camera_format_s *format);
+
/**
* @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.9
+Version: 0.0.10
Release: 0
Group: Development/Libraries
License: Apache-2.0
}
+int hal_camera_set_extra_preview_stream_format(void *camera_handle, int stream_id, camera_format_s *format)
+{
+ 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_stream_format, CAMERA_ERROR_NOT_IMPLEMENTED);
+
+ return handle->funcs->set_extra_preview_stream_format(handle->backend, stream_id, format);
+}
+
+
+int hal_camera_get_extra_preview_stream_format(void *camera_handle, int stream_id, camera_format_s *format)
+{
+ 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_stream_format, CAMERA_ERROR_NOT_IMPLEMENTED);
+
+ return handle->funcs->get_extra_preview_stream_format(handle->backend, stream_id, format);
+}
+
+
int hal_camera_set_command(void *camera_handle, int64_t command, void *value)
{
hal_camera_s *handle = (hal_camera_s *)camera_handle;