diff options
author | Anton Khirnov <anton@khirnov.net> | 2011-08-23 07:11:26 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2011-09-03 20:52:21 +0200 |
commit | c11fb8288d282da430f598bb029deccbacb31591 (patch) | |
tree | 22a1048ae72d776fd0681f063f391208d80171f7 /libavutil/opt.h | |
parent | 5938e02185430ca711106aaec9b5622dbf588af3 (diff) | |
download | ffmpeg-c11fb8288d282da430f598bb029deccbacb31591.tar.gz |
AVOptions: add AV_OPT_SEARCH_FAKE_OBJ flag for av_opt_find().
It allows to search for options only with AVClass, without allocating
the corresponding context.
Diffstat (limited to 'libavutil/opt.h')
-rw-r--r-- | libavutil/opt.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libavutil/opt.h b/libavutil/opt.h index 30aa54f5b6..21dac7c569 100644 --- a/libavutil/opt.h +++ b/libavutil/opt.h @@ -215,6 +215,13 @@ int av_opt_set_dict(void *obj, struct AVDictionary **options); #define AV_OPT_SEARCH_CHILDREN 0x0001 /**< Search in possible children of the given object first. */ +/** + * The obj passed to av_opt_find() is fake -- only a double pointer to AVClass + * instead of a required pointer to a struct containing AVClass. This is + * useful for searching for options without needing to allocate the corresponding + * object. + */ +#define AV_OPT_SEARCH_FAKE_OBJ 0x0002 /** * Look for an option in an object. Consider only options which @@ -222,6 +229,8 @@ int av_opt_set_dict(void *obj, struct AVDictionary **options); * * @param[in] obj A pointer to a struct whose first element is a * pointer to an AVClass. + * Alternatively a double pointer to an AVClass, if + * AV_OPT_SEARCH_FAKE_OBJ search flag is set. * @param[in] name The name of the option to look for. * @param[in] unit When searching for named constants, name of the unit * it belongs to. |