OSDN Git Service

Move list_fmts() from ffmpeg.c to cmdutils.{h,c}, so that it can be
authorStefano Sabatini <stefano.sabatini-lala@poste.it>
Sat, 12 Dec 2009 17:45:20 +0000 (17:45 +0000)
committerStefano Sabatini <stefano.sabatini-lala@poste.it>
Sat, 12 Dec 2009 17:45:20 +0000 (17:45 +0000)
shared by the other ff* tools code.

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

cmdutils.c
cmdutils.h
ffmpeg.c

index b87eea3..d4afc02 100644 (file)
@@ -413,6 +413,16 @@ void show_license(void)
     );
 }
 
+void list_fmts(void (*get_fmt_string)(char *buf, int buf_size, int fmt), int nb_fmts)
+{
+    int i;
+    char fmt_str[128];
+    for (i=-1; i < nb_fmts; i++) {
+        get_fmt_string (fmt_str, sizeof(fmt_str), i);
+        fprintf(stdout, "%s\n", fmt_str);
+    }
+}
+
 void show_formats(void)
 {
     AVInputFormat *ifmt=NULL;
index c2734a1..40bdea3 100644 (file)
@@ -131,6 +131,8 @@ void set_context_opts(void *ctx, void *opts_ctx, int flags);
 
 void print_error(const char *filename, int err);
 
+void list_fmts(void (*get_fmt_string)(char *buf, int buf_size, int fmt), int nb_fmts);
+
 /**
  * Prints the program banner to stderr. The banner contents depend on the
  * current version of the repository and of the libav* libraries used by
index d1a00b8..a1abd30 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2564,16 +2564,6 @@ static void opt_frame_pad_right(const char *arg)
     }
 }
 
-static void list_fmts(void (*get_fmt_string)(char *buf, int buf_size, int fmt), int nb_fmts)
-{
-    int i;
-    char fmt_str[128];
-    for (i=-1; i < nb_fmts; i++) {
-        get_fmt_string (fmt_str, sizeof(fmt_str), i);
-        fprintf(stdout, "%s\n", fmt_str);
-    }
-}
-
 static void opt_frame_pix_fmt(const char *arg)
 {
     if (strcmp(arg, "list")) {