Update muse-camera by the splited muse library
[platform/core/multimedia/mmsvc-camera.git] / muse / include / muse_camera_internal.h
1 /*
2 * Copyright (c) 2015 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 __MUSE_CAMERA_INTERNAL_H__
18 #define __MUSE_CAMERA_INTERNAL_H__
19
20 #ifdef _cplusplus
21 extern "C" {
22 #endif
23
24 /**
25   * @file muse_camera_internal.h
26   * @brief This file contains the muse camera internal API for framework, related structures and enumerations.
27   */
28
29 #include <muse_core.h>
30 #include <muse_camera.h>
31 #include <legacy_camera_internal.h>
32
33 #define PREVIEW_CB_TYPE_USER 0x0000000F
34 #define PREVIEW_CB_TYPE_EVAS 0x000000F0
35
36 #define CHECK_PREVIEW_CB(muse_camera, cb_type) ((muse_camera)->preview_cb_flag & cb_type)
37 #define SET_PREVIEW_CB_TYPE(muse_camera, cb_type) ((muse_camera)->preview_cb_flag |= cb_type)
38 #define UNSET_PREVIEW_CB_TYPE(muse_camera, cb_type) ((muse_camera)->preview_cb_flag &= ~cb_type)
39
40
41 typedef struct {
42         int api;
43         int class;
44         int value;
45 } muse_camera_task_job_s;
46
47 typedef struct {
48         camera_h camera_handle;
49         tbm_bufmgr bufmgr;
50         GList *data_list;
51         GMutex list_lock;
52         GCond list_cond;
53         GMutex preview_cb_lock;
54         GCond preview_cb_cond;
55         guint preview_cb_flag;
56         MMCamWaylandInfo wl_info;
57         GThread *task_thread;
58         GMutex task_lock;
59         GCond task_cond;
60         GQueue task_queue;
61         gboolean task_run;
62         muse_module_h module;
63         gboolean is_shutting_down;
64 } muse_camera_handle_s;
65
66
67 #ifdef __cplusplus
68 }
69 #endif
70
71 #endif /* __MUSE_CAMERA_INTERNAL_H__ */