Add new interface for extra preview GOP interval 10/264110/2
authorJeongmo Yang <jm80.yang@samsung.com>
Mon, 13 Sep 2021 11:36:02 +0000 (20:36 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Tue, 14 Sep 2021 05:34:19 +0000 (14:34 +0900)
[Version] 0.0.13
[Issue Type] New feature

Change-Id: I7edbcebc9d39f8a30f800c9edd00a5969b9b22cb
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
include/hal-camera-interface.h
include/hal-camera.h
packaging/hal-api-camera.spec
src/hal-api-camera.c

index b24781446303c39854a790c4566120a3e4d65c8c..a8ce49bc1e09f8e449cdee1e22aeab5d1669d0bf 100644 (file)
@@ -627,6 +627,8 @@ typedef struct _hal_backend_media_camera_funcs {
        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);
+       int (*set_extra_preview_gop_interval)(void *camera_handle, int stream_id, int interval);
+       int (*get_extra_preview_gop_interval)(void *camera_handle, int stream_id, int *interval);
 } hal_backend_camera_funcs;
 
 /**
index 608c33dae2c738e6fa6dba0f20d8280a3c5f6f55..e6cd800352ca1b2a30c444a650a48c2ddc46f367 100644 (file)
@@ -59,6 +59,7 @@ int hal_camera_init(const char *hal_name, void **camera_handle);
  * @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_IMPLEMENTED The feature is not implemented
  * @see hal_camera_init()
  */
 int hal_camera_deinit(void *camera_handle);
@@ -73,6 +74,7 @@ int hal_camera_deinit(void *camera_handle);
  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #CAMERA_ERROR_OUT_OF_MEMORY Out of memory
  * @retval #CAMERA_ERROR_DEVICE_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_NOT_IMPLEMENTED The feature is not implemented
  */
 int hal_camera_get_device_info_list(void *camera_handle, camera_device_info_list_s *device_info_list);
 
