diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2009-05-14 22:57:08 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2009-05-14 22:57:08 +0000 |
commit | c1ec75b576398f98cdce0c3fbc22d8746531b3fa (patch) | |
tree | 7db723b1e894267fea45d54521765f364eca140b /libavfilter/parseutils.h | |
parent | ab4752e3820002eaa712ab272538f7a210b719d3 (diff) | |
download | ffmpeg-c1ec75b576398f98cdce0c3fbc22d8746531b3fa.tar.gz |
Implement av_set_options_string().
Originally committed as revision 18832 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter/parseutils.h')
-rw-r--r-- | libavfilter/parseutils.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/libavfilter/parseutils.h b/libavfilter/parseutils.h index 46c66ed37f..621687dca6 100644 --- a/libavfilter/parseutils.h +++ b/libavfilter/parseutils.h @@ -25,6 +25,8 @@ #ifndef AVFILTER_PARSEUTILS_H #define AVFILTER_PARSEUTILS_H +#include "libavcodec/opt.h" + /** * Unescapes the given string until a non escaped terminating char, * and returns the token corresponding to the unescaped string. @@ -51,4 +53,23 @@ char *av_get_token(const char **buf, const char *term); */ int av_parse_color(uint8_t *rgba_color, const char *color_string, void *log_ctx); +/** + * Parses 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 /* AVFILTER_PARSEUTILS_H */ |