diff -Naur mythtv-master-20160121-g1f389ff-old/mythtv/libs/libmythtv/eitfixup.h mythtv-master-20160121-g1f389ff-new/mythtv/libs/libmythtv/eitfixup.h
old
|
new
|
|
70 | 70 | kFixGreekSubtitle = 1 << 29, |
71 | 71 | kFixGreekEIT = 1 << 30, |
72 | 72 | kFixGreekCategories = 1 << 31, |
| 73 | kEFixForceISO6937 = 1 << 32, |
73 | 74 | }; |
74 | 75 | |
75 | 76 | EITFixUp(); |
diff -Naur mythtv-master-20160121-g1f389ff-old/mythtv/libs/libmythtv/eithelper.cpp mythtv-master-20160121-g1f389ff-new/mythtv/libs/libmythtv/eithelper.cpp
old
|
new
|
|
256 | 256 | unsigned char enc_7[3] = { 0x10, 0x00, 0x07 }; // Latin/Greek Alphabet |
257 | 257 | unsigned char enc_9[3] = { 0x10, 0x00, 0x09 }; // could use { 0x05 } instead |
258 | 258 | unsigned char enc_15[3] = { 0x10, 0x00, 0x0f }; // could use { 0x0B } instead |
| 259 | unsigned char enc_0[1] = { 0x20 }; |
259 | 260 | int enc_len = 0; |
260 | 261 | const unsigned char *enc = NULL; |
261 | 262 | |
| 263 | // Use an encoding override of ISO 6937 |
| 264 | if (fix & EITFixUp::kEFixForceISO6937) |
| 265 | { |
| 266 | enc = enc_0; |
| 267 | enc_len = sizeof(enc_0); |
| 268 | } |
| 269 | |
262 | 270 | // Is this BellExpressVU EIT (Canada) ? |
263 | 271 | // Use an encoding override of ISO 8859-1 (Latin1) |
264 | 272 | if (fix & EITFixUp::kEFixForceISO8859_1) |
… |
… |
|
290 | 298 | enc = enc_15; |
291 | 299 | enc_len = sizeof(enc_15); |
292 | 300 | } |
| 301 | |
| 302 | |
293 | 303 | |
294 | 304 | // Is this broken DVB provider in Greece? |
295 | 305 | // Use an encoding override of ISO 8859-7 (Latin/Greek) |
… |
… |
|
377 | 387 | return; |
378 | 388 | |
379 | 389 | uint descCompression = (eit->TableID() > 0x80) ? 2 : 1; |
380 | | FixupValue fix = fixup.value((FixupKey)eit->OriginalNetworkID() << 16); |
| 390 | uint fix = EITFixUp::kFixGenericDVB; |
| 391 | if (eit->SourceNetworkID() && eit->SourceTransportID()) { |
| 392 | fix |= fixup[1<<15 | (FixupKey)eit->SourceNetworkID() << 16]; |
| 393 | fix |= fixup[1<<15 | (((FixupKey)eit->SourceTransportID()) << 32) | |
| 394 | ((FixupKey)eit->SourceNetworkID() << 16)]; |
| 395 | fix |= fixup[1<<15 | ((FixupKey)eit->SourceNetworkID() << 16) | (FixupKey)eit->ServiceID()]; |
| 396 | fix |= fixup[1<<15 | (((FixupKey)eit->SourceTransportID()) << 32) | |
| 397 | (FixupKey)((FixupKey)eit->SourceNetworkID() << 16) | |
| 398 | (FixupKey)(FixupKey)eit->ServiceID()]; |
| 399 | } |
| 400 | fix |= fixup[eit->OriginalNetworkID() << 16]; |
| 401 | |
381 | 402 | fix |= fixup.value((((FixupKey)eit->TSID()) << 32) | |
382 | 403 | ((FixupKey)eit->OriginalNetworkID() << 16)); |
383 | 404 | fix |= fixup.value(((FixupKey)eit->OriginalNetworkID() << 16) | |
384 | 405 | (FixupKey)eit->ServiceID()); |
385 | 406 | fix |= fixup.value((((FixupKey)eit->TSID()) << 32) | |
386 | 407 | ((FixupKey)eit->OriginalNetworkID() << 16) | |
387 | | (FixupKey)eit->ServiceID()); |
388 | | fix |= EITFixUp::kFixGenericDVB; |
| 408 | (FixupKey)eit->ServiceID()); |
389 | 409 | |
390 | 410 | uint tableid = eit->TableID(); |
391 | 411 | uint version = eit->Version(); |
… |
… |
|
1060 | 1080 | /////////////////////////////////////////////////////////////////////////// |
1061 | 1081 | // Fixups to make EIT provided listings more useful |
1062 | 1082 | // transport_id<<32 | netword_id<<16 | service_id |
| 1083 | // The service_id is a 13-bit field. Free bit number 15 |
| 1084 | // is used here to determine that the data releate to |
| 1085 | // transponder, which sent the EIT, and not the program. |
1063 | 1086 | |
1064 | 1087 | // Bell Express VU Canada |
1065 | 1088 | fix[ 256U << 16] = EITFixUp::kFixBell; |
… |
… |
|
1369 | 1392 | |
1370 | 1393 | // Premiere |
1371 | 1394 | fix[133 << 16] = EITFixUp::kEFixForceISO8859_15; |
1372 | | |
| 1395 | |
| 1396 | // Cyfra+ ISO-6937 (source NID) |
| 1397 | fix[1<<15 | 318<<16] = EITFixUp::kEFixForceISO6937; |
| 1398 | |
| 1399 | // Polsat ISO-8859-2 (source NID) |
| 1400 | fix[1<<15 | 113<<16] = EITFixUp::kEFixForceISO8859_2; |
| 1401 | |
1373 | 1402 | // DVB-S Astra 19.2E French channels |
1374 | 1403 | fix[ 1022LL << 32 | 1 << 16 | 6901 ] = // DIRECT 8 |
1375 | 1404 | fix[ 1022LL << 32 | 1 << 16 | 6905 ] = // France 24 (en Francais) |
diff -Naur mythtv-master-20160121-g1f389ff-old/mythtv/libs/libmythtv/mpeg/dvbdescriptors.cpp mythtv-master-20160121-g1f389ff-new/mythtv/libs/libmythtv/mpeg/dvbdescriptors.cpp
old
|
new
|
|
88 | 88 | new unsigned char[raw_length + encoding_override_length]; |
89 | 89 | |
90 | 90 | uint length = 0; |
91 | | if (encoding_override && src[0] >= 0x20) { |
92 | | memcpy(dst, encoding_override, encoding_override_length); |
93 | | length = encoding_override_length; |
| 91 | if (encoding_override) { |
| 92 | if (src[0] >= 0x20) { |
| 93 | memcpy(dst, encoding_override, encoding_override_length); |
| 94 | length = encoding_override_length; |
| 95 | } else { |
| 96 | //incorrect ISO-8859 encoding marker, |
| 97 | //when text has been encoded using ISO-6937 |
| 98 | if (src[0] >= 0x01 && src[0] <= 0x0B |
| 99 | && encoding_override_length == 1 |
| 100 | && encoding_override[0] == 0x20) { |
| 101 | src++; |
| 102 | raw_length--; |
| 103 | } |
| 104 | } |
94 | 105 | } |
95 | 106 | |
96 | 107 | // Strip formatting characters |
diff -Naur mythtv-master-20160121-g1f389ff-old/mythtv/libs/libmythtv/mpeg/dvbstreamdata.cpp mythtv-master-20160121-g1f389ff-new/mythtv/libs/libmythtv/mpeg/dvbstreamdata.cpp
old
|
new
|
|
397 | 397 | SetVersionEIT(psip.TableID(), service_id, psip.Version(), psip.LastSection()); |
398 | 398 | SetEITSectionSeen(psip.TableID(), service_id, psip.Section()); |
399 | 399 | |
400 | | DVBEventInformationTable eit(psip); |
| 400 | DVBEventInformationTable eit(psip, _desired_netid, _desired_tsid); |
401 | 401 | for (uint i = 0; i < _dvb_eit_listeners.size(); i++) |
402 | 402 | _dvb_eit_listeners[i]->HandleEIT(&eit); |
403 | 403 | |
diff -Naur mythtv-master-20160121-g1f389ff-old/mythtv/libs/libmythtv/mpeg/dvbtables.h mythtv-master-20160121-g1f389ff-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 |