annotate opt.h @ 1022:7cfd5ddf993b libavutil

Move AVOptions from libavcodec to libavutil
author michael
date Sun, 26 Sep 2010 14:25:22 +0000
parents
children 5dbb12a37c3d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1022
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
1 /*
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
2 * AVOptions
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
3 * copyright (c) 2005 Michael Niedermayer <michaelni@gmx.at>
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
4 *
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
5 * This file is part of FFmpeg.
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
6 *
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
7 * FFmpeg is free software; you can redistribute it and/or
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
8 * modify it under the terms of the GNU Lesser General Public
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
9 * License as published by the Free Software Foundation; either
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
10 * version 2.1 of the License, or (at your option) any later version.
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
11 *
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
12 * FFmpeg is distributed in the hope that it will be useful,
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
15 * Lesser General Public License for more details.
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
16 *
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
17 * You should have received a copy of the GNU Lesser General Public
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
18 * License along with FFmpeg; if not, write to the Free Software
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
20 */
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
21
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
22 #ifndef AVUTIL_OPT_H
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
23 #define AVUTIL_OPT_H
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
24
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
25 /**
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
26 * @file
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
27 * AVOptions
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
28 */
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
29
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
30 #include "rational.h"
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
31 #include "avutil.h"
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
32
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
33 enum AVOptionType{
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
34 FF_OPT_TYPE_FLAGS,
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
35 FF_OPT_TYPE_INT,
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
36 FF_OPT_TYPE_INT64,
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
37 FF_OPT_TYPE_DOUBLE,
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
38 FF_OPT_TYPE_FLOAT,
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
39 FF_OPT_TYPE_STRING,
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
40 FF_OPT_TYPE_RATIONAL,
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
41 FF_OPT_TYPE_BINARY, ///< offset must point to a pointer immediately followed by an int for the length
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
42 FF_OPT_TYPE_CONST=128,
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
43 };
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
44
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
45 /**
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
46 * AVOption
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
47 */
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
48 typedef struct AVOption {
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
49 const char *name;
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
50
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
51 /**
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
52 * short English help text
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
53 * @todo What about other languages?
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
54 */
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
55 const char *help;
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
56
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
57 /**
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
58 * The offset relative to the context structure where the option
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
59 * value is stored. It should be 0 for named constants.
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
60 */
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
61 int offset;
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
62 enum AVOptionType type;
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
63
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
64 /**
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
65 * the default value for scalar options
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
66 */
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
67 double default_val;
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
68 double min; ///< minimum valid value for the option
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
69 double max; ///< maximum valid value for the option
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
70
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
71 int flags;
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
72 #define AV_OPT_FLAG_ENCODING_PARAM 1 ///< a generic parameter which can be set by the user for muxing or encoding
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
73 #define AV_OPT_FLAG_DECODING_PARAM 2 ///< a generic parameter which can be set by the user for demuxing or decoding
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
74 #define AV_OPT_FLAG_METADATA 4 ///< some data extracted or inserted into the file like title, comment, ...
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
75 #define AV_OPT_FLAG_AUDIO_PARAM 8
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
76 #define AV_OPT_FLAG_VIDEO_PARAM 16
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
77 #define AV_OPT_FLAG_SUBTITLE_PARAM 32
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
78 //FIXME think about enc-audio, ... style flags
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
79
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
80 /**
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
81 * The logical unit to which the option belongs. Non-constant
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
82 * options and corresponding named constants share the same
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
83 * unit. May be NULL.
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
84 */
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
85 const char *unit;
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
86 } AVOption;
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
87
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
88 /**
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
89 * AVOption2.
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
90 * THIS IS NOT PART OF THE API/ABI YET!
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
91 * This is identical to AVOption except that default_val was replaced by
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
92 * an union, it should be compatible with AVOption on normal platforms.
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
93 */
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
94 typedef struct AVOption2 {
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
95 const char *name;
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
96
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
97 /**
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
98 * short English help text
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
99 * @todo What about other languages?
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
100 */
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
101 const char *help;
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
102
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
103 /**
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
104 * The offset relative to the context structure where the option
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
105 * value is stored. It should be 0 for named constants.
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
106 */
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
107 int offset;
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
108 enum AVOptionType type;
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
109
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
110 /**
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
111 * the default value for scalar options
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
112 */
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
113 union {
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
114 double dbl;
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
115 const char *str;
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
116 } default_val;
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
117
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
118 double min; ///< minimum valid value for the option
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
119 double max; ///< maximum valid value for the option
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
120
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
121 int flags;
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
122 /*
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
123 #define AV_OPT_FLAG_ENCODING_PARAM 1 ///< a generic parameter which can be set by the user for muxing or encoding
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
124 #define AV_OPT_FLAG_DECODING_PARAM 2 ///< a generic parameter which can be set by the user for demuxing or decoding
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
125 #define AV_OPT_FLAG_METADATA 4 ///< some data extracted or inserted into the file like title, comment, ...
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
126 #define AV_OPT_FLAG_AUDIO_PARAM 8
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
127 #define AV_OPT_FLAG_VIDEO_PARAM 16
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
128 #define AV_OPT_FLAG_SUBTITLE_PARAM 32
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
129 */
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
130 //FIXME think about enc-audio, ... style flags
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
131
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
132 /**
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
133 * The logical unit to which the option belongs. Non-constant
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
134 * options and corresponding named constants share the same
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
135 * unit. May be NULL.
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
136 */
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
137 const char *unit;
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
138 } AVOption2;
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
139
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
140
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
141 /**
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
142 * Look for an option in obj. Look only for the options which
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
143 * have the flags set as specified in mask and flags (that is,
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
144 * for which it is the case that opt->flags & mask == flags).
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
145 *
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
146 * @param[in] obj a pointer to a struct whose first element is a
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
147 * pointer to an AVClass
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
148 * @param[in] name the name of the option to look for
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
149 * @param[in] unit the unit of the option to look for, or any if NULL
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
150 * @return a pointer to the option found, or NULL if no option
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
151 * has been found
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
152 */
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
153 const AVOption *av_find_opt(void *obj, const char *name, const char *unit, int mask, int flags);
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
154
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
155 /**
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
156 * Set the field of obj with the given name to value.
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
157 *
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
158 * @param[in] obj A struct whose first element is a pointer to an
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
159 * AVClass.
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
160 * @param[in] name the name of the field to set
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
161 * @param[in] val The value to set. If the field is not of a string
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
162 * type, then the given string is parsed.
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
163 * SI postfixes and some named scalars are supported.
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
164 * If the field is of a numeric type, it has to be a numeric or named
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
165 * scalar. Behavior with more than one scalar and +- infix operators
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
166 * is undefined.
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
167 * If the field is of a flags type, it has to be a sequence of numeric
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
168 * scalars or named flags separated by '+' or '-'. Prefixing a flag
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
169 * with '+' causes it to be set without affecting the other flags;
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
170 * similarly, '-' unsets a flag.
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
171 * @param[out] o_out if non-NULL put here a pointer to the AVOption
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
172 * found
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
173 * @param alloc when 1 then the old value will be av_freed() and the
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
174 * new av_strduped()
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
175 * when 0 then no av_free() nor av_strdup() will be used
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
176 * @return 0 if the value has been set, or an AVERROR code in case of
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
177 * error:
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
178 * AVERROR(ENOENT) if no matching option exists
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
179 * AVERROR(ERANGE) if the value is out of range
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
180 * AVERROR(EINVAL) if the value is not valid
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
181 */
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
182 int av_set_string3(void *obj, const char *name, const char *val, int alloc, const AVOption **o_out);
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
183
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
184 const AVOption *av_set_double(void *obj, const char *name, double n);
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
185 const AVOption *av_set_q(void *obj, const char *name, AVRational n);
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
186 const AVOption *av_set_int(void *obj, const char *name, int64_t n);
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
187 double av_get_double(void *obj, const char *name, const AVOption **o_out);
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
188 AVRational av_get_q(void *obj, const char *name, const AVOption **o_out);
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
189 int64_t av_get_int(void *obj, const char *name, const AVOption **o_out);
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
190 const char *av_get_string(void *obj, const char *name, const AVOption **o_out, char *buf, int buf_len);
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
191 const AVOption *av_next_option(void *obj, const AVOption *last);
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
192
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
193 /**
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
194 * Show the obj options.
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
195 *
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
196 * @param req_flags requested flags for the options to show. Show only the
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
197 * options for which it is opt->flags & req_flags.
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
198 * @param rej_flags rejected flags for the options to show. Show only the
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
199 * options for which it is !(opt->flags & req_flags).
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
200 * @param av_log_obj log context to use for showing the options
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
201 */
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
202 int av_opt_show2(void *obj, void *av_log_obj, int req_flags, int rej_flags);
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
203
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
204 void av_opt_set_defaults(void *s);
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
205 void av_opt_set_defaults2(void *s, int mask, int flags);
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
206
7cfd5ddf993b Move AVOptions from libavcodec to libavutil
michael
parents:
diff changeset
207 #endif /* AVUTIL_OPT_H */