summaryrefslogtreecommitdiff
path: root/libavutil/log.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2020-05-27 15:21:30 +0200
committerAnton Khirnov <anton@khirnov.net>2020-06-10 12:36:42 +0200
commit1b4a98b0296c7aa6d294ea73ec567d38cf5c5196 (patch)
tree3d96211f10f2637da14b83fc18feb62964b226da /libavutil/log.h
parent202e06870eb4bbc4636aff5f461c1a0654ec2435 (diff)
lavu/opt: add a more general child class iteration API
Use opaque iteration state instead of the previous child class. This mirrors similar changes done in lavf/lavc. Deprecate the av_opt_child_class_next() API.
Diffstat (limited to 'libavutil/log.h')
-rw-r--r--libavutil/log.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/libavutil/log.h b/libavutil/log.h
index 9c14188a9c..8edd6bbf2b 100644
--- a/libavutil/log.h
+++ b/libavutil/log.h
@@ -112,6 +112,7 @@ typedef struct AVClass {
*/
void* (*child_next)(void *obj, void *prev);
+#if FF_API_CHILD_CLASS_NEXT
/**
* Return an AVClass corresponding to the next potential
* AVOptions-enabled child.
@@ -120,7 +121,9 @@ typedef struct AVClass {
* child_next iterates over _already existing_ objects, while
* child_class_next iterates over _all possible_ children.
*/
+ attribute_deprecated
const struct AVClass* (*child_class_next)(const struct AVClass *prev);
+#endif
/**
* Category used for visualization (like color)
@@ -140,6 +143,21 @@ typedef struct AVClass {
* available since version (52.12)
*/
int (*query_ranges)(struct AVOptionRanges **, void *obj, const char *key, int flags);
+
+ /**
+ * Iterate over the AVClasses corresponding to potential AVOptions-enabled
+ * children.
+ *
+ * @param iter pointer to opaque iteration state. The caller must initialize
+ * *iter to NULL before the first call.
+ * @return AVClass for the next AVOptions-enabled child or NULL if there are
+ * no more such children.
+ *
+ * @note The difference between child_next and this is that child_next
+ * iterates over _already existing_ objects, while child_class_iterate
+ * iterates over _all possible_ children.
+ */
+ const struct AVClass* (*child_class_iterate)(void **iter);
} AVClass;
/**