231282d8f0a7f3f70be38cbac2d92cedfc4d431b
[platform/core/multimedia/vision-source.git] / include / vision_source.h
1 /**
2  * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef __VISION_SOURCE__
18 #define __VISION_SOURCE__
19
20 #include <vision_source_interface.h>
21
22 #ifdef __cplusplus
23 extern "C"
24 {
25 #endif
26
27 int vision_source_init(vision_source_h *handle);
28 int vision_source_exit(vision_source_h handle);
29 int vision_source_open_device(vision_source_h handle, int device_index);
30 int vision_source_close_device(vision_source_h handle);
31 int vision_source_start_stream(vision_source_h handle, stream_cb callback,
32                                                                 void *user_data);
33 int vision_source_stop_stream(vision_source_h handle);
34 int vision_source_enumerate_devices(
35                 vision_source_h handle,
36                 vision_source_device_info_list_s *info_list);
37 int vision_source_set_stream_format(vision_source_h handle,
38                                                                         vision_source_format_s *format);
39 int vision_source_get_capture_frame(vision_source_h handle,
40                                                                         vision_source_buffer_s *buffer);
41 int vision_source_release_capture_frame(vision_source_h handle,
42                                                                                 int buffer_index);
43
44 #ifdef __cplusplus
45 }
46 #endif
47
48 #endif /* __VISION_SOURCE__ */