aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-09-11 23:19:57 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-09-11 23:19:57 +0000
commita1689e2f19957c45b6f2b2fc0063b304826a8887 (patch)
tree2c8f041d185284db79a34f509a3c98c4f400b16e /libavcodec
parentb4abfb306084e204a1c79f468dbb3b0880914342 (diff)
downloadffmpeg-a1689e2f19957c45b6f2b2fc0063b304826a8887.tar.gz
avoid stdio.h
Originally committed as revision 4585 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/opt.c21
-rw-r--r--libavcodec/opt.h2
2 files changed, 11 insertions, 12 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;
}
diff --git a/libavcodec/opt.h b/libavcodec/opt.h
index 7b2fe47c66..c84db00fed 100644
--- a/libavcodec/opt.h
+++ b/libavcodec/opt.h
@@ -56,6 +56,6 @@ AVRational av_get_q(void *obj, const char *name, AVOption **o_out);
int64_t av_get_int(void *obj, const char *name, AVOption **o_out);
const char *av_get_string(void *obj, const char *name, AVOption **o_out, char *buf, int buf_len);
AVOption *av_next_option(void *obj, AVOption *last);
-int av_opt_show(void *obj, FILE *f);
+int av_opt_show(void *obj, void *av_log_obj);
#endif