[FFmpeg-cvslog] r20553 - in trunk: cmdutils.c cmdutils.h ffmpeg.c ffplay.c ffserver.c

michael subversion
Thu Nov 19 17:35:55 CET 2009


Author: michael
Date: Thu Nov 19 17:35:55 2009
New Revision: 20553

Log:
Split show_formats().

Modified:
   trunk/cmdutils.c
   trunk/cmdutils.h
   trunk/ffmpeg.c
   trunk/ffplay.c
   trunk/ffserver.c

Modified: trunk/cmdutils.c
==============================================================================
--- trunk/cmdutils.c	Thu Nov 19 12:49:03 2009	(r20552)
+++ trunk/cmdutils.c	Thu Nov 19 17:35:55 2009	(r20553)
@@ -417,9 +417,6 @@ void show_formats(void)
 {
     AVInputFormat *ifmt=NULL;
     AVOutputFormat *ofmt=NULL;
-    URLProtocol *up=NULL;
-    AVCodec *p=NULL, *p2;
-    AVBitStreamFilter *bsf=NULL;
     const char *last_name;
 
     printf(
@@ -463,8 +460,12 @@ void show_formats(void)
             name,
             long_name ? long_name:" ");
     }
-    printf("\n");
+}
 
+void show_codecs(void)
+{
+    AVCodec *p=NULL, *p2;
+    const char *last_name;
     printf(
         "Codecs:\n"
         " D..... = Decoding supported\n"
@@ -529,11 +530,27 @@ void show_formats(void)
         printf("\n");
     }
     printf("\n");
+    printf(
+"Note, the names of encoders and decoders do not always match, so there are\n"
+"several cases where the above table shows encoder only or decoder only entries\n"
+"even though both encoding and decoding are supported. For example, the h263\n"
+"decoder corresponds to the h263 and h263p encoders, for file formats it is even\n"
+"worse.\n");
+}
+
+void show_bsfs(void)
+{
+    AVBitStreamFilter *bsf=NULL;
 
     printf("Bitstream filters:\n");
     while((bsf = av_bitstream_filter_next(bsf)))
         printf("%s\n", bsf->name);
     printf("\n");
+}
+
+void show_protocols(void)
+{
+    URLProtocol *up=NULL;
 
     printf("Supported file protocols:\n");
     while((up = av_protocol_next(up)))
@@ -541,13 +558,6 @@ void show_formats(void)
     printf("\n");
 
     printf("Frame size, frame rate abbreviations:\n ntsc pal qntsc qpal sntsc spal film ntsc-film sqcif qcif cif 4cif\n");
-    printf("\n");
-    printf(
-"Note, the names of encoders and decoders do not always match, so there are\n"
-"several cases where the above table shows encoder only or decoder only entries\n"
-"even though both encoding and decoding are supported. For example, the h263\n"
-"decoder corresponds to the h263 and h263p encoders, for file formats it is even\n"
-"worse.\n");
 }
 
 int read_yesno(void)

Modified: trunk/cmdutils.h
==============================================================================
--- trunk/cmdutils.h	Thu Nov 19 12:49:03 2009	(r20552)
+++ trunk/cmdutils.h	Thu Nov 19 17:35:55 2009	(r20553)
@@ -158,6 +158,24 @@ void show_license(void);
 void show_formats(void);
 
 /**
+ * Prints a listing containing all the codecs supported by the
+ * program.
+ */
+void show_codecs(void);
+
+/**
+ * Prints a listing containing all the bit stream filters supported by the
+ * program.
+ */
+void show_bsfs(void);
+
+/**
+ * Prints a listing containing all the protocols supported by the
+ * program.
+ */
+void show_protocols(void);
+
+/**
  * Returns a positive value if reads from standard input a line
  * starting with [yY], otherwise returns 0.
  */

