Initial codes for tizen branch
[platform/core/multimedia/mmsvc-recorder.git] / legacy / include / legacy_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 <mm_camcorder.h>
22 #include <legacy_recorder.h>
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27
28 typedef union _mediaSource{
29         camera_h camera;
30 }mediasource;
31
32
33 typedef enum {
34         _RECORDER_EVENT_TYPE_STATE_CHANGE,
35         _RECORDER_EVENT_TYPE_RECORDING_LIMITED,
36         _RECORDER_EVENT_TYPE_RECORDING_STATUS,
37         _RECORDER_EVENT_TYPE_INTERRUPTED,
38         _RECORDER_EVENT_TYPE_AUDIO_STREAM,
39         _RECORDER_EVENT_TYPE_ERROR,
40         _RECORDER_EVENT_TYPE_NUM
41 }_recorder_event_e;
42
43 typedef enum {
44         _RECORDER_TYPE_AUDIO = 0,
45         _RECORDER_TYPE_VIDEO
46 }_recorder_type_e;
47
48 typedef enum {
49         _RECORDER_SOURCE_TYPE_UNKNOWN,
50         _RECORDER_SOURCE_TYPE_CAMERA,
51 }_recorder_source_type_e;
52
53 typedef struct _recorder_s{
54         MMHandleType mm_handle;
55         mediasource mm_source;
56         void* user_cb[_RECORDER_EVENT_TYPE_NUM];
57         void* user_data[_RECORDER_EVENT_TYPE_NUM];
58         unsigned int state;
59         int camera_device_count;
60         _recorder_type_e type;
61         _recorder_source_type_e src_type;
62         int origin_preview_format;
63         int changed_preview_format;
64         double last_max_input_level;
65 } recorder_s;
66
67 int __convert_recorder_error_code(const char *func, int code);
68 #ifdef __cplusplus
69 }
70 #endif
71
72 #endif //__TIZEN_MULTIMEDIA_RECORDER_PRIVATE_H__
73
74