00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef AVUTIL_OPT_H
00023 #define AVUTIL_OPT_H
00024
00030 #include "rational.h"
00031 #include "avutil.h"
00032 #include "dict.h"
00033
00034 enum AVOptionType{
00035 FF_OPT_TYPE_FLAGS,
00036 FF_OPT_TYPE_INT,
00037 FF_OPT_TYPE_INT64,
00038 FF_OPT_TYPE_DOUBLE,
00039 FF_OPT_TYPE_FLOAT,
00040 FF_OPT_TYPE_STRING,
00041 FF_OPT_TYPE_RATIONAL,
00042 FF_OPT_TYPE_BINARY,
00043 FF_OPT_TYPE_CONST=128,
00044 };
00045
00049 typedef struct AVOption {
00050 const char *name;
00051
00056 const char *help;
00057
00062 int offset;
00063 enum AVOptionType type;
00064
00068 union {
00069 double dbl;
00070 const char *str;
00071
00072 int64_t i64;
00073 AVRational q;
00074 } default_val;
00075 double min;
00076 double max;
00077
00078 int flags;
00079 #define AV_OPT_FLAG_ENCODING_PARAM 1
00080 #define AV_OPT_FLAG_DECODING_PARAM 2
00081 #define AV_OPT_FLAG_METADATA 4
00082 #define AV_OPT_FLAG_AUDIO_PARAM 8
00083 #define AV_OPT_FLAG_VIDEO_PARAM 16
00084 #define AV_OPT_FLAG_SUBTITLE_PARAM 32
00085
00086
00092 const char *unit;
00093 } AVOption;
00094
00095 #if FF_API_FIND_OPT
00096
00110 attribute_deprecated
00111 const AVOption *av_find_opt(void *obj, const char *name, const char *unit, int mask, int flags);
00112 #endif
00113
00141 int av_set_string3(void *obj, const char *name, const char *val, int alloc, const AVOption **o_out);
00142
00143 const AVOption *av_set_double(void *obj, const char *name, double n);
00144 const AVOption *av_set_q(void *obj, const char *name, AVRational n);
00145 const AVOption *av_set_int(void *obj, const char *name, int64_t n);
00146 double av_get_double(void *obj, const char *name, const AVOption **o_out);
00147 AVRational av_get_q(void *obj, const char *name, const AVOption **o_out);
00148 int64_t av_get_int(void *obj, const char *name, const AVOption **o_out);
00149 const char *av_get_string(void *obj, const char *name, const AVOption **o_out, char *buf, int buf_len);
00150 const AVOption *av_next_option(void *obj, const AVOption *last);
00151
00161 int av_opt_show2(void *obj, void *av_log_obj, int req_flags, int rej_flags);
00162
00163 void av_opt_set_defaults(void *s);
00164 void av_opt_set_defaults2(void *s, int mask, int flags);
00165
00183 int av_set_options_string(void *ctx, const char *opts,
00184 const char *key_val_sep, const char *pairs_sep);
00185
00189 void av_opt_free(void *obj);
00190
00199 int av_opt_flag_is_set(void *obj, const char *field_name, const char *flag_name);
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215 int av_opt_set_dict(void *obj, struct AVDictionary **options);
00216
00217 #define AV_OPT_SEARCH_CHILDREN 0x0001
00240 const AVOption *av_opt_find(void *obj, const char *name, const char *unit,
00241 int opt_flags, int search_flags);
00242
00243 #endif