Modified: trunk/ffmpeg.c
==============================================================================
--- trunk/ffmpeg.c	Thu Nov 19 12:49:03 2009	(r20552)
+++ trunk/ffmpeg.c	Thu Nov 19 17:35:55 2009	(r20553)
@@ -3828,7 +3828,10 @@ static const OptionDef options[] = {
     { "L", OPT_EXIT, {(void*)show_license}, "show license" },
     { "h", OPT_EXIT, {(void*)show_help}, "show help" },
     { "version", OPT_EXIT, {(void*)show_version}, "show version" },
-    { "formats", OPT_EXIT, {(void*)show_formats}, "show available formats, codecs, protocols, ..." },
+    { "formats"  , OPT_EXIT, {(void*)show_formats  }, "show available formats" },
+    { "codecs"   , OPT_EXIT, {(void*)show_codecs   }, "show available codecs" },
+    { "bsfs"     , OPT_EXIT, {(void*)show_bsfs     }, "show available bit stream filters" },
+    { "protocols", OPT_EXIT, {(void*)show_protocols}, "show available protocols" },
     { "f", HAS_ARG, {(void*)opt_format}, "force format", "fmt" },
     { "i", HAS_ARG, {(void*)opt_input_file}, "input file name", "filename" },
     { "y", OPT_BOOL, {(void*)&file_overwrite}, "overwrite output files" },

Modified: trunk/ffplay.c
==============================================================================
--- trunk/ffplay.c	Thu Nov 19 12:49:03 2009	(r20552)
+++ trunk/ffplay.c	Thu Nov 19 17:35:55 2009	(r20553)
@@ -2456,7 +2456,10 @@ static const OptionDef options[] = {
     { "h", OPT_EXIT, {(void*)show_help}, "show help" },
     { "version", OPT_EXIT, {(void*)show_version}, "show version" },
     { "L", OPT_EXIT, {(void*)show_license}, "show license" },
-    { "formats", OPT_EXIT, {(void*)show_formats}, "show available formats, codecs, protocols, ..." },
+    { "formats"  , OPT_EXIT, {(void*)show_formats  }, "show available formats" },
+    { "codecs"   , OPT_EXIT, {(void*)show_codecs   }, "show available codecs" },
+    { "bsfs"     , OPT_EXIT, {(void*)show_bsfs     }, "show available bit stream filters" },
+    { "protocols", OPT_EXIT, {(void*)show_protocols}, "show available protocols" },
     { "x", HAS_ARG | OPT_FUNC2, {(void*)opt_width}, "force displayed width", "width" },
     { "y", HAS_ARG | OPT_FUNC2, {(void*)opt_height}, "force displayed height", "height" },
     { "s", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_size}, "set frame size (WxH or abbreviation)", "size" },

Modified: trunk/ffserver.c
==============================================================================
--- trunk/ffserver.c	Thu Nov 19 12:49:03 2009	(r20552)
+++ trunk/ffserver.c	Thu Nov 19 17:35:55 2009	(r20553)
@@ -4475,7 +4475,10 @@ static const OptionDef options[] = {
     { "h", OPT_EXIT, {(void*)opt_show_help}, "show help" },
     { "version", OPT_EXIT, {(void*)show_version}, "show version" },
     { "L", OPT_EXIT, {(void*)show_license}, "show license" },
-    { "formats", OPT_EXIT, {(void*)show_formats}, "show available formats, codecs, protocols, ..." },
+    { "formats"  , OPT_EXIT, {(void*)show_formats  }, "show available formats" },
+    { "codecs"   , OPT_EXIT, {(void*)show_codecs   }, "show available codecs" },
+    { "bsfs"     , OPT_EXIT, {(void*)show_bsfs     }, "show available bit stream filters" },
+    { "protocols", OPT_EXIT, {(void*)show_protocols}, "show available protocols" },
     { "loglevel", HAS_ARG | OPT_FUNC2, {(void*)opt_loglevel}, "set libav* logging level", "loglevel" },
     { "n", OPT_BOOL, {(void *)&no_launch }, "enable no-launch mode" },
     { "d", 0, {(void*)opt_debug}, "enable debug mode" },



More information about the ffmpeg-cvslog mailing list