initial upload
[apps/native/smart-surveillance-camera.git] / include / resource_camera.h
1  /*
2  * Copyright (c) 2018 Samsung Electronics Co., Ltd.
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 __RESOURCE_CAMERA_H__
18 #define __RESOURCE_CAMERA_H__
19
20 typedef struct __image_buffer_data_s {
21     unsigned char *buffer;
22         unsigned int buffer_size;
23         unsigned int image_width;
24         unsigned int image_height;
25         camera_pixel_format_e format;
26         void *user_data;
27 } image_buffer_data_s;
28
29 typedef void (*preview_image_buffer_created_cb)(void *buffedata);
30 typedef void (*capture_completed_cb)(const void *image, unsigned int size, void *user_data);
31
32 int resource_camera_init(preview_image_buffer_created_cb preview_image_buffer_created_cb, void *user_data);
33 int resource_camera_start_preview(void);
34 int resource_camera_capture(capture_completed_cb capture_completed_cb, void *data);
35 void resource_camera_close(void);
36
37 #endif