Commit 638922f0 authored by michael's avatar michael

avoid stdio.h


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@4585 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 25870106
...@@ -4495,7 +4495,7 @@ static void show_help(void) ...@@ -4495,7 +4495,7 @@ static void show_help(void)
show_help_options(options, "\nAdvanced options:\n", show_help_options(options, "\nAdvanced options:\n",
OPT_EXPERT | OPT_AUDIO | OPT_VIDEO | OPT_GRAB, OPT_EXPERT | OPT_AUDIO | OPT_VIDEO | OPT_GRAB,
OPT_EXPERT); OPT_EXPERT);
av_opt_show(avctx_opts, stdout); av_opt_show(avctx_opts, NULL);
exit(1); exit(1);
} }
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
* @author Michael Niedermayer <michaelni@gmx.at> * @author Michael Niedermayer <michaelni@gmx.at>
*/ */
#include <stdio.h> //for FILE *
#include "avcodec.h" #include "avcodec.h"
static double av_parse_num(const char *name, char **tail){ 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){ ...@@ -224,26 +223,26 @@ int64_t av_get_int(void *obj, const char *name, AVOption **o_out){
return num*intnum/den; 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; AVOption *opt=NULL;
if(!obj) if(!obj)
return -1; 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))){ while((opt= av_next_option(obj, opt))){
if(!(opt->flags & (AV_OPT_FLAG_ENCODING_PARAM|AV_OPT_FLAG_DECODING_PARAM))) if(!(opt->flags & (AV_OPT_FLAG_ENCODING_PARAM|AV_OPT_FLAG_DECODING_PARAM)))
continue; continue;
fprintf(f, "-%-17s ", opt->name); av_log(av_log_obj, AV_LOG_INFO, "-%-17s ", opt->name);
fprintf(f, "%c", (opt->flags & AV_OPT_FLAG_ENCODING_PARAM) ? 'E' : '.'); av_log(av_log_obj, AV_LOG_INFO, "%c", (opt->flags & AV_OPT_FLAG_ENCODING_PARAM) ? 'E' : '.');
fprintf(f, "%c", (opt->flags & AV_OPT_FLAG_DECODING_PARAM) ? 'D' : '.'); av_log(av_log_obj, AV_LOG_INFO, "%c", (opt->flags & AV_OPT_FLAG_DECODING_PARAM) ? 'D' : '.');
fprintf(f, "%c", (opt->flags & AV_OPT_FLAG_VIDEO_PARAM ) ? 'V' : '.'); av_log(av_log_obj, AV_LOG_INFO, "%c", (opt->flags & AV_OPT_FLAG_VIDEO_PARAM ) ? 'V' : '.');
fprintf(f, "%c", (opt->flags & AV_OPT_FLAG_AUDIO_PARAM ) ? 'A' : '.'); av_log(av_log_obj, AV_LOG_INFO, "%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, "%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; return 0;
} }
...@@ -56,6 +56,6 @@ AVRational av_get_q(void *obj, const char *name, AVOption **o_out); ...@@ -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); 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); 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); 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 #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment