Just for naming consistency, no functional changes.
| ... | ... |
@@ -47,8 +47,15 @@ const AVOption *av_find_opt(void *v, const char *name, const char *unit, int mas |
| 47 | 47 |
} |
| 48 | 48 |
#endif |
| 49 | 49 |
|
| 50 |
+#if FF_API_OLD_AVOPTIONS |
|
| 50 | 51 |
const AVOption *av_next_option(void *obj, const AVOption *last) |
| 51 | 52 |
{
|
| 53 |
+ return av_opt_next(obj, last); |
|
| 54 |
+} |
|
| 55 |
+#endif |
|
| 56 |
+ |
|
| 57 |
+const AVOption *av_opt_next(void *obj, const AVOption *last) |
|
| 58 |
+{
|
|
| 52 | 59 |
if (last && last[1].name) return ++last; |
| 53 | 60 |
else if (last) return NULL; |
| 54 | 61 |
else return (*(AVClass**)obj)->option; |
| ... | ... |
@@ -150,8 +150,8 @@ attribute_deprecated double av_get_double(void *obj, const char *name, const AVO |
| 150 | 150 |
attribute_deprecated AVRational av_get_q(void *obj, const char *name, const AVOption **o_out); |
| 151 | 151 |
attribute_deprecated int64_t av_get_int(void *obj, const char *name, const AVOption **o_out); |
| 152 | 152 |
attribute_deprecated const char *av_get_string(void *obj, const char *name, const AVOption **o_out, char *buf, int buf_len); |
| 153 |
+attribute_deprecated const AVOption *av_next_option(void *obj, const AVOption *last); |
|
| 153 | 154 |
#endif |
| 154 |
-const AVOption *av_next_option(void *obj, const AVOption *last); |
|
| 155 | 155 |
|
| 156 | 156 |
/** |
| 157 | 157 |
* Show the obj options. |
| ... | ... |
@@ -310,6 +310,17 @@ const AVOption *av_opt_find2(void *obj, const char *name, const char *unit, |
| 310 | 310 |
int opt_flags, int search_flags, void **target_obj); |
| 311 | 311 |
|
| 312 | 312 |
/** |
| 313 |
+ * Iterate over all AVOptions belonging to obj. |
|
| 314 |
+ * |
|
| 315 |
+ * @param obj an AVOptions-enabled struct or a double pointer to an |
|
| 316 |
+ * AVClass describing it. |
|
| 317 |
+ * @param prev result of the previous call to av_opt_next() on this object |
|
| 318 |
+ * or NULL |
|
| 319 |
+ * @return next AVOption or NULL |
|
| 320 |
+ */ |
|
| 321 |
+const AVOption *av_opt_next(void *obj, const AVOption *prev); |
|
| 322 |
+ |
|
| 323 |
+/** |
|
| 313 | 324 |
* Iterate over AVOptions-enabled children of obj. |
| 314 | 325 |
* |
| 315 | 326 |
* @param prev result of a previous call to this function or NULL |