]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/blob - libavfilter/parseutils.h
Prepare for O_DIRECT
[frescor/ffmpeg.git] / libavfilter / parseutils.h
1 /*
2  * copyright (c) 2009 Stefano Sabatini
3  * This file is part of FFmpeg.
4  *
5  * FFmpeg is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * FFmpeg is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with FFmpeg; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19
20 /**
21  * @file libavfilter/parseutils.h
22  * parsing utils
23  */
24
25 #ifndef AVFILTER_PARSEUTILS_H
26 #define AVFILTER_PARSEUTILS_H
27
28 /**
29  * Unescapes the given string until a non escaped terminating char,
30  * and returns the token corresponding to the unescaped string.
31  *
32  * The normal \ and ' escaping is supported. Leading and trailing
33  * whitespaces are removed.
34  *
35  * @param term a 0-terminated list of terminating chars
36  * @param buf the buffer to parse, buf will be updated to point to the
37  * terminating char
38  * @return the malloced unescaped string, which must be av_freed by
39  * the user
40  */
41 char *av_get_token(const char **buf, const char *term);
42
43 /**
44  * Puts the RGBA values that correspond to color_string in rgba_color.
45  *
46  * @param color_string a string specifying a color. It can be the name of
47  * a color or a 0xRRGGBB[AA] sequence.
48  * @return >= 0 in case of success, a negative value in case of
49  * failure (for example if color_string cannot be parsed).
50  */
51 int av_parse_color(uint8_t *rgba_color, const char *color_string, void *log_ctx);
52
53 #endif  /* AVFILTER_PARSEUTILS_H */