diff options
author | Kwanghoon Son <k.son@samsung.com> | 2023-10-23 13:26:06 +0900 |
---|---|---|
committer | Kwanghoon Son <k.son@samsung.com> | 2023-10-24 10:42:04 +0900 |
commit | 4133692c61a1558a2c76b66dffc4077e3b411f70 (patch) | |
tree | 30ae3fc6cb2ecfc1b2eab9e3f78327e8b5590451 | |
parent | f8547d28df55e967742d34b09e72deca8f0c348a (diff) | |
download | vision-source-accepted/tizen_8.0_unified.tar.gz vision-source-accepted/tizen_8.0_unified.tar.bz2 vision-source-accepted/tizen_8.0_unified.zip |
Change API naming and parametertizen_9.0_m2_releaseaccepted/tizen/unified/dev/20240620.005547accepted/tizen/unified/20231025.120203accepted/tizen/unified/20231025.093313accepted/tizen/9.0/unified/20241030.233507accepted/tizen/8.0/unified/20231107.094919tizen_9.0tizen_8.0tizenaccepted/tizen_unified_devaccepted/tizen_unifiedaccepted/tizen_9.0_unifiedaccepted/tizen_8.0_unified
- Add const for explicit immutable
- list for listing multiple cap
Change-Id: I280bf7c45b6057fe57faffb48771bbbf3fe26bdc
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
-rw-r--r-- | include/vision_source.h | 5 | ||||
-rw-r--r-- | include/vision_source_interface.h | 4 | ||||
-rw-r--r-- | src/vision_source.c | 9 |
3 files changed, 10 insertions, 8 deletions
diff --git a/include/vision_source.h b/include/vision_source.h index 9abad0f..f0201f3 100644 --- a/include/vision_source.h +++ b/include/vision_source.h @@ -25,8 +25,9 @@ extern "C" { int vision_source_init(vision_source_h *handle); int vision_source_exit(vision_source_h handle); -int vision_source_list_devices(vision_source_h handle, vision_source_device_info_s **dev_list, int *dev_count); -int vision_source_get_device_cap(vision_source_h handle, int dev_index, media_format_h **fmt_list, int *fmt_count); +int vision_source_list_devices(vision_source_h handle, const vision_source_device_info_s **dev_list, int *dev_count); +int vision_source_list_device_caps(vision_source_h handle, int dev_index, const media_format_h **fmt_list, + int *fmt_count); int vision_source_open_device(vision_source_h handle, int dev_index); int vision_source_close_device(vision_source_h handle); int vision_source_set_stream_format(vision_source_h handle, media_format_h fmt); diff --git a/include/vision_source_interface.h b/include/vision_source_interface.h index 9062582..c793489 100644 --- a/include/vision_source_interface.h +++ b/include/vision_source_interface.h @@ -62,8 +62,8 @@ typedef int (*error_cb)(vision_source_error_e err, void *user_data); typedef struct vision_source_func { int (*init)(vision_source_h *handle); int (*exit)(vision_source_h handle); - int (*list_devices)(vision_source_h handle, vision_source_device_info_s **dev_list, int *dev_count); - int (*get_device_cap)(vision_source_h handle, int dev_index, media_format_h **fmt_list, int *fmt_count); + int (*list_devices)(vision_source_h handle, const vision_source_device_info_s **dev_list, int *dev_count); + int (*list_device_caps)(vision_source_h handle, int dev_index, const media_format_h **fmt_list, int *fmt_count); int (*open_device)(vision_source_h handle, int dev_index); int (*close_device)(vision_source_h handle); int (*set_stream_format)(vision_source_h handle, media_format_h fmt); diff --git a/src/vision_source.c b/src/vision_source.c index 6d20106..195a036 100644 --- a/src/vision_source.c +++ b/src/vision_source.c @@ -151,7 +151,7 @@ int vision_source_exit(vision_source_h handle) return VISION_SOURCE_ERROR_NONE; } -int vision_source_list_devices(vision_source_h handle, vision_source_device_info_s **dev_list, int *dev_count) +int vision_source_list_devices(vision_source_h handle, const vision_source_device_info_s **dev_list, int *dev_count) { VISION_SOURCE_NULL_ARG_CHECK(handle); VISION_SOURCE_NULL_ARG_CHECK(dev_list); @@ -163,16 +163,17 @@ int vision_source_list_devices(vision_source_h handle, vision_source_device_info return source_handle->funcs.list_devices(source_handle->backend_handle, dev_list, dev_count); } -int vision_source_get_device_cap(vision_source_h handle, int dev_index, media_format_h **fmt_list, int *fmt_count) +int vision_source_list_device_caps(vision_source_h handle, int dev_index, const media_format_h **fmt_list, + int *fmt_count) { VISION_SOURCE_NULL_ARG_CHECK(handle); VISION_SOURCE_NULL_ARG_CHECK(fmt_list); VISION_SOURCE_NULL_ARG_CHECK(fmt_count); vision_source_internal_s *source_handle = (vision_source_internal_s *) handle; - VISION_SOURCE_IMPLEMENT_CHECK(source_handle->funcs.get_device_cap); + VISION_SOURCE_IMPLEMENT_CHECK(source_handle->funcs.list_device_caps); - return source_handle->funcs.get_device_cap(source_handle->backend_handle, dev_index, fmt_list, fmt_count); + return source_handle->funcs.list_device_caps(source_handle->backend_handle, dev_index, fmt_list, fmt_count); } int vision_source_open_device(vision_source_h handle, int dev_index) |