diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-05-01 00:21:56 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-05-01 00:26:05 +0200 |
commit | ffb5a0d533498102c31aa131bc91a4cce868b0a8 (patch) | |
tree | 1c78494488bab5bafa3bda2ab20295f13860fc2e /libavutil/opt.h | |
parent | 1a9f9f81b1244b952126bb65bc741b04d3534f81 (diff) | |
parent | 85770f2a2651497861ed938efcd0df3696ff5e45 (diff) | |
download | ffmpeg-ffb5a0d533498102c31aa131bc91a4cce868b0a8.tar.gz |
Merge commit '85770f2a2651497861ed938efcd0df3696ff5e45'
* commit '85770f2a2651497861ed938efcd0df3696ff5e45':
AVOptions: make default_val a union, as proposed in AVOption2.
Move ff_dynarray_add to lavu and make it public.
lavf: remove duplicate assignment in avformat_alloc_context.
lavf: use designated initializers for AVClasses.
options: simplify av_find_opt by using av_next_option.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/opt.h')
-rw-r--r-- | libavutil/opt.h | 52 |
1 files changed, 1 insertions, 51 deletions
diff --git a/libavutil/opt.h b/libavutil/opt.h index 67c2dd7c12..018d8a2b4f 100644 --- a/libavutil/opt.h +++ b/libavutil/opt.h @@ -64,69 +64,20 @@ typedef struct AVOption { /** * the default value for scalar options */ - double default_val; - double min; ///< minimum valid value for the option - double max; ///< maximum valid value for the option - - int flags; -#define AV_OPT_FLAG_ENCODING_PARAM 1 ///< a generic parameter which can be set by the user for muxing or encoding -#define AV_OPT_FLAG_DECODING_PARAM 2 ///< a generic parameter which can be set by the user for demuxing or decoding -#define AV_OPT_FLAG_METADATA 4 ///< some data extracted or inserted into the file like title, comment, ... -#define AV_OPT_FLAG_AUDIO_PARAM 8 -#define AV_OPT_FLAG_VIDEO_PARAM 16 -#define AV_OPT_FLAG_SUBTITLE_PARAM 32 -//FIXME think about enc-audio, ... style flags - - /** - * The logical unit to which the option belongs. Non-constant - * options and corresponding named constants share the same - * unit. May be NULL. - */ - const char *unit; -} AVOption; - -/** - * AVOption2. - * THIS IS NOT PART OF THE API/ABI YET! - * This is identical to AVOption except that default_val was replaced by - * an union, it should be compatible with AVOption on normal platforms. - */ -typedef struct AVOption2 { - const char *name; - - /** - * short English help text - * @todo What about other languages? - */ - const char *help; - - /** - * The offset relative to the context structure where the option - * value is stored. It should be 0 for named constants. - */ - int offset; - enum AVOptionType type; - - /** - * the default value for scalar options - */ union { double dbl; const char *str; } default_val; - double min; ///< minimum valid value for the option double max; ///< maximum valid value for the option int flags; -/* #define AV_OPT_FLAG_ENCODING_PARAM 1 ///< a generic parameter which can be set by the user for muxing or encoding #define AV_OPT_FLAG_DECODING_PARAM 2 ///< a generic parameter which can be set by the user for demuxing or decoding #define AV_OPT_FLAG_METADATA 4 ///< some data extracted or inserted into the file like title, comment, ... #define AV_OPT_FLAG_AUDIO_PARAM 8 #define AV_OPT_FLAG_VIDEO_PARAM 16 #define AV_OPT_FLAG_SUBTITLE_PARAM 32 -*/ //FIXME think about enc-audio, ... style flags /** @@ -135,8 +86,7 @@ typedef struct AVOption2 { * unit. May be NULL. */ const char *unit; -} AVOption2; - +} AVOption; /** * Look for an option in obj. Look only for the options which |