fcf95b491948b3f8b8ee0a86935056421b2f12b2
[framework/multimedia/libmedia-service.git] / src / include / common / media-info-debug.h
1 /*
2  * libmedia-service
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Hyunjun Ko <zzoon.ko@samsung.com>, Haejeong Kim <backto.kim@samsung.com>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  */
21
22
23
24 #ifndef _MEDIA_INFO_DEBUG_H_
25 #define _MEDIA_INFO_DEBUG_H_
26
27 #include <stdio.h>
28 #include <stdlib.h>
29 #include <dlog.h>
30
31 #ifdef LOG_TAG
32 #undef LOG_TAG
33 #endif
34
35 #define LOG_TAG "Media-Info"
36
37 #define mediainfo_dbg(fmt, arg...)       LOGD("[%s : %d] [%s] " fmt "\n", __FILE__, __LINE__, __FUNCTION__, ##arg)
38
39 #ifdef _USE_LOG_FILE_
40 void mediainfo_init_file_debug();
41 void mediainfo_close_file_debug();
42 FILE* get_fp();
43 #define mediainfo_file_dbg(fmt,arg...)      fprintf( get_fp(), "[%s: %d] [%s]" fmt "\n", __FILE__, __LINE__, __FUNCTION__, ##arg)
44
45 #endif
46
47
48 #ifdef _PERFORMANCE_CHECK_
49 long
50 mediainfo_get_debug_time(void);
51 void
52 mediainfo_reset_debug_time(void);
53 void
54 mediainfo_print_debug_time(char* time_string);
55 void
56 mediainfo_print_debug_time_ex(long start, long end, const char* func_name, char* time_string);
57 #endif
58
59 #endif /*_MEDIA_INFO_DEBUG_H_*/