summaryrefslogtreecommitdiff
path: root/libavutil/opt.h
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2010-09-27 22:09:53 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2010-09-27 22:09:53 +0000
commitc85eef4ed8ed838943a01b5bb1f1c9dd8969c423 (patch)
tree0412d41ec55c08430f03f70d96a9994f8130945d /libavutil/opt.h
parent486adc55c0faa6ebc693645dbbeb1c11d2768280 (diff)
downloadffmpeg-c85eef4ed8ed838943a01b5bb1f1c9dd8969c423.tar.gz
Move av_set_options_string() from libavfilter to libavutil.
Originally committed as revision 25236 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil/opt.h')
-rw-r--r--libavutil/opt.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/libavutil/opt.h b/libavutil/opt.h
index 1006ab6e54..67c2dd7c12 100644
--- a/libavutil/opt.h
+++ b/libavutil/opt.h
@@ -204,4 +204,23 @@ int av_opt_show2(void *obj, void *av_log_obj, int req_flags, int rej_flags);
void av_opt_set_defaults(void *s);
void av_opt_set_defaults2(void *s, int mask, int flags);
+/**
+ * Parse the key/value pairs list in opts. For each key/value pair
+ * found, stores the value in the field in ctx that is named like the
+ * key. ctx must be an AVClass context, storing is done using
+ * AVOptions.
+ *
+ * @param key_val_sep a 0-terminated list of characters used to
+ * separate key from value
+ * @param pairs_sep a 0-terminated list of characters used to separate
+ * two pairs from each other
+ * @return the number of successfully set key/value pairs, or a negative
+ * value corresponding to an AVERROR code in case of error:
+ * AVERROR(EINVAL) if opts cannot be parsed,
+ * the error code issued by av_set_string3() if a key/value pair
+ * cannot be set
+ */
+int av_set_options_string(void *ctx, const char *opts,
+ const char *key_val_sep, const char *pairs_sep);
+
#endif /* AVUTIL_OPT_H */