Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
d61617a5
Commit
d61617a5
authored
Oct 17, 2013
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavu/parseutils: add av_get_known_color_name()
parent
1e5271a9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
3 deletions
+32
-3
APIchanges
doc/APIchanges
+3
-1
parseutils.c
libavutil/parseutils.c
+14
-0
parseutils.h
libavutil/parseutils.h
+13
-0
version.h
libavutil/version.h
+2
-2
No files found.
doc/APIchanges
View file @
d61617a5
...
@@ -15,7 +15,9 @@ libavutil: 2012-10-22
...
@@ -15,7 +15,9 @@ libavutil: 2012-10-22
API changes, most recent first:
API changes, most recent first:
libavutil 52.47.100
2013-10-27 - xxxxxxx - lavu 52.48.100 - parseutils.h
Add av_get_known_color_name().
2013-10-17 - xxxxxxx - lavu 52.47.100 - opt.h
2013-10-17 - xxxxxxx - lavu 52.47.100 - opt.h
Add AV_OPT_TYPE_CHANNEL_LAYOUT and channel layout option handlers
Add AV_OPT_TYPE_CHANNEL_LAYOUT and channel layout option handlers
av_opt_get_channel_layout() and av_opt_set_channel_layout().
av_opt_get_channel_layout() and av_opt_set_channel_layout().
...
...
libavutil/parseutils.c
View file @
d61617a5
...
@@ -420,6 +420,20 @@ int av_parse_color(uint8_t *rgba_color, const char *color_string, int slen,
...
@@ -420,6 +420,20 @@ int av_parse_color(uint8_t *rgba_color, const char *color_string, int slen,
return
0
;
return
0
;
}
}
const
char
*
av_get_known_color_name
(
int
color_idx
,
const
uint8_t
**
rgbp
)
{
const
ColorEntry
*
color
;
if
((
unsigned
)
color_idx
>=
FF_ARRAY_ELEMS
(
color_table
))
return
NULL
;
color
=
&
color_table
[
color_idx
];
if
(
rgbp
)
*
rgbp
=
color
->
rgb_color
;
return
color
->
name
;
}
/* get a positive number between n_min and n_max, for a maximum length
/* get a positive number between n_min and n_max, for a maximum length
of len_max. Return -1 if error. */
of len_max. Return -1 if error. */
static
int
date_get_num
(
const
char
**
pp
,
static
int
date_get_num
(
const
char
**
pp
,
...
...
libavutil/parseutils.h
View file @
d61617a5
...
@@ -98,6 +98,19 @@ int av_parse_video_rate(AVRational *rate, const char *str);
...
@@ -98,6 +98,19 @@ int av_parse_video_rate(AVRational *rate, const char *str);
int
av_parse_color
(
uint8_t
*
rgba_color
,
const
char
*
color_string
,
int
slen
,
int
av_parse_color
(
uint8_t
*
rgba_color
,
const
char
*
color_string
,
int
slen
,
void
*
log_ctx
);
void
*
log_ctx
);
/**
* Get the name of a color from the internal table of hard-coded named
* colors.
*
* This function is meant to enumerate the color names recognized by
* av_parse_color().
*
* @param color_idx index of the requested color, starting from 0
* @param rgbp if not NULL, will point to a 3-elements array with the color value in RGB
* @return the color name string or NULL if color_idx is not in the array
*/
const
char
*
av_get_known_color_name
(
int
color_idx
,
const
uint8_t
**
rgb
);
/**
/**
* Parse timestr and return in *time a corresponding number of
* Parse timestr and return in *time a corresponding number of
* microseconds.
* microseconds.
...
...
libavutil/version.h
View file @
d61617a5
...
@@ -75,8 +75,8 @@
...
@@ -75,8 +75,8 @@
*/
*/
#define LIBAVUTIL_VERSION_MAJOR 52
#define LIBAVUTIL_VERSION_MAJOR 52
#define LIBAVUTIL_VERSION_MINOR 4
7
#define LIBAVUTIL_VERSION_MINOR 4
8
#define LIBAVUTIL_VERSION_MICRO 10
1
#define LIBAVUTIL_VERSION_MICRO 10
0
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
LIBAVUTIL_VERSION_MINOR, \
LIBAVUTIL_VERSION_MINOR, \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment