Release version 0.2.14-2
[platform/core/api/recorder.git] / include / recorder_private.h
1 /*
2 * Copyright (c) 2011 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
18
19 #ifndef __TIZEN_MULTIMEDIA_RECORDER_PRIVATE_H__
20 #define __TIZEN_MULTIMEDIA_RECORDER_PRIVATE_H__
21 #include <camera.h>
22 #include <mm_camcorder.h>
23 #include <recorder.h>
24 #include <muse_core.h>
25
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29
30 #define RECORDER_PARSE_STRING_SIZE 10
31
32
33 typedef struct _recorder_cb_info_s {
34         gint fd;
35         GThread *msg_recv_thread;
36         GThread *msg_handler_thread;
37         gint msg_recv_running;
38         gint msg_handler_running;
39         GCond msg_handler_cond;
40         GMutex msg_handler_mutex;
41         GQueue *msg_queue;
42         GList *idle_event_list;
43         GCond idle_event_cond;
44         GMutex idle_event_mutex;
45         gpointer user_cb[MUSE_RECORDER_EVENT_TYPE_NUM];
46         gpointer user_data[MUSE_RECORDER_EVENT_TYPE_NUM];
47         gchar recv_msg[MUSE_RECORDER_MSG_MAX_LENGTH];
48         GCond *api_cond;
49         GMutex *api_mutex;
50         gint *api_activating;
51         gint *api_ret;
52         tbm_bufmgr bufmgr;
53 } recorder_cb_info_s;
54
55 typedef struct _recorder_message_s {
56         gchar recv_msg[MUSE_RECORDER_MSG_MAX_LENGTH];
57         muse_recorder_api_e api;
58 } recorder_message_s;
59
60 typedef struct _recorder_idle_event_s {
61         recorder_cb_info_s *cb_info;
62         gchar recv_msg[MUSE_RECORDER_MSG_MAX_LENGTH];
63         muse_recorder_event_e event;
64         GMutex event_mutex;
65 } recorder_idle_event_s;
66
67 typedef struct _recorder_cli_s {
68         intptr_t remote_handle;
69         recorder_cb_info_s *cb_info;
70 } recorder_cli_s;
71
72 typedef struct _camera_cli_s {
73         intptr_t remote_handle;
74         MMHandleType client_handle;
75         void *cb_info;
76 } camera_cli_s;
77
78 int __convert_recorder_error_code(const char *func, int code);
79
80 #ifdef __cplusplus
81 }
82 #endif
83
84 #endif /* __TIZEN_MULTIMEDIA_RECORDER_PRIVATE_H__ */
85
86