diff options
author | Steven Liu <lq@chinaffmpeg.org> | 2019-11-27 13:57:02 +0800 |
---|---|---|
committer | Steven Liu <lq@chinaffmpeg.org> | 2020-01-30 17:10:21 +0800 |
commit | 6087692a60699a5eac5b061dd458e5a856e0662f (patch) | |
tree | a686403d4d7f08709d18f56782463cc45566aed0 /fftools/cmdutils.c | |
parent | 27529eeb27cf0d7f574ae60d5cef22baa0e8a850 (diff) | |
download | ffmpeg-6087692a60699a5eac5b061dd458e5a856e0662f.tar.gz |
cmdutils: add show_help_protocol for get protocol options
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
Diffstat (limited to 'fftools/cmdutils.c')
-rw-r--r-- | fftools/cmdutils.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 7954f23430..22846317c1 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -1870,6 +1870,18 @@ static void show_help_demuxer(const char *name) show_help_children(fmt->priv_class, AV_OPT_FLAG_DECODING_PARAM); } +static void show_help_protocol(const char *name) +{ + const AVClass *proto_class = avio_protocol_get_class(name); + + if (!proto_class) { + av_log(NULL, AV_LOG_ERROR, "Unknown protocol '%s'.\n", name); + return; + } + + show_help_children(proto_class, AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_ENCODING_PARAM); +} + static void show_help_muxer(const char *name) { const AVCodecDescriptor *desc; @@ -2000,6 +2012,8 @@ int show_help(void *optctx, const char *opt, const char *arg) show_help_demuxer(par); } else if (!strcmp(topic, "muxer")) { show_help_muxer(par); + } else if (!strcmp(topic, "protocol")) { + show_help_protocol(par); #if CONFIG_AVFILTER } else if (!strcmp(topic, "filter")) { show_help_filter(par); |