summaryrefslogtreecommitdiff
path: root/libavutil/opt.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-12-03 21:16:46 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-12-05 03:22:04 +0100
commitdff97be8084594a0bd900782ca91612680c77bbc (patch)
tree66b447cd6f534eb84a036cbc0807621e8cb23a16 /libavutil/opt.h
parent618fb9cc062c6ca1146cc90911daab5a2317b25f (diff)
av_opt: add av_opt_ptr() to return a pointer to a field of a object based on
an AVClass Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/opt.h')
-rw-r--r--libavutil/opt.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/libavutil/opt.h b/libavutil/opt.h
index 5fce09a5c8..2d282b3899 100644
--- a/libavutil/opt.h
+++ b/libavutil/opt.h
@@ -586,6 +586,17 @@ int av_opt_get_double(void *obj, const char *name, int search_flags, double
int av_opt_get_q (void *obj, const char *name, int search_flags, AVRational *out_val);
/**
* @}
+ */
+/**
+ * Gets a pointer to the requested field in a struct.
+ * This function allows accessing a struct even when its fields are moved or
+ * renamed since the application making the access has been compiled,
+ *
+ * @returns a pointer to the field, it can be cast to the correct type and read
+ * or written to.
+ */
+void *av_opt_ptr(const AVClass *class, void *obj, const char *name);
+/**
* @}
*/