[Ffmpeg-devel] libavcodec help

Antoine Cellerier dionoea+ffmpeg
Wed Feb 22 23:29:21 CET 2006


On Wed, Feb 22, 2006, Guillaume POIRIER wrote:
> What's the status of this patch?
> Do you have a fixed and cleaned-up version available?

Woops, i'd completely forgoten. Here comes a cleaned up version with
output aligned like Michael suggested in
http://mplayerhq.hu/pipermail/ffmpeg-devel/2005-November/004862.html .

-- 
Antoine Cellerier
dionoea
-------------- next part --------------
Index: libavcodec/opt.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/opt.c,v
retrieving revision 1.12
diff -u -r1.12 opt.c
--- libavcodec/opt.c	12 Jan 2006 22:43:16 -0000	1.12
+++ libavcodec/opt.c	22 Feb 2006 22:26:55 -0000
@@ -258,6 +258,35 @@
             continue;
 
         av_log(av_log_obj, AV_LOG_INFO, "-%-17s ", opt->name);
+
+        switch( opt->type )
+        {
+            case FF_OPT_TYPE_FLAGS:
+                av_log( av_log_obj, AV_LOG_INFO, "%-7s ", "<flags>" );
+                break;
+            case FF_OPT_TYPE_INT:
+                av_log( av_log_obj, AV_LOG_INFO, "%-7s ", "<int>" );
+                break;
+            case FF_OPT_TYPE_INT64:
+                av_log( av_log_obj, AV_LOG_INFO, "%-7s ", "<int64>" );
+                break;
+            case FF_OPT_TYPE_DOUBLE:
+                av_log( av_log_obj, AV_LOG_INFO, "%-7s ", "<double>" );
+                break;
+            case FF_OPT_TYPE_FLOAT:
+                av_log( av_log_obj, AV_LOG_INFO, "%-7s ", "<float>" );
+                break;
+            case FF_OPT_TYPE_STRING:
+                av_log( av_log_obj, AV_LOG_INFO, "%-7s ", "<string>" );
+                break;
+            case FF_OPT_TYPE_RATIONAL:
+                av_log( av_log_obj, AV_LOG_INFO, "%-7s ", "<rational>" );
+                break;
+            case FF_OPT_TYPE_CONST:
+            default:
+                av_log( av_log_obj, AV_LOG_INFO, "%-7s ", "" );
+                break;
+        }
         av_log(av_log_obj, AV_LOG_INFO, "%c", (opt->flags & AV_OPT_FLAG_ENCODING_PARAM) ? 'E' : '.');
         av_log(av_log_obj, AV_LOG_INFO, "%c", (opt->flags & AV_OPT_FLAG_DECODING_PARAM) ? 'D' : '.');
         av_log(av_log_obj, AV_LOG_INFO, "%c", (opt->flags & AV_OPT_FLAG_VIDEO_PARAM   ) ? 'V' : '.');



More information about the ffmpeg-devel mailing list