From 1ea875ff07774f90fe83c3dcdaddf0bf42b01968 Mon Sep 17 00:00:00 2001 From: Petri Hintukainen Date: Mon, 9 Jul 2012 21:41:40 +0300 Subject: input_test: added human-friendly title --- src/input/input_test.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/input/input_test.c b/src/input/input_test.c index 5bdf165ef..c25450bfa 100644 --- a/src/input/input_test.c +++ b/src/input/input_test.c @@ -77,6 +77,19 @@ static const char * const test_names[TEST_MAX_NAMES + 1 + 1] = { NULL }; +const char * const test_titles[TEST_MAX_NAMES/2] = { + N_("Color Circle"), + N_("RGB Levels"), + N_("Saturation Levels"), + N_("UV Square"), + N_("Luminance Resolution"), +}; + +static const char * const test_cm[] = { + " ITU-R 470 BG / SDTV", + " ITU-R 709 / HDTV", +}; + /* TJ. the generator code - actually a cut down version of my "testvideo" project */ static void put32le (unsigned int v, unsigned char *p) { @@ -420,6 +433,16 @@ static int test_make (test_input_plugin_t * this) { } } + /* human-friendly title */ + if (type > 0 && type <= TEST_MAX_NAMES / 2) { + char *title = _x_asprintf("%s (%s)%s", + _(test_titles[type-1]), + yuv ? "YUV" : "RGB", + yuv ? test_cm[!!hdtv] : ""); + _x_meta_info_set(this->stream, XINE_META_INFO_TITLE, title); + free(title); + } + return (1); } -- cgit v1.2.3