OSDN Git Service

Extend documentation for parse_filter().
[coroid/libav_saccubus.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
22  * parsing utils
23  */
24
25 #ifndef AVFILTER_PARSEUTILS_H
26 #define AVFILTER_PARSEUTILS_H
27
28 #include "libavutil/opt.h"
29
30 /**
31  * Put the RGBA values that correspond to color_string in rgba_color.
32  *
33  * @param color_string a string specifying a color. It can be the name of
34  * a color (case insensitive match) or a 0xRRGGBB[AA] sequence,
35  * possibly followed by "@" and a string representing the alpha
36  * component.
37  * The alpha component may be a string composed by "0x" followed by an
38  * hexadecimal number or a base-10 number between 0 and 255, or a
39  * decimal number between 0.0 and 1.0, which represents the opacity
40  * value (0/0x00/0.0 means completely transparent, 255/0xff/1.0
41  * completely opaque).
42  * If the alpha component is not specified then 255 is assumed.
43  * The string "random" will result in a random color.
44  * @return >= 0 in case of success, a negative value in case of
45  * failure (for example if color_string cannot be parsed).
46  */
47 int av_parse_color(uint8_t *rgba_color, const char *color_string, void *log_ctx);
48
49 #endif  /* AVFILTER_PARSEUTILS_H */