[FFmpeg-devel] [PATCH 2/4] cmdutils: switch PRINT_CODEC_SUPPORTED to av_log
Michael Niedermayer
michaelni at gmx.at
Mon Oct 22 02:01:35 CEST 2012
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
cmdutils.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/cmdutils.c b/cmdutils.c
index 8467a5a..5b9111a 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -808,17 +808,17 @@ int show_formats(void *optctx, const char *opt, const char *arg)
return 0;
}
-#define PRINT_CODEC_SUPPORTED(codec, field, type, list_name, term, get_name) \
+#define PRINT_CODEC_SUPPORTED(ctx, codec, field, type, list_name, term, get_name) \
if (codec->field) { \
const type *p = codec->field; \
\
- printf(" Supported " list_name ":"); \
+ av_log(ctx, AV_LOG_INFO, " Supported " list_name ":"); \
while (*p != term) { \
get_name(*p); \
- printf(" %s", name); \
+ av_log(ctx, AV_LOG_INFO, " %s", name); \
p++; \
} \
- printf("\n"); \
+ av_log(ctx, AV_LOG_INFO, "\n"); \
} \
static void print_codec(const AVCodec *c)
@@ -851,13 +851,13 @@ static void print_codec(const AVCodec *c)
}
printf("\n");
}
- PRINT_CODEC_SUPPORTED(c, pix_fmts, enum AVPixelFormat, "pixel formats",
+ PRINT_CODEC_SUPPORTED(NULL, c, pix_fmts, enum AVPixelFormat, "pixel formats",
AV_PIX_FMT_NONE, GET_PIX_FMT_NAME);
- PRINT_CODEC_SUPPORTED(c, supported_samplerates, int, "sample rates", 0,
+ PRINT_CODEC_SUPPORTED(NULL, c, supported_samplerates, int, "sample rates", 0,
GET_SAMPLE_RATE_NAME);
- PRINT_CODEC_SUPPORTED(c, sample_fmts, enum AVSampleFormat, "sample formats",
+ PRINT_CODEC_SUPPORTED(NULL, c, sample_fmts, enum AVSampleFormat, "sample formats",
AV_SAMPLE_FMT_NONE, GET_SAMPLE_FMT_NAME);
- PRINT_CODEC_SUPPORTED(c, channel_layouts, uint64_t, "channel layouts",
+ PRINT_CODEC_SUPPORTED(NULL, c, channel_layouts, uint64_t, "channel layouts",
0, GET_CH_LAYOUT_DESC);
if (c->priv_class) {
--
1.7.9.5
More information about the ffmpeg-devel
mailing list