Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukasz Marek <lukasz.m.luki2@gmail.com>2014-04-30 01:57:24 +0400
committerLukasz Marek <lukasz.m.luki2@gmail.com>2014-05-02 20:04:05 +0400
commitba52fb11dc6305ec2ded10ad172ebb28e6583038 (patch)
treefcb8182debff800eaa038bdfacecc7857dd261bb /libavutil/opt.h
parentdb4b03146cc3a355b000c4a8444efac3ee5b33f2 (diff)
lavu/opt: add av_opt_set_dict2() function
Existing av_opt_set_dict doesn't accept flags. It doesn't allow to pass options to nested structs. New function alllows that. Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Diffstat (limited to 'libavutil/opt.h')
-rw-r--r--libavutil/opt.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/libavutil/opt.h b/libavutil/opt.h
index 6a1ae4354a..1e1dd69b30 100644
--- a/libavutil/opt.h
+++ b/libavutil/opt.h
@@ -541,6 +541,24 @@ int av_opt_flag_is_set(void *obj, const char *field_name, const char *flag_name)
*/
int av_opt_set_dict(void *obj, struct AVDictionary **options);
+
+/**
+ * Set all the options from a given dictionary on an object.
+ *
+ * @param obj a struct whose first element is a pointer to AVClass
+ * @param options options to process. This dictionary will be freed and replaced
+ * by a new one containing all options not found in obj.
+ * Of course this new dictionary needs to be freed by caller
+ * with av_dict_free().
+ * @param search_flags A combination of AV_OPT_SEARCH_*.
+ *
+ * @return 0 on success, a negative AVERROR if some option was found in obj,
+ * but could not be set.
+ *
+ * @see av_dict_copy()
+ */
+int av_opt_set_dict2(void *obj, struct AVDictionary **options, int search_flags);
+
/**
* Extract a key-value pair from the beginning of a string.
*