Add coverage exception macros
[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 #ifdef TIZEN_EXCLUDE_COVERAGE
32 #define video_util_debug(fmt, arg...)
33 #define video_util_info(fmt, arg...)
34 #define video_util_error(fmt, arg...)
35 #define video_util_debug_fenter()
36 #define video_util_debug_fleave()
37 #define video_util_secure_info(fmt, arg...)
38 #define video_util_deprecated_log(function)
39 #else
40 #define video_util_debug(fmt, arg...) do { \
41                         LOGD(""fmt"", ##arg);     \
42                 } while (0)
43
44 #define video_util_info(fmt, arg...) do { \
45                         LOGI(""fmt"", ##arg);     \
46                 } while (0)
47
48 #define video_util_error(fmt, arg...) do { \
49                         LOGE(""fmt"", ##arg);     \
50                 } while (0)
51
52 #define video_util_debug_fenter() do { \
53                         LOGD("<Enter>");     \
54                 } while (0)
55
56 #define video_util_debug_fleave() do { \
57                         LOGD("<Leave>");     \
58                 } while (0)
59
60 #define video_util_secure_info(fmt, arg...) do { \
61                         SECURE_LOGI(""fmt"", ##arg);     \
62                 } while (0)
63
64 #define video_util_deprecated_log(function) do { \
65                         LOGW("DEPRECATION WARNING: %s() is deprecated and will be removed "\
66                                 "from next release.", function); \
67                 } while (0)
68 #endif
69
70 typedef bool(*video_util_supported_type_cb)(int type, void *user_data);
71
72 typedef struct {
73         void *user_data;
74         video_util_transcoding_progress_cb transcode_progress_cb;
75         video_util_transcoding_completed_cb transcode_completed_cb;
76 } video_util_cb_s;
77
78 typedef struct {
79         void *user_data;
80         video_util_supported_type_cb supported_type_cb;
81 } video_util_type_cb_s;
82
83 typedef struct {
84         char *input_path;
85         bool accurate_mode;
86         video_util_video_codec_e video_codec;
87         video_util_audio_codec_e audio_codec;
88         video_util_file_format_e file_format;
89         int width;
90         int height;
91         int fps;
92         unsigned long bps;
93         MMHandleType transcode_h;
94         video_util_cb_s *_util_cb;
95 } video_util_s;
96
97 typedef enum {
98         VIDEO_UTIL_TYPE_FORMAT = 0,
99         VIDEO_UTIL_TYPE_VIDEO_ENC,
100         VIDEO_UTIL_TYPE_AUDIO_ENC
101 } video_util_type_e;
102
103 #endif /*__TIZEN_VIDEO_UTIL_PRIVATE_H__*/