[FFmpeg-cvslog] cmdutils: print supported codecs in show_help_bsf()

James Almer git at videolan.org
Thu Mar 22 05:15:31 EET 2018


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Wed Mar 21 22:09:45 2018 -0300| [ead257db560ae0c66c4e834a743f2148e6718f04] | committer: James Almer

cmdutils: print supported codecs in show_help_bsf()

Tested-by: Jun Zhao <mypopydev at gmail.com>
Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ead257db560ae0c66c4e834a743f2148e6718f04
---

 fftools/cmdutils.c | 2 ++
 fftools/cmdutils.h | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c
index 708a849f51..c0ddf0b287 100644
--- a/fftools/cmdutils.c
+++ b/fftools/cmdutils.c
@@ -1907,6 +1907,8 @@ static void show_help_bsf(const char *name)
     }
 
     printf("Bit stream filter %s\n", bsf->name);
+    PRINT_CODEC_SUPPORTED(bsf, codec_ids, enum AVCodecID, "codecs",
+                          AV_CODEC_ID_NONE, GET_CODEC_NAME);
     if (bsf->priv_class)
         show_help_children(bsf->priv_class, AV_OPT_FLAG_BSF_PARAM);
 }
diff --git a/fftools/cmdutils.h b/fftools/cmdutils.h
index 87244891d4..6e2e0a2acb 100644
--- a/fftools/cmdutils.h
+++ b/fftools/cmdutils.h
@@ -625,6 +625,9 @@ void *grow_array(void *array, int elem_size, int *size, int new_size);
 #define GET_PIX_FMT_NAME(pix_fmt)\
     const char *name = av_get_pix_fmt_name(pix_fmt);
 
+#define GET_CODEC_NAME(id)\
+    const char *name = avcodec_descriptor_get(id)->name;
+
 #define GET_SAMPLE_FMT_NAME(sample_fmt)\
     const char *name = av_get_sample_fmt_name(sample_fmt)
 



More information about the ffmpeg-cvslog mailing list