diff options
author | Kwanghoon Son <k.son@samsung.com> | 2023-09-26 16:01:36 +0900 |
---|---|---|
committer | Kwanghoon Son <k.son@samsung.com> | 2023-09-26 16:01:36 +0900 |
commit | e5c2ff7db24d636bd81f3aedfe17070893834929 (patch) | |
tree | 3afdec840ff2c2706443b965e6bea5d10bd9476e | |
parent | 3e6d07c10a55b1addb461de69d273919c58004ca (diff) | |
download | vision-source-e5c2ff7db24d636bd81f3aedfe17070893834929.tar.gz vision-source-e5c2ff7db24d636bd81f3aedfe17070893834929.tar.bz2 vision-source-e5c2ff7db24d636bd81f3aedfe17070893834929.zip |
Add new type and ioctl function
[Version] 0.2.0
[Issue type] New
Among the requirements, a function that can control the camera at
runtime. Also Z16U type added as requirements.
Change-Id: I516f6f8a770acd6ef6bc65b4859f63262db87b5f
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
-rw-r--r-- | include/vision_source.h | 1 | ||||
-rw-r--r-- | include/vision_source_interface.h | 2 | ||||
-rw-r--r-- | packaging/vision-source.spec | 2 | ||||
-rw-r--r-- | src/vision_source.c | 9 |
4 files changed, 13 insertions, 1 deletions
diff --git a/include/vision_source.h b/include/vision_source.h index 231282d..6fa79cb 100644 --- a/include/vision_source.h +++ b/include/vision_source.h @@ -40,6 +40,7 @@ int vision_source_get_capture_frame(vision_source_h handle, vision_source_buffer_s *buffer); int vision_source_release_capture_frame(vision_source_h handle, int buffer_index); +int vision_source_ioctl(vision_source_h handle, int request, void *arg); #ifdef __cplusplus } diff --git a/include/vision_source_interface.h b/include/vision_source_interface.h index ecc3076..0f0ee80 100644 --- a/include/vision_source_interface.h +++ b/include/vision_source_interface.h @@ -48,6 +48,7 @@ typedef enum vision_source_pixel_format VISION_SOURCE_PIXEL_FORMAT_YVU420, //YV12 VISION_SOURCE_PIXEL_FORMAT_YUV420, //I420 VISION_SOURCE_PIXEL_FORMAT_Z32F, //FP32 depth data(millimeter distance) + VISION_SOURCE_PIXEL_FORMAT_Z16U, //U16 depth data(millimeter distance) VISION_SOURCE_PIXEL_FORMAT_MAX } vision_source_pixel_format_e; @@ -171,6 +172,7 @@ typedef struct vision_source_func int (*get_capture_frame)(vision_source_h handle, vision_source_buffer_s *buffer); int (*release_capture_frame)(vision_source_h handle, int buffer_index); + int (*ioctl)(vision_source_h handle, int request, void *arg); } vision_source_func_s; void attach_backend(vision_source_func_s *funcp); diff --git a/packaging/vision-source.spec b/packaging/vision-source.spec index 22d2527..2ce9e0f 100644 --- a/packaging/vision-source.spec +++ b/packaging/vision-source.spec @@ -1,6 +1,6 @@ Name: vision-source Summary: vision source -Version: 0.1.1 +Version: 0.2.0 Release: 0 Group: Multimedia/Framework License: Apache-2.0 diff --git a/src/vision_source.c b/src/vision_source.c index 080849b..22c0022 100644 --- a/src/vision_source.c +++ b/src/vision_source.c @@ -222,4 +222,13 @@ int vision_source_release_capture_frame(vision_source_h handle, (vision_source_internal_s *) handle; return source_handle->funcs.release_capture_frame( source_handle->backend_handle, buffer_index); +} + +int vision_source_ioctl(vision_source_h handle, int request, void *arg) +{ + VISION_SOURCE_NULL_ARG_CHECK(handle); + vision_source_internal_s *source_handle = + (vision_source_internal_s *) handle; + return source_handle->funcs.ioctl(source_handle->backend_handle, request, + arg); }
\ No newline at end of file |