[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xine-cvslog
Subject:    [xine-cvs] =?utf-8?q?HG=3A_xine-lib-1=2E2=3A_input=5Ftest=3A_adde?= =?utf-8?q?d_human-friendly_title
From:       Petri_Hintukainen <phintuka () users ! sourceforge ! net>
Date:       2012-07-12 7:01:12
Message-ID: 9a9efe72db8f2c68f4a0.1341859300 () hg ! debian ! org
[Download RAW message or body]

# HG changeset patch
# User Petri Hintukainen <phintuka@users.sourceforge.net>
# Date 1341859300 -10800
# Node ID 9a9efe72db8f2c68f4a0e791e52aadd7695ab921
# Branch  default
# Parent  e02ab18632282c26d6afdceb1652379a57ec5baa
input_test: added human-friendly title

diff --git a/src/input/input_test.c b/src/input/input_test.c
--- a/src/input/input_test.c
+++ b/src/input/input_test.c
@@ -77,6 +77,19 @@
   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 @@
     }
   }
 
+  /* 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);
 }
 

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Xine-cvslog mailing list
Xine-cvslog@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xine-cvslog
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic