Unified · Split
| @@ -15,7 +15,9 @@ libavutil: 2012-10-22 · 14 unmodified lines | ||
| 15 | 15 | |
| 16 | 16 | API changes, most recent first: |
| 17 | 17 | |
| 18 | −libavutil 52.47.100 | |
| 18 | +2013-10-27 - xxxxxxx - lavu 52.48.100 - parseutils.h | |
| 19 | + Add av_get_known_color_name(). | |
| 20 | + | |
| 19 | 21 | 2013-10-17 - xxxxxxx - lavu 52.47.100 - opt.h |
| 20 | 22 | Add AV_OPT_TYPE_CHANNEL_LAYOUT and channel layout option handlers |
| 21 | 23 | av_opt_get_channel_layout() and av_opt_set_channel_layout(). |
| @@ -420,6 +420,20 @@ int av_parse_color(uint8_t *rgba_color, const char *color_string, int slen, · 419 unmodified lines | ||
| 420 | 420 | return 0; |
| 421 | 421 | } |
| 422 | 422 | |
| 423 | +const char *av_get_known_color_name(int color_idx, const uint8_t **rgbp) | |
| 424 | +{ | |
| 425 | + const ColorEntry *color; | |
| 426 | + | |
| 427 | + if ((unsigned)color_idx >= FF_ARRAY_ELEMS(color_table)) | |
| 428 | + return NULL; | |
| 429 | + | |
| 430 | + color = &color_table[color_idx]; | |
| 431 | + if (rgbp) | |
| 432 | + *rgbp = color->rgb_color; | |
| 433 | + | |
| 434 | + return color->name; | |
| 435 | +} | |
| 436 | + | |
| 423 | 437 | /* get a positive number between n_min and n_max, for a maximum length |
| 424 | 438 | of len_max. Return -1 if error. */ |
| 425 | 439 | static int date_get_num(const char **pp, |
| @@ -98,6 +98,19 @@ int av_parse_video_rate(AVRational *rate, const char *str); · 97 unmodified lines | ||
| 98 | 98 | int av_parse_color(uint8_t *rgba_color, const char *color_string, int slen, |
| 99 | 99 | void *log_ctx); |
| 100 | 100 | |
| 101 | +/** | |
| 102 | + * Get the name of a color from the internal table of hard-coded named | |
| 103 | + * colors. | |
| 104 | + * | |
| 105 | + * This function is meant to enumerate the color names recognized by | |
| 106 | + * av_parse_color(). | |
| 107 | + * | |
| 108 | + * @param color_idx index of the requested color, starting from 0 | |
| 109 | + * @param rgbp if not NULL, will point to a 3-elements array with the color value in RGB | |
| 110 | + * @return the color name string or NULL if color_idx is not in the array | |
| 111 | + */ | |
| 112 | +const char *av_get_known_color_name(int color_idx, const uint8_t **rgb); | |
| 113 | + | |
| 101 | 114 | /** |
| 102 | 115 | * Parse timestr and return in *time a corresponding number of |
| 103 | 116 | * microseconds. |
| @@ -75,8 +75,8 @@ · 74 unmodified lines | ||
| 75 | 75 | */ |
| 76 | 76 | |
| 77 | 77 | #define LIBAVUTIL_VERSION_MAJOR 52 |
| 78 | −#define LIBAVUTIL_VERSION_MINOR 47 | |
| 79 | −#define LIBAVUTIL_VERSION_MICRO 101 | |
| 78 | +#define LIBAVUTIL_VERSION_MINOR 48 | |
| 79 | +#define LIBAVUTIL_VERSION_MICRO 100 | |
| 80 | 80 | |
| 81 | 81 | #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ |
| 82 | 82 | LIBAVUTIL_VERSION_MINOR, \ |