Originally committed as revision 18832 to svn://svn.ffmpeg.org/ffmpeg/trunk
Showing the changes to libavfilter/parseutils.h (1 of 2 files). Show all
Unified · Split
| @@ -25,6 +25,8 @@ · 24 unmodified lines | |||
| 25 | #ifndef AVFILTER_PARSEUTILS_H | 25 | #ifndef AVFILTER_PARSEUTILS_H |
| 26 | #define AVFILTER_PARSEUTILS_H | 26 | #define AVFILTER_PARSEUTILS_H |
| 27 | 27 | ||
| 28 | #include "libavcodec/opt.h" | ||
| 29 | |||
| 28 | /** | 30 | /** |
| 29 | * Unescapes the given string until a non escaped terminating char, | 31 | * Unescapes the given string until a non escaped terminating char, |
| 30 | * and returns the token corresponding to the unescaped string. | 32 | * and returns the token corresponding to the unescaped string. |
| @@ -51,4 +53,23 @@ char *av_get_token(const char **buf, const char *term); · 20 unmodified lines | |||
| 51 | */ | 53 | */ |
| 52 | int av_parse_color(uint8_t *rgba_color, const char *color_string, void *log_ctx); | 54 | int av_parse_color(uint8_t *rgba_color, const char *color_string, void *log_ctx); |
| 53 | 55 | ||
| 56 | /** | ||
| 57 | * Parses the key/value pairs list in opts. For each key/value pair | ||
| 58 | * found, stores the value in the field in ctx that is named like the | ||
| 59 | * key. ctx must be an AVClass context, storing is done using | ||
| 60 | * AVOptions. | ||
| 61 | * | ||
| 62 | * @param key_val_sep a 0-terminated list of characters used to | ||
| 63 | * separate key from value | ||
| 64 | * @param pairs_sep a 0-terminated list of characters used to separate | ||
| 65 | * two pairs from each other | ||
| 66 | * @return the number of successfully set key/value pairs, or a negative | ||
| 67 | * value corresponding to an AVERROR code in case of error: | ||
| 68 | * AVERROR(EINVAL) if opts cannot be parsed, | ||
| 69 | * the error code issued by av_set_string3() if a key/value pair | ||
| 70 | * cannot be set | ||
| 71 | */ | ||
| 72 | int av_set_options_string(void *ctx, const char *opts, | ||
| 73 | const char *key_val_sep, const char *pairs_sep); | ||
| 74 | |||
| 54 | #endif /* AVFILTER_PARSEUTILS_H */ | 75 | #endif /* AVFILTER_PARSEUTILS_H */ |