On 22-11-2019 02:26 pm, Steven Liu wrote:
Signed-off-by: Steven Liu <l...@chinaffmpeg.org>
---
  fftools/cmdutils.c | 17 +++++++++++++++++
  1 file changed, 17 insertions(+)

diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c
index 84f98b7c04..fe18093ce1 100644
--- a/fftools/cmdutils.c
+++ b/fftools/cmdutils.c
@@ -1870,6 +1870,21 @@ 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 URLProtocol *proto = av_find_protocol_by_name(name);;
+
+    if (!proto) {
+        av_log(NULL, AV_LOG_ERROR, "Unknown protocol '%s'.\n", name);
+        return;
+    }
+
+    printf("Protocol %s:\n", name);
+
+    if (proto->priv_data_class)
+        show_help_children(proto->priv_data_class, AV_OPT_FLAG_DECODING_PARAM);
+}

Protocols may be employed for output as well. Is there a separate option for those protocol options?

+
  static void show_help_muxer(const char *name)
  {
      const AVCodecDescriptor *desc;
@@ -2000,6 +2015,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);

Regards,
Gyan
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to