Mercurial > libavcodec.hg
comparison opt.h @ 8356:0030146fc2ba libavcodec
Implement av_set_string3().
author | stefano |
---|---|
date | Tue, 16 Dec 2008 21:35:35 +0000 |
parents | f73e7117bf67 |
children | 8903ad65c412 |
comparison
equal
deleted
inserted
replaced
8355:179f8e1327ce | 8356:0030146fc2ba |
---|---|
103 * @see av_set_string2() | 103 * @see av_set_string2() |
104 */ | 104 */ |
105 attribute_deprecated const AVOption *av_set_string(void *obj, const char *name, const char *val); | 105 attribute_deprecated const AVOption *av_set_string(void *obj, const char *name, const char *val); |
106 | 106 |
107 /** | 107 /** |
108 * @return a pointer to the AVOption corresponding to the field set or | |
109 * NULL if no matching AVOption exists, or if the value \p val is not | |
110 * valid | |
111 * @see av_set_string3() | |
112 */ | |
113 attribute_deprecated const AVOption *av_set_string2(void *obj, const char *name, const char *val, int alloc); | |
114 | |
115 /** | |
108 * Sets the field of obj with the given name to value. | 116 * Sets the field of obj with the given name to value. |
109 * | 117 * |
110 * @param[in] obj A struct whose first element is a pointer to an | 118 * @param[in] obj A struct whose first element is a pointer to an |
111 * AVClass. | 119 * AVClass. |
112 * @param[in] name the name of the field to set | 120 * @param[in] name the name of the field to set |
118 * is undefined. | 126 * is undefined. |
119 * If the field is of a flags type, it has to be a sequence of numeric | 127 * If the field is of a flags type, it has to be a sequence of numeric |
120 * scalars or named flags separated by '+' or '-'. Prefixing a flag | 128 * scalars or named flags separated by '+' or '-'. Prefixing a flag |
121 * with '+' causes it to be set without affecting the other flags; | 129 * with '+' causes it to be set without affecting the other flags; |
122 * similarly, '-' unsets a flag. | 130 * similarly, '-' unsets a flag. |
123 * @return a pointer to the AVOption corresponding to the field set or | 131 * @param[out] o_out if non-NULL put here a pointer to the AVOption |
124 * NULL if no matching AVOption exists, or if the value \p val is not | 132 * found |
125 * valid | |
126 * @param alloc when 1 then the old value will be av_freed() and the | 133 * @param alloc when 1 then the old value will be av_freed() and the |
127 * new av_strduped() | 134 * new av_strduped() |
128 * when 0 then no av_free() nor av_strdup() will be used | 135 * when 0 then no av_free() nor av_strdup() will be used |
136 * @return 0 if the value has been set, an AVERROR* error code if no | |
137 * matching option exists, or if the value \p val is not valid | |
129 */ | 138 */ |
130 const AVOption *av_set_string2(void *obj, const char *name, const char *val, int alloc); | 139 int av_set_string3(void *obj, const char *name, const char *val, int alloc, const AVOption **o_out); |
131 | 140 |
132 const AVOption *av_set_double(void *obj, const char *name, double n); | 141 const AVOption *av_set_double(void *obj, const char *name, double n); |
133 const AVOption *av_set_q(void *obj, const char *name, AVRational n); | 142 const AVOption *av_set_q(void *obj, const char *name, AVRational n); |
134 const AVOption *av_set_int(void *obj, const char *name, int64_t n); | 143 const AVOption *av_set_int(void *obj, const char *name, int64_t n); |
135 double av_get_double(void *obj, const char *name, const AVOption **o_out); | 144 double av_get_double(void *obj, const char *name, const AVOption **o_out); |