@@ -90,6 +92,7 @@ int hal_camera_get_device_info_list(void *camera_handle, camera_device_info_list
  * @retval #CAMERA_ERROR_DEVICE_NOT_SUPPORTED The feature is not supported
  * @retval #CAMERA_ERROR_DEVICE_NOT_FOUND Failed to find camera device
  * @retval #CAMERA_ERROR_DEVICE_UNAVAILABLE The camera device is unavailable
+ * @retval #CAMERA_ERROR_NOT_IMPLEMENTED The feature is not implemented
  * @pre    The camera state must be set to #CAMERA_STATE_INITIALIZED.
  * @post   If it succeeds, the camera state will be #CAMERA_STATE_OPENED.
  * @see hal_camera_close_device()
@@ -109,6 +112,7 @@ int hal_camera_open_device(void *camera_handle, int device_index);
  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
  * @retval #CAMERA_ERROR_DEVICE_NOT_FOUND Failed to find camera device
  * @retval #CAMERA_ERROR_DEVICE_UNAVAILABLE The camera device is unavailable
+ * @retval #CAMERA_ERROR_NOT_IMPLEMENTED The feature is not implemented
  * @pre    The camera state must be set to #CAMERA_STATE_INITIALIZED.
  * @post   If it succeeds, the camera state will be #CAMERA_STATE_OPENED.
  * @see hal_camera_close_device()
@@ -123,6 +127,7 @@ int hal_camera_open_device_ext(void *camera_handle, const char *device_name);
  * @retval #CAMERA_ERROR_NONE Successful
  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
+ * @retval #CAMERA_ERROR_NOT_IMPLEMENTED The feature is not implemented
  * @pre    The camera state must be set to #CAMERA_STATE_OPENED.
  * @post   If it succeeds, the camera state will be #CAMERA_STATE_INITIALIZED.
  * @see hal_camera_open_device()
@@ -140,6 +145,7 @@ int hal_camera_close_device(void *camera_handle);
  * @retval #CAMERA_ERROR_NONE Successful
  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #CAMERA_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #CAMERA_ERROR_NOT_IMPLEMENTED The feature is not implemented
  * @see hal_camera_remove_message_callback()
  */
 int hal_camera_add_message_callback(void *camera_handle, hal_camera_message_cb callback, void *user_data, uint32_t *cb_id);
@@ -152,6 +158,7 @@ int hal_camera_add_message_callback(void *camera_handle, hal_camera_message_cb c
  * @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_IMPLEMENTED The feature is not implemented
  * @see hal_camera_remove_message_callback()
  */
 int hal_camera_remove_message_callback(void *camera_handle, uint32_t cb_id);
@@ -167,6 +174,7 @@ int hal_camera_remove_message_callback(void *camera_handle, uint32_t cb_id);
  * @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
+ * @retval #CAMERA_ERROR_NOT_IMPLEMENTED The feature is not implemented
  * @pre The camera state must be set to #CAMERA_STATE_OPENED.
  * @see hal_camera_start_preview()
  * @see hal_camera_start_capture()
@@ -184,6 +192,7 @@ int hal_camera_set_preview_stream_format(void *camera_handle, camera_format_s *f
  * @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
+ * @retval #CAMERA_ERROR_NOT_IMPLEMENTED The feature is not implemented
  * @see hal_camera_start_preview()
  * @see hal_camera_start_capture()
  * @see hal_camera_set_preview_stream_format()
@@ -202,6 +211,7 @@ int hal_camera_get_preview_stream_format(void *camera_handle, camera_format_s *f
  * @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
+ * @retval #CAMERA_ERROR_NOT_IMPLEMENTED The feature is not implemented
  * @pre    The camera state must be set to #CAMERA_STATE_OPENED.
  * @see hal_camera_start_preview()
  */
@@ -220,6 +230,7 @@ int hal_camera_set_user_buffer_fd(void *camera_handle, int *fds, int number);
  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
  * @retval #CAMERA_ERROR_DEVICE_BUSY The device is being used in another application or is performing other operations
  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
+ * @retval #CAMERA_ERROR_NOT_IMPLEMENTED The feature is not implemented
  * @pre    The camera state must be set to #CAMERA_STATE_OPENED.
  * @post   If it succeeds, the camera state will be #CAMERA_STATE_PREVIEWING.
  * @see hal_camera_stop_preview()
@@ -237,6 +248,7 @@ int hal_camera_start_preview(void *camera_handle, hal_camera_preview_frame_cb ca
  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #CAMERA_ERROR_NOT_IMPLEMENTED The feature is not implemented
  * @see hal_camera_start_preview()
  */
 int hal_camera_release_preview_buffer(void *camera_handle, int buffer_index);
@@ -250,6 +262,7 @@ int hal_camera_release_preview_buffer(void *camera_handle, int buffer_index);
  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #CAMERA_ERROR_NOT_IMPLEMENTED The feature is not implemented
  * @pre    The camera state must be set to #CAMERA_STATE_PREVIEWING.
  * @post   The camera state will be #CAMERA_STATE_OPENED.
  * @see hal_camera_start_preview()
@@ -267,6 +280,7 @@ int hal_camera_stop_preview(void *camera_handle);
  * @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
+ * @retval #CAMERA_ERROR_NOT_IMPLEMENTED The feature is not implemented
  * @pre The camera state must be set to #CAMERA_STATE_OPENED.
  * @see hal_camera_get_extra_preview_stream_format()
  */
@@ -283,6 +297,7 @@ int hal_camera_set_extra_preview_stream_format(void *camera_handle, int stream_i
  * @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
+ * @retval #CAMERA_ERROR_NOT_IMPLEMENTED The feature is not implemented
  * @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);
@@ -298,7 +313,7 @@ int hal_camera_get_extra_preview_stream_format(void *camera_handle, int stream_i
  * @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.
+ * @retval #CAMERA_ERROR_NOT_IMPLEMENTED The feature is not implemented
  * @see hal_camera_get_extra_preview_bitrate()
  */
 int hal_camera_set_extra_preview_bitrate(void *camera_handle, int stream_id, int bitrate);
@@ -314,10 +329,43 @@ int hal_camera_set_extra_preview_bitrate(void *camera_handle, int stream_id, int
  * @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
+ * @retval #CAMERA_ERROR_NOT_IMPLEMENTED The feature is not implemented
  * @see hal_camera_set_extra_preview_bitrate()
  */
 int hal_camera_get_extra_preview_bitrate(void *camera_handle, int stream_id, int *bitrate);
 
+/**
+ * @brief Sets the GOP (Group Of Pictures) interval 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] interval The GOP interval(millisecond) 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
+ * @retval #CAMERA_ERROR_NOT_IMPLEMENTED The feature is not implemented
+ * @see hal_camera_get_extra_preview_gop_interval()
+ */
+int hal_camera_set_extra_preview_gop_interval(void *camera_handle, int stream_id, int interval);
+
+/**
+ * @brief Gets the GOP (Group Of Pictures) interval 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] interval The GOP interval(millisecond) 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
+ * @retval #CAMERA_ERROR_NOT_IMPLEMENTED The feature is not implemented
+ * @see hal_camera_set_extra_preview_gop_interval()
+ */
+int hal_camera_get_extra_preview_gop_interval(void *camera_handle, int stream_id, int *interval);
+
 /**
  * @brief Sets a callback function to be called for extra preview frames.
  * @since_tizen 6.5
@@ -330,6 +378,7 @@ int hal_camera_get_extra_preview_bitrate(void *camera_handle, int stream_id, int
  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
  * @retval #CAMERA_ERROR_DEVICE_NOT_SUPPORTED Not supported
+ * @retval #CAMERA_ERROR_NOT_IMPLEMENTED The feature is not implemented
  * @pre The camera state must be set to #CAMERA_STATE_OPENED.
  */
 int hal_camera_set_extra_preview_frame_cb(void *camera_handle, hal_camera_extra_preview_frame_cb callback, void *user_data);
@@ -341,6 +390,7 @@ int hal_camera_set_extra_preview_frame_cb(void *camera_handle, hal_camera_extra_
  * @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_IMPLEMENTED The feature is not implemented
  * @see camera_set_extra_preview_cb()
  */
 int hal_camera_unset_extra_preview_frame_cb(void *camera_handle);
@@ -357,6 +407,7 @@ int hal_camera_unset_extra_preview_frame_cb(void *camera_handle);
  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #CAMERA_ERROR_NOT_IMPLEMENTED The feature is not implemented
  * @see hal_camera_set_extra_preview_frame_cb()
  */
 int hal_camera_release_extra_preview_buffer(void *camera_handle, int stream_id, int buffer_index);
@@ -371,6 +422,7 @@ int hal_camera_release_extra_preview_buffer(void *camera_handle, int stream_id,
  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
  * @retval #CAMERA_ERROR_DEVICE_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_NOT_IMPLEMENTED The feature is not implemented
  * @pre    The camera state must be set to #CAMERA_STATE_PREVIEWING or #CAMERA_STATE_RECORDING.
  * @post   The camera focus state will be #CAMERA_FOCUS_STATE_ONGOING.
  * @see hal_camera_stop_auto_focus()
@@ -390,6 +442,7 @@ int hal_camera_start_auto_focus(void *camera_handle);
  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
  * @retval #CAMERA_ERROR_DEVICE_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_NOT_IMPLEMENTED The feature is not implemented
  * @pre    The camera state must be set to #CAMERA_STATE_PREVIEWING or #CAMERA_STATE_RECORDING.
  * @post   The camera focus state will be #CAMERA_FOCUS_STATE_ONGOING.
  * @see hal_camera_start_auto_focus()
@@ -410,6 +463,7 @@ int hal_camera_stop_auto_focus(void *camera_handle);
  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #CAMERA_ERROR_NOT_IMPLEMENTED The feature is not implemented
  * @pre    The camera state must be set to #CAMERA_STATE_PREVIEWING or #CAMERA_STATE_RECORDING.
  * @post   If it succeeds the camera state will be #CAMERA_STATE_CAPTURING or #CAMERA_STATE_RECORDING_SNAPSHOT.
  * @see hal_camera_start_preview()
@@ -431,6 +485,7 @@ int hal_camera_start_capture(void *camera_handle, hal_camera_capture_cb callback
  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #CAMERA_ERROR_NOT_IMPLEMENTED The feature is not implemented
  * @pre    The camera state must be set to #CAMERA_STATE_CAPTURING or #CAMERA_STATE_RECORDING_SNAPSHOT.
  * @post   If it succeeds the camera state will be #CAMERA_STATE_PREVIEWING or #CAMERA_STATE_RECORDING.
  * @see hal_camera_start_capture()
@@ -454,6 +509,7 @@ int hal_camera_stop_capture(void *camera_handle);
  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
  * @retval #CAMERA_ERROR_DEVICE_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_NOT_IMPLEMENTED The feature is not implemented
  * @pre The camera state must be set to #CAMERA_STATE_OPENED.
  * @see hal_camera_start_record()
  * @see hal_camera_start_capture()
@@ -471,6 +527,7 @@ int hal_camera_set_video_stream_format(void *camera_handle, camera_format_s *for
  * @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
+ * @retval #CAMERA_ERROR_NOT_IMPLEMENTED The feature is not implemented
  * @see hal_camera_start_preview()
  * @see hal_camera_start_capture()
  * @see hal_camera_set_preview_stream_format()
@@ -491,6 +548,7 @@ int hal_camera_get_video_stream_format(void *camera_handle, camera_format_s *for
  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
  * @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
  * @retval #CAMERA_ERROR_DEVICE_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_NOT_IMPLEMENTED The feature is not implemented
  * @pre The camera state must be #CAMERA_STATE_PREVIEWING.
  * @post The camera state will be #CAMERA_STATE_RECORDING.
  * @see hal_camera_set_video_stream_format()
@@ -510,6 +568,7 @@ int hal_camera_start_record(void *camera_handle, hal_camera_video_frame_cb callb
  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #CAMERA_ERROR_NOT_IMPLEMENTED The feature is not implemented
  * @pre The camera state must be set to #CAMERA_STATE_PREVIEWING.
  * @see hal_camera_start_record()
  */
@@ -524,6 +583,7 @@ int hal_camera_release_video_buffer(void *camera_handle, int buffer_index);
  * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
+ * @retval #CAMERA_ERROR_NOT_IMPLEMENTED The feature is not implemented
  * @pre The camera state must be #CAMERA_STATE_RECORDING.
  * @post The camera state will be #CAMERA_STATE_PREVIEWING.
  * @see hal_camera_set_video_stream_format()
@@ -544,6 +604,7 @@ int hal_camera_stop_record(void *camera_handle);
  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
  * @retval #CAMERA_ERROR_DEVICE_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_NOT_IMPLEMENTED The feature is not implemented
  * @see hal_camera_get_command()
  */
 int hal_camera_set_command(void *camera_handle, int64_t command, void *value);
@@ -560,6 +621,7 @@ int hal_camera_set_command(void *camera_handle, int64_t command, void *value);
  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
  * @retval #CAMERA_ERROR_DEVICE_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_NOT_IMPLEMENTED The feature is not implemented
  * @see hal_camera_get_command()
  */
 int hal_camera_get_command(void *camera_handle, int64_t command, void **value);
@@ -577,6 +639,7 @@ int hal_camera_get_command(void *camera_handle, int64_t command, void **value);
  * @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
  * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
  * @retval #CAMERA_ERROR_DEVICE_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_NOT_IMPLEMENTED The feature is not implemented
  * @see hal_camera_set_command()
  * @see hal_camera_get_command()
  */
index 168df1b0bd40f7f51958b4774549f07ac8999725..f40d3f59a7801d1feea150f41296ca2513bf6513 100644 (file)
@@ -4,7 +4,7 @@
 ### main package #########
 Name:       %{name}
 Summary:    %{name} interface
-Version:    0.0.12
+Version:    0.0.13
 Release:    0
 Group:      Development/Libraries
 License:    Apache-2.0
index f878060c93a9d006df2bd6ad6bc3b2efce7519c5..84a22e1aa9d949e85124f6fafd61d73aa738dfc0 100644 (file)
@@ -456,6 +456,30 @@ int hal_camera_get_extra_preview_bitrate(void *camera_handle, int stream_id, int
 }
 
 
+int hal_camera_set_extra_preview_gop_interval(void *camera_handle, int stream_id, int interval)
+{
+       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_gop_interval, CAMERA_ERROR_NOT_IMPLEMENTED);
+
+       return handle->funcs->set_extra_preview_gop_interval(handle->backend, stream_id, interval);
+}
+
+
+int hal_camera_get_extra_preview_gop_interval(void *camera_handle, int stream_id, int *interval)
+{
+       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_gop_interval, CAMERA_ERROR_NOT_IMPLEMENTED);
+
+       return handle->funcs->get_extra_preview_gop_interval(handle->backend, stream_id, interval);
+}
+
+
 int hal_camera_set_command(void *camera_handle, int64_t command, void *value)
 {
        hal_camera_s *handle = (hal_camera_s *)camera_handle;