#endif
if(avctx_opts[0]->debug)
- av_log_level = AV_LOG_DEBUG;
+ av_log_set_level(AV_LOG_DEBUG);
return 0;
}
static void opt_verbose(const char *arg)
{
verbose = atoi(arg);
- av_log_level = atoi(arg);
+ av_log_set_level(atoi(arg));
}
static void opt_frame_rate(const char *arg)
static void opt_debug(const char *arg)
{
- av_log_level = 99;
+ av_log_set_level(99);
debug = atoi(arg);
}
" [PAR %d:%d DAR %d:%d]",
enc->sample_aspect_ratio.num, enc->sample_aspect_ratio.den,
display_aspect_ratio.num, display_aspect_ratio.den);
- if(av_log_level >= AV_LOG_DEBUG){
+ if(av_log_get_level() >= AV_LOG_DEBUG){
int g= ff_gcd(enc->time_base.num, enc->time_base.den);
snprintf(buf + strlen(buf), buf_size - strlen(buf),
", %d/%d",
vfprintf(stderr, fmt, vl);
}
-#if LIBAVUTIL_VERSION_INT < (50<<16)
static void (*av_log_callback)(void*, int, const char*, va_list) = av_log_default_callback;
-#else
-void (*av_vlog)(void*, int, const char*, va_list) = av_log_default_callback;
-#endif
void av_log(void* avcl, int level, const char *fmt, ...)
{
va_end(vl);
}
-#if LIBAVUTIL_VERSION_INT < (50<<16)
void av_vlog(void* avcl, int level, const char *fmt, va_list vl)
{
av_log_callback(avcl, level, fmt, vl);
{
av_log_callback = callback;
}
-#endif
*/
#define AV_LOG_DEBUG 48
#endif
+
+#if LIBAVUTIL_VERSION_INT < (50<<16)
extern int av_log_level;
+#endif
/**
* Send the specified message to the log if the level is less than or equal to
extern void av_log(void*, int level, const char *fmt, ...);
#endif
-#if LIBAVUTIL_VERSION_INT < (50<<16)
extern void av_vlog(void*, int level, const char *fmt, va_list);
extern int av_log_get_level(void);
extern void av_log_set_level(int);
extern void av_log_set_callback(void (*)(void*, int, const char*, va_list));
extern void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl);
-#else
-extern void (*av_vlog)(void*, int, const char*, va_list);
-#endif
#endif /* FFMPEG_LOG_H */