[SCM] libav/experimental: Give a hint about what is the expected the data type of command line options. Patch by Antoine Cellerier < dionoea AaH via pOiS ecp PoIs fr > Original thread: Date: Nov 1, 2005 7:41 PM Subject: [Ffmpeg-devel] libavcodec help

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:46:41 UTC 2013


The following commit has been merged in the experimental branch:
commit 88d6903e23b0769603884106f98630a02be6b78e
Author: Antoine Cellerier <dionoea at via.ecp.fr>
Date:   Thu Feb 23 10:07:41 2006 +0000

    Give a hint about what is the expected the data type of command line options.
    Patch by Antoine Cellerier < dionoea AaH via pOiS ecp PoIs fr >
    Original thread:
    Date: Nov 1, 2005 7:41 PM
    Subject: [Ffmpeg-devel] libavcodec help
    
    Originally committed as revision 5054 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/opt.c b/libavcodec/opt.c
index 5469b6b..0bdef5c 100644
--- a/libavcodec/opt.c
+++ b/libavcodec/opt.c
@@ -258,6 +258,35 @@ int av_opt_show(void *obj, void *av_log_obj){
             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' : '.');

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list