diff options
author | Michael Niedermayer | 2005-09-11 23:19:57 +0000 |
---|---|---|
committer | Michael Niedermayer | 2005-09-11 23:19:57 +0000 |
commit | a1689e2f19957c45b6f2b2fc0063b304826a8887 (patch) | |
tree | 2c8f041d185284db79a34f509a3c98c4f400b16e /libavcodec/opt.c | |
parent | b4abfb306084e204a1c79f468dbb3b0880914342 (diff) |
avoid stdio.h
Originally committed as revision 4585 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/opt.c')
-rw-r--r-- | libavcodec/opt.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/libavcodec/opt.c b/libavcodec/opt.c index fc8f28462b..bf49767185 100644 --- a/libavcodec/opt.c +++ b/libavcodec/opt.c @@ -24,7 +24,6 @@ * @author Michael Niedermayer <michaelni@gmx.at> */ -#include <stdio.h> //for FILE * #include "avcodec.h" static double av_parse_num(const char *name, char **tail){ @@ -224,26 +223,26 @@ int64_t av_get_int(void *obj, const char *name, AVOption **o_out){ return num*intnum/den; } -int av_opt_show(void *obj, FILE *f){ +int av_opt_show(void *obj, void *av_log_obj){ AVOption *opt=NULL; if(!obj) return -1; -#undef fprintf - fprintf(f, "%s AVOptions:\n", (*(AVClass**)obj)->class_name); + + av_log(av_log_obj, AV_LOG_INFO, "%s AVOptions:\n", (*(AVClass**)obj)->class_name); while((opt= av_next_option(obj, opt))){ if(!(opt->flags & (AV_OPT_FLAG_ENCODING_PARAM|AV_OPT_FLAG_DECODING_PARAM))) continue; - fprintf(f, "-%-17s ", opt->name); - fprintf(f, "%c", (opt->flags & AV_OPT_FLAG_ENCODING_PARAM) ? 'E' : '.'); - fprintf(f, "%c", (opt->flags & AV_OPT_FLAG_DECODING_PARAM) ? 'D' : '.'); - fprintf(f, "%c", (opt->flags & AV_OPT_FLAG_VIDEO_PARAM ) ? 'V' : '.'); - fprintf(f, "%c", (opt->flags & AV_OPT_FLAG_AUDIO_PARAM ) ? 'A' : '.'); - fprintf(f, "%c", (opt->flags & AV_OPT_FLAG_SUBTITLE_PARAM) ? 'S' : '.'); + av_log(av_log_obj, AV_LOG_INFO, "-%-17s ", opt->name); + av_log(av_log_obj, AV_LOG_INFO, "%c", (opt->flags & AV_OPT_FLAG_ENCODING_PARAM) ? 'E' : '.'); + av_log(av_log_obj, AV_LOG_INFO, "%c", (opt->flags & AV_OPT_FLAG_DECODING_PARAM) ? 'D' : '.'); + av_log(av_log_obj, AV_LOG_INFO, "%c", (opt->flags & AV_OPT_FLAG_VIDEO_PARAM ) ? 'V' : '.'); + av_log(av_log_obj, AV_LOG_INFO, "%c", (opt->flags & AV_OPT_FLAG_AUDIO_PARAM ) ? 'A' : '.'); + av_log(av_log_obj, AV_LOG_INFO, "%c", (opt->flags & AV_OPT_FLAG_SUBTITLE_PARAM) ? 'S' : '.'); - fprintf(f, " %s\n", opt->help); + av_log(av_log_obj, AV_LOG_INFO, " %s\n", opt->help); } return 0; } |