00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef FFMPEG_OPT_H
00023 #define FFMPEG_OPT_H
00024
00030 #include "rational.h"
00031
00032 enum AVOptionType{
00033 FF_OPT_TYPE_FLAGS,
00034 FF_OPT_TYPE_INT,
00035 FF_OPT_TYPE_INT64,
00036 FF_OPT_TYPE_DOUBLE,
00037 FF_OPT_TYPE_FLOAT,
00038 FF_OPT_TYPE_STRING,
00039 FF_OPT_TYPE_RATIONAL,
00040 FF_OPT_TYPE_BINARY,
00041 FF_OPT_TYPE_CONST=128,
00042 };
00043
00047 typedef struct AVOption {
00048 const char *name;
00049
00054 const char *help;
00055 int offset;
00056 enum AVOptionType type;
00057
00058 double default_val;
00059 double min;
00060 double max;
00061
00062 int flags;
00063 #define AV_OPT_FLAG_ENCODING_PARAM 1
00064 #define AV_OPT_FLAG_DECODING_PARAM 2
00065 #define AV_OPT_FLAG_METADATA 4
00066 #define AV_OPT_FLAG_AUDIO_PARAM 8
00067 #define AV_OPT_FLAG_VIDEO_PARAM 16
00068 #define AV_OPT_FLAG_SUBTITLE_PARAM 32
00069
00070 const char *unit;
00071 } AVOption;
00072
00073
00074 const AVOption *av_find_opt(void *obj, const char *name, const char *unit, int mask, int flags);
00075 const AVOption *av_set_string(void *obj, const char *name, const char *val);
00076 const AVOption *av_set_double(void *obj, const char *name, double n);
00077 const AVOption *av_set_q(void *obj, const char *name, AVRational n);
00078 const AVOption *av_set_int(void *obj, const char *name, int64_t n);
00079 double av_get_double(void *obj, const char *name, const AVOption **o_out);
00080 AVRational av_get_q(void *obj, const char *name, const AVOption **o_out);
00081 int64_t av_get_int(void *obj, const char *name, const AVOption **o_out);
00082 const char *av_get_string(void *obj, const char *name, const AVOption **o_out, char *buf, int buf_len);
00083 const AVOption *av_next_option(void *obj, const AVOption *last);
00084 int av_opt_show(void *obj, void *av_log_obj);
00085 void av_opt_set_defaults(void *s);
00086 void av_opt_set_defaults2(void *s, int mask, int flags);
00087
00088 #endif