Browse Source

Add support for more CA systems.

Add support for detecting SECA, VIACCESS, VIDEOGUARD,
NAGRA and DRECRYPT. That should cover the most used CA
systems.
Georgi Chorbadzhiyski 12 years ago
parent
commit
d9734150a3
2 changed files with 18 additions and 2 deletions
  1. 13
    2
      cat.c
  2. 5
    0
      tsdata.h

+ 13
- 2
cat.c View File

184
 }
184
 }
185
 
185
 
186
 enum CA_system ts_get_CA_sys(uint16_t CA_id) {
186
 enum CA_system ts_get_CA_sys(uint16_t CA_id) {
187
+	if (CA_id >= 0x0100 && CA_id <= 0x01FF) return CA_SECA;
188
+	if (CA_id >= 0x0500 && CA_id <= 0x05FF) return CA_VIACCESS;
187
 	if (CA_id >= 0x0600 && CA_id <= 0x06FF) return CA_IRDETO;
189
 	if (CA_id >= 0x0600 && CA_id <= 0x06FF) return CA_IRDETO;
190
+	if (CA_id >= 0x0900 && CA_id <= 0x09FF) return CA_VIDEOGUARD;
188
 	if (CA_id >= 0x0B00 && CA_id <= 0x0BFF) return CA_CONAX;
191
 	if (CA_id >= 0x0B00 && CA_id <= 0x0BFF) return CA_CONAX;
189
 	if (CA_id >= 0x0D00 && CA_id <= 0x0DFF) return CA_CRYPTOWORKS;
192
 	if (CA_id >= 0x0D00 && CA_id <= 0x0DFF) return CA_CRYPTOWORKS;
193
+	if (CA_id >= 0x1800 && CA_id <= 0x18FF) return CA_NAGRA;
194
+	if (CA_id >= 0x4AE0 && CA_id <= 0x4AE1) return CA_DRECRYPT;
190
 	return CA_UNKNOWN;
195
 	return CA_UNKNOWN;
191
 }
196
 }
192
 
197
 
198
+
193
 char * ts_get_CA_sys_txt(enum CA_system CA_sys) {
199
 char * ts_get_CA_sys_txt(enum CA_system CA_sys) {
194
 	switch (CA_sys) {
200
 	switch (CA_sys) {
201
+		case CA_SECA:			return "SECA";
202
+		case CA_VIACCESS:		return "VIACCESS";
195
 		case CA_IRDETO:			return "IRDETO";
203
 		case CA_IRDETO:			return "IRDETO";
204
+		case CA_VIDEOGUARD:		return "VIDEOGUARD";
196
 		case CA_CONAX:			return "CONAX";
205
 		case CA_CONAX:			return "CONAX";
197
 		case CA_CRYPTOWORKS:	return "CRYPTOWORKS";
206
 		case CA_CRYPTOWORKS:	return "CRYPTOWORKS";
198
-		case CA_UNKNOWN:
199
-		default:				return "UNKNOWN";
207
+		case CA_NAGRA:			return "NAGRA";
208
+		case CA_DRECRYPT:		return "DRE-CRYPT";
209
+		case CA_UNKNOWN:		return "UNKNOWN";
200
 	}
210
 	}
211
+	return "UNKNOWN";
201
 }
212
 }
202
 
213
 
203
 static int find_CA_descriptor(uint8_t *data, int data_len, enum CA_system req_CA_type, uint16_t *CA_id, uint16_t *CA_pid) {
214
 static int find_CA_descriptor(uint8_t *data, int data_len, enum CA_system req_CA_type, uint16_t *CA_id, uint16_t *CA_pid) {

+ 5
- 0
tsdata.h View File

93
 };
93
 };
94
 
94
 
95
 enum CA_system {
95
 enum CA_system {
96
+	CA_SECA,		// 0x0100 - 0x01FF Canal Plus (SECA/Mediaguard)
97
+	CA_VIACCESS,	// 0x0500 - 0x05FF France Telecom
96
 	CA_IRDETO,		// 0x0600 - 0x06FF Irdeto
98
 	CA_IRDETO,		// 0x0600 - 0x06FF Irdeto
99
+	CA_VIDEOGUARD,	// 0x0900 - 0x09FF News Datacom (NDS/Videoguard)
97
 	CA_CONAX,		// 0x0B00 - 0x0BFF Norwegian Telekom
100
 	CA_CONAX,		// 0x0B00 - 0x0BFF Norwegian Telekom
98
 	CA_CRYPTOWORKS,	// 0x0D00 - 0x0DFF CrytoWorks
101
 	CA_CRYPTOWORKS,	// 0x0D00 - 0x0DFF CrytoWorks
102
+	CA_NAGRA,		// 0x1800 - 0x18FF Kudelski SA (Nagravision)
103
+	CA_DRECRYPT,	// 0x4AE0 - 0x4AE1 OOO Cifra (DRE-Crypt)
99
 	CA_UNKNOWN,
104
 	CA_UNKNOWN,
100
 };
105
 };
101
 
106
 

Loading…
Cancel
Save