aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/opt.h
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2019-12-24 00:19:47 +0100
committerMarton Balint <cus@passwd.hu>2019-12-27 21:52:21 +0100
commit5edacc46099725f59ac81bdbff991b0daf4b3a7c (patch)
tree03c75d042e9737a581a94d213f8637db27dfa8c4 /libavutil/opt.h
parent6c883e214a1120938bb61caccb40e6ef62078add (diff)
downloadffmpeg-5edacc46099725f59ac81bdbff991b0daf4b3a7c.tar.gz
avutil/opt: add full support for AV_OPT_TYPE_DICT
Now it is possible to set them from a string, to serialize them and to use a default value. Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavutil/opt.h')
-rw-r--r--libavutil/opt.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/libavutil/opt.h b/libavutil/opt.h
index bc98ab104d..1969c984dd 100644
--- a/libavutil/opt.h
+++ b/libavutil/opt.h
@@ -670,6 +670,9 @@ const AVClass *av_opt_child_class_next(const AVClass *parent, const AVClass *pre
* scalars or named flags separated by '+' or '-'. Prefixing a flag
* with '+' causes it to be set without affecting the other flags;
* similarly, '-' unsets a flag.
+ * If the field is of a dictionary type, it has to be a ':' separated list of
+ * key=value parameters. Values containing ':' special characters must be
+ * escaped.
* @param search_flags flags passed to av_opt_find2. I.e. if AV_OPT_SEARCH_CHILDREN
* is passed here, then the option may be set on a child of obj.
*
@@ -730,9 +733,10 @@ int av_opt_set_dict_val(void *obj, const char *name, const AVDictionary *val, in
/**
* @note the returned string will be av_malloc()ed and must be av_free()ed by the caller
*
- * @note if AV_OPT_ALLOW_NULL is set in search_flags in av_opt_get, and the option has
- * AV_OPT_TYPE_STRING or AV_OPT_TYPE_BINARY and is set to NULL, *out_val will be set
- * to NULL instead of an allocated empty string.
+ * @note if AV_OPT_ALLOW_NULL is set in search_flags in av_opt_get, and the
+ * option is of type AV_OPT_TYPE_STRING, AV_OPT_TYPE_BINARY or AV_OPT_TYPE_DICT
+ * and is set to NULL, *out_val will be set to NULL instead of an allocated
+ * empty string.
*/
int av_opt_get (void *obj, const char *name, int search_flags, uint8_t **out_val);
int av_opt_get_int (void *obj, const char *name, int search_flags, int64_t *out_val);