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