From cb7c11cc9e7e05c819fff487a3f486f11ab4b860 Mon Sep 17 00:00:00 2001 From: Martin Storsjö Date: Fri, 27 May 2011 22:21:40 +0300 Subject: avoptions: Add an av_opt_flag_is_set function for inspecting flag fields MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavutil/opt.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libavutil/opt.h') diff --git a/libavutil/opt.h b/libavutil/opt.h index 8c3b6c1c36..46ad8acce1 100644 --- a/libavutil/opt.h +++ b/libavutil/opt.h @@ -181,4 +181,14 @@ int av_set_options_string(void *ctx, const char *opts, */ void av_opt_free(void *obj); +/** + * Check whether a particular flag is set in a flags field. + * + * @param field_name the name of the flag field option + * @param flag_name the name of the flag to check + * @return non-zero if the flag is set, zero if the flag isn't set, + * isn't of the right type, or the flags field doesn't exist. + */ +int av_opt_flag_is_set(void *obj, const char *field_name, const char *flag_name); + #endif /* AVUTIL_OPT_H */ -- cgit v1.2.3