Change type of parameter for camera command 67/316267/1 accepted/tizen/unified/20241216.010848 accepted/tizen/unified/x/20241218.032832 accepted/tizen/unified/x/asan/20241224.004603
authorJeongmo Yang <jm80.yang@samsung.com>
Thu, 12 Dec 2024 07:27:36 +0000 (16:27 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Thu, 12 Dec 2024 07:42:08 +0000 (16:42 +0900)
[Version] 1.3.4
[Issue Type] Update

Change-Id: Icf87edc9027c827eee231114aee493fabd827660
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
packaging/hal-backend-camera-v4l2.spec
src/hal_backend_camera_v4l2.c
src/hal_backend_camera_v4l2_private.h

index 4da62ced8f51800264c1ed4d0f50568d179569b2..aeef4706f9c95584ece2334ca9ef1cd86cb8606d 100644 (file)
@@ -2,7 +2,7 @@
 
 Name:       hal-backend-camera-v4l2
 Summary:    Tizen Camera Hal using generic V4L2 interface
-Version:    1.3.3
+Version:    1.3.4
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0
index fa407e8e419d063db5c3be4457eaa280a49ab275..d4e7f2681096d5da224653f5b5f4141a25934ffe 100644 (file)
@@ -2780,7 +2780,7 @@ int camera_v4l2_get_extra_preview_gop_interval(void *camera_handle, int stream_i
 }
 
 
-static int __set_command(hal_camera_handle *handle, int64_t command, void *value)
+static int __set_command(hal_camera_handle *handle, camera_command_e command, void *value)
 {
        int cid = 0;
        int ctrl_ret = 0;
@@ -2886,7 +2886,7 @@ static int __set_command(hal_camera_handle *handle, int64_t command, void *value
 }
 
 
-int camera_v4l2_set_command(void *camera_handle, int64_t command, void *value)
+int camera_v4l2_set_command(void *camera_handle, camera_command_e command, void *value)
 {
        int ret = CAMERA_ERROR_NONE;
        hal_camera_handle *handle = (hal_camera_handle *)camera_handle;
@@ -2901,7 +2901,7 @@ int camera_v4l2_set_command(void *camera_handle, int64_t command, void *value)
 }
 
 
-int camera_v4l2_get_command(void *camera_handle, int64_t command, void **value)
+int camera_v4l2_get_command(void *camera_handle, camera_command_e command, void **value)
 {
        int ret = CAMERA_ERROR_NONE;
        int cid = 0;
@@ -3036,7 +3036,7 @@ static void __dump_batch_command(camera_batch_command_control_s *batch_command)
 }
 
 
-int camera_v4l2_set_batch_command(void *camera_handle, camera_batch_command_control_s *batch_command, int64_t *error_command)
+int camera_v4l2_set_batch_command(void *camera_handle, camera_batch_command_control_s *batch_command, camera_command_e *error_command)
 {
        int ret = CAMERA_ERROR_NONE;
        int i = 0;
@@ -3078,6 +3078,8 @@ int camera_v4l2_set_batch_command(void *camera_handle, camera_batch_command_cont
                ret = __set_command(handle, set_table[i].command, set_table[i].value);
                if (ret != CAMERA_ERROR_NONE) {
                        LOGE("failed command %"PRIx64", ret 0x%x", set_table[i].command, ret);
+                       if (error_command)
+                               *error_command = set_table[i].command;
                        break;
                }
        }
index 845e7926aa41afa083e3afdcf8d8b0357dfd8332..bf1ede2e9a3018fa07a846ba2d91ebef3e6cd91a 100644 (file)
@@ -35,7 +35,7 @@
 
 
 typedef struct _set_batch_table_s {
-       int64_t command;
+       camera_command_e command;
        void *value;
 } set_batch_table_s;
 
@@ -125,8 +125,8 @@ int camera_v4l2_get_video_stream_format(void *camera_handle, camera_format_s *fo
 int camera_v4l2_start_record(void *camera_handle, hal_camera_video_frame_cb callback, void *user_data);
 int camera_v4l2_release_video_buffer(void *camera_handle, int buffer_index);
 int camera_v4l2_stop_record(void *camera_handle);
-int camera_v4l2_set_command(void *camera_handle, int64_t command, void *value);
-int camera_v4l2_get_command(void *camera_handle, int64_t command, void **value);
-int camera_v4l2_set_batch_command(void *camera_handle, camera_batch_command_control_s *batch_command, int64_t *error_command);
+int camera_v4l2_set_command(void *camera_handle, camera_command_e command, void *value);
+int camera_v4l2_get_command(void *camera_handle, camera_command_e command, void **value);
+int camera_v4l2_set_batch_command(void *camera_handle, camera_batch_command_control_s *batch_command, camera_command_e *error_command);
 
 #endif /* __HAL_BACKEND_CAMERA_V4L2_PRIVATE_H__ */