Browse Source

av_default_item_name() so Simply AVClasses need 1 function less.

Originally committed as revision 23198 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/n0.8
Michael Niedermayer 15 years ago
parent
commit
8d2a5139da
2 changed files with 5 additions and 0 deletions
  1. +4
    -0
      libavutil/log.c
  2. +1
    -0
      libavutil/log.h

+ 4
- 0
libavutil/log.c View File

@@ -55,6 +55,10 @@ static void colored_fputs(int color, const char *str){
}
}

const char* av_default_item_name(void* ptr){
return (*(AVClass**)ptr)->class_name;
}

void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl)
{
static int print_prefix=1;


+ 1
- 0
libavutil/log.h View File

@@ -125,5 +125,6 @@ int av_log_get_level(void);
void av_log_set_level(int);
void av_log_set_callback(void (*)(void*, int, const char*, va_list));
void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl);
const char* av_default_item_name(void* ctx);

#endif /* AVUTIL_LOG_H */

Loading…
Cancel
Save