From d2a05977e5a2e8026cca4e0af20cfd268ef7cc44 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 26 Feb 2012 16:11:45 +0100 Subject: [PATCH] libeplayer3: get rid of __FILE__ for shorter logmessages --- libeplayer3/container/container.c | 2 +- libeplayer3/container/container_ass.c | 5 +++-- libeplayer3/container/container_ffmpeg.c | 6 +++--- libeplayer3/container/text_srt.c | 6 +++--- libeplayer3/container/text_ssa.c | 6 +++--- libeplayer3/manager/audio.c | 2 +- libeplayer3/manager/subtitle.c | 2 +- libeplayer3/manager/video.c | 2 +- libeplayer3/output/linuxdvb.c | 6 +++--- libeplayer3/output/output.c | 2 +- libeplayer3/output/output_subtitle.c | 6 +++--- libeplayer3/output/writer/aac.c | 5 +++-- libeplayer3/output/writer/ac3.c | 5 +++-- libeplayer3/output/writer/divx.c | 5 +++-- libeplayer3/output/writer/dts.c | 5 +++-- libeplayer3/output/writer/flac.c | 5 +++-- libeplayer3/output/writer/framebuffer.c | 5 +++-- libeplayer3/output/writer/h263.c | 5 +++-- libeplayer3/output/writer/h264.c | 5 +++-- libeplayer3/output/writer/mp3.c | 5 +++-- libeplayer3/output/writer/mpeg2.c | 5 +++-- libeplayer3/output/writer/pcm.c | 5 +++-- libeplayer3/output/writer/vc1.c | 5 +++-- libeplayer3/output/writer/vorbis.c | 5 +++-- libeplayer3/output/writer/wma.c | 5 +++-- libeplayer3/output/writer/wmv.c | 5 +++-- libeplayer3/playback/playback.c | 5 +++-- 27 files changed, 71 insertions(+), 54 deletions(-) diff --git a/libeplayer3/container/container.c b/libeplayer3/container/container.c index 5e37932..9717415 100644 --- a/libeplayer3/container/container.c +++ b/libeplayer3/container/container.c @@ -42,7 +42,7 @@ if (debug_level >= level) printf(x); } while (0) #endif -static const char FILENAME[] = __FILE__; +static const char FILENAME[] = "container.c"; static void printContainerCapabilities() { int i, j; diff --git a/libeplayer3/container/container_ass.c b/libeplayer3/container/container_ass.c index 04efee4..80933cc 100644 --- a/libeplayer3/container/container_ass.c +++ b/libeplayer3/container/container_ass.c @@ -55,16 +55,17 @@ #ifdef ASS_DEBUG +static const char *FILENAME = "container_ass.c"; static short debug_level = 10; #define ass_printf(level, fmt, x...) do { \ -if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +if (debug_level >= level) printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define ass_printf(level, fmt, x...) #endif #ifndef ASS_SILENT -#define ass_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +#define ass_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define ass_err(fmt, x...) #endif diff --git a/libeplayer3/container/container_ffmpeg.c b/libeplayer3/container/container_ffmpeg.c index 4261290..e5cda8b 100644 --- a/libeplayer3/container/container_ffmpeg.c +++ b/libeplayer3/container/container_ffmpeg.c @@ -59,13 +59,13 @@ static short debug_level = 10; #define ffmpeg_printf(level, fmt, x...) do { \ -if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +if (debug_level >= level) printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define ffmpeg_printf(level, fmt, x...) #endif #ifndef FFMPEG_SILENT -#define ffmpeg_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +#define ffmpeg_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define ffmpeg_err(fmt, x...) #endif @@ -83,7 +83,7 @@ if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); #define cERR_CONTAINER_FFMPEG_ERR -9 #define cERR_CONTAINER_FFMPEG_END_OF_FILE -10 -static const char* FILENAME = __FILE__; +static const char* FILENAME = "container_ffmpeg.c"; /* ***************************** */ /* Types */ diff --git a/libeplayer3/container/text_srt.c b/libeplayer3/container/text_srt.c index 3ef0598..c54f6fe 100644 --- a/libeplayer3/container/text_srt.c +++ b/libeplayer3/container/text_srt.c @@ -50,13 +50,13 @@ static short debug_level = 10; #define srt_printf(level, fmt, x...) do { \ -if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +if (debug_level >= level) printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define srt_printf(level, fmt, x...) #endif #ifndef SRT_SILENT -#define srt_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +#define srt_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define srt_err(fmt, x...) #endif @@ -68,7 +68,7 @@ if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); #define TRACKWRAP 20 #define MAXLINELENGTH 80 -static const char FILENAME[] = __FILE__; +static const char FILENAME[] = "text_srt.c"; /* ***************************** */ /* Types */ diff --git a/libeplayer3/container/text_ssa.c b/libeplayer3/container/text_ssa.c index fe15b07..2f2b920 100644 --- a/libeplayer3/container/text_ssa.c +++ b/libeplayer3/container/text_ssa.c @@ -50,13 +50,13 @@ static short debug_level = 10; #define ssa_printf(level, fmt, x...) do { \ -if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +if (debug_level >= level) printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define ssa_printf(level, fmt, x...) #endif #ifndef SSA_SILENT -#define ssa_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +#define ssa_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define ssa_err(fmt, x...) #endif @@ -71,7 +71,7 @@ if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); //Buffer size used in getLine function. Do not set to value less than 1 !!! #define SSA_BUFFER_SIZE 14 -static const char FILENAME[] = __FILE__; +static const char FILENAME[] = "text_ssa.c"; /* ***************************** */ /* Types */ diff --git a/libeplayer3/manager/audio.c b/libeplayer3/manager/audio.c index 742270a..8662ff8 100644 --- a/libeplayer3/manager/audio.c +++ b/libeplayer3/manager/audio.c @@ -54,7 +54,7 @@ if (debug_level >= level) printf(x); } while (0) #define cERR_AUDIO_MGR_NO_ERROR 0 #define cERR_AUDIO_MGR_ERROR -1 -static const char FILENAME[] = __FILE__; +static const char FILENAME[] = "audio.c"; /* ***************************** */ /* Types */ diff --git a/libeplayer3/manager/subtitle.c b/libeplayer3/manager/subtitle.c index e22ad20..697f669 100644 --- a/libeplayer3/manager/subtitle.c +++ b/libeplayer3/manager/subtitle.c @@ -54,7 +54,7 @@ if (debug_level >= level) printf(x); } while (0) #define cERR_SUBTITLE_MGR_NO_ERROR 0 #define cERR_SUBTITLE_MGR_ERROR -1 -static const char FILENAME[] = __FILE__; +static const char FILENAME[] = "subtitle.c"; /* ***************************** */ /* Types */ diff --git a/libeplayer3/manager/video.c b/libeplayer3/manager/video.c index b50e22b..404d975 100644 --- a/libeplayer3/manager/video.c +++ b/libeplayer3/manager/video.c @@ -54,7 +54,7 @@ if (debug_level >= level) printf(x); } while (0) #define cERR_VIDEO_MGR_NO_ERROR 0 #define cERR_VIDEO_MGR_ERROR -1 -static const char FILENAME[] = __FILE__; +static const char FILENAME[] = "video.c"; /* ***************************** */ /* Types */ diff --git a/libeplayer3/output/linuxdvb.c b/libeplayer3/output/linuxdvb.c index d1c5bb0..41e039a 100644 --- a/libeplayer3/output/linuxdvb.c +++ b/libeplayer3/output/linuxdvb.c @@ -51,17 +51,17 @@ static short debug_level = 10; -static const char FILENAME[] = __FILE__; +static const char FILENAME[] = "linuxdvb.c"; #ifdef LINUXDVB_DEBUG #define linuxdvb_printf(level, fmt, x...) do { \ -if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x ); } while (0) +if (debug_level >= level) printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x ); } while (0) #else #define linuxdvb_printf(x...) #endif #ifndef LINUXDVB_SILENT -#define linuxdvb_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +#define linuxdvb_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define linuxdvb_err(x...) #endif diff --git a/libeplayer3/output/output.c b/libeplayer3/output/output.c index 5689897..8551777 100644 --- a/libeplayer3/output/output.c +++ b/libeplayer3/output/output.c @@ -53,7 +53,7 @@ if (debug_level >= level) printf(x); } while (0) #define cERR_OUTPUT_NO_ERROR 0 #define cERR_OUTPUT_INTERNAL_ERROR -1 -static const char* FILENAME = __FILE__; +static const char* FILENAME = "output.c"; /* ***************************** */ /* Types */ diff --git a/libeplayer3/output/output_subtitle.c b/libeplayer3/output/output_subtitle.c index c5a1a8f..15a9403 100644 --- a/libeplayer3/output/output_subtitle.c +++ b/libeplayer3/output/output_subtitle.c @@ -49,13 +49,13 @@ static short debug_level = 10; #define subtitle_printf(level, fmt, x...) do { \ -if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +if (debug_level >= level) printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define subtitle_printf(level, fmt, x...) #endif #ifndef SUBTITLE_SILENT -#define subtitle_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +#define subtitle_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define subtitle_err(fmt, x...) #endif @@ -64,7 +64,7 @@ if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); #define cERR_SUBTITLE_NO_ERROR 0 #define cERR_SUBTITLE_ERROR -1 -static const char FILENAME[] = "subtitle.c"; +static const char FILENAME[] = "output_subtitle.c"; /* Number, Style, Name,, MarginL, MarginR, MarginV, Effect,, Text diff --git a/libeplayer3/output/writer/aac.c b/libeplayer3/output/writer/aac.c index 73c5f10..67fc853 100644 --- a/libeplayer3/output/writer/aac.c +++ b/libeplayer3/output/writer/aac.c @@ -57,15 +57,16 @@ #ifdef AAC_DEBUG static short debug_level = 0; +static const char *FILENAME = "aac.c"; #define aac_printf(level, fmt, x...) do { \ -if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +if (debug_level >= level) printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define aac_printf(level, fmt, x...) #endif #ifndef AAC_SILENT -#define aac_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +#define aac_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define aac_err(fmt, x...) #endif diff --git a/libeplayer3/output/writer/ac3.c b/libeplayer3/output/writer/ac3.c index c39c971..58a3455 100644 --- a/libeplayer3/output/writer/ac3.c +++ b/libeplayer3/output/writer/ac3.c @@ -56,15 +56,16 @@ #ifdef AC3_DEBUG static short debug_level = 0; +static const char *FILENAME = "ac3.c"; #define ac3_printf(level, fmt, x...) do { \ -if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +if (debug_level >= level) printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define ac3_printf(level, fmt, x...) #endif #ifndef AC3_SILENT -#define ac3_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +#define ac3_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define ac3_err(fmt, x...) #endif diff --git a/libeplayer3/output/writer/divx.c b/libeplayer3/output/writer/divx.c index c65d572..641edff 100644 --- a/libeplayer3/output/writer/divx.c +++ b/libeplayer3/output/writer/divx.c @@ -55,15 +55,16 @@ #ifdef DIVX_DEBUG static short debug_level = 0; +static const char *FILENAME = "divx.c"; #define divx_printf(level, fmt, x...) do { \ -if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +if (debug_level >= level) printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define divx_printf(level, fmt, x...) #endif #ifndef DIVX_SILENT -#define divx_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +#define divx_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define divx_err(fmt, x...) #endif diff --git a/libeplayer3/output/writer/dts.c b/libeplayer3/output/writer/dts.c index a123b87..d09f408 100644 --- a/libeplayer3/output/writer/dts.c +++ b/libeplayer3/output/writer/dts.c @@ -59,15 +59,16 @@ #ifdef DTS_DEBUG static short debug_level = 0; +static const char *FILENAME = "dts.c"; #define dts_printf(level, fmt, x...) do { \ -if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +if (debug_level >= level) printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define dts_printf(level, fmt, x...) #endif #ifndef DTS_SILENT -#define dts_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +#define dts_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define dts_err(fmt, x...) #endif diff --git a/libeplayer3/output/writer/flac.c b/libeplayer3/output/writer/flac.c index e1c01a1..1b68fc9 100644 --- a/libeplayer3/output/writer/flac.c +++ b/libeplayer3/output/writer/flac.c @@ -54,15 +54,16 @@ #ifdef FLAC_DEBUG static short debug_level = 1; +static const char *FILENAME = "flac.c"; #define flac_printf(level, fmt, x...) do { \ -if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +if (debug_level >= level) printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define flac_printf(level, fmt, x...) #endif #ifndef FLAC_SILENT -#define flac_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +#define flac_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define flac_err(fmt, x...) #endif diff --git a/libeplayer3/output/writer/framebuffer.c b/libeplayer3/output/writer/framebuffer.c index e55faad..9d8ab2d 100644 --- a/libeplayer3/output/writer/framebuffer.c +++ b/libeplayer3/output/writer/framebuffer.c @@ -54,15 +54,16 @@ #ifdef FB_DEBUG static short debug_level = 10; +static const char *FILENAME = "framebuffer.c"; #define fb_printf(level, fmt, x...) do { \ -if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +if (debug_level >= level) printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define fb_printf(level, fmt, x...) #endif #ifndef FB_SILENT -#define fb_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +#define fb_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define fb_err(fmt, x...) #endif diff --git a/libeplayer3/output/writer/h263.c b/libeplayer3/output/writer/h263.c index 63c8ca4..519d298 100644 --- a/libeplayer3/output/writer/h263.c +++ b/libeplayer3/output/writer/h263.c @@ -54,15 +54,16 @@ #ifdef H263_DEBUG static short debug_level = 0; +static const char *FILENAME = "h263.c"; #define h263_printf(level, fmt, x...) do { \ -if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +if (debug_level >= level) printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define h263_printf(level, fmt, x...) #endif #ifndef H263_SILENT -#define h263_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +#define h263_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define h263_err(fmt, x...) #endif diff --git a/libeplayer3/output/writer/h264.c b/libeplayer3/output/writer/h264.c index 3fdd4c8..edb1b4d 100644 --- a/libeplayer3/output/writer/h264.c +++ b/libeplayer3/output/writer/h264.c @@ -53,16 +53,17 @@ #ifdef H264_DEBUG +static const char *FILENAME = "h264.c"; static short debug_level = 0; #define h264_printf(level, fmt, x...) do { \ -if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +if (debug_level >= level) printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define h264_printf(level, fmt, x...) #endif #ifndef H264_SILENT -#define h264_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +#define h264_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define h264_err(fmt, x...) #endif diff --git a/libeplayer3/output/writer/mp3.c b/libeplayer3/output/writer/mp3.c index 4ba936d..8baf7ce 100644 --- a/libeplayer3/output/writer/mp3.c +++ b/libeplayer3/output/writer/mp3.c @@ -54,15 +54,16 @@ #ifdef MP3_DEBUG static short debug_level = 0; +static const char *FILENAME = "mp3.c"; #define mp3_printf(level, fmt, x...) do { \ -if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +if (debug_level >= level) printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define mp3_printf(level, fmt, x...) #endif #ifndef MP3_SILENT -#define mp3_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +#define mp3_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define mp3_err(fmt, x...) #endif diff --git a/libeplayer3/output/writer/mpeg2.c b/libeplayer3/output/writer/mpeg2.c index 3869369..a86d861 100644 --- a/libeplayer3/output/writer/mpeg2.c +++ b/libeplayer3/output/writer/mpeg2.c @@ -55,15 +55,16 @@ #ifdef MPEG2_DEBUG static short debug_level = 0; +static const char *FILENAME = "mpeg2.c"; #define mpeg2_printf(level, fmt, x...) do { \ -if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +if (debug_level >= level) printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define mpeg2_printf(level, fmt, x...) #endif #ifndef MPEG2_SILENT -#define mpeg2_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +#define mpeg2_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define mpeg2_err(fmt, x...) #endif diff --git a/libeplayer3/output/writer/pcm.c b/libeplayer3/output/writer/pcm.c index 9c22733..6b8c3e9 100644 --- a/libeplayer3/output/writer/pcm.c +++ b/libeplayer3/output/writer/pcm.c @@ -55,15 +55,16 @@ #ifdef PCM_DEBUG static short debug_level = 1; +static const char *FILENAME = "pcm.c"; #define pcm_printf(level, fmt, x...) do { \ -if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +if (debug_level >= level) printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define pcm_printf(level, fmt, x...) #endif #ifndef PCM_SILENT -#define pcm_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +#define pcm_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define pcm_err(fmt, x...) #endif diff --git a/libeplayer3/output/writer/vc1.c b/libeplayer3/output/writer/vc1.c index 4f423ea..2487ab1 100644 --- a/libeplayer3/output/writer/vc1.c +++ b/libeplayer3/output/writer/vc1.c @@ -66,15 +66,16 @@ #ifdef VC1_DEBUG static short debug_level = 10; +static const char *FILENAME = "vc1.c"; #define vc1_printf(level, fmt, x...) do { \ -if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +if (debug_level >= level) printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define vc1_printf(level, fmt, x...) #endif #ifndef VC1_SILENT -#define vc1_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +#define vc1_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define vc1_err(fmt, x...) #endif diff --git a/libeplayer3/output/writer/vorbis.c b/libeplayer3/output/writer/vorbis.c index 4415e65..f64f4de 100644 --- a/libeplayer3/output/writer/vorbis.c +++ b/libeplayer3/output/writer/vorbis.c @@ -54,15 +54,16 @@ #ifdef VORBIS_DEBUG static short debug_level = 1; +static const char *FILENAME = "vorbis.c"; #define vorbis_printf(level, fmt, x...) do { \ -if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +if (debug_level >= level) printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define vorbis_printf(level, fmt, x...) #endif #ifndef VORBIS_SILENT -#define vorbis_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +#define vorbis_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define vorbis_err(fmt, x...) #endif diff --git a/libeplayer3/output/writer/wma.c b/libeplayer3/output/writer/wma.c index 2fe0acc..b025ba1 100644 --- a/libeplayer3/output/writer/wma.c +++ b/libeplayer3/output/writer/wma.c @@ -55,15 +55,16 @@ #ifdef WMA_DEBUG static short debug_level = 10; +static const char *FILENAME = "wma.c"; #define wma_printf(level, fmt, x...) do { \ -if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +if (debug_level >= level) printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define wma_printf(level, fmt, x...) #endif #ifndef WMA_SILENT -#define wma_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +#define wma_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define wma_err(fmt, x...) #endif diff --git a/libeplayer3/output/writer/wmv.c b/libeplayer3/output/writer/wmv.c index 04ce6f5..ac0d76d 100644 --- a/libeplayer3/output/writer/wmv.c +++ b/libeplayer3/output/writer/wmv.c @@ -62,15 +62,16 @@ #ifdef WMV_DEBUG static short debug_level = 10; +static const char *FILENAME = "wmv.c"; #define wmv_printf(level, fmt, x...) do { \ -if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +if (debug_level >= level) printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define wmv_printf(level, fmt, x...) #endif #ifndef WMV_SILENT -#define wmv_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +#define wmv_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define wmv_err(fmt, x...) #endif diff --git a/libeplayer3/playback/playback.c b/libeplayer3/playback/playback.c index e1fe779..de88d92 100644 --- a/libeplayer3/playback/playback.c +++ b/libeplayer3/playback/playback.c @@ -31,15 +31,16 @@ static short debug_level = 10; +static const char *FILENAME = "playback.c"; #ifdef PLAYBACK_DEBUG #define playback_printf(level, fmt, x...) do { \ -if (debug_level >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +if (debug_level >= level) printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define playback_printf(level, fmt, x...) #endif #ifndef PLAYBACK_SILENT -#define playback_err(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +#define playback_err(fmt, x...) do { printf("[%s:%s] " fmt, FILENAME, __FUNCTION__, ## x); } while (0) #else #define playback_err(fmt, x...) #endif