lavu/parseutils: add av_get_known_color_name()

This commit is contained in:
Stefano Sabatini 2013-10-17 19:03:40 +02:00
parent 1e5271a9fd
commit d61617a523
4 changed files with 32 additions and 3 deletions

View file

@ -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,
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
* microseconds.