[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec opt.c,1.5,1.6 opt.h,1.1,1.2
Michael Niedermayer CVS
michael
Mon Sep 12 01:20:00 CEST 2005
Update of /cvsroot/ffmpeg/ffmpeg/libavcodec
In directory mail:/var2/tmp/cvs-serv13865/libavcodec
Modified Files:
opt.c opt.h
Log Message:
avoid stdio.h
Index: opt.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/opt.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- opt.c 11 Sep 2005 14:39:33 -0000 1.5
+++ opt.c 11 Sep 2005 23:19:57 -0000 1.6
@@ -24,7 +24,6 @@
* @author Michael Niedermayer <michaelni at gmx.at>
*/
-#include <stdio.h> //for FILE *
#include "avcodec.h"
static double av_parse_num(const char *name, char **tail){
@@ -224,26 +223,26 @@
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;
}
Index: opt.h
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/opt.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- opt.h 11 Sep 2005 14:22:42 -0000 1.1
+++ opt.h 11 Sep 2005 23:19:57 -0000 1.2
@@ -56,6 +56,6 @@
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
More information about the ffmpeg-cvslog
mailing list