MythTV  master
eithelper.cpp
Go to the documentation of this file.
1 // -*- Mode: c++ -*-
2 
3 // Std C++ headers
4 #include <algorithm>
5 using namespace std;
6 
7 // MythTV includes
8 #include "eithelper.h"
9 #include "eitfixup.h"
10 #include "eitcache.h"
11 #include "mythdb.h"
12 #include "atsctables.h"
13 #include "dvbtables.h"
14 #include "premieretables.h"
15 #include "dishdescriptors.h"
16 #include "premieredescriptors.h"
17 #include "channelutil.h" // for ChannelUtil
18 #include "mythdate.h"
19 #include "programdata.h"
20 #include "programinfo.h" // for subtitle types and audio and video properties
21 #include "scheduledrecording.h" // for ScheduledRecording
22 #include "compat.h" // for gmtime_r on windows.
23 
24 const uint EITHelper::kChunkSize = 20;
26 
27 static uint get_chan_id_from_db_atsc(uint sourceid,
28  uint atsc_major, uint atsc_minor);
29 static uint get_chan_id_from_db_dvb(uint sourceid, uint serviceid,
30  uint networkid, uint transportid);
31 static uint get_chan_id_from_db_dtv(uint sourceid,
32  uint serviceid, uint tunedchanid);
33 static void init_fixup(FixupMap &fix);
34 
35 #define LOC QString("EITHelper: ")
36 
38  m_eitFixup(new EITFixUp())
39 {
41 }
42 
44 {
45  QMutexLocker locker(&m_eitListLock);
46  while (!m_dbEvents.empty())
47  delete m_dbEvents.dequeue();
48 
49  delete m_eitFixup;
50 }
51 
53 {
54  QMutexLocker locker(&m_eitListLock);
55  return m_dbEvents.size();
56 }
57 
64 {
65  QMutexLocker locker(&m_eitListLock);
66  uint insertCount = 0;
67 
68  if (m_dbEvents.empty())
69  return 0;
70 
72  for (uint i = 0; (i < kChunkSize) && (!m_dbEvents.empty()); i++)
73  {
74  DBEventEIT *event = m_dbEvents.dequeue();
75  m_eitListLock.unlock();
76 
77  m_eitFixup->Fix(*event);
78 
79  insertCount += event->UpdateDB(query, 1000);
80  m_maxStarttime = max (m_maxStarttime, event->m_starttime);
81 
82  delete event;
83  m_eitListLock.lock();
84  }
85 
86  if (!insertCount)
87  return 0;
88 
89  if (!m_incompleteEvents.empty())
90  {
91  LOG(VB_EIT, LOG_INFO,
92  LOC + QString("Added %1 events -- complete: %2 incomplete: %3")
93  .arg(insertCount).arg(m_dbEvents.size())
94  .arg(m_incompleteEvents.size()));
95  }
96  else
97  {
98  LOG(VB_EIT, LOG_INFO,
99  LOC + QString("Added %1 events").arg(insertCount));
100  }
101 
102  return insertCount;
103 }
104 
105 void EITHelper::SetFixup(uint atsc_major, uint atsc_minor, FixupValue eitfixup)
106 {
107  QMutexLocker locker(&m_eitListLock);
108  FixupKey atsc_key = (atsc_major << 16) | atsc_minor;
109  m_fixup[atsc_key] = eitfixup;
110 }
111 
112 void EITHelper::SetLanguagePreferences(const QStringList &langPref)
113 {
114  QMutexLocker locker(&m_eitListLock);
115 
116  uint priority = 1;
117  QStringList::const_iterator it;
118  for (it = langPref.begin(); it != langPref.end(); ++it)
119  {
120  if (!(*it).isEmpty())
121  {
122  uint language_key = iso639_str3_to_key(*it);
123  uint canonoical_key = iso639_key_to_canonical_key(language_key);
124  m_languagePreferences[canonoical_key] = priority++;
125  }
126  }
127 }
128 
130 {
131  QMutexLocker locker(&m_eitListLock);
132  m_sourceid = _sourceid;
133 }
134 
136 {
137  QMutexLocker locker(&m_eitListLock);
138  m_channelid = _channelid;
139 }
140 
141 void EITHelper::AddEIT(uint atsc_major, uint atsc_minor,
142  const EventInformationTable *eit)
143 {
144  uint atsc_key = (atsc_major << 16) | atsc_minor;
145  EventIDToATSCEvent &events = m_incompleteEvents[atsc_key];
146 
147  for (uint i = 0; i < eit->EventCount(); i++)
148  {
149  ATSCEvent ev(eit->StartTimeRaw(i), eit->LengthInSeconds(i),
150  eit->ETMLocation(i),
152  eit->Descriptors(i), eit->DescriptorsLength(i));
153 
154  // Create an event immediately if the ETM_location specifies
155  // that there is no ETT event coming; otherwise save the EIT
156  // event in the incomplete_events for this channel.
157  if (!ev.m_etm)
158  {
159  CompleteEvent(atsc_major, atsc_minor, ev, "");
160  }
161  else
162  {
163  // If there is an existing EIT event with this event_id then
164  // delete the descriptor to avoid a memory leak.
165  EventIDToATSCEvent::iterator it = events.find(eit->EventID(i));
166  if (it != events.end())
167  {
168  delete [] (*it).m_desc;
169  }
170 
171  // Save the EIT event in the incomplete_events for this channel.
172  auto *tmp = new unsigned char[ev.m_desc_length];
173  memcpy(tmp, eit->Descriptors(i), ev.m_desc_length);
174  ev.m_desc = tmp;
175  events.insert(eit->EventID(i), ev);
176  }
177  }
178 }
179 
180 void EITHelper::AddETT(uint atsc_major, uint atsc_minor,
181  const ExtendedTextTable *ett)
182 {
183  // Find the matching incomplete EIT event for this ETT
184  // If we have no EIT event then just discard the ETT.
185  uint atsc_key = (atsc_major << 16) | atsc_minor;
186  ATSCSRCToEvents::iterator eits_it = m_incompleteEvents.find(atsc_key);
187  if (eits_it != m_incompleteEvents.end())
188  {
189  EventIDToATSCEvent::iterator it = (*eits_it).find(ett->EventID());
190  if (it != (*eits_it).end())
191  {
192  // Only consider EIT events from the very recent past.
193  if (!it->IsStale()) {
195  atsc_major, atsc_minor, *it,
197  }
198 
199  // Remove EIT event from the incomplete_event list.
200  delete [] (*it).m_desc;
201  (*eits_it).erase(it);
202  }
203  }
204 }
205 
207  QMap<uint,uint> languagePreferences,
208  QString &title, QString &subtitle,
209  QString &description, QMap<QString,QString> &items)
210 {
211  const unsigned char *bestShortEvent =
213  list, DescriptorID::short_event, languagePreferences);
214 
215  // from EN 300 468, Appendix A.2 - Selection of character table
216  unsigned char enc_1[3] = { 0x10, 0x00, 0x01 };
217  unsigned char enc_2[3] = { 0x10, 0x00, 0x02 };
218  unsigned char enc_7[3] = { 0x10, 0x00, 0x07 }; // Latin/Greek Alphabet
219  unsigned char enc_9[3] = { 0x10, 0x00, 0x09 }; // could use { 0x05 } instead
220  unsigned char enc_15[3] = { 0x10, 0x00, 0x0f }; // could use { 0x0B } instead
221  int enc_len = 0;
222  const unsigned char *enc = nullptr;
223 
224  // Is this BellExpressVU EIT (Canada) ?
225  // Use an encoding override of ISO 8859-1 (Latin1)
227  {
228  enc = enc_1;
229  enc_len = sizeof(enc_1);
230  }
231 
232  // Is this broken DVB provider in Central Europe?
233  // Use an encoding override of ISO 8859-2 (Latin2)
235  {
236  enc = enc_2;
237  enc_len = sizeof(enc_2);
238  }
239 
240  // Is this broken DVB provider in Western Europe?
241  // Use an encoding override of ISO 8859-9 (Latin5)
243  {
244  enc = enc_9;
245  enc_len = sizeof(enc_9);
246  }
247 
248  // Is this broken DVB provider in Western Europe?
249  // Use an encoding override of ISO 8859-15 (Latin9)
251  {
252  enc = enc_15;
253  enc_len = sizeof(enc_15);
254  }
255 
256  // Is this broken DVB provider in Greece?
257  // Use an encoding override of ISO 8859-7 (Latin/Greek)
259  {
260  enc = enc_7;
261  enc_len = sizeof(enc_7);
262  }
263 
264  if (bestShortEvent)
265  {
266  ShortEventDescriptor sed(bestShortEvent);
267  if (sed.IsValid())
268  {
269  if (enc)
270  {
271  title = sed.EventName(enc, enc_len);
272  subtitle = sed.Text(enc, enc_len);
273  }
274  else
275  {
276  title = sed.EventName();
277  subtitle = sed.Text();
278  }
279  }
280  }
281 
282  vector<const unsigned char*> bestExtendedEvents =
284  list, DescriptorID::extended_event, languagePreferences);
285 
286  description = "";
287  for (size_t j = 0; j < bestExtendedEvents.size(); j++)
288  {
289  if (!bestExtendedEvents[j])
290  {
291  description = "";
292  break;
293  }
294 
295  ExtendedEventDescriptor eed(bestExtendedEvents[j]);
296  if (eed.IsValid())
297  {
298  if (enc)
299  description += eed.Text(enc, enc_len);
300  else
301  description += eed.Text();
302  }
303  // add items from the decscriptor to the items
304  items.unite (eed.Items());
305  }
306 }
307 
308 static inline void parse_dvb_component_descriptors(const desc_list_t& list,
309  unsigned char &subtitle_type,
310  unsigned char &audio_properties,
311  unsigned char &video_properties)
312 {
313  desc_list_t components =
315  for (size_t j = 0; j < components.size(); j++)
316  {
317  ComponentDescriptor component(components[j]);
318  if (!component.IsValid())
319  continue;
320  video_properties |= component.VideoProperties();
321  audio_properties |= component.AudioProperties();
322  subtitle_type |= component.SubtitleType();
323  }
324 }
325 
327 {
328  uint chanid = 0;
329  if ((eit->TableID() == TableID::PF_EIT) ||
330  ((eit->TableID() >= TableID::SC_EITbeg) && (eit->TableID() <= TableID::SC_EITend)))
331  {
332  // EITa(ctive)
333  chanid = GetChanID(eit->ServiceID());
334  }
335  else
336  {
337  // EITo(ther)
338  chanid = GetChanID(eit->ServiceID(), eit->OriginalNetworkID(), eit->TSID());
339  // do not reschedule if its only present+following
340  if (eit->TableID() != TableID::PF_EITo)
341  {
342  m_seenEITother = true;
343  }
344  }
345  if (!chanid)
346  return;
347 
348  uint descCompression = (eit->TableID() > 0x80) ? 2 : 1;
349  FixupValue fix = m_fixup.value((FixupKey)eit->OriginalNetworkID() << 16);
350  fix |= m_fixup.value((((FixupKey)eit->TSID()) << 32) |
351  ((FixupKey)eit->OriginalNetworkID() << 16));
352  fix |= m_fixup.value(((FixupKey)eit->OriginalNetworkID() << 16) |
353  (FixupKey)eit->ServiceID());
354  fix |= m_fixup.value((((FixupKey)eit->TSID()) << 32) |
355  ((FixupKey)eit->OriginalNetworkID() << 16) |
356  (FixupKey)eit->ServiceID());
358 
359  uint tableid = eit->TableID();
360  uint version = eit->Version();
361  for (uint i = 0; i < eit->EventCount(); i++)
362  {
363  // Skip event if we have already processed it before...
364  if (!s_eitCache->IsNewEIT(chanid, tableid, version, eit->EventID(i),
365  eit->EndTimeUnixUTC(i)))
366  {
367  continue;
368  }
369 
370  QString title = QString("");
371  QString subtitle = QString("");
372  QString description = QString("");
373  QString category = QString("");
375  unsigned char subtitle_type=0;
376  unsigned char audio_props=0;
377  unsigned char video_props=0;
378  uint season = 0;
379  uint episode = 0;
380  uint totalepisodes = 0;
381  QMap<QString,QString> items;
382 
383  // Parse descriptors
385  eit->Descriptors(i), eit->DescriptorsLength(i));
386 
387  const unsigned char *dish_event_name = nullptr;
388  if (EITFixUp::kFixDish & fix)
389  {
390  dish_event_name = MPEGDescriptor::Find(
392  }
393 
394  if (dish_event_name)
395  {
396  DishEventNameDescriptor dend(dish_event_name);
397  if (dend.IsValid() && dend.HasName())
398  title = dend.Name(descCompression);
399 
400  const unsigned char *dish_event_description =
403  if (dish_event_description)
404  {
405  DishEventDescriptionDescriptor dedd(dish_event_description);
406  if (dedd.HasDescription())
407  description = dedd.Description(descCompression);
408  }
409  }
410  else
411  {
413  title, subtitle, description, items);
414  }
415 
416  parse_dvb_component_descriptors(list, subtitle_type, audio_props,
417  video_props);
418 
419  QString programId = QString("");
420  QString seriesId = QString("");
421  QString rating = QString("");
422  QString rating_system = QString("");
423  QString advisory = QString("");
424  float stars = 0.0;
425  QDate originalairdate;
426 
427  if (EITFixUp::kFixDish & fix)
428  {
429  const unsigned char *mpaa_data = MPEGDescriptor::Find(
431  if (mpaa_data)
432  {
433  DishEventMPAADescriptor mpaa(mpaa_data);
434  stars = mpaa.stars();
435 
436  if (stars) // Only movies for now
437  {
438  rating = mpaa.rating();
439  rating_system = "MPAA";
440  advisory = mpaa.advisory();
441  }
442  }
443 
444  if (!stars) // Not MPAA rated, check VCHIP
445  {
446  const unsigned char *vchip_data = MPEGDescriptor::Find(
448  if (vchip_data)
449  {
450  DishEventVCHIPDescriptor vchip(vchip_data);
451  rating = vchip.rating();
452  rating_system = "VCHIP";
453  advisory = vchip.advisory();
454  }
455  }
456 
457  if (!advisory.isEmpty() && !rating.isEmpty())
458  rating += ", " + advisory;
459  else if (!advisory.isEmpty())
460  {
461  rating = advisory;
462  rating_system = "advisory";
463  }
464 
465  const unsigned char *tags_data = MPEGDescriptor::Find(
467  if (tags_data)
468  {
469  DishEventTagsDescriptor tags(tags_data);
470  seriesId = tags.seriesid();
471  programId = tags.programid();
472  originalairdate = tags.originalairdate(); // future use
473 
474  if (programId.startsWith("MV") || programId.startsWith("SP"))
475  seriesId = "";
476  }
477 
478  const unsigned char *properties_data = MPEGDescriptor::Find(
480  if (properties_data)
481  {
482  DishEventPropertiesDescriptor properties(properties_data);
483  subtitle_type |= properties.SubtitleProperties(descCompression);
484  audio_props |= properties.AudioProperties(descCompression);
485  }
486  }
487 
488  const unsigned char *content_data =
490  if (content_data)
491  {
492  if ((EITFixUp::kFixDish & fix) || (EITFixUp::kFixBell & fix))
493  {
494  DishContentDescriptor content(content_data);
495  switch (content.GetTheme())
496  {
497  case kThemeMovie :
498  category_type = ProgramInfo::kCategoryMovie;
499  break;
500  case kThemeSeries :
501  category_type = ProgramInfo::kCategorySeries;
502  break;
503  case kThemeSports :
504  category_type = ProgramInfo::kCategorySports;
505  break;
506  default :
507  category_type = ProgramInfo::kCategoryNone;
508  }
509  if (EITFixUp::kFixDish & fix)
510  category = content.GetCategory();
511  }
512  else if (EITFixUp::kFixAUDescription & fix)//AU Freeview assigned genres
513  {
514  static const char *s_auGenres[] =
515  {/* 0*/"Unknown", "Movie", "News", "Entertainment",
516  /* 4*/"Sport", "Children", "Music", "Arts/Culture",
517  /* 8*/"Current Affairs", "Education", "Infotainment",
518  /*11*/"Special", "Comedy", "Drama", "Documentary",
519  /*15*/"Unknown"};
520  ContentDescriptor content(content_data);
521  if (content.IsValid())
522  {
523  category = s_auGenres[content.Nibble1(0)];
524  category_type = content.GetMythCategory(0);
525  }
526  }
527  else if (EITFixUp::kFixGreekEIT & fix)//Greek
528  {
529  static const char *s_grGenres[] =
530  {/* 0*/"Unknown", "Ταινία", "Ενημερωτικό", "Unknown",
531  /* 4*/"Αθλητικό", "Παιδικό", "Unknown", "Unknown",
532  /* 8*/"Unknown", "Ντοκιμαντέρ", "Unknown", "Unknown",
533  /*12*/"Unknown", "Unknown", "Unknown", "Unknown"};
534  ContentDescriptor content(content_data);
535  if (content.IsValid())
536  {
537  category = s_grGenres[content.Nibble2(0)];
538  category_type = content.GetMythCategory(2);
539  }
540  }
541  else
542  {
543  ContentDescriptor content(content_data);
544  if (content.IsValid())
545  {
546  category = content.GetDescription(0);
547 #if 0 /* there is no category_type in DVB EIT */
548  category_type = content.GetMythCategory(0);
549 #endif
550  }
551  }
552  }
553 
554  desc_list_t contentIds =
556  for (size_t j = 0; j < contentIds.size(); j++)
557  {
558  DVBContentIdentifierDescriptor desc(contentIds[j]);
559  if (!desc.IsValid())
560  continue;
561  for (size_t k = 0; k < desc.CRIDCount(); k++)
562  {
563  if (desc.ContentEncoding(k) == 0)
564  {
565  // The CRID is a URI. It could contain UTF8 sequences encoded
566  // as %XX but there's no advantage in decoding them.
567  // The BBC currently uses private types 0x31 and 0x32.
568  // IDs from the authority eventis.nl are not fit for our scheduler
569  if (desc.ContentType(k) == 0x01 || desc.ContentType(k) == 0x31)
570  {
571  if (!desc.ContentId(k).startsWith ("eventis.nl/"))
572  {
573  programId = desc.ContentId(k);
574  }
575  }
576  else if (desc.ContentType(k) == 0x02 || desc.ContentType(k) == 0x32)
577  {
578  if (!desc.ContentId(k).startsWith ("eventis.nl/"))
579  {
580  seriesId = desc.ContentId(k);
581  }
582  category_type = ProgramInfo::kCategorySeries;
583  }
584  }
585  }
586  }
587 
588  /* if we don't have a subtitle, try to parse one from private descriptors */
589  if (subtitle.isEmpty()) {
590  bool isUPC = false;
591  /* is this event carrying UPC private data? */
593  for (size_t j = 0; j < private_data_specifiers.size(); j++) {
594  PrivateDataSpecifierDescriptor desc(private_data_specifiers[j]);
595  if (!desc.IsValid())
596  continue;
598  isUPC = true;
599  }
600  }
601 
602  if (isUPC) {
604  for (size_t j = 0; j < subtitles.size(); j++) {
606  if (!desc.IsValid())
607  continue;
608  subtitle = desc.Text();
609  }
610  }
611  }
612 
613 
614  QDateTime starttime = eit->StartTimeUTC(i);
615  // fix starttime only if the duration is a multiple of a minute
616  if (!(eit->DurationInSeconds(i) % 60))
617  EITFixUp::TimeFix(starttime);
618  QDateTime endtime = starttime.addSecs(eit->DurationInSeconds(i));
619 
620  auto *event = new DBEventEIT(
621  chanid,
622  title, subtitle, description,
623  category, category_type,
624  starttime, endtime, fix,
625  subtitle_type,
626  audio_props,
627  video_props, stars,
628  seriesId, programId,
629  season, episode, totalepisodes);
630  event->m_items = items;
631 
632  m_dbEvents.enqueue(event);
633  }
634 }
635 
636 // This function gets special EIT data from the German provider Premiere
637 // for the option channels Premiere Sport and Premiere Direkt
639 {
640  // set fixup for Premiere
641  FixupValue fix = m_fixup.value(133 << 16);
643 
644  QString title = QString("");
645  QString subtitle = QString("");
646  QString description = QString("");
647  QString category = QString("");
649  unsigned char subtitle_type=0;
650  unsigned char audio_props=0;
651  unsigned char video_props=0;
652  uint season = 0;
653  uint episode = 0;
654  uint totalepisodes = 0;
655  QMap<QString,QString> items;
656 
657  // Parse descriptors
659  cit->Descriptors(), cit->DescriptorsLength());
660 
662  title, subtitle, description, items);
663 
664  parse_dvb_component_descriptors(list, subtitle_type, audio_props,
665  video_props);
666 
667  const unsigned char *content_data =
669  if (content_data)
670  {
671  ContentDescriptor content(content_data);
672  // fix events without real content data
673  if (content.IsValid() && (content.Nibble(0)==0x00))
674  {
675  if(content.UserNibble(0)==0x1)
676  {
677  category_type = ProgramInfo::kCategoryMovie;
678  }
679  else if(content.UserNibble(0)==0x0)
680  {
681  category_type = ProgramInfo::kCategorySports;
682  category = QObject::tr("Sports");
683  }
684  }
685  else
686  {
687  category_type = content.GetMythCategory(0);
688  category = content.GetDescription(0);
689  }
690  }
691 
692  uint tableid = cit->TableID();
693  uint version = cit->Version();
694  uint contentid = cit->ContentID();
695  // fake endtime
696 #if QT_VERSION < QT_VERSION_CHECK(5,8,0)
697  uint endtime = MythDate::current().addDays(1).toTime_t();
698 #else
699  uint endtime = MythDate::current().addDays(1).toSecsSinceEpoch();
700 #endif
701 
702  // Find Transmissions
703  desc_list_t transmissions =
706  for(size_t j=0; j< transmissions.size(); j++)
707  {
708  PremiereContentTransmissionDescriptor transmission(transmissions[j]);
709  if (!transmission.IsValid())
710  continue;
711  uint networkid = transmission.OriginalNetworkID();
712  uint tsid = transmission.TSID();
713  uint serviceid = transmission.ServiceID();
714 
715  uint chanid = GetChanID(serviceid, networkid, tsid);
716 
717  if (!chanid)
718  {
719  LOG(VB_EIT, LOG_INFO, LOC +
720  QString("Premiere EIT for NIT %1, TID %2, SID %3, "
721  "count %4, title: %5. Channel not found!")
722  .arg(networkid).arg(tsid).arg(serviceid)
723  .arg(transmission.TransmissionCount()).arg(title));
724  continue;
725  }
726 
727  // Skip event if we have already processed it before...
728  if (!s_eitCache->IsNewEIT(chanid, tableid, version, contentid, endtime))
729  {
730  continue;
731  }
732 
733  for (uint k=0; k<transmission.TransmissionCount(); ++k)
734  {
735  QDateTime txstart = transmission.StartTimeUTC(k);
736  // fix txstart only if the duration is a multiple of a minute
737  if (!(cit->DurationInSeconds() % 60))
738  EITFixUp::TimeFix(txstart);
739  QDateTime txend = txstart.addSecs(cit->DurationInSeconds());
740 
741  auto *event = new DBEventEIT(
742  chanid,
743  title, subtitle, description,
744  category, category_type,
745  txstart, txend, fix,
746  subtitle_type,
747  audio_props,
748  video_props, 0.0,
749  "", "",
750  season, episode, totalepisodes);
751  event->m_items = items;
752 
753  m_dbEvents.enqueue(event);
754  }
755  }
756 }
757 
758 
760 {
761  s_eitCache->PruneOldEntries(timestamp);
762 }
763 
765 {
767 }
768 
770 // private methods and functions below this line //
772 
773 void EITHelper::CompleteEvent(uint atsc_major, uint atsc_minor,
774  const ATSCEvent &event,
775  const QString &ett)
776 {
777  uint chanid = GetChanID(atsc_major, atsc_minor);
778  if (!chanid)
779  return;
780 
781 #if QT_VERSION < QT_VERSION_CHECK(5,8,0)
782  QDateTime starttime = MythDate::fromTime_t(
784 #else
785  QDateTime starttime = MythDate::fromSecsSinceEpoch(
787 #endif
788 
789  // fix starttime only if the duration is a multiple of a minute
790  if (!(event.m_length % 60))
791  EITFixUp::TimeFix(starttime);
792  QDateTime endtime = starttime.addSecs(event.m_length);
793 
795  unsigned char subtitle_type =
798  unsigned char audio_properties = AUD_UNKNOWN;
799  unsigned char video_properties = VID_UNKNOWN;
800 
801  uint atsc_key = (atsc_major << 16) | atsc_minor;
802 
803  QMutexLocker locker(&m_eitListLock);
804  QString title = event.m_title;
805  const QString& subtitle = ett;
806  m_dbEvents.enqueue(new DBEventEIT(chanid, title, subtitle,
807  starttime, endtime,
808  m_fixup.value(atsc_key), subtitle_type,
809  audio_properties, video_properties));
810 }
811 
812 uint EITHelper::GetChanID(uint atsc_major, uint atsc_minor)
813 {
814  uint64_t key;
815  key = ((uint64_t) m_sourceid);
816  key |= ((uint64_t) atsc_minor) << 16;
817  key |= ((uint64_t) atsc_major) << 32;
818 
819  ServiceToChanID::const_iterator it = m_srvToChanid.find(key);
820  if (it != m_srvToChanid.end())
821  return *it;
822 
823  uint chanid = get_chan_id_from_db_atsc(m_sourceid, atsc_major, atsc_minor);
824  m_srvToChanid[key] = chanid;
825 
826  return chanid;
827 }
828 
829 uint EITHelper::GetChanID(uint serviceid, uint networkid, uint tsid)
830 {
831  uint64_t key;
832  key = ((uint64_t) m_sourceid);
833  key |= ((uint64_t) serviceid) << 16;
834  key |= ((uint64_t) networkid) << 32;
835  key |= ((uint64_t) tsid) << 48;
836 
837  ServiceToChanID::const_iterator it = m_srvToChanid.find(key);
838  if (it != m_srvToChanid.end())
839  return *it;
840 
841  uint chanid = get_chan_id_from_db_dvb(m_sourceid, serviceid, networkid, tsid);
842  m_srvToChanid[key] = chanid;
843 
844  return chanid;
845 }
846 
848 {
849  uint64_t key;
850  key = ((uint64_t) m_sourceid);
851  key |= ((uint64_t) program_number) << 16;
852  key |= ((uint64_t) m_channelid) << 32;
853 
854  ServiceToChanID::const_iterator it = m_srvToChanid.find(key);
855  if (it != m_srvToChanid.end())
856  return *it;
857 
858  uint chanid = get_chan_id_from_db_dtv(m_sourceid, program_number, m_channelid);
859  m_srvToChanid[key] = chanid;
860 
861  return chanid;
862 }
863 
865  uint atsc_major, uint atsc_minor)
866 {
867  MSqlQuery query(MSqlQuery::InitCon());
868  query.prepare(
869  "SELECT chanid, useonairguide "
870  "FROM channel "
871  "WHERE deleted IS NULL AND "
872  " atsc_major_chan = :MAJORCHAN AND "
873  " atsc_minor_chan = :MINORCHAN AND "
874  " sourceid = :SOURCEID");
875  query.bindValue(":MAJORCHAN", atsc_major);
876  query.bindValue(":MINORCHAN", atsc_minor);
877  query.bindValue(":SOURCEID", sourceid);
878 
879  if (!query.exec() || !query.isActive())
880  MythDB::DBError("Looking up chanid 1", query);
881  else if (query.next())
882  {
883  bool useOnAirGuide = query.value(1).toBool();
884  return (useOnAirGuide) ? query.value(0).toUInt() : 0;
885  }
886 
887  return 0;
888 }
889 
890 // Figure out the chanid for this channel
891 static uint get_chan_id_from_db_dvb(uint sourceid, uint serviceid,
892  uint networkid, uint transportid)
893 {
894  uint chanid = 0;
895  bool useOnAirGuide = false;
896  MSqlQuery query(MSqlQuery::InitCon());
897 
898  // DVB Link to chanid
899  QString qstr =
900  "SELECT chanid, useonairguide, channel.sourceid "
901  "FROM channel, dtv_multiplex "
902  "WHERE deleted IS NULL AND "
903  " serviceid = :SERVICEID AND "
904  " networkid = :NETWORKID AND "
905  " transportid = :TRANSPORTID AND "
906  " channel.mplexid = dtv_multiplex.mplexid";
907 
908  query.prepare(qstr);
909  query.bindValue(":SERVICEID", serviceid);
910  query.bindValue(":NETWORKID", networkid);
911  query.bindValue(":TRANSPORTID", transportid);
912 
913  if (!query.exec() || !query.isActive())
914  MythDB::DBError("Looking up chanID", query);
915 
916  if (query.size() == 0) {
917  // Attempt fuzzy matching, by skipping the tsid
918  // DVB Link to chanid
919  qstr =
920  "SELECT chanid, useonairguide, channel.sourceid "
921  "FROM channel, dtv_multiplex "
922  "WHERE deleted IS NULL AND "
923  " serviceid = :SERVICEID AND "
924  " networkid = :NETWORKID AND "
925  " channel.mplexid = dtv_multiplex.mplexid";
926 
927  query.prepare(qstr);
928  query.bindValue(":SERVICEID", serviceid);
929  query.bindValue(":NETWORKID", networkid);
930  if (!query.exec() || !query.isActive())
931  MythDB::DBError("Looking up chanID in fuzzy mode", query);
932  }
933 
934  while (query.next())
935  {
936  // Check to see if we are interested in this channel
937  chanid = query.value(0).toUInt();
938  useOnAirGuide = query.value(1).toBool();
939  if (sourceid == query.value(2).toUInt())
940  return useOnAirGuide ? chanid : 0;
941  }
942 
943  if (query.size() > 1)
944  {
945  LOG(VB_EIT, LOG_INFO,
946  LOC + QString("found %1 channels for networkid %2, "
947  "transportid %3, serviceid %4 but none "
948  "for current sourceid %5.")
949  .arg(query.size()).arg(networkid).arg(transportid)
950  .arg(serviceid).arg(sourceid));
951  }
952 
953  return useOnAirGuide ? chanid : 0;
954 }
955 
956 /* Figure out the chanid for this channel from the sourceid,
957  * program_number/service_id and the chanid of the channel we are tuned to
958  *
959  * TODO for SPTS (e.g. HLS / IPTV) it would be useful to match without an entry
960  * in dtv_multiplex
961  */
962 static uint get_chan_id_from_db_dtv(uint sourceid, uint serviceid,
963  uint tunedchanid)
964 {
965  uint chanid = 0;
966  bool useOnAirGuide = false;
967  MSqlQuery query(MSqlQuery::InitCon());
968 
969  // DVB Link to chanid
970  QString qstr =
971  "SELECT c1.chanid, c1.useonairguide, c1.sourceid "
972  "FROM channel c1, dtv_multiplex m, channel c2 "
973  "WHERE c1.deleted IS NULL AND "
974  " c1.serviceid = :SERVICEID AND "
975  " c1.mplexid = m.mplexid AND "
976  " m.mplexid = c2.mplexid AND "
977  " c2.chanid = :CHANID";
978 
979  query.prepare(qstr);
980  query.bindValue(":SERVICEID", serviceid);
981  query.bindValue(":CHANID", tunedchanid);
982 
983  if (!query.exec() || !query.isActive())
984  MythDB::DBError("Looking up chanID", query);
985 
986  while (query.next())
987  {
988  // Check to see if we are interested in this channel
989  chanid = query.value(0).toUInt();
990  useOnAirGuide = query.value(1).toBool();
991  if (sourceid == query.value(2).toUInt())
992  return useOnAirGuide ? chanid : 0;
993  }
994 
995  if (query.size() > 1)
996  {
997  LOG(VB_EIT, LOG_INFO,
998  LOC + QString("found %1 channels for multiplex of chanid %2, "
999  "serviceid %3 but none "
1000  "for current sourceid %4.")
1001  .arg(query.size()).arg(tunedchanid)
1002  .arg(serviceid).arg(sourceid));
1003  }
1004 
1005  return useOnAirGuide ? chanid : 0;
1006 }
1007 
1008 static void init_fixup(FixupMap &fix)
1009 {
1011  // Fixups to make EIT provided listings more useful
1012  // transport_id<<32 | original_network_id<<16 | service_id
1013 
1014  // Bell Express VU Canada
1015  fix[ 256U << 16] = EITFixUp::kFixBell;
1016  fix[ 257U << 16] = EITFixUp::kFixBell;
1017  fix[ 4100U << 16] = EITFixUp::kFixBell;
1018  fix[ 4101U << 16] = EITFixUp::kFixBell;
1019  fix[ 4102U << 16] = EITFixUp::kFixBell;
1020  fix[ 4103U << 16] = EITFixUp::kFixBell;
1021  fix[ 4104U << 16] = EITFixUp::kFixBell;
1022  fix[ 4105U << 16] = EITFixUp::kFixBell;
1023  fix[ 4106U << 16] = EITFixUp::kFixBell;
1024  fix[ 4107U << 16] = EITFixUp::kFixBell;
1025  fix[ 4097U << 16] = EITFixUp::kFixBell;
1026  fix[ 4098U << 16] = EITFixUp::kFixBell;
1027 
1028  // United Kingdom - DVB-T/T2
1029  fix[ 9018U << 16] = EITFixUp::kFixUK;
1030 
1031  // UK - Astra 28.2
1032  for (int i = 2001; i <= 2035; ++i)
1033  fix[ (long long)i << 32 | 2U << 16] = EITFixUp::kFixUK;
1034 
1035  fix[ 2036LL << 32 | 2U << 16] = EITFixUp::kFixUK | EITFixUp::kFixHTML;
1036 
1037  for (int i = 2037; i <= 2057; ++i)
1038  fix[ (long long)i << 32 | 2U << 16] = EITFixUp::kFixUK;
1039  fix[ 2059LL << 32 | 2U << 16] = EITFixUp::kFixUK;
1040  fix[ 2061LL << 32 | 2U << 16] = EITFixUp::kFixUK;
1041  for (int i = 2063; i <= 2069; ++i)
1042  fix[ (long long)i << 32 | 2U << 16] = EITFixUp::kFixUK;
1043  fix[ 2071LL << 32 | 2U << 16] = EITFixUp::kFixUK;
1044  fix[ 2076LL << 32 | 2U << 16] = EITFixUp::kFixUK;
1045  fix[ 2081LL << 32 | 2U << 16] = EITFixUp::kFixUK;
1046  for (int i = 2089; i <= 2092; ++i)
1047  fix[ (long long)i << 32 | 2U << 16] = EITFixUp::kFixUK;
1048  for (int i = 2094; i <= 2099; ++i)
1049  fix[ (long long)i << 32 | 2U << 16] = EITFixUp::kFixUK;
1050  for (int i = 2102; i <= 2110; ++i)
1051  fix[ (long long)i << 32 | 2U << 16] = EITFixUp::kFixUK;
1052  fix[ 2112LL << 32 | 2U << 16] = EITFixUp::kFixUK;
1053  fix[ 2116LL << 32 | 2U << 16] = EITFixUp::kFixUK;
1054  fix[ 2301LL << 32 | 2U << 16] = EITFixUp::kFixUK | EITFixUp::kFixHTML;
1055  fix[ 2302LL << 32 | 2U << 16] = EITFixUp::kFixUK;
1056  fix[ 2303LL << 32 | 2U << 16] = EITFixUp::kFixUK;
1057  fix[ 2304LL << 32 | 2U << 16] = EITFixUp::kFixUK | EITFixUp::kFixHTML;
1058  fix[ 2305LL << 32 | 2U << 16] = EITFixUp::kFixUK;
1059  fix[ 2306LL << 32 | 2U << 16] = EITFixUp::kFixUK | EITFixUp::kFixHTML;
1060  fix[ 2311LL << 32 | 2U << 16] = EITFixUp::kFixUK;
1061  fix[ 2312LL << 32 | 2U << 16] = EITFixUp::kFixUK;
1062  fix[ 2313LL << 32 | 2U << 16] = EITFixUp::kFixUK;
1063  fix[ 2314LL << 32 | 2U << 16] = EITFixUp::kFixUK;
1064  fix[ 2315LL << 32 | 2U << 16] = EITFixUp::kFixUK;
1065  fix[ 2316LL << 32 | 2U << 16] = EITFixUp::kFixUK;
1066  for (int i = 2401; i <= 2413; ++i)
1067  fix[ (long long)i << 32 | 2U << 16] = EITFixUp::kFixUK;
1068  fix[ 2601LL << 32 | 2U << 16] = EITFixUp::kFixUK;
1069  fix[ 2602LL << 32 | 2U << 16] = EITFixUp::kFixUK;
1070  fix[ 2603LL << 32 | 2U << 16] = EITFixUp::kFixUK;
1071  fix[ 2604LL << 32 | 2U << 16] = EITFixUp::kFixUK;
1072  fix[ 2612LL << 32 | 2U << 16] = EITFixUp::kFixUK;
1073  fix[ 2614LL << 32 | 2U << 16] = EITFixUp::kFixUK;
1074  fix[ 2611LL << 32 | 2U << 16] = EITFixUp::kFixUK;
1075  fix[ 2612LL << 32 | 2U << 16] = EITFixUp::kFixUK;
1076  fix[ 2613LL << 32 | 2U << 16] = EITFixUp::kFixUK;
1077 
1078  // R.caroline
1079  fix[ 2315LL << 32 | 59U << 16] = EITFixUp::kFixUK;
1080 
1081  // ComHem Sweden
1082  fix[40999U << 16 ] = EITFixUp::kFixComHem;
1083  fix[40999U << 16 | 1070] = EITFixUp::kFixSubtitle;
1084  fix[40999U << 16 | 1308] = EITFixUp::kFixSubtitle;
1085  fix[40999U << 16 | 1041] = EITFixUp::kFixSubtitle;
1086  fix[40999U << 16 | 1306] = EITFixUp::kFixSubtitle;
1087  fix[40999U << 16 | 1307] = EITFixUp::kFixSubtitle;
1088  fix[40999U << 16 | 1030] = EITFixUp::kFixSubtitle;
1089  fix[40999U << 16 | 1016] = EITFixUp::kFixSubtitle;
1090  fix[40999U << 16 | 1131] = EITFixUp::kFixSubtitle;
1091  fix[40999U << 16 | 1068] = EITFixUp::kFixSubtitle;
1092  fix[40999U << 16 | 1069] = EITFixUp::kFixSubtitle;
1093 
1094  // Australia
1095  fix[ 4096U << 16] = EITFixUp::kFixAUStar;
1096  fix[ 4096U << 16] = EITFixUp::kFixAUStar;
1097  fix[ 4112U << 16] = EITFixUp::kFixAUDescription | EITFixUp::kFixAUFreeview; // ABC Brisbane
1098  fix[ 4114U << 16] = EITFixUp::kFixAUDescription | EITFixUp::kFixAUFreeview | EITFixUp::kFixAUNine;; // Nine Brisbane
1099  fix[ 4115U << 16] = EITFixUp::kFixAUDescription | EITFixUp::kFixAUSeven; //Seven
1100  fix[ 4116U << 16] = EITFixUp::kFixAUDescription; //Ten
1101  fix[ 12801U << 16] = EITFixUp::kFixAUFreeview | EITFixUp::kFixAUDescription; //ABC
1102  fix[ 12802U << 16] = EITFixUp::kFixAUDescription; //SBS
1104  fix[ 12842U << 16] = EITFixUp::kFixAUDescription; // 31 Brisbane
1105  fix[ 12862U << 16] = EITFixUp::kFixAUDescription; //WestTV
1106 
1107  // MultiChoice Africa
1108  fix[ 6144U << 16] = EITFixUp::kFixMCA;
1109 
1110  // RTL Subtitle parsing
1111  fix[ 1089LL << 32 | 1 << 16] = // DVB-S
1112  fix[ 1041LL << 32 | 1 << 16] = // DVB-S RTL Group HD Austria Transponder
1113  fix[ 1057LL << 32 | 1 << 16] = // DVB-S RTL Group HD Transponder
1114  fix[ 773LL << 32 | 8468U << 16] = // DVB-T Berlin/Brandenburg
1115  fix[ 2819LL << 32 | 8468U << 16] = // DVB-T Niedersachsen + Bremen
1116  fix[ 8706LL << 32 | 8468U << 16] = // DVB-T NRW
1117  fix[ 12801LL << 32 | 8468U << 16] = // DVB-T Bayern
1119 
1120  // Mark HD+ channels as HDTV
1121  fix[ 1041LL << 32 | 1 << 16] = EITFixUp::kFixHDTV;
1122  fix[ 1055LL << 32 | 1 << 16] = EITFixUp::kFixHDTV;
1123  fix[ 1057LL << 32 | 1 << 16] = EITFixUp::kFixHDTV;
1124  fix[ 1109LL << 32 | 1 << 16] = EITFixUp::kFixHDTV;
1125 
1126  // PRO7/SAT.1
1127  fix[ 1017LL << 32 | 1 << 16] = EITFixUp::kFixHDTV | EITFixUp::kFixP7S1;
1128  fix[ 1031LL << 32 | 1 << 16 | 5300] = EITFixUp::kFixHDTV | EITFixUp::kFixP7S1;
1129  fix[ 1031LL << 32 | 1 << 16 | 5301] = EITFixUp::kFixHDTV | EITFixUp::kFixP7S1;
1130  fix[ 1031LL << 32 | 1 << 16 | 5302] = EITFixUp::kFixHDTV | EITFixUp::kFixP7S1;
1131  fix[ 1031LL << 32 | 1 << 16 | 5303] = EITFixUp::kFixHDTV | EITFixUp::kFixP7S1;
1132  fix[ 1031LL << 32 | 1 << 16 | 5310] = EITFixUp::kFixP7S1;
1133  fix[ 1031LL << 32 | 1 << 16 | 5311] = EITFixUp::kFixP7S1;
1134  fix[ 1107LL << 32 | 1 << 16] = EITFixUp::kFixP7S1;
1135  fix[ 1082LL << 32 | 1 << 16] = EITFixUp::kFixP7S1;
1136  fix[ 5LL << 32 | 133 << 16 | 776] = EITFixUp::kFixP7S1;
1137  fix[ 8468 << 16 | 16426] = EITFixUp::kFixP7S1; // ProSieben MAXX - DVB-T Rhein/Main
1138  fix[ 8707LL << 32 | 8468 << 16] = EITFixUp::kFixP7S1; // ProSieben Sat.1 Mux - DVB-T Rhein/Main
1139 
1140  // ATV / ATV2
1141  fix[ 1117LL << 32 | 1 << 16 | 13012 ] = EITFixUp::kFixATV; // ATV
1142  fix[ 1003LL << 32 | 1 << 16 | 13223 ] = EITFixUp::kFixATV; // ATV2
1143  fix[ 1003LL << 32 | 1 << 16 | 13228 ] = EITFixUp::kFixHDTV | EITFixUp::kFixATV; // ATV HD
1144 
1145  // Disney Channel Germany
1146  fix[ 1055LL << 32 | 1 << 16 | 5500 ] = EITFixUp::kFixHDTV | EITFixUp::kFixDisneyChannel; // Disney Channel HD
1147  fix[ 1055LL << 32 | 1 << 16 | 5510 ] = EITFixUp::kFixHDTV | EITFixUp::kFixDisneyChannel; // Disney Channel HD Austria
1148  fix[ 5LL << 32 | 133 << 16 | 1793 ] = EITFixUp::kFixDisneyChannel; // Disney Channel HD Austria
1149  fix[ 1109LL << 32 | 1 << 16 | 5401 ] = EITFixUp::kFixHDTV | EITFixUp::kFixDisneyChannel; // Tele 5 HD
1150  fix[ 1109LL << 32 | 1 << 16 | 5421 ] = EITFixUp::kFixHDTV | EITFixUp::kFixDisneyChannel; // Tele 5 HD Austria
1151  fix[ 33LL << 32 | 133 << 16 | 51 ] = EITFixUp::kFixDisneyChannel; // Tele 5
1152 
1153  // Premiere EIT processing
1154  fix[ 1LL << 32 | 133 << 16] = EITFixUp::kFixPremiere;
1155  fix[ 2LL << 32 | 133 << 16] = EITFixUp::kFixPremiere;
1156  fix[ 3LL << 32 | 133 << 16] = EITFixUp::kFixPremiere;
1157  fix[ 4LL << 32 | 133 << 16] = EITFixUp::kFixPremiere;
1158  fix[ 6LL << 32 | 133 << 16] = EITFixUp::kFixPremiere | EITFixUp::kFixHDTV;
1159  fix[ 8LL << 32 | 133 << 16] = EITFixUp::kFixPremiere | EITFixUp::kFixHDTV;
1160  fix[ 9LL << 32 | 133 << 16] = EITFixUp::kFixPremiere | EITFixUp::kFixHDTV;
1161  fix[ 10LL << 32 | 133 << 16] = EITFixUp::kFixPremiere | EITFixUp::kFixHDTV;
1162  fix[ 11LL << 32 | 133 << 16] = EITFixUp::kFixPremiere | EITFixUp::kFixHDTV;
1163  fix[ 12LL << 32 | 133 << 16] = EITFixUp::kFixPremiere | EITFixUp::kFixHDTV;
1164  fix[ 13LL << 32 | 133 << 16] = EITFixUp::kFixPremiere | EITFixUp::kFixHDTV;
1165  fix[ 14LL << 32 | 133 << 16] = EITFixUp::kFixPremiere | EITFixUp::kFixHDTV;
1166  fix[ 15LL << 32 | 133 << 16] = EITFixUp::kFixPremiere;
1167  fix[ 17LL << 32 | 133 << 16] = EITFixUp::kFixPremiere;
1168  // Mark Premiere HD, AXN HD and Discovery HD as HDTV
1169  fix[ 6LL << 32 | 133 << 16 | 129] = EITFixUp::kFixHDTV;
1170  fix[ 6LL << 32 | 133 << 16 | 130] = EITFixUp::kFixHDTV;
1171  fix[ 10LL << 32 | 133 << 16 | 125] = EITFixUp::kFixHDTV;
1172 
1173  // Netherlands DVB-C
1174  fix[ 1000U << 16] = EITFixUp::kFixNL;
1175  // Canal Digitaal DVB-S 19.2 Dutch/Belgian ONID 53 covers all CanalDigitaal TiD
1176  fix[ 53U << 16] = EITFixUp::kFixNL;
1177  // Canal Digitaal DVB-S 23.5 Dutch/Belgian
1178  fix[ 3202LL << 32 | 3U << 16] = EITFixUp::kFixNL;
1179  fix[ 3208LL << 32 | 3U << 16] = EITFixUp::kFixNL;
1180  fix[ 3211LL << 32 | 3U << 16] = EITFixUp::kFixNL;
1181  fix[ 3222LL << 32 | 3U << 16] = EITFixUp::kFixNL;
1182  fix[ 3225LL << 32 | 3U << 16] = EITFixUp::kFixNL;
1183 
1184  // Finland
1185  fix[ 8438U << 16] = // DVB-T Espoo
1186  fix[ 42249U << 16] = // DVB-C Welho
1187  fix[ 15U << 16] = // DVB-C Welho
1189 
1190  // DVB-C YouSee (Denmark)
1191  fix[65024U << 16] = EITFixUp::kFixDK;
1192 
1193  // DVB-S(2) Thor 0.8W Norwegian
1194  fix[70U << 16] = EITFixUp::kFixNO;
1195 
1196  // DVB-T NTV/NRK (Norway)
1197  fix[910LL << 32 | 8770U << 16 | 0x006f] = EITFixUp::kFixNRK_DVBT; //NRK Folkemusikk
1198  fix[910LL << 32 | 8770U << 16 | 0x0070] = EITFixUp::kFixNRK_DVBT; //NRK Stortinget
1199  fix[910LL << 32 | 8770U << 16 | 0x0071] = EITFixUp::kFixNRK_DVBT; //NRK Super
1200  fix[910LL << 32 | 8770U << 16 | 0x0072] = EITFixUp::kFixNRK_DVBT; //NRK Sport
1201  fix[910LL << 32 | 8770U << 16 | 0x0073] = EITFixUp::kFixNRK_DVBT; //NRK Gull
1202  fix[910LL << 32 | 8770U << 16 | 0x0074] = EITFixUp::kFixNRK_DVBT; //NRK Jazz
1203  fix[910LL << 32 | 8770U << 16 | 0x0067] = EITFixUp::kFixNRK_DVBT; //NRK Super / NRK3
1204  fix[910LL << 32 | 8770U << 16 | 0x0068] = EITFixUp::kFixNRK_DVBT; //NRK Tegnspr�
1205  fix[910LL << 32 | 8770U << 16 | 0x0069] = EITFixUp::kFixNRK_DVBT; //NRK P2
1206  fix[910LL << 32 | 8770U << 16 | 0x006a] = EITFixUp::kFixNRK_DVBT; //NRK P3
1207  fix[910LL << 32 | 8770U << 16 | 0x006b] = EITFixUp::kFixNRK_DVBT; //NRK Alltid Nyheter
1208  fix[910LL << 32 | 8770U << 16 | 0x006c] = EITFixUp::kFixNRK_DVBT; //NRK mP3
1209  fix[910LL << 32 | 8770U << 16 | 0x006d] = EITFixUp::kFixNRK_DVBT; //NRK Klassisk
1210  fix[910LL << 32 | 8770U << 16 | 0x006e] = EITFixUp::kFixNRK_DVBT; //NRK S�i Radio
1211  fix[910LL << 32 | 8770U << 16 | 0x0066] = EITFixUp::kFixNRK_DVBT; //NRK2
1212  fix[910LL << 32 | 8770U << 16 | 0x03f0] = EITFixUp::kFixNRK_DVBT; //NRK1 M�e og Romsdal
1213  fix[910LL << 32 | 8770U << 16 | 0x0455] = EITFixUp::kFixNRK_DVBT; //NRK P1 Tr�delag
1214  fix[910LL << 32 | 8770U << 16 | 0x03f1] = EITFixUp::kFixNRK_DVBT; //NRK1 Midtnytt
1215 
1217  // Special Early fixups for providers that break DVB EIT spec.
1218  // transport_id<<32 | network_id<<16 | service_id
1219 
1220  // Bell Express VU Canada
1221  fix[ 256U << 16] |= EITFixUp::kEFixForceISO8859_1;
1222  fix[ 257U << 16] |= EITFixUp::kEFixForceISO8859_1;
1223  fix[4100U << 16] |= EITFixUp::kEFixForceISO8859_1;
1224  fix[4101U << 16] |= EITFixUp::kEFixForceISO8859_1;
1225  fix[4102U << 16] |= EITFixUp::kEFixForceISO8859_1;
1226  fix[4103U << 16] |= EITFixUp::kEFixForceISO8859_1;
1227  fix[4104U << 16] |= EITFixUp::kEFixForceISO8859_1;
1228  fix[4105U << 16] |= EITFixUp::kEFixForceISO8859_1;
1229  fix[4106U << 16] |= EITFixUp::kEFixForceISO8859_1;
1230  fix[4107U << 16] |= EITFixUp::kEFixForceISO8859_1;
1231  fix[4097U << 16] |= EITFixUp::kEFixForceISO8859_1;
1232  fix[4098U << 16] |= EITFixUp::kEFixForceISO8859_1;
1233 
1234  //DVB-T Germany Berlin HSE/MonA TV
1235  fix[ 772LL << 32 | 8468 << 16 | 16387] = EITFixUp::kEFixForceISO8859_15;
1236  //DVB-T Germany Ruhrgebiet Tele 5
1237  //fix[ 8707LL << 32 | 8468 << 16 | 16413] = EITFixUp::kEFixForceISO8859_15; // they are sending the ISO 8859-9 signalling now
1238  // ANIXE
1239  fix[ 8707LL << 32 | 8468U << 16 | 16426 ] = // DVB-T Rhein-Main
1241 
1242  // DVB-C Kabel Deutschland encoding fixes Germany
1243  fix[ 112LL << 32 | 61441U << 16] = EITFixUp::kEFixForceISO8859_15;
1244  fix[ 10000LL << 32 | 61441U << 16] = EITFixUp::kEFixForceISO8859_15;
1245  fix[ 10001LL << 32 | 61441U << 16] = EITFixUp::kEFixForceISO8859_15;
1246  fix[ 10002LL << 32 | 61441U << 16] = EITFixUp::kEFixForceISO8859_15;
1247  fix[ 10003LL << 32 | 61441U << 16] = EITFixUp::kEFixForceISO8859_15;
1248  fix[ 10006LL << 32 | 61441U << 16] = EITFixUp::kEFixForceISO8859_15;
1249  fix[ 10009LL << 32 | 61441U << 16] = EITFixUp::kEFixForceISO8859_15;
1250  fix[ 10010LL << 32 | 61441U << 16] = EITFixUp::kEFixForceISO8859_15;
1251  // Mark program on the HD transponders as HDTV
1252  fix[ 10012LL << 32 | 61441U << 16] = EITFixUp::kFixHDTV;
1253  fix[ 10013LL << 32 | 61441U << 16] = EITFixUp::kFixHDTV;
1254  // On transport 10004 only DMAX needs no fixing:
1255  fix[10004LL<<32 | 61441U << 16 | 50403] = // BBC World Service
1256  fix[10004LL<<32 | 61441U << 16 | 53101] = // BBC Prime (engl)
1257  fix[10004LL<<32 | 61441U << 16 | 53108] = // Toon Disney (engl)
1258  fix[10004LL<<32 | 61441U << 16 | 53109] = // Sky News (engl)
1259  fix[10004LL<<32 | 61441U << 16 | 53406] = // BBC Prime
1260  fix[10004LL<<32 | 61441U << 16 | 53407] = // Boomerang (engl)
1261  fix[10004LL<<32 | 61441U << 16 | 53404] = // Boomerang
1262  fix[10004LL<<32 | 61441U << 16 | 53408] = // TCM Classic Movies (engl)
1263  fix[10004LL<<32 | 61441U << 16 | 53409] = // Extreme Sports
1264  fix[10004LL<<32 | 61441U << 16 | 53410] = // CNBC Europe (engl)
1265  fix[10004LL<<32 | 61441U << 16 | 53503] = // Detski Mir
1266  fix[10004LL<<32 | 61441U << 16 | 53411] = // Sat.1 Comedy
1267  fix[10004LL<<32 | 61441U << 16 | 53412] = // kabel eins classics
1268  fix[10004LL<<32 | 61441U << 16 | 53112] = // Extreme Sports (engl)
1269  fix[10004LL<<32 | 61441U << 16 | 53513] = // Playhouse Disney (engl)
1270  fix[10004LL<<32 | 61441U << 16 | 53618] = // K1010
1271  fix[10004LL<<32 | 61441U << 16 | 53619] = // GemsTV
1273  // On transport 10005 QVC and Giga Digital needs no fixing:
1274  fix[10005LL<<32 | 61441U << 16 | 50104] = // E! Entertainment
1275  fix[10005LL<<32 | 61441U << 16 | 50107] = // 13th Street (KD)
1276  fix[10005LL<<32 | 61441U << 16 | 50301] = // ESPN Classic
1277  fix[10005LL<<32 | 61441U << 16 | 50302] = // VH1 Classic
1278  fix[10005LL<<32 | 61441U << 16 | 50303] = // Wein TV
1279  fix[10005LL<<32 | 61441U << 16 | 50304] = // AXN
1280  fix[10005LL<<32 | 61441U << 16 | 50305] = // Silverline
1281  fix[10005LL<<32 | 61441U << 16 | 50306] = // NASN
1282  fix[10005LL<<32 | 61441U << 16 | 50307] = // Disney Toon
1283  fix[10005LL<<32 | 61441U << 16 | 53105] = // NASN (engl)
1284  fix[10005LL<<32 | 61441U << 16 | 53115] = // VH1 Classic (engl)
1285  fix[10005LL<<32 | 61441U << 16 | 53405] = // ESPN Classic (engl)
1286  fix[10005LL<<32 | 61441U << 16 | 53402] = // AXN (engl)
1287  fix[10005LL<<32 | 61441U << 16 | 53613] = // CNN (engl)
1288  fix[10005LL<<32 | 61441U << 16 | 53516] = // Voyages Television
1289  fix[10005LL<<32 | 61441U << 16 | 53611] = // Der Schmuckkanal
1290  fix[10005LL<<32 | 61441U << 16 | 53104] = // Jukebox
1292  // On transport 10007 only following channels need fixing:
1293  fix[10007LL<<32| 61441U << 16 | 53607] = // Eurosport
1294  fix[10007LL<<32| 61441U << 16 | 53608] = // Das Vierte
1295  fix[10007LL<<32| 61441U << 16 | 53609] = // Viva
1296  fix[10007LL<<32| 61441U << 16 | 53628] = // COMEDY CENTRAL
1298  // RTL Subtitle parsing
1299  fix[10007LL<<32| 61441U << 16 | 53601] = // RTL
1300  fix[10007LL<<32| 61441U << 16 | 53602] = // Super RTL
1301  fix[10007LL<<32| 61441U << 16 | 53604] = // VOX
1302  fix[10007LL<<32| 61441U << 16 | 53606] = // n-tv
1304  // On transport 10008 only following channels need fixing:
1305  fix[ 10008LL<<32 | 61441U << 16 | 53002] = // Tele 5
1307 
1308  // DVB-C Unitymedia Germany
1309  fix[ 9999 << 16 | 161LL << 32 | 12101 ] = // RTL Television
1310  fix[ 9999 << 16 | 161LL << 32 | 12104 ] = // VOX
1311  fix[ 9999 << 16 | 161LL << 32 | 12107 ] = // Super RTL
1312  fix[ 9999 << 16 | 161LL << 32 | 12109 ] = // n-tv
1313  fix[ 9999 << 16 | 301LL << 32 | 30114 ] = // RTL NITRO
1315  fix[ 9999 << 16 | 191LL << 32 | 11102 ] = // DAS VIERTE
1317  // on this transport are only HD services, two TBD, arte and ServusTV, I think arte properly signals HD!
1318  fix[ 9999 << 16 | 401LL << 32 | 29109 ] = // ServusTV HD
1320  // generic Unitymedia / Liberty Global / Eventis.nl?
1321  fix[ 9999 << 16 | 121LL << 32 | 12107 ] = // Super RTL
1322  fix[ 9999 << 16 | 151LL << 32 | 15110 ] = // Bibel TV
1323  fix[ 9999 << 16 | 161LL << 32 | 12107 ] = // Super RTL
1324  fix[ 9999 << 16 | 161LL << 32 | 12109 ] = // n-tv
1325  fix[ 9999 << 16 | 171LL << 32 | 17119 ] = // RiC
1326  fix[ 9999 << 16 | 171LL << 32 | 27102 ] = // DELUXE MUSIC
1327  fix[ 9999 << 16 | 181LL << 32 | 24108 ] = // DMAX
1328  fix[ 9999 << 16 | 181LL << 32 | 25102 ] = // TV5MONDE Europe
1329  fix[ 9999 << 16 | 191LL << 32 | 11102 ] = // Disney SD
1330  fix[ 9999 << 16 | 191LL << 32 | 12110 ] = // N24
1331  fix[ 9999 << 16 | 191LL << 32 | 12111 ] = // Tele 5
1332  fix[ 9999 << 16 | 201LL << 32 | 27103 ] = // TLC
1333  fix[ 9999 << 16 | 211LL << 32 | 29108 ] = // Astro TV
1334  fix[ 9999 << 16 | 231LL << 32 | 23117 ] = // Deutsches Musik Fernsehen
1335  fix[ 9999 << 16 | 231LL << 32 | 23115 ] = // Family TV
1336  fix[ 9999 << 16 | 271LL << 32 | 27101 ] = // DIE NEUE ZEIT TV
1337  fix[ 9999 << 16 | 541LL << 32 | 54101 ] = // HR HD
1339 
1340  // DVB-S Astra 19.2E DMAX Germany
1341  fix[ 1113LL << 32 | 1 << 16 | 12602] = EITFixUp::kEFixForceISO8859_15;
1342 
1343  // Premiere
1344  fix[133 << 16] = EITFixUp::kEFixForceISO8859_15;
1345 
1346  // DVB-S Astra 19.2E French channels
1347  fix[ 1022LL << 32 | 1 << 16 | 6901 ] = // DIRECT 8
1348  fix[ 1022LL << 32 | 1 << 16 | 6905 ] = // France 24 (en Francais)
1349  fix[ 1022LL << 32 | 1 << 16 | 6911 ] = // DIRECT 8
1350  fix[ 1072LL << 32 | 1 << 16 | 8201 ] = // CANAL+
1351  fix[ 1070LL << 32 | 1 << 16 | 8004 ] = // EURONEWS
1352  fix[ 1091LL << 32 | 1 << 16 | 31220 ] = // EuroNews
1353  fix[ 1094LL << 32 | 1 << 16 | 17027 ] = // LCP
1354  fix[ 1094LL << 32 | 1 << 16 | 17028 ] = // NT1
1355  fix[ 1100LL << 32 | 1 << 16 | 8710 ] = // NRJ 12
1357 
1358  // DVB-C T-Kábel Hungary
1359  // FIXME this should be more specific. Is the encoding really wrong for all services?
1360  fix[ 100 << 16] = EITFixUp::kEFixForceISO8859_2;
1361 
1362  // DVB-T Greece
1363  // Pelion Transmitter
1364  // transport_id<<32 | netword_id<<16 | service_id
1365  fix[ 100LL << 32 | 8492LL << 16 ] = // Ant1,Alpha,Art,10E
1366  fix[ 102LL << 32 | 8492LL << 16 ] = // Mega,Star,SKAI,M.tv
1367  fix[ 320LL << 32 | 8492LL << 16 ] = // Astra,Thessalia,TRT,TV10,ZEYS
1371  fix[ 2LL << 32 | 8492LL << 16 ] = // N1,Nplus,NHD,Vouli
1372  EITFixUp::kEFixForceISO8859_7 | // it is encoded in cp-1253
1373  EITFixUp::kFixGreekSubtitle | // Subtitle has too much info and is
1374  EITFixUp::kFixGreekEIT | // cut in db. Will move to descr.
1376 
1377  //DVB-S & S2 Greek Nova Provider
1378  // Hotbird 11823H DVB-S
1379  fix[ 5500LL << 32 | 318LL << 16 ] = EITFixUp::kEFixForceISO8859_7;
1380  // Hotbird 11938H DVB-S
1381  fix[ 6100LL << 32 | 318LL << 16 ] = EITFixUp::kEFixForceISO8859_7;
1382  // Hotbird 12130H DVB-S2
1383  fix[ 7100LL << 32 | 318LL << 16 ] = EITFixUp::kEFixForceISO8859_7;
1384  // Hotbird 12169H DVB-S2
1385  fix[ 7300LL << 32 | 318LL << 16 ] = EITFixUp::kEFixForceISO8859_7;
1386 
1387  // DVB-S Star One C2 70W (Brazil)
1388  // it has original_network_id = 1 like Astra on 19.2E, but transport_id does
1389  // not collide at the moment
1390  fix[ 1LL << 32 | 1LL << 16 ] = EITFixUp::kEFixForceISO8859_1;
1391  fix[ 2LL << 32 | 1LL << 16 ] = EITFixUp::kEFixForceISO8859_1;
1392  fix[ 3LL << 32 | 1LL << 16 ] = EITFixUp::kEFixForceISO8859_1;
1393  fix[ 4LL << 32 | 1LL << 16 ] = EITFixUp::kEFixForceISO8859_1;
1394  fix[ 50LL << 32 | 1LL << 16 ] = EITFixUp::kEFixForceISO8859_1;
1395  fix[ 51LL << 32 | 1LL << 16 ] = EITFixUp::kEFixForceISO8859_1;
1396  fix[ 52LL << 32 | 1LL << 16 ] = EITFixUp::kEFixForceISO8859_1;
1397  fix[ 53LL << 32 | 1LL << 16 ] = EITFixUp::kEFixForceISO8859_1;
1398  fix[ 54LL << 32 | 1LL << 16 ] = EITFixUp::kEFixForceISO8859_1;
1399  fix[ 55LL << 32 | 1LL << 16 ] = EITFixUp::kEFixForceISO8859_1;
1400  fix[ 56LL << 32 | 1LL << 16 ] = EITFixUp::kEFixForceISO8859_1;
1401  fix[ 57LL << 32 | 1LL << 16 ] = EITFixUp::kEFixForceISO8859_1;
1402  fix[ 58LL << 32 | 1LL << 16 ] = EITFixUp::kEFixForceISO8859_1;
1403  fix[ 59LL << 32 | 1LL << 16 ] = EITFixUp::kEFixForceISO8859_1;
1404 }
1405 
1411 {
1414  m_maxStarttime, "EITScanner");
1415  m_seenEITother = false;
1416  m_maxStarttime = QDateTime();
1417 }
int m_gpsOffset
Definition: eithelper.h:146
bool next(void)
Wrap QSqlQuery::next() so we can display the query results.
Definition: mythdbcon.cpp:782
uint Version(void) const
Definition: mpegtables.h:503
QMap< QString, QString > Items(void) const
uint TSID(void) const
Definition: dvbtables.h:308
void bindValue(const QString &placeholder, const QVariant &val)
Add a single binding.
Definition: mythdbcon.cpp:863
uint GetChanID(uint atsc_major, uint atsc_minor)
Definition: eithelper.cpp:812
void CompleteEvent(uint atsc_major, uint atsc_minor, const ATSCEvent &event, const QString &ett)
Definition: eithelper.cpp:773
uint SubtitleProperties(uint compression_type) const
QString EventName(void) const
uint32_t m_length
Definition: eithelper.h:40
static void init_fixup(FixupMap &fix)
Definition: eithelper.cpp:1008
#define GPS_EPOCH
Seconds between start of GPS time and the start of UNIX time.
Definition: mpegtables.h:28
#define LOC
Definition: eithelper.cpp:35
unsigned char SubtitleType(void) const
uint32_t m_desc_length
Definition: eithelper.h:42
uint32_t m_start_time
Definition: eithelper.h:39
ExtendedTextTable contain additional text not contained in EventInformationTables.
Definition: atsctables.h:625
const char * subtitles[4]
Definition: vbilut.cpp:202
QMutex m_eitListLock
EIT List lock.
Definition: eithelper.h:140
QSqlQuery wrapper that fetches a DB connection from the connection pool.
Definition: mythdbcon.h:125
int size(void) const
Definition: mythdbcon.h:203
QString ContentId(size_t n=0) const
const unsigned char * Descriptors(uint i) const
Definition: dvbtables.h:357
MythDeque< DBEventEIT * > m_dbEvents
Definition: eithelper.h:157
bool HasName(void) const
unsigned char VideoProperties(void) const
static int iso639_str3_to_key(const unsigned char *iso639_2)
Definition: iso639.h:63
static const unsigned char * FindBestMatch(const desc_list_t &parsed, uint desc_tag, QMap< uint, uint > &langPref)
vector< const unsigned char * > desc_list_t
int iso639_key_to_canonical_key(int iso639_2)
Definition: iso639.cpp:121
EITHelper(void)
Definition: eithelper.cpp:37
void SetLanguagePreferences(const QStringList &langPref)
Definition: eithelper.cpp:112
static void TimeFix(QDateTime &dt)
Corrects starttime to the multiple of a minute.
Definition: eitfixup.h:83
static void parse_dvb_event_descriptors(const desc_list_t &list, FixupValue fix, QMap< uint, uint > languagePreferences, QString &title, QString &subtitle, QString &description, QMap< QString, QString > &items)
Definition: eithelper.cpp:206
static guint32 * tmp
Definition: goom_core.c:35
static uint GetMplexID(uint sourceid, const QString &channum)
void enqueue(T d)
Adds item to the back of the list. O(1).
Definition: mythdeque.h:42
uint GetListSize(void) const
Definition: eithelper.cpp:52
void AddEIT(uint atsc_major, uint atsc_minor, const EventInformationTable *eit)
Definition: eithelper.cpp:141
uint EventCount() const
Definition: atsctables.h:553
QDateTime StartTimeUTC(uint i) const
Definition: dvbtables.h:331
QString Text(void) const
QString advisory(void) const
Overall structure.
QVariant value(int i) const
Definition: mythdbcon.h:198
static void WriteEITCache(void)
Definition: eithelper.cpp:764
uint EventCount() const
Definition: dvbtables.h:322
QString seriesid(void) const
const unsigned char * m_desc
Definition: eithelper.h:44
FixupMap m_fixup
Definition: eithelper.h:154
def rating(profile, smoonURL, gate)
Definition: scan.py:39
MBASE_PUBLIC QDateTime fromSecsSinceEpoch(uint seconds)
This function takes the number of seconds since the start of the epoch and returns a QDateTime with t...
Definition: mythdate.cpp:88
uint ServiceID(void) const
Definition: dvbtables.h:305
uint ETMLocation(uint i) const
Definition: atsctables.h:579
static uint get_chan_id_from_db_dtv(uint sourceid, uint serviceid, uint tunedchanid)
Definition: eithelper.cpp:962
void WriteToDB(void)
Definition: eitcache.cpp:308
uint DescriptorsLength(uint i) const
Definition: dvbtables.h:353
QDateTime current(bool stripped)
Returns current Date and Time in UTC.
Definition: mythdate.cpp:10
T dequeue()
Removes item from front of list and returns a copy. O(1).
Definition: mythdeque.h:32
uint64_t FixupValue
Definition: eithelper.h:78
static uint get_chan_id_from_db_atsc(uint sourceid, uint atsc_major, uint atsc_minor)
Definition: eithelper.cpp:864
void AddETT(uint atsc_major, uint atsc_minor, const ExtendedTextTable *ett)
Definition: eithelper.cpp:180
bool isActive(void) const
Definition: mythdbcon.h:204
uint EventID(uint i) const
Definition: atsctables.h:558
EITFixUp * m_eitFixup
Definition: eithelper.h:143
QString Name(uint) const
QMap< uint, ATSCEvent > EventIDToATSCEvent
Definition: eithelper.h:72
uint OriginalNetworkID(void) const
Definition: dvbtables.h:312
ATSCSRCToEvents m_incompleteEvents
Definition: eithelper.h:155
unsigned int uint
Definition: compat.h:140
static MSqlQueryInfo InitCon(ConnectionReuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
Definition: mythdbcon.cpp:535
static void parse_dvb_component_descriptors(const desc_list_t &list, unsigned char &subtitle_type, unsigned char &audio_properties, unsigned char &video_properties)
Definition: eithelper.cpp:308
QMap< FixupKey, FixupValue > FixupMap
Definition: eithelper.h:79
EIT Fix Up Functions.
Definition: eitfixup.h:13
bool m_seenEITother
if false we only reschedule the active mplex
Definition: eithelper.h:152
static void RescheduleMatch(uint recordid, uint sourceid, uint mplexid, const QDateTime &maxstarttime, const QString &why)
void SetSourceID(uint _sourceid)
Definition: eithelper.cpp:129
static const unsigned char * Find(const desc_list_t &parsed, uint desc_tag)
QDate originalairdate(void) const
EventInformationTables contain program titles, start times, and channel information.
Definition: atsctables.h:521
uint PruneOldEntries(uint utc_timestamp)
Prunes entries that describe events ending before timestamp time.
Definition: eitcache.cpp:412
QString GetBestMatch(QMap< uint, uint > &langPrefs) const
QString Text(void) const
uint AudioProperties(uint compression_type) const
uint TableID(void) const
Definition: mpegtables.h:479
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.
Definition: mythdbcon.cpp:807
uint32_t PrivateDataSpecifier(void) const
uint StartTimeRaw(uint i) const
Definition: atsctables.h:563
#define LOG(_MASK_, _LEVEL_, _STRING_)
Definition: mythlogging.h:41
bool IsNewEIT(uint chanid, uint tableid, uint version, uint eventid, uint endtime)
Definition: eitcache.cpp:337
const unsigned char * Descriptors(uint i) const
Definition: atsctables.h:607
uint LengthInSeconds(uint i) const
Definition: atsctables.h:584
virtual ~EITHelper(void)
Definition: eithelper.cpp:43
static void PruneEITCache(uint timestamp)
Definition: eithelper.cpp:759
uint DurationInSeconds(uint i) const
Definition: dvbtables.h:342
time_t EndTimeUnixUTC(uint i) const
Definition: dvbtables.h:335
QString rating(void) const
static const uint kChunkSize
Maximum number of DB inserts per ProcessEvents call.
Definition: eithelper.h:162
uint ContentType(size_t n=0) const
uint EventID(uint i) const
Definition: dvbtables.h:326
ServiceToChanID m_srvToChanid
Definition: eithelper.h:141
uint EventID(void) const
Definition: atsctables.h:663
QString programid(void) const
const MultipleStringStructure ExtendedTextMessage() const
Definition: atsctables.h:667
static uint get_chan_id_from_db_dvb(uint sourceid, uint serviceid, uint networkid, uint transportid)
Definition: eithelper.cpp:891
void SetChannelID(uint _channelid)
Definition: eithelper.cpp:135
uint ContentEncoding(size_t n=0) const
QDateTime m_maxStarttime
latest starttime of changed events
Definition: eithelper.h:151
uint DescriptorsLength(uint i) const
Definition: atsctables.h:599
QMap< uint, uint > m_languagePreferences
Definition: eithelper.h:159
bool exec(void)
Wrap QSqlQuery::exec() so we can display SQL.
Definition: mythdbcon.cpp:603
bool IsValid(void) const
uint ProcessEvents(void)
Inserts events in EIT list.
Definition: eithelper.cpp:63
static void DBError(const QString &where, const MSqlQuery &query)
Definition: mythdb.cpp:179
static desc_list_t FindBestMatches(const desc_list_t &parsed, uint desc_tag, QMap< uint, uint > &langPref)
static desc_list_t FindAll(const desc_list_t &parsed, uint desc_tag)
MultipleStringStructure title(int i) const
Definition: atsctables.h:593
static EITCache * s_eitCache
Definition: eithelper.h:144
static desc_list_t Parse(const unsigned char *data, uint len)
uint m_sourceid
id of the video source
Definition: eithelper.h:149
unsigned char AudioProperties(void) const
uint64_t FixupKey
Definition: eithelper.h:77
const unsigned char * Descriptors() const
void Fix(DBEventEIT &event) const
Definition: eitfixup.cpp:253
QString rating(void) const
void RescheduleRecordings(void)
Tells scheduler about programming changes.
Definition: eithelper.cpp:1410
void SetFixup(uint atsc_major, uint atsc_minor, FixupValue eitfixup)
Definition: eithelper.cpp:105
QString advisory(void) const
uint m_channelid
id of the channel
Definition: eithelper.h:150