summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKwanghoon Son <k.son@samsung.com>2023-10-23 13:26:06 +0900
committerKwanghoon Son <k.son@samsung.com>2023-10-24 10:42:04 +0900
commit4133692c61a1558a2c76b66dffc4077e3b411f70 (patch)
tree30ae3fc6cb2ecfc1b2eab9e3f78327e8b5590451
parentf8547d28df55e967742d34b09e72deca8f0c348a (diff)
downloadvision-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
- 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.h5
-rw-r--r--include/vision_source_interface.h4
-rw-r--r--src/vision_source.c9
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)