diff -Naur mythtv-master-20150105-g4216e00-old/mythtv/libs/libmythtv/eitfixup.h mythtv-master-20150105-g4216e00-new/mythtv/libs/libmythtv/eitfixup.h
|
old
|
new
|
|
| 63 | 63 | kEFixForceISO8859_15 = 0x4000, |
| 64 | 64 | kEFixForceISO8859_9 = 0x80000, |
| 65 | 65 | kEFixForceISO8859_2 = 0x100000, |
| | 66 | kEFixForceISO6937 = 0x8000, |
| 66 | 67 | }; |
| 67 | 68 | |
| 68 | 69 | EITFixUp(); |
diff -Naur mythtv-master-20150105-g4216e00-old/mythtv/libs/libmythtv/eithelper.cpp mythtv-master-20150105-g4216e00-new/mythtv/libs/libmythtv/eithelper.cpp
|
old
|
new
|
|
| 227 | 227 | unsigned char enc_2[3] = { 0x10, 0x00, 0x02 }; |
| 228 | 228 | unsigned char enc_9[3] = { 0x10, 0x00, 0x09 }; // could use { 0x05 } instead |
| 229 | 229 | unsigned char enc_15[3] = { 0x10, 0x00, 0x0f }; // could use { 0x0B } instead |
| | 230 | unsigned char enc_0[1] = { 0x20 }; |
| 230 | 231 | int enc_len = 0; |
| 231 | 232 | const unsigned char *enc = NULL; |
| 232 | 233 | |
| | 234 | // Use an encoding override of ISO 6937 |
| | 235 | if (fix & EITFixUp::kEFixForceISO6937) |
| | 236 | { |
| | 237 | enc = enc_0; |
| | 238 | enc_len = sizeof(enc_0); |
| | 239 | } |
| | 240 | |
| 233 | 241 | // Is this BellExpressVU EIT (Canada) ? |
| 234 | 242 | // Use an encoding override of ISO 8859-1 (Latin1) |
| 235 | 243 | if (fix & EITFixUp::kEFixForceISO8859_1) |
| … |
… |
|
| 261 | 269 | enc = enc_15; |
| 262 | 270 | enc_len = sizeof(enc_15); |
| 263 | 271 | } |
| | 272 | |
| | 273 | |
| 264 | 274 | |
| 265 | 275 | if (bestShortEvent) |
| 266 | 276 | { |
| … |
… |
|
| 337 | 347 | return; |
| 338 | 348 | |
| 339 | 349 | uint descCompression = (eit->TableID() > 0x80) ? 2 : 1; |
| 340 | | uint fix = fixup.value((uint64_t)eit->OriginalNetworkID() << 16); |
| | 350 | uint fix = EITFixUp::kFixGenericDVB; |
| | 351 | if (eit->SourceNetworkID() && eit->SourceTransportID()) { |
| | 352 | fix |= fixup[1<<15 | (uint64_t)eit->SourceNetworkID() << 16]; |
| | 353 | fix |= fixup[1<<15 | (((uint64_t)eit->SourceTransportID()) << 32) | |
| | 354 | ((uint64_t)eit->SourceNetworkID() << 16)]; |
| | 355 | fix |= fixup[1<<15 | ((uint64_t)eit->SourceNetworkID() << 16) | (uint64_t)eit->ServiceID()]; |
| | 356 | fix |= fixup[1<<15 | (((uint64_t)eit->SourceTransportID()) << 32) | |
| | 357 | (uint64_t)((uint64_t)eit->SourceNetworkID() << 16) | |
| | 358 | (uint64_t)(uint64_t)eit->ServiceID()]; |
| | 359 | } |
| | 360 | fix |= fixup[eit->OriginalNetworkID() << 16]; |
| | 361 | |
| 341 | 362 | fix |= fixup.value((((uint64_t)eit->TSID()) << 32) | |
| 342 | 363 | ((uint64_t)eit->OriginalNetworkID() << 16)); |
| 343 | 364 | fix |= fixup.value(((uint64_t)eit->OriginalNetworkID() << 16) | |
| 344 | 365 | (uint64_t)eit->ServiceID()); |
| 345 | 366 | fix |= fixup.value((((uint64_t)eit->TSID()) << 32) | |
| 346 | 367 | ((uint64_t)eit->OriginalNetworkID() << 16) | |
| 347 | | (uint64_t)eit->ServiceID()); |
| 348 | | fix |= EITFixUp::kFixGenericDVB; |
| | 368 | (uint64_t)eit->ServiceID()); |
| 349 | 369 | |
| 350 | 370 | uint tableid = eit->TableID(); |
| 351 | 371 | uint version = eit->Version(); |
| … |
… |
|
| 990 | 1010 | /////////////////////////////////////////////////////////////////////////// |
| 991 | 1011 | // Fixups to make EIT provided listings more useful |
| 992 | 1012 | // transport_id<<32 | netword_id<<16 | service_id |
| | 1013 | // The service_id is a 13-bit field. Free bit number 15 |
| | 1014 | // is used here to determine that the data releate to |
| | 1015 | // transponder, which sent the EIT, and not the program. |
| 993 | 1016 | |
| 994 | 1017 | // Bell Express VU Canada |
| 995 | 1018 | fix[ 256U << 16] = EITFixUp::kFixBell; |
| … |
… |
|
| 1270 | 1293 | |
| 1271 | 1294 | // Premiere |
| 1272 | 1295 | fix[133 << 16] = EITFixUp::kEFixForceISO8859_15; |
| 1273 | | |
| | 1296 | |
| | 1297 | // Cyfra+ ISO-6937 (source NID) |
| | 1298 | fix[1<<15 | 318<<16] = EITFixUp::kEFixForceISO6937; |
| | 1299 | |
| | 1300 | // Polsat ISO-8859-2 (source NID) |
| | 1301 | fix[1<<15 | 113<<16] = EITFixUp::kEFixForceISO8859_2; |
| | 1302 | |
| 1274 | 1303 | // DVB-S Astra 19.2E French channels |
| 1275 | 1304 | fix[ 1022LL << 32 | 1 << 16 | 6901 ] = // DIRECT 8 |
| 1276 | 1305 | fix[ 1022LL << 32 | 1 << 16 | 6905 ] = // France 24 (en Francais) |
diff -Naur mythtv-master-20150105-g4216e00-old/mythtv/libs/libmythtv/mpeg/dvbdescriptors.cpp mythtv-master-20150105-g4216e00-new/mythtv/libs/libmythtv/mpeg/dvbdescriptors.cpp
|
old
|
new
|
|
| 76 | 76 | new unsigned char[raw_length + encoding_override_length]; |
| 77 | 77 | |
| 78 | 78 | uint length = 0; |
| 79 | | if (encoding_override && src[0] >= 0x20) { |
| 80 | | memcpy(dst, encoding_override, encoding_override_length); |
| 81 | | length = encoding_override_length; |
| | 79 | if (encoding_override) { |
| | 80 | if (src[0] >= 0x20) { |
| | 81 | memcpy(dst, encoding_override, encoding_override_length); |
| | 82 | length = encoding_override_length; |
| | 83 | } else { |
| | 84 | //incorrect ISO-8859 encoding marker, |
| | 85 | //when text has been encoded using ISO-6937 |
| | 86 | if (src[0] >= 0x01 && src[0] <= 0x0B |
| | 87 | && encoding_override_length == 1 |
| | 88 | && encoding_override[0] == 0x20) { |
| | 89 | src++; |
| | 90 | raw_length--; |
| | 91 | } |
| | 92 | } |
| 82 | 93 | } |
| 83 | 94 | |
| 84 | 95 | // Strip formatting characters |
diff -Naur mythtv-master-20150105-g4216e00-old/mythtv/libs/libmythtv/mpeg/dvbstreamdata.cpp mythtv-master-20150105-g4216e00-new/mythtv/libs/libmythtv/mpeg/dvbstreamdata.cpp
|
old
|
new
|
|
| 396 | 396 | SetVersionEIT(psip.TableID(), service_id, psip.Version(), psip.LastSection()); |
| 397 | 397 | SetEITSectionSeen(psip.TableID(), service_id, psip.Section()); |
| 398 | 398 | |
| 399 | | DVBEventInformationTable eit(psip); |
| | 399 | DVBEventInformationTable eit(psip, _desired_netid, _desired_tsid); |
| 400 | 400 | for (uint i = 0; i < _dvb_eit_listeners.size(); i++) |
| 401 | 401 | _dvb_eit_listeners[i]->HandleEIT(&eit); |
| 402 | 402 | |
diff -Naur mythtv-master-20150105-g4216e00-old/mythtv/libs/libmythtv/mpeg/dvbtables.h mythtv-master-20150105-g4216e00-new/mythtv/libs/libmythtv/mpeg/dvbtables.h
|
old
|
new
|
|
| 285 | 285 | class MTV_PUBLIC DVBEventInformationTable : public PSIPTable |
| 286 | 286 | { |
| 287 | 287 | public: |
| | 288 | DVBEventInformationTable(const PSIPTable& table, |
| | 289 | uint SourceNetworkID, |
| | 290 | uint SourceTransportID) : PSIPTable(table) |
| | 291 | { |
| | 292 | _source_netid = SourceNetworkID, |
| | 293 | _source_tsid = SourceTransportID; |
| | 294 | assert(IsEIT(TableID())); |
| | 295 | Parse(); |
| | 296 | } |
| 288 | 297 | DVBEventInformationTable(const PSIPTable& table) : PSIPTable(table) |
| 289 | 298 | { |
| 290 | 299 | // table_id 8 0.0 0xC7 |
| … |
… |
|
| 362 | 371 | void Parse(void) const; |
| 363 | 372 | |
| 364 | 373 | static bool IsEIT(uint table_id); |
| | 374 | |
| | 375 | uint SourceNetworkID(void) const { return _source_netid; } |
| | 376 | uint SourceTransportID(void) const { return _source_tsid; } |
| | 377 | bool ActualTS() const { |
| | 378 | return (TableID() == TableID::PF_EIT) |
| | 379 | || ((TableID() > TableID::SC_EITbeg) |
| | 380 | && (TableID() < TableID::SC_EITend)); |
| | 381 | } |
| | 382 | |
| 365 | 383 | |
| 366 | 384 | private: |
| 367 | 385 | mutable vector<const unsigned char*> _ptrs; // used to parse |
| | 386 | uint _source_netid; |
| | 387 | uint _source_tsid; |
| 368 | 388 | }; |
| 369 | 389 | |
| 370 | 390 | /** \class TimeDateTable |