Release 0.2.10
[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 200
31
32 typedef union _mediaSource{
33         camera_h camera;
34 }mediasource;
35
36
37 typedef enum {
38         _RECORDER_EVENT_TYPE_STATE_CHANGE,
39         _RECORDER_EVENT_TYPE_RECORDING_LIMITED,
40         _RECORDER_EVENT_TYPE_RECORDING_STATUS,
41         _RECORDER_EVENT_TYPE_INTERRUPTED,
42         _RECORDER_EVENT_TYPE_AUDIO_STREAM,
43         _RECORDER_EVENT_TYPE_ERROR,
44         _RECORDER_EVENT_TYPE_NUM
45 }_recorder_event_e;
46
47 typedef struct _callback_cb_info {
48         GThread *thread;
49         gint running;
50         gint fd;
51         gpointer user_cb[MUSE_RECORDER_EVENT_TYPE_NUM];
52         gpointer user_cb_completed[MUSE_RECORDER_EVENT_TYPE_NUM];
53         gpointer user_data[MUSE_RECORDER_EVENT_TYPE_NUM];
54         gchar recvMsg[MUSE_RECORDER_MSG_MAX_LENGTH];
55         gchar recvApiMsg[MUSE_RECORDER_MSG_MAX_LENGTH];
56         gchar recvEventMsg[MUSE_RECORDER_MSG_MAX_LENGTH];
57         GCond *pCond;
58         GMutex *pMutex;
59         gint *activating;
60         tbm_bufmgr bufmgr;
61 } callback_cb_info_s;
62
63 typedef struct _recorder_cli_s{
64         intptr_t remote_handle;
65         callback_cb_info_s *cb_info;
66 }recorder_cli_s;
67
68 typedef struct _camera_cli_s{
69         intptr_t remote_handle;
70         MMHandleType client_handle;
71         callback_cb_info_s *cb_info;
72 }camera_cli_s;
73
74 int __convert_recorder_error_code(const char *func, int code);
75 #ifdef __cplusplus
76 }
77 #endif
78
79 #endif //__TIZEN_MULTIMEDIA_RECORDER_PRIVATE_H__
80
81