00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef AVCODEC_OPT_H
00023 #define AVCODEC_OPT_H
00024
00030 #include "libavutil/rational.h"
00031 #include "avcodec.h"
00032
00033 enum AVOptionType{
00034 FF_OPT_TYPE_FLAGS,
00035 FF_OPT_TYPE_INT,
00036 FF_OPT_TYPE_INT64,
00037 FF_OPT_TYPE_DOUBLE,
00038 FF_OPT_TYPE_FLOAT,
00039 FF_OPT_TYPE_STRING,
00040 FF_OPT_TYPE_RATIONAL,
00041 FF_OPT_TYPE_BINARY,
00042 FF_OPT_TYPE_CONST=128,
00043 };
00044
00048 typedef struct AVOption {
00049 const char *name;
00050
00055 const char *help;
00056
00061 int offset;
00062 enum AVOptionType type;
00063
00067 double default_val;
00068 double min;
00069 double max;
00070
00071 int flags;
00072 #define AV_OPT_FLAG_ENCODING_PARAM 1
00073 #define AV_OPT_FLAG_DECODING_PARAM 2
00074 #define AV_OPT_FLAG_METADATA 4
00075 #define AV_OPT_FLAG_AUDIO_PARAM 8
00076 #define AV_OPT_FLAG_VIDEO_PARAM 16
00077 #define AV_OPT_FLAG_SUBTITLE_PARAM 32
00078
00079
00085 const char *unit;
00086 } AVOption;
00087
00088
00101 const AVOption *av_find_opt(void *obj, const char *name, const char *unit, int mask, int flags);
00102
00103 #if LIBAVCODEC_VERSION_MAJOR < 53
00104
00107 attribute_deprecated const AVOption *av_set_string(void *obj, const char *name, const char *val);
00108
00115 attribute_deprecated const AVOption *av_set_string2(void *obj, const char *name, const char *val, int alloc);
00116 #endif
00117
00142 int av_set_string3(void *obj, const char *name, const char *val, int alloc, const AVOption **o_out);
00143
00144 const AVOption *av_set_double(void *obj, const char *name, double n);
00145 const AVOption *av_set_q(void *obj, const char *name, AVRational n);
00146 const AVOption *av_set_int(void *obj, const char *name, int64_t n);
00147 double av_get_double(void *obj, const char *name, const AVOption **o_out);
00148 AVRational av_get_q(void *obj, const char *name, const AVOption **o_out);
00149 int64_t av_get_int(void *obj, const char *name, const AVOption **o_out);
00150 const char *av_get_string(void *obj, const char *name, const AVOption **o_out, char *buf, int buf_len);
00151 const AVOption *av_next_option(void *obj, const AVOption *last);
00152 int av_opt_show(void *obj, void *av_log_obj);
00153 void av_opt_set_defaults(void *s);
00154 void av_opt_set_defaults2(void *s, int mask, int flags);
00155
00156 #endif