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-11-11 00:25:30 +0300
committerLukasz Marek <lukasz.m.luki2@gmail.com>2014-11-16 03:13:38 +0300
commiteec693328a09f0dc6cbe398c199d093405ba7cf9 (patch)
treef97b6edfd2fda25dc54d3d007a33fd7c9c461e8e /libavutil/opt.h
parent01974a58df40f183c46b1cf3e37edb020716c8be (diff)
lavu/opt: introduce av_opt_is_set_to_default()
New function allows to check if option is set to its default value Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Diffstat (limited to 'libavutil/opt.h')
-rw-r--r--libavutil/opt.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/libavutil/opt.h b/libavutil/opt.h
index 39365ac957..1b458e1860 100644
--- a/libavutil/opt.h
+++ b/libavutil/opt.h
@@ -844,6 +844,32 @@ int av_opt_copy(void *dest, void *src);
int av_opt_query_ranges_default(AVOptionRanges **, void *obj, const char *key, int flags);
/**
+ * Check if given option is set to its default value.
+ *
+ * Options o must belong to the obj. This function must not be called to check child's options state.
+ * @see av_opt_is_set_to_default_by_name().
+ *
+ * @param obj AVClass object to check option on
+ * @param o option to be checked
+ * @return >0 when option is set to its default,
+ * 0 when option is not set its default,
+ * <0 on error
+ */
+int av_opt_is_set_to_default(void *obj, const AVOption *o);
+
+/**
+ * Check if given option is set to its default value.
+ *
+ * @param obj AVClass object to check option on
+ * @param name option name
+ * @param search_flags combination of AV_OPT_SEARCH_*
+ * @return >0 when option is set to its default,
+ * 0 when option is not set its default,
+ * <0 on error
+ */
+int av_opt_is_set_to_default_by_name(void *obj, const char *name, int search_flags);
+
+/**
* @}
*/