diff options
author | Jeongmo Yang <jm80.yang@samsung.com> | 2015-11-19 18:29:32 +0900 |
---|---|---|
committer | Jeongmo Yang <jm80.yang@samsung.com> | 2015-11-20 19:51:26 +0900 |
commit | 571320aeb3756fd1cbe5a26b4994d104a448c949 (patch) | |
tree | e48e836a5c3689f3fd003c5a934aeb7fcc23bfe0 /include/camera_private.h | |
parent | 172cf9151ca3e1957d1033526ebc98680f1c9003 (diff) | |
download | camera-571320aeb3756fd1cbe5a26b4994d104a448c949.tar.gz camera-571320aeb3756fd1cbe5a26b4994d104a448c949.tar.bz2 camera-571320aeb3756fd1cbe5a26b4994d104a448c949.zip |
Release version 0.2.24submit/tizen/20151120.121220accepted/tizen/wearable/20151122.234604accepted/tizen/tv/20151122.234553accepted/tizen/mobile/20151122.234540
1. Fix bug - capture completed callback is not called when continuous capture mode
2. Renaming some member variables
3. Update error handling in _client_callback_new function
4. Remove unused code
Change-Id: I15fbf122a0cf8e5e93a0e09b9d2227b0adf34698
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
Diffstat (limited to 'include/camera_private.h')
-rw-r--r-- | include/camera_private.h | 80 |
1 files changed, 20 insertions, 60 deletions
diff --git a/include/camera_private.h b/include/camera_private.h index 905e2d7..9bb0891 100644 --- a/include/camera_private.h +++ b/include/camera_private.h @@ -30,69 +30,39 @@ extern "C" { #endif -#define MAX_DETECTED_FACE 20 - #define CAMERA_PARSE_STRING_SIZE 20 -typedef enum { - _CAMERA_EVENT_TYPE_STATE_CHANGE, - _CAMERA_EVENT_TYPE_FOCUS_CHANGE, - _CAMERA_EVENT_TYPE_CAPTURE_COMPLETE, - _CAMERA_EVENT_TYPE_PREVIEW, - _CAMERA_EVENT_TYPE_MEDIA_PACKET_PREVIEW, - _CAMERA_EVENT_TYPE_CAPTURE, - _CAMERA_EVENT_TYPE_ERROR, - _CAMERA_EVENT_TYPE_HDR_PROGRESS, - _CAMERA_EVENT_TYPE_INTERRUPTED, - _CAMERA_EVENT_TYPE_FACE_DETECTION, - _CAMERA_EVENT_TYPE_VIDEO_FRAME_RENDER_ERROR, - _CAMERA_EVENT_TYPE_NUM -}_camera_event_e; - -typedef struct _camera_cb_data { - int event_type; - void *handle; -} camera_cb_data; - -typedef struct _callback_cb_info { - GThread *msg_rcv_thread; - GThread *message_handler_thread; - gint rcv_thread_running; - gint message_handler_running; +typedef struct _camera_cb_info_s { gint fd; - gint id; - gpointer user_cb[MUSE_CAMERA_EVENT_TYPE_NUM]; - gpointer user_cb_completed[MUSE_CAMERA_EVENT_TYPE_NUM]; - gpointer user_data[MUSE_CAMERA_EVENT_TYPE_NUM]; - gchar recv_msg[MUSE_CAMERA_MSG_MAX_LENGTH]; - GCond *pCond; - GMutex *pMutex; - GCond message_handler_cond; - GMutex message_handler_mutex; + 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; GList *idle_event_list; GCond idle_event_cond; GMutex idle_event_mutex; - gint *activating; - gint *ret; + gpointer user_cb[MUSE_CAMERA_EVENT_TYPE_NUM]; + gpointer user_data[MUSE_CAMERA_EVENT_TYPE_NUM]; + gchar recv_msg[MUSE_CAMERA_MSG_MAX_LENGTH]; + GCond *api_cond; + GMutex *api_mutex; + gint *api_activating; + gint *api_ret; tbm_bufmgr bufmgr; - GQueue *message_queue; gint prev_state; media_format_h pkt_fmt; -} callback_cb_info_s; +} camera_cb_info_s; typedef struct _camera_message_s { gchar recv_msg[MUSE_CAMERA_MSG_MAX_LENGTH]; muse_camera_api_e api; } camera_message_s; -typedef struct _camera_event_s { - callback_cb_info_s *cb_info; - gchar recv_msg[MUSE_CAMERA_MSG_MAX_LENGTH]; - muse_camera_event_e event; -} camera_event_s; - typedef struct _camera_idle_event_s { - callback_cb_info_s *cb_info; + camera_cb_info_s *cb_info; gchar recv_msg[MUSE_CAMERA_MSG_MAX_LENGTH]; muse_camera_event_e event; GMutex event_mutex; @@ -101,8 +71,8 @@ typedef struct _camera_idle_event_s { typedef struct _camera_cli_s { intptr_t remote_handle; MMHandleType client_handle; - intptr_t cli_display_handle; - callback_cb_info_s *cb_info; + intptr_t display_handle; + camera_cb_info_s *cb_info; #ifdef HAVE_WAYLAND MMCamWaylandInfo *wl_info; #endif /* #ifdef HAVE_WAYLAND */ @@ -115,17 +85,7 @@ typedef struct _camera_media_packet_data { int num_buffer_key; } camera_media_packet_data; -typedef enum { - MUSE_CAMERA_CLIENT_SYNC_CB_HANDLER, - MUSE_CAMERA_CLIENT_USER_CALLBACK, - MUSE_CAMERA_CLIENT_MAX -} muse_cli_camera_api_e; - -int _camera_get_mm_handle(camera_h camera , MMHandleType *handle); -int _camera_set_relay_mm_message_callback(camera_h camera, MMMessageCallback callback, void *user_data); -int __camera_start_continuous_focusing(camera_h camera); -int _camera_set_use(camera_h camera, bool used); -bool _camera_is_used(camera_h camera); + int _camera_get_tbm_surface_format(int in_format, uint32_t *out_format); int _camera_get_media_packet_mimetype(int in_format, media_format_mimetype_e *mimetype); int _camera_media_packet_finalize(media_packet_h pkt, int error_code, void *user_data); |