Apply Tizen coding rule and add doc
[platform/core/api/video-util.git] / include / video_util_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 #ifndef __TIZEN_VIDEO_UTIL_PRIVATE_H__
18 #define __TIZEN_VIDEO_UTIL_PRIVATE_H__
19
20 #include <stdbool.h>
21 #include <mm_types.h>
22 #include <dlog.h>
23 #include <video_util_type.h>
24
25 #ifdef LOG_TAG
26 #undef LOG_TAG
27 #endif
28
29 #define LOG_TAG "CAPI_MEDIA_VIDEO_UTIL"
30
31 #define video_util_debug(fmt, arg...) do { \
32                         LOGD(""fmt"", ##arg);     \
33                 } while (0)
34
35 #define video_util_info(fmt, arg...) do { \
36                         LOGI(""fmt"", ##arg);     \
37                 } while (0)
38
39 #define video_util_error(fmt, arg...) do { \
40                         LOGE(""fmt"", ##arg);     \
41                 } while (0)
42
43 #define video_util_debug_fenter() do { \
44                         LOGD("<Enter>");     \
45                 } while (0)
46
47 #define video_util_debug_fleave() do { \
48                         LOGD("<Leave>");     \
49                 } while (0)
50
51 #define video_util_secure_info(fmt, arg...) do { \
52                         SECURE_LOGI(""fmt"", ##arg);     \
53                 } while (0)
54
55 typedef bool(*video_util_supported_type_cb)(int type, void *user_data);
56
57 typedef struct {
58         void *user_data;
59         video_util_transcoding_progress_cb transcode_progress_cb;
60         video_util_transcoding_completed_cb transcode_completed_cb;
61 } video_util_cb_s;
62
63 typedef struct {
64         void *user_data;
65         video_util_supported_type_cb supported_type_cb;
66 } video_util_type_cb_s;
67
68 typedef struct {
69         char *input_path;
70         bool accurate_mode;
71         video_util_video_codec_e video_codec;
72         video_util_audio_codec_e audio_codec;
73         video_util_file_format_e file_format;
74         int width;
75         int height;
76         int fps;
77         unsigned long bps;
78         MMHandleType transcode_h;
79         video_util_cb_s *_util_cb;
80 } video_util_s;
81
82 typedef enum {
83         VIDEO_UTIL_TYPE_FORMAT = 0,
84         VIDEO_UTIL_TYPE_VIDEO_ENC,
85         VIDEO_UTIL_TYPE_AUDIO_ENC
86 } video_util_type_e;
87
88 #endif /*__TIZEN_VIDEO_UTIL_PRIVATE_H__*/