31b1c67f66fb3ff4ee9397ad28f931457e191b32
[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 #define video_util_deprecated_log(fuction) do { \
56                         LOGW("DEPRECATION WARNING: %s() is deprecated and will be removed "\
57                                 "from next release.", fuction); \
58                 } while (0)
59
60 typedef bool(*video_util_supported_type_cb)(int type, void *user_data);
61
62 typedef struct {
63         void *user_data;
64         video_util_transcoding_progress_cb transcode_progress_cb;
65         video_util_transcoding_completed_cb transcode_completed_cb;
66 } video_util_cb_s;
67
68 typedef struct {
69         void *user_data;
70         video_util_supported_type_cb supported_type_cb;
71 } video_util_type_cb_s;
72
73 typedef struct {
74         char *input_path;
75         bool accurate_mode;
76         video_util_video_codec_e video_codec;
77         video_util_audio_codec_e audio_codec;
78         video_util_file_format_e file_format;
79         int width;
80         int height;
81         int fps;
82         unsigned long bps;
83         MMHandleType transcode_h;
84         video_util_cb_s *_util_cb;
85 } video_util_s;
86
87 typedef enum {
88         VIDEO_UTIL_TYPE_FORMAT = 0,
89         VIDEO_UTIL_TYPE_VIDEO_ENC,
90         VIDEO_UTIL_TYPE_AUDIO_ENC
91 } video_util_type_e;
92
93 #endif /*__TIZEN_VIDEO_UTIL_PRIVATE_H__*/