Skip to content

Commit

Permalink
[pvr] fixed missing encryption name for new channels. cleaned up Upda…
Browse files Browse the repository at this point in the history
…teEncryptionName() a bit
  • Loading branch information
opdenkamp committed Oct 26, 2012
1 parent a3ece58 commit a562e9d
Showing 1 changed file with 91 additions and 96 deletions.
187 changes: 91 additions & 96 deletions xbmc/pvr/channels/PVRChannel.cpp
Expand Up @@ -76,6 +76,7 @@ CPVRChannel::CPVRChannel(bool bRadio /* = false */)
m_strStreamURL = StringUtils::EmptyString;
m_strFileNameAndPath = StringUtils::EmptyString;
m_iClientEncryptionSystem = -1;
UpdateEncryptionName();
}

CPVRChannel::CPVRChannel(const PVR_CHANNEL &channel, unsigned int iClientId)
Expand Down Expand Up @@ -534,107 +535,101 @@ void CPVRChannel::UpdateEncryptionName(void)
{
// http://www.dvb.org/index.php?id=174
// http://en.wikipedia.org/wiki/Conditional_access_system
CStdString strName;
CStdString strName(g_localizeStrings.Get(13205)); /* Unknown */
CSingleLock lock(m_critSection);

if ( m_iClientEncryptionSystem == 0x0000)
strName = g_localizeStrings.Get(19013); /* Free To Air */
else if (m_iClientEncryptionSystem < 0x0000)
strName = g_localizeStrings.Get(13205); /* Unknown */
else
{
if ( m_iClientEncryptionSystem >= 0x0001 &&
m_iClientEncryptionSystem <= 0x009F)
strName = g_localizeStrings.Get(19014); /* Fixed */
else if (m_iClientEncryptionSystem >= 0x00A0 &&
m_iClientEncryptionSystem <= 0x00A1)
strName = g_localizeStrings.Get(338); /* Analog */
else if (m_iClientEncryptionSystem >= 0x00A2 &&
m_iClientEncryptionSystem <= 0x00FF)
strName = g_localizeStrings.Get(19014); /* Fixed */
else if (m_iClientEncryptionSystem >= 0x0100 &&
m_iClientEncryptionSystem <= 0x01FF)
strName = "SECA Mediaguard";
else if (m_iClientEncryptionSystem == 0x0464)
strName = "EuroDec";
else if (m_iClientEncryptionSystem >= 0x0500 &&
m_iClientEncryptionSystem <= 0x05FF)
strName = "Viaccess";
else if (m_iClientEncryptionSystem >= 0x0600 &&
m_iClientEncryptionSystem <= 0x06FF)
strName = "Irdeto";
else if (m_iClientEncryptionSystem >= 0x0900 &&
m_iClientEncryptionSystem <= 0x09FF)
strName = "NDS Videoguard";
else if (m_iClientEncryptionSystem >= 0x0B00 &&
m_iClientEncryptionSystem <= 0x0BFF)
strName = "Conax";
else if (m_iClientEncryptionSystem >= 0x0D00 &&
m_iClientEncryptionSystem <= 0x0DFF)
strName = "CryptoWorks";
else if (m_iClientEncryptionSystem >= 0x0E00 &&
m_iClientEncryptionSystem <= 0x0EFF)
strName = "PowerVu";
else if (m_iClientEncryptionSystem == 0x1000)
strName = "RAS";
else if (m_iClientEncryptionSystem >= 0x1200 &&
m_iClientEncryptionSystem <= 0x12FF)
strName = "NagraVision";
else if (m_iClientEncryptionSystem >= 0x1700 &&
m_iClientEncryptionSystem <= 0x17FF)
strName = "BetaCrypt";
else if (m_iClientEncryptionSystem >= 0x1800 &&
m_iClientEncryptionSystem <= 0x18FF)
strName = "NagraVision";
else if (m_iClientEncryptionSystem == 0x22F0)
strName = "Codicrypt";
else if (m_iClientEncryptionSystem == 0x2600)
strName = "BISS";
else if (m_iClientEncryptionSystem == 0x4347)
strName = "CryptOn";
else if (m_iClientEncryptionSystem == 0x4800)
strName = "Accessgate";
else if (m_iClientEncryptionSystem == 0x4900)
strName = "China Crypt";
else if (m_iClientEncryptionSystem == 0x4A10)
strName = "EasyCas";
else if (m_iClientEncryptionSystem == 0x4A20)
strName = "AlphaCrypt";
else if (m_iClientEncryptionSystem == 0x4A70)
strName = "DreamCrypt";
else if (m_iClientEncryptionSystem == 0x4A60)
strName = "SkyCrypt";
else if (m_iClientEncryptionSystem == 0x4A61)
strName = "Neotioncrypt";
else if (m_iClientEncryptionSystem == 0x4A62)
strName = "SkyCrypt";
else if (m_iClientEncryptionSystem == 0x4A63)
strName = "Neotion SHL";
else if (m_iClientEncryptionSystem >= 0x4A64 &&
m_iClientEncryptionSystem <= 0x4A6F)
strName = "SkyCrypt";
else if (m_iClientEncryptionSystem == 0x4A80)
strName = "ThalesCrypt";
else if (m_iClientEncryptionSystem == 0x4AA1)
strName = "KeyFly";
else if (m_iClientEncryptionSystem == 0x4ABF)
strName = "DG-Crypt";
else if (m_iClientEncryptionSystem >= 0x4AD0 &&
m_iClientEncryptionSystem <= 0x4AD1)
strName = "X-Crypt";
else if (m_iClientEncryptionSystem == 0x4AD4)
strName = "OmniCrypt";
else if (m_iClientEncryptionSystem == 0x4AE0)
strName = "RossCrypt";
else if (m_iClientEncryptionSystem == 0x5500)
strName = "Z-Crypt";
else if (m_iClientEncryptionSystem == 0x5501)
strName = "Griffin";
else
strName = g_localizeStrings.Get(19499); /* Unknown */

else if (m_iClientEncryptionSystem >= 0x0001 &&
m_iClientEncryptionSystem <= 0x009F)
strName = g_localizeStrings.Get(19014); /* Fixed */
else if (m_iClientEncryptionSystem >= 0x00A0 &&
m_iClientEncryptionSystem <= 0x00A1)
strName = g_localizeStrings.Get(338); /* Analog */
else if (m_iClientEncryptionSystem >= 0x00A2 &&
m_iClientEncryptionSystem <= 0x00FF)
strName = g_localizeStrings.Get(19014); /* Fixed */
else if (m_iClientEncryptionSystem >= 0x0100 &&
m_iClientEncryptionSystem <= 0x01FF)
strName = "SECA Mediaguard";
else if (m_iClientEncryptionSystem == 0x0464)
strName = "EuroDec";
else if (m_iClientEncryptionSystem >= 0x0500 &&
m_iClientEncryptionSystem <= 0x05FF)
strName = "Viaccess";
else if (m_iClientEncryptionSystem >= 0x0600 &&
m_iClientEncryptionSystem <= 0x06FF)
strName = "Irdeto";
else if (m_iClientEncryptionSystem >= 0x0900 &&
m_iClientEncryptionSystem <= 0x09FF)
strName = "NDS Videoguard";
else if (m_iClientEncryptionSystem >= 0x0B00 &&
m_iClientEncryptionSystem <= 0x0BFF)
strName = "Conax";
else if (m_iClientEncryptionSystem >= 0x0D00 &&
m_iClientEncryptionSystem <= 0x0DFF)
strName = "CryptoWorks";
else if (m_iClientEncryptionSystem >= 0x0E00 &&
m_iClientEncryptionSystem <= 0x0EFF)
strName = "PowerVu";
else if (m_iClientEncryptionSystem == 0x1000)
strName = "RAS";
else if (m_iClientEncryptionSystem >= 0x1200 &&
m_iClientEncryptionSystem <= 0x12FF)
strName = "NagraVision";
else if (m_iClientEncryptionSystem >= 0x1700 &&
m_iClientEncryptionSystem <= 0x17FF)
strName = "BetaCrypt";
else if (m_iClientEncryptionSystem >= 0x1800 &&
m_iClientEncryptionSystem <= 0x18FF)
strName = "NagraVision";
else if (m_iClientEncryptionSystem == 0x22F0)
strName = "Codicrypt";
else if (m_iClientEncryptionSystem == 0x2600)
strName = "BISS";
else if (m_iClientEncryptionSystem == 0x4347)
strName = "CryptOn";
else if (m_iClientEncryptionSystem == 0x4800)
strName = "Accessgate";
else if (m_iClientEncryptionSystem == 0x4900)
strName = "China Crypt";
else if (m_iClientEncryptionSystem == 0x4A10)
strName = "EasyCas";
else if (m_iClientEncryptionSystem == 0x4A20)
strName = "AlphaCrypt";
else if (m_iClientEncryptionSystem == 0x4A70)
strName = "DreamCrypt";
else if (m_iClientEncryptionSystem == 0x4A60)
strName = "SkyCrypt";
else if (m_iClientEncryptionSystem == 0x4A61)
strName = "Neotioncrypt";
else if (m_iClientEncryptionSystem == 0x4A62)
strName = "SkyCrypt";
else if (m_iClientEncryptionSystem == 0x4A63)
strName = "Neotion SHL";
else if (m_iClientEncryptionSystem >= 0x4A64 &&
m_iClientEncryptionSystem <= 0x4A6F)
strName = "SkyCrypt";
else if (m_iClientEncryptionSystem == 0x4A80)
strName = "ThalesCrypt";
else if (m_iClientEncryptionSystem == 0x4AA1)
strName = "KeyFly";
else if (m_iClientEncryptionSystem == 0x4ABF)
strName = "DG-Crypt";
else if (m_iClientEncryptionSystem >= 0x4AD0 &&
m_iClientEncryptionSystem <= 0x4AD1)
strName = "X-Crypt";
else if (m_iClientEncryptionSystem == 0x4AD4)
strName = "OmniCrypt";
else if (m_iClientEncryptionSystem == 0x4AE0)
strName = "RossCrypt";
else if (m_iClientEncryptionSystem == 0x5500)
strName = "Z-Crypt";
else if (m_iClientEncryptionSystem == 0x5501)
strName = "Griffin";

if (m_iClientEncryptionSystem >= 0)
strName.AppendFormat(" (%04X)", m_iClientEncryptionSystem);
}

m_strClientEncryptionName = strName;
}
Expand Down

0 comments on commit a562e9d

Please sign in to comment.