Browse code

Show per-codec options on FFmpeg commandline help.

Originally committed as revision 25927 to svn://svn.ffmpeg.org/ffmpeg/trunk

Justin Ruggles authored on 2010/12/11 03:25:02
Showing 1 changed files
... ...
@@ -3883,6 +3883,8 @@ static void show_usage(void)
3883 3883
 
3884 3884
 static void show_help(void)
3885 3885
 {
3886
+    AVCodec *c;
3887
+
3886 3888
     av_log_set_callback(log_callback_help);
3887 3889
     show_usage();
3888 3890
     show_help_options(options, "Main options:\n",
... ...
@@ -3911,6 +3913,16 @@ static void show_help(void)
3911 3911
     printf("\n");
3912 3912
     av_opt_show2(avcodec_opts[0], NULL, AV_OPT_FLAG_ENCODING_PARAM|AV_OPT_FLAG_DECODING_PARAM, 0);
3913 3913
     printf("\n");
3914
+
3915
+    /* individual codec options */
3916
+    c = NULL;
3917
+    while ((c = av_codec_next(c))) {
3918
+        if (c->priv_class) {
3919
+            av_opt_show2(&c->priv_class, NULL, AV_OPT_FLAG_ENCODING_PARAM|AV_OPT_FLAG_DECODING_PARAM, 0);
3920
+            printf("\n");
3921
+        }
3922
+    }
3923
+
3914 3924
     av_opt_show2(avformat_opts, NULL, AV_OPT_FLAG_ENCODING_PARAM|AV_OPT_FLAG_DECODING_PARAM, 0);
3915 3925
     printf("\n");
3916 3926
     av_opt_show2(sws_opts, NULL, AV_OPT_FLAG_ENCODING_PARAM|AV_OPT_FLAG_DECODING_PARAM, 0);