Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] patch for femonosd.c



Ugly hack to display CA systemname, ie. Conax or Viaccess, if known,
othervise display CA_system_id in hex, ie. 90F, instead of decimal.

Some more work needs to be done to display all CA's of channel


--- Begin Message ---
--- femonosd.c.orig	2004-06-24 04:20:00.000000000 +0300
+++ femonosd.c	2004-07-28 10:39:57.000000000 +0300
@@ -309,13 +309,46 @@
         if (value) snprintf(buf, sizeof(buf), "%d, %d", channel->Dpid1(), value);
         else       snprintf(buf, sizeof(buf), "%d", channel->Dpid1());
         m_Osd->DrawText(OSDINFOWIN_X(4), OSDINFOWIN_Y(offset), buf, clrYellow, clrBackground, m_Font);
+
         offset += m_Font->Height();
         m_Osd->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), tr("CA"), clrWhite, clrBackground, m_Font);
-        snprintf(buf, sizeof(buf), "%d", channel->Ca());
+//        snprintf(buf, sizeof(buf), "%d", channel->Ca());
+        value = channel->Ca() / 256;
+		switch (value) {
+			case 0x0:	if (channel->Ca() == 0) {
+							snprintf(buf, sizeof(buf), "%s", "Free to Air");
+						} else {
+							snprintf(buf, sizeof(buf), "%s", "Fixed");
+						};
+						break;
+			case 0x1:	snprintf(buf, sizeof(buf), "%s", "SECA/Mediaguard");
+						break;
+			case 0x5:	snprintf(buf, sizeof(buf), "%s", "Viaccess");
+						break;
+			case 0x6:	snprintf(buf, sizeof(buf), "%s", "Irdeto");
+						break;
+			case 0x9:	snprintf(buf, sizeof(buf), "%s", "NDS/Videoguard");
+						break;
+			case 0xB:	snprintf(buf, sizeof(buf), "%s", "Conax");
+						break;
+			case 0xD:	snprintf(buf, sizeof(buf), "%s", "CryptoWorks");
+						break;
+			case 0xE:	snprintf(buf, sizeof(buf), "%s", "PowerVu");
+						break;
+			case 0x17:	snprintf(buf, sizeof(buf), "%s", "BetaCrypt");
+						break;
+			case 0x18:	snprintf(buf, sizeof(buf), "%s", "NagraVision");
+						break;
+			case 0x4A:	snprintf(buf, sizeof(buf), "%s", "SkyCrypt");
+						break;
+			default:	snprintf(buf, sizeof(buf), "%4X", channel->Ca());
+		};
         m_Osd->DrawText(OSDINFOWIN_X(2), OSDINFOWIN_Y(offset), buf, clrYellow, clrBackground, m_Font);
+
         m_Osd->DrawText(OSDINFOWIN_X(3), OSDINFOWIN_Y(offset), tr("Tpid"), clrWhite, clrBackground, m_Font);
         snprintf(buf, sizeof(buf), "%d", channel->Tpid());
         m_Osd->DrawText(OSDINFOWIN_X(4), OSDINFOWIN_Y(offset), buf, clrYellow, clrBackground, m_Font);
+
         offset += m_Font->Height();
         m_Osd->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), tr("Sid"), clrWhite, clrBackground, m_Font);
         snprintf(buf, sizeof(buf), "%d", channel->Sid());

--- End Message ---

Home | Main Index | Thread Index