2 * tizen_camera_private.c
4 * Copyright (c) 2018 Samsung Electronics Co., Ltd. All rights reserved.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
20 #ifndef __TIZEN_CAMERA_PRIVATE_H__
21 #define __TIZEN_CAMERA_PRIVATE_H__
23 #include <linux/videodev2.h>
25 #include <tbm_bufmgr.h>
26 #include <tizen-camera.h>
28 #define CAMERA_HAL_INITIAL_INDEX -1
29 #define CAMERA_HAL_INITIAL_FD -1
30 #define MESSAGE_CALLBACK_MAX 10
32 #define V4L2_PLANES_MAX 4
34 typedef struct _camera_hal_handle {
43 guint32 buffer_dequeued_count;
44 GThread *buffer_thread;
45 gboolean buffer_thread_run;
47 camera_buffer_t camera_buffers[BUFFER_MAX];
48 enum v4l2_buf_type buffer_type;
53 camera_format_t preview_format;
54 camera_preview_frame_cb preview_cb;
55 gpointer preview_cb_data;
58 camera_capture_cb capture_cb;
59 gpointer capture_cb_data;
60 guint32 capture_count;
61 guint32 capture_interval_ms;
62 guint32 captured_count;
63 gboolean capture_request;
64 gboolean capture_restart_stream;
68 camera_message_cb msg_cb[MESSAGE_CALLBACK_MAX];
69 gpointer msg_cb_data[MESSAGE_CALLBACK_MAX];
80 #endif /* __TIZEN_CAMERA_PRIVATE_H__ */