summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJeongmo Yang <jm80.yang@samsung.com>2016-08-09 16:00:40 +0900
committerJeongmo Yang <jm80.yang@samsung.com>2016-08-09 16:00:40 +0900
commit3b9b49d27a189a7e20fa499b546f77296daba281 (patch)
tree93f27e87290e900a164db6ad965770dabf3826fd /include
parentb99fb331c65df7c0d20773f8e9cd8027b84753c8 (diff)
downloadcamera-3b9b49d27a189a7e20fa499b546f77296daba281.tar.gz
camera-3b9b49d27a189a7e20fa499b546f77296daba281.tar.bz2
camera-3b9b49d27a189a7e20fa499b546f77296daba281.zip
[Release version 0.2.66] Add sub threads for 2.4 API compatibility
Change-Id: If6728e5132b3ce0418bf5fe27a64d51db7c0dfe8 Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
Diffstat (limited to 'include')
-rw-r--r--include/camera_private.h38
1 files changed, 31 insertions, 7 deletions
diff --git a/include/camera_private.h b/include/camera_private.h
index 56e8ad5..32257f1 100644
--- a/include/camera_private.h
+++ b/include/camera_private.h
@@ -42,6 +42,11 @@ extern "C" {
#define SET_PREVIEW_CB_TYPE(cb_info, cb_type) ((cb_info)->preview_cb_flag |= cb_type)
#define UNSET_PREVIEW_CB_TYPE(cb_info, cb_type) ((cb_info)->preview_cb_flag &= ~cb_type)
+enum {
+ CAMERA_MESSAGE_HANDLER_TYPE_GENERAL,
+ CAMERA_MESSAGE_HANDLER_TYPE_PREVIEW_CB,
+ CAMERA_MESSAGE_HANDLER_TYPE_CAPTURE_CB
+};
typedef struct _camera_stream_data_s {
union {
@@ -81,15 +86,32 @@ typedef struct _camera_stream_data_s {
int elevation[BUFFER_MAX_PLANE_NUM]; /**< Elevation of each plane */
} camera_stream_data_s;
+typedef struct _camera_msg_handler_info_s {
+ int type;
+ void *cb_info;
+ int running;
+ GCond cond;
+ GMutex mutex;
+ GQueue *queue;
+ GThread *thread;
+} camera_msg_handler_info_s;
+
typedef struct _camera_cb_info_s {
gint fd;
+
+ /* message receive thread */
GThread *msg_recv_thread;
- GThread *msg_handler_thread;
gint msg_recv_running;
- gint msg_handler_running;
- GCond msg_handler_cond;
- GMutex msg_handler_mutex;
- GQueue *msg_queue;
+
+ /* general message handler info */
+ camera_msg_handler_info_s msg_handler_info;
+
+ /* preview cb message handler info */
+ camera_msg_handler_info_s preview_cb_info;
+
+ /* capture cb message handler info */
+ camera_msg_handler_info_s capture_cb_info;
+
GList *idle_event_list;
GCond idle_event_cond;
GMutex idle_event_mutex;
@@ -98,8 +120,8 @@ typedef struct _camera_cb_info_s {
gchar recv_msg[MUSE_CAMERA_MSG_MAX_LENGTH];
GCond api_cond[MUSE_CAMERA_API_MAX];
GMutex api_mutex[MUSE_CAMERA_API_MAX];
- gint *api_activating;
- gint *api_ret;
+ gint api_activating[MUSE_CAMERA_API_MAX];
+ gint api_ret[MUSE_CAMERA_API_MAX];
tbm_bufmgr bufmgr;
media_format_h pkt_fmt;
int preview_cb_flag;
@@ -114,6 +136,8 @@ typedef struct _camera_cb_info_s {
typedef struct _camera_message_s {
gchar recv_msg[MUSE_CAMERA_MSG_MAX_LENGTH];
muse_camera_api_e api;
+ muse_camera_event_e event;
+ muse_camera_event_class_e event_class;
} camera_message_s;
typedef struct _camera_idle_event_s {