Commit 0985e1a3 authored by Aurelien Jacobs's avatar Aurelien Jacobs

move the av_parse_color() function from libavfilter to libavcore

Originally committed as revision 25761 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 909865fd
......@@ -13,6 +13,9 @@ libavutil: 2009-03-08
API changes, most recent first:
2010-11-17 - r25761 - lavcore 0.13.0 - parseutils.h
Add av_parse_color() declared in libavcore/parseutils.h.
2010-11-13 - r25745 - lavc 52.95.0 - AVCodecContext
Add AVCodecContext.subtitle_header and AVCodecContext.subtitle_header_size
fields.
......
......@@ -27,8 +27,8 @@
#include "libavutil/avutil.h"
#define LIBAVCORE_VERSION_MAJOR 0
#define LIBAVCORE_VERSION_MINOR 12
#define LIBAVCORE_VERSION_MICRO 1
#define LIBAVCORE_VERSION_MINOR 13
#define LIBAVCORE_VERSION_MICRO 0
#define LIBAVCORE_VERSION_INT AV_VERSION_INT(LIBAVCORE_VERSION_MAJOR, \
LIBAVCORE_VERSION_MINOR, \
......
This diff is collapsed.
......@@ -50,4 +50,26 @@ int av_parse_video_size(int *width_ptr, int *height_ptr, const char *str);
*/
int av_parse_video_rate(AVRational *rate, const char *str);
/**
* Put the RGBA values that correspond to color_string in rgba_color.
*
* @param color_string a string specifying a color. It can be the name of
* a color (case insensitive match) or a [0x|#]RRGGBB[AA] sequence,
* possibly followed by "@" and a string representing the alpha
* component.
* The alpha component may be a string composed by "0x" followed by an
* hexadecimal number or a decimal number between 0.0 and 1.0, which
* represents the opacity value (0x00/0.0 means completely transparent,
* 0xff/1.0 completely opaque).
* If the alpha component is not specified then 0xff is assumed.
* The string "random" will result in a random color.
* @param slen length of the initial part of color_string containing the
* color. It can be set to -1 if color_string is a null terminated string
* containing nothing else than the color.
* @return >= 0 in case of success, a negative value in case of
* failure (for example if color_string cannot be parsed).
*/
int av_parse_color(uint8_t *rgba_color, const char *color_string, int slen,
void *log_ctx);
#endif /* AVCORE_PARSEUTILS_H */
......@@ -12,7 +12,6 @@ OBJS = allfilters.o \
defaults.o \
formats.o \
graphparser.o \
parseutils.o \
OBJS-$(CONFIG_ANULL_FILTER) += af_anull.o
......
......@@ -26,7 +26,6 @@
#include "libavutil/avstring.h"
#include "avfilter.h"
#include "avfiltergraph.h"
#include "parseutils.h"
#define WHITESPACES " \n\t"
......
This diff is collapsed.
/*
* copyright (c) 2009 Stefano Sabatini
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/**
* @file
* parsing utils
*/
#ifndef AVFILTER_PARSEUTILS_H
#define AVFILTER_PARSEUTILS_H
#include "libavutil/opt.h"
/**
* Put the RGBA values that correspond to color_string in rgba_color.
*
* @param color_string a string specifying a color. It can be the name of
* a color (case insensitive match) or a [0x|#]RRGGBB[AA] sequence,
* possibly followed by "@" and a string representing the alpha
* component.
* The alpha component may be a string composed by "0x" followed by an
* hexadecimal number or a decimal number between 0.0 and 1.0, which
* represents the opacity value (0x00/0.0 means completely transparent,
* 0xff/1.0 completely opaque).
* If the alpha component is not specified then 0xff is assumed.
* The string "random" will result in a random color.
* @param slen length of the initial part of color_string containing the
* color. It can be set to -1 if color_string is a null terminated string
* containing nothing else than the color.
* @return >= 0 in case of success, a negative value in case of
* failure (for example if color_string cannot be parsed).
*/
int av_parse_color(uint8_t *rgba_color, const char *color_string, int slen,
void *log_ctx);
#endif /* AVFILTER_PARSEUTILS_H */
......@@ -26,8 +26,8 @@
#include "libavutil/colorspace.h"
#include "libavutil/pixdesc.h"
#include "libavcore/parseutils.h"
#include "avfilter.h"
#include "parseutils.h"
enum { Y, U, V, A };
......
......@@ -27,8 +27,8 @@
#include <dlfcn.h>
#include <frei0r.h>
#include "libavutil/avstring.h"
#include "libavcore/parseutils.h"
#include "avfilter.h"
#include "parseutils.h"
typedef f0r_instance_t (*f0r_construct_f)(unsigned int width, unsigned int height);
typedef void (*f0r_destruct_f)(f0r_instance_t instance);
......
......@@ -25,7 +25,6 @@
*/
#include "avfilter.h"
#include "parseutils.h"
#include "libavutil/pixdesc.h"
#include "libavutil/colorspace.h"
#include "libavcore/imgutils.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment