MythTV  master
atscstreamdata.cpp
Go to the documentation of this file.
1 // -*- Mode: c++ -*-
2 // Copyright (c) 2003-2004, Daniel Thor Kristjansson
3 
4 #include <cmath>
5 
6 #include <algorithm>
7 
8 #include "atscstreamdata.h"
9 #include "atsctables.h"
10 #include "sctetables.h"
11 #include "eithelper.h"
12 
13 #define LOC QString("ATSCStream[%1]: ").arg(m_cardId)
14 
33 ATSCStreamData::ATSCStreamData(int desiredMajorChannel,
34  int desiredMinorChannel,
35  int cardnum, bool cacheTables)
36  : MPEGStreamData(-1, cardnum, cacheTables),
37  m_desiredMajorChannel(desiredMajorChannel),
38  m_desiredMinorChannel(desiredMinorChannel)
39 {
42 }
43 
45 {
46  Reset(-1,-1);
47 
48  QMutexLocker locker(&m_listenerLock);
49  m_atscMainListeners.clear();
50  m_atscAuxListeners.clear();
51  m_atscEitListeners.clear();
52 
53  m_scteMainlisteners.clear();
54  m_atsc81EitListeners.clear();
55 }
56 
58 {
59  bool reset = true;
60  const MasterGuideTable *mgt = GetCachedMGT();
61  tvct_vec_t tvcts = GetCachedTVCTs();
62  cvct_vec_t cvcts = GetCachedCVCTs();
63 
64  if (mgt && (!tvcts.empty() || !cvcts.empty()))
65  {
66  const TerrestrialVirtualChannelTable *tvct = nullptr;
67  const CableVirtualChannelTable *cvct = nullptr;
68  int chan_idx = -1;
69  for (uint i = 0; (i < tvcts.size()) && (chan_idx < 0); i++)
70  {
71  tvct = tvcts[i];
72  chan_idx = tvcts[i]->Find(major, minor);
73  }
74  for (uint i = (chan_idx < 0) ? 0 : cvcts.size();
75  (i < cvcts.size()) && (chan_idx < 0); i++)
76  {
77  cvct = cvcts[i];
78  chan_idx = cvcts[i]->Find(major, minor);
79  }
80 
81  if (chan_idx >= 0)
82  {
83  m_desiredMajorChannel = major;
85 
86  ProcessMGT(mgt);
87 
88  if (cvct)
89  {
90  ProcessCVCT(cvct->TransportStreamID(), cvct);
91  SetDesiredProgram(cvct->ProgramNumber(chan_idx));
92  }
93  else if (tvct)
94  {
95  ProcessTVCT(tvct->TransportStreamID(), tvct);
96  SetDesiredProgram(tvct->ProgramNumber(chan_idx));
97  }
98  reset = false;
99  }
100  }
101 
102  ReturnCachedTable(mgt);
103  ReturnCachedTVCTTables(tvcts);
104  ReturnCachedCVCTTables(cvcts);
105 
106  if (reset)
107  Reset(major, minor);
108 }
109 
110 void ATSCStreamData::Reset(int desiredProgram)
111 {
112  MPEGStreamData::Reset(desiredProgram);
115 }
116 
117 void ATSCStreamData::Reset(int desiredMajorChannel, int desiredMinorChannel)
118 {
119  m_desiredMajorChannel = desiredMajorChannel;
120  m_desiredMinorChannel = desiredMinorChannel;
121 
123  m_mgtVersion = -1;
124  m_tvctVersion.clear();
125  m_cvctVersion.clear();
126  m_eitStatus.clear();
127 
128  m_sourceIdToAtscMajMin.clear();
129  m_atscEitPids.clear();
130  m_atscEttPids.clear();
131 
132  {
133  QMutexLocker locker(&m_cacheLock);
134 
136  m_cachedMgt = nullptr;
137 
138  for (const auto & cached : std::as_const(m_cachedTvcts))
139  DeleteCachedTable(cached);
140  m_cachedTvcts.clear();
141 
142  for (const auto & cached : std::as_const(m_cachedCvcts))
143  DeleteCachedTable(cached);
144  m_cachedCvcts.clear();
145  }
146 
149 }
150 
158 bool ATSCStreamData::IsRedundant(uint pid, const PSIPTable &psip) const
159 {
160  if (MPEGStreamData::IsRedundant(pid, psip))
161  return true;
162 
163  const int table_id = psip.TableID();
164  const int version = psip.Version();
165 
166  if (TableID::EIT == table_id)
167  {
168  uint key = (pid<<16) | psip.TableIDExtension();
169  return m_eitStatus.IsSectionSeen(key, version, psip.Section());
170  }
171 
172  if (TableID::ETT == table_id)
173  return false; // retransmit ETT's we've seen
174 
175  if (TableID::STT == table_id)
176  return false; // each SystemTimeTable matters
177 
178  if (TableID::STTscte == table_id)
179  return false; // each SCTESystemTimeTable matters
180 
181  if (TableID::MGT == table_id)
182  return VersionMGT() == version;
183 
184  if (TableID::TVCT == table_id)
185  {
186  return VersionTVCT(psip.TableIDExtension()) == version;
187  }
188 
189  if (TableID::CVCT == table_id)
190  {
191  return VersionCVCT(psip.TableIDExtension()) == version;
192  }
193 
194  if (TableID::RRT == table_id)
195  return VersionRRT(psip.TableIDExtension()) == version;
196 
197  if (TableID::PIM == table_id)
198  return true; // ignore these messages..
199 
200  if (TableID::PNM == table_id)
201  return true; // ignore these messages..
202 
203  return false;
204 }
205 
207 {
208  if (MPEGStreamData::HandleTables(pid, psip))
209  return true;
210 
211  if (IsRedundant(pid, psip))
212  return true;
213 
214  const int version = psip.Version();
215 
216  // Decode any table we know about
217  switch (psip.TableID())
218  {
219  case TableID::MGT:
220  {
222  if (m_cacheTables)
223  {
224  auto *mgt = new MasterGuideTable(psip);
225  CacheMGT(mgt);
226  ProcessMGT(mgt);
227  }
228  else
229  {
230  MasterGuideTable mgt(psip);
231  ProcessMGT(&mgt);
232  }
233  return true;
234  }
235  case TableID::TVCT:
236  {
237  uint tsid = psip.TableIDExtension();
238  SetVersionTVCT(tsid, version);
239  if (m_cacheTables)
240  {
241  auto *vct = new TerrestrialVirtualChannelTable(psip);
242  CacheTVCT(pid, vct);
243  ProcessTVCT(tsid, vct);
244  }
245  else
246  {
248  ProcessTVCT(tsid, &vct);
249  }
250  return true;
251  }
252  case TableID::CVCT:
253  {
254  uint tsid = psip.TableIDExtension();
255  SetVersionCVCT(tsid, version);
256  if (m_cacheTables)
257  {
258  auto *vct = new CableVirtualChannelTable(psip);
259  CacheCVCT(pid, vct);
260  ProcessCVCT(tsid, vct);
261  }
262  else
263  {
264  CableVirtualChannelTable vct(psip);
265  ProcessCVCT(tsid, &vct);
266  }
267  return true;
268  }
269  case TableID::RRT:
270  {
271  uint region = psip.TableIDExtension();
272  SetVersionRRT(region, version);
273  RatingRegionTable rrt(psip);
274  QMutexLocker locker(&m_listenerLock);
275  for (auto & listener : m_atscAuxListeners)
276  listener->HandleRRT(&rrt);
277  return true;
278  }
279  case TableID::EIT:
280  {
281  QMutexLocker locker(&m_listenerLock);
282  if (m_atscEitListeners.empty() && !m_eitHelper)
283  return true;
284 
285  uint key = (pid<<16) | psip.TableIDExtension();
286  m_eitStatus.SetSectionSeen(key, version, psip.Section(), psip.LastSection());
287 
288  EventInformationTable eit(psip);
289  for (auto & listener : m_atscEitListeners)
290  listener->HandleEIT(pid, &eit);
291 
292  const uint mm = GetATSCMajorMinor(eit.SourceID());
293  if (mm && m_eitHelper)
294  m_eitHelper->AddEIT(mm >> 16, mm & 0xffff, &eit);
295 
296  return true;
297  }
298  case TableID::ETT:
299  {
300  ExtendedTextTable ett(psip);
301 
302  QMutexLocker locker(&m_listenerLock);
303  for (auto & listener : m_atscEitListeners)
304  listener->HandleETT(pid, &ett);
305 
306  if (ett.IsEventETM() && m_eitHelper) // Guide ETTs
307  {
308  const uint mm = GetATSCMajorMinor(ett.SourceID());
309  if (mm)
310  m_eitHelper->AddETT(mm >> 16, mm & 0xffff, &ett);
311  }
312 
313  return true;
314  }
315  case TableID::STT:
316  {
317  SystemTimeTable stt(psip);
318 
319  UpdateTimeOffset(stt.UTCUnix());
320 
321  // only update internal offset if it changes
322  if (stt.GPSOffset() != m_gpsUtcOffset)
323  m_gpsUtcOffset = stt.GPSOffset();
324 
325  m_listenerLock.lock();
326  for (auto & listener : m_atscMainListeners)
327  listener->HandleSTT(&stt);
328  m_listenerLock.unlock();
329 
332 
333  return true;
334  }
335  case TableID::DCCT:
336  {
337  DirectedChannelChangeTable dcct(psip);
338 
339  QMutexLocker locker(&m_listenerLock);
340  for (auto & listener : m_atscAuxListeners)
341  listener->HandleDCCT(&dcct);
342 
343  return true;
344  }
345  case TableID::DCCSCT:
346  {
348 
349  QMutexLocker locker(&m_listenerLock);
350  for (auto & listener : m_atscAuxListeners)
351  listener->HandleDCCSCT(&dccsct);
352 
353  return true;
354  }
355 
356  // ATSC A/81 & SCTE 65 tables
357  case TableID::AEIT:
358  {
360 
361  QMutexLocker locker(&m_listenerLock);
362  for (auto & listener : m_atsc81EitListeners)
363  listener->HandleAEIT(pid, &aeit);
364 
365  return true;
366  }
367  case TableID::AETT:
368  {
369  AggregateExtendedTextTable aett(psip);
370 
371  QMutexLocker locker(&m_listenerLock);
372  for (auto & listener : m_atsc81EitListeners)
373  listener->HandleAETT(pid, &aett);
374 
375  return true;
376  }
377 
378  // SCTE 65 tables
379  case TableID::NITscte:
380  {
381  SCTENetworkInformationTable nit(psip);
382 
383  QMutexLocker locker(&m_listenerLock);
384  for (auto & listener : m_scteMainlisteners)
385  listener->HandleNIT(&nit);
386 
387  return true;
388  }
389  case TableID::NTT:
390  {
391  NetworkTextTable ntt(psip);
392 
393  QMutexLocker locker(&m_listenerLock);
394  for (auto & listener : m_scteMainlisteners)
395  listener->HandleNTT(&ntt);
396 
397  return true;
398  }
399  case TableID::SVCTscte:
400  {
401  ShortVirtualChannelTable svct(psip);
402 
403  QMutexLocker locker(&m_listenerLock);
404  for (auto & listener : m_scteMainlisteners)
405  listener->HandleSVCT(&svct);
406 
407  return true;
408  }
409  case TableID::STTscte:
410  {
411  SCTESystemTimeTable stt(psip);
412 
413  QMutexLocker locker(&m_listenerLock);
414  for (auto & listener : m_scteMainlisteners)
415  listener->HandleSTT(&stt);
416 
417  return true;
418  }
419 
420  // SCTE 57 table -- SCTE 65 standard supercedes this
421  case TableID::PIM:
422  {
424 
425  QMutexLocker locker(&m_listenerLock);
426  for (auto & listener : m_scteMainlisteners)
427  listener->HandlePIM(&pim);
428 
429  return true;
430  }
431  // SCTE 57 table -- SCTE 65 standard supercedes this
432  case TableID::PNM:
433  {
434  ProgramNameMessageTable pnm(psip);
435 
436  QMutexLocker locker(&m_listenerLock);
437  for (auto & listener : m_scteMainlisteners)
438  listener->HandlePNM(&pnm);
439 
440  return true;
441  }
442 
443  // SCTE 80
444  case TableID::ADET:
445  {
446  AggregateDataEventTable adet(psip);
447 
448  QMutexLocker locker(&m_listenerLock);
449  for (auto & listener : m_scteMainlisteners)
450  listener->HandleADET(&adet);
451 
452  return true;
453  }
454 
455  case TableID::NIT:
456  case TableID::NITo:
457  case TableID::SDT:
458  case TableID::SDTo:
459  case TableID::BAT:
460  case TableID::TDT:
461  case TableID::TOT:
462  case TableID::DVBCA_81:
463  case TableID::DVBCA_82:
464  case TableID::DVBCA_83:
465  case TableID::DVBCA_84:
466  case TableID::DVBCA_85:
467  case TableID::DVBCA_86:
468  case TableID::DVBCA_87:
469  case TableID::DVBCA_88:
470  case TableID::DVBCA_89:
471  case TableID::DVBCA_8a:
472  case TableID::DVBCA_8b:
473  case TableID::DVBCA_8c:
474  case TableID::DVBCA_8d:
475  case TableID::DVBCA_8e:
476  {
477  // All DVB specific tables, not handled here
478  return false;
479  }
480 
481  default:
482  {
483  LOG(VB_RECORD, LOG_ERR, LOC +
484  QString("ATSCStreamData::HandleTables(): Unknown table 0x%1 version:%2 pid:%3 0x%4")
485  .arg(psip.TableID(),0,16).arg(psip.Version()).arg(pid).arg(pid,0,16));
486  break;
487  }
488  }
489  return false;
490 }
491 
492 bool ATSCStreamData::HasEITPIDChanges(const uint_vec_t &in_use_pids) const
493 {
494  QMutexLocker locker(&m_listenerLock);
495  uint eit_count = (uint) std::round(m_atscEitPids.size() * m_eitRate);
496  uint ett_count = (uint) std::round(m_atscEttPids.size() * m_eitRate);
497  return (in_use_pids.size() != (eit_count + ett_count) || m_atscEitReset);
498 }
499 
501  uint_vec_t &add_pids,
502  uint_vec_t &del_pids) const
503 {
504  QMutexLocker locker(&m_listenerLock);
505 
506  m_atscEitReset = false;
507 
508  uint eit_count = (uint) std::round(m_atscEitPids.size() * m_eitRate);
509  uint ett_count = (uint) std::round(m_atscEttPids.size() * m_eitRate);
510 
511 #if 0
512  LOG(VB_GENERAL, LOG_DEBUG, LOC + QString("eit size: %1, rate: %2, cnt: %3")
513  .arg(m_atscEitPids.size()).arg(m_eitRate).arg(eit_count));
514 #endif
515 
516  uint_vec_t add_pids_tmp;
517  atsc_eit_pid_map_t::const_iterator it = m_atscEitPids.begin();
518  for (uint i = 0; it != m_atscEitPids.end() && (i < eit_count); (++it),(i++))
519  add_pids_tmp.push_back(*it);
520 
521  atsc_ett_pid_map_t::const_iterator it2 = m_atscEttPids.begin();
522  for (uint i = 0; it2 != m_atscEttPids.end() && (i < ett_count); (++it2),(i++))
523  add_pids_tmp.push_back(*it2);
524 
525  uint_vec_t::const_iterator it3;
526  for (uint pid : cur_pids)
527  {
528  it3 = find(add_pids_tmp.begin(), add_pids_tmp.end(), pid);
529  if (it3 == add_pids_tmp.end())
530  del_pids.push_back(pid);
531  }
532 
533  for (uint pid : add_pids_tmp)
534  {
535  it3 = find(cur_pids.begin(), cur_pids.end(), pid);
536  if (it3 == cur_pids.end())
537  add_pids.push_back(pid);
538  }
539 
540  return !add_pids.empty() || !del_pids.empty();
541 }
542 
544 {
545  QMutexLocker locker(&m_listenerLock);
546 
547  m_atscEitReset = true;
548  m_atscEitPids.clear();
549  m_atscEttPids.clear();
550 
551  for (uint i = 0 ; i < mgt->TableCount(); i++)
552  {
553  const int table_class = mgt->TableClass(i);
554  const uint pid = mgt->TablePID(i);
555 
556  if (table_class == TableClass::EIT)
557  {
558  const uint num = mgt->TableType(i) - 0x100;
559  m_atscEitPids[num] = pid;
560  }
561  else if (table_class == TableClass::ETTe)
562  {
563  const uint num = mgt->TableType(i) - 0x200;
564  m_atscEttPids[num] = pid;
565  }
566  }
567 
568  for (auto & listener : m_atscMainListeners)
569  listener->HandleMGT(mgt);
570 }
571 
573 {
574  for (auto & listener : m_atscMainListeners)
575  listener->HandleVCT(tsid, vct);
576 
577  m_sourceIdToAtscMajMin.clear();
578  for (uint i = 0; i < vct->ChannelCount() ; i++)
579  {
580  if (vct->IsHidden(i) && vct->IsHiddenInGuide(i))
581  {
582  LOG(VB_EIT, LOG_INFO, LOC +
583  QString("%1 chan %2-%3 is hidden in guide")
584  .arg(vct->ModulationMode(i) == 1 ? "NTSC" : "ATSC")
585  .arg(vct->MajorChannel(i))
586  .arg(vct->MinorChannel(i)));
587  continue;
588  }
589 
590  if (1 == vct->ModulationMode(i))
591  {
592  LOG(VB_EIT, LOG_INFO, LOC + QString("Ignoring NTSC chan %1-%2")
593  .arg(vct->MajorChannel(i))
594  .arg(vct->MinorChannel(i)));
595  continue;
596  }
597 
598  LOG(VB_EIT, LOG_INFO, LOC + QString("Adding Source #%1 ATSC chan %2-%3")
599  .arg(vct->SourceID(i))
600  .arg(vct->MajorChannel(i))
601  .arg(vct->MinorChannel(i)));
602 
604  vct->MajorChannel(i) << 16 | vct->MinorChannel(i);
605  }
606 }
607 
610 {
611  QMutexLocker locker(&m_listenerLock);
612  ProcessVCT(tsid, vct);
613  for (auto & listener : m_atscAuxListeners)
614  listener->HandleTVCT(tsid, vct);
615 }
616 
618  const CableVirtualChannelTable *vct)
619 {
620  QMutexLocker locker(&m_listenerLock);
621  ProcessVCT(tsid, vct);
622  for (auto & listener : m_atscAuxListeners)
623  listener->HandleCVCT(tsid, vct);
624 }
625 
627 {
628  if (!current)
629  LOG(VB_GENERAL, LOG_WARNING, LOC +
630  "Currently we ignore \'current\' param");
631 
632  return (bool)(m_cachedMgt);
633 }
634 
636 {
637  bool hasit = false;
638 
639  {
640  tvct_vec_t tvct = GetCachedTVCTs();
641  for (size_t i = 0; i < tvct.size() && !hasit; i++)
642  {
643  if (tvct[i]->Find(major, minor) >= 0)
644  hasit |= HasProgram(tvct[i]->ProgramNumber(i));
645  }
647  }
648 
649  if (!hasit)
650  {
651  cvct_vec_t cvct = GetCachedCVCTs();
652  for (size_t i = 0; i < cvct.size() && !hasit; i++)
653  {
654  if (cvct[i]->Find(major, minor) >= 0)
655  hasit |= HasProgram(cvct[i]->ProgramNumber(i));
656  }
658  }
659 
660  return hasit;
661 }
662 
664 {
665  if (!current)
666  LOG(VB_GENERAL, LOG_WARNING, LOC +
667  "Currently we ignore \'current\' param");
668 
669  m_cacheLock.lock();
670  tvct_cache_t::const_iterator it = m_cachedTvcts.constFind(pid);
671  bool exists = (it != m_cachedTvcts.constEnd());
672  m_cacheLock.unlock();
673 
674  return exists;
675 }
676 
678 {
679  if (!current)
680  LOG(VB_GENERAL, LOG_WARNING, LOC +
681  "Currently we ignore \'current\' param");
682 
683  m_cacheLock.lock();
684  cvct_cache_t::const_iterator it = m_cachedCvcts.constFind(pid);
685  bool exists = (it != m_cachedCvcts.constEnd());
686  m_cacheLock.unlock();
687 
688  return exists;
689 }
690 
692 {
693  if (!current)
694  LOG(VB_GENERAL, LOG_WARNING, LOC +
695  "Currently we ignore \'current\' param");
696 
697  if (!m_cachedMgt)
698  return false;
699 
700  m_cacheLock.lock();
701  bool ret = false;
702  for (uint i = 0; (i < m_cachedMgt->TableCount()); ++i)
703  {
705  {
707  {
708  ret = true;
709  }
710  else
711  {
712  ret = false;
713  break;
714  }
715  }
716  }
717  m_cacheLock.unlock();
718 
719  return ret;
720 }
721 
723 {
724  if (!current)
725  LOG(VB_GENERAL, LOG_WARNING, LOC +
726  "Currently we ignore \'current\' param");
727 
728  if (!m_cachedMgt)
729  return false;
730 
731  m_cacheLock.lock();
732  bool ret = false;
733  for (uint i = 0; (i < m_cachedMgt->TableCount()); ++i)
734  {
736  {
738  {
739  ret = true;
740  }
741  else
742  {
743  ret = false;
744  break;
745  }
746  }
747  }
748  m_cacheLock.unlock();
749 
750  return ret;
751 }
752 
754 {
755  if (!current)
756  LOG(VB_GENERAL, LOG_WARNING, LOC +
757  "Currently we ignore \'current\' param");
758 
759  QMutexLocker locker(&m_cacheLock);
760  return !m_cachedTvcts.empty();
761 }
762 
764 {
765  if (!current)
766  LOG(VB_GENERAL, LOG_WARNING, LOC +
767  "Currently we ignore \'current\' param");
768 
769  QMutexLocker locker(&m_cacheLock);
770  return !m_cachedCvcts.empty();
771 }
772 
774 {
775  if (!current)
776  LOG(VB_GENERAL, LOG_WARNING, LOC +
777  "Currently we ignore \'current\' param");
778 
779  m_cacheLock.lock();
780  const MasterGuideTable *mgt = m_cachedMgt;
781  IncrementRefCnt(mgt);
782  m_cacheLock.unlock();
783 
784  return mgt;
785 }
786 
788 {
789  if (!current)
790  LOG(VB_GENERAL, LOG_WARNING, LOC +
791  "Currently we ignore \'current\' param");
792 
793  tvct_ptr_t tvct = nullptr;
794 
795  m_cacheLock.lock();
796  tvct_cache_t::const_iterator it = m_cachedTvcts.constFind(pid);
797  if (it != m_cachedTvcts.constEnd())
798  IncrementRefCnt(tvct = *it);
799  m_cacheLock.unlock();
800 
801  return tvct;
802 }
803 
805 {
806  if (!current)
807  LOG(VB_GENERAL, LOG_WARNING, LOC +
808  "Currently we ignore \'current\' param");
809 
810  cvct_ptr_t cvct = nullptr;
811 
812  m_cacheLock.lock();
813  cvct_cache_t::const_iterator it = m_cachedCvcts.constFind(pid);
814  if (it != m_cachedCvcts.constEnd())
815  IncrementRefCnt(cvct = *it);
816  m_cacheLock.unlock();
817 
818  return cvct;
819 }
820 
822 {
823  if (!current)
824  LOG(VB_GENERAL, LOG_WARNING, LOC +
825  "Currently we ignore \'current\' param");
826 
827  std::vector<const TerrestrialVirtualChannelTable*> tvcts;
828 
829  m_cacheLock.lock();
830  for (auto *tvct : std::as_const(m_cachedTvcts))
831  {
832  IncrementRefCnt(tvct);
833  tvcts.push_back(tvct);
834  }
835  m_cacheLock.unlock();
836 
837  return tvcts;
838 }
839 
841 {
842  if (!current)
843  LOG(VB_GENERAL, LOG_WARNING, LOC +
844  "Currently we ignore \'current\' param");
845 
846  std::vector<const CableVirtualChannelTable*> cvcts;
847 
848  m_cacheLock.lock();
849  for (auto *cvct : std::as_const(m_cachedCvcts))
850  {
851  IncrementRefCnt(cvct);
852  cvcts.push_back(cvct);
853  }
854  m_cacheLock.unlock();
855 
856  return cvcts;
857 }
858 
860 {
861  QMutexLocker locker(&m_cacheLock);
862 
864  m_cachedMgt = mgt;
865 }
866 
868 {
869  QMutexLocker locker(&m_cacheLock);
870 
872  m_cachedTvcts[pid] = tvct;
873 }
874 
876 {
877  QMutexLocker locker(&m_cacheLock);
878 
880  m_cachedCvcts[pid] = cvct;
881 }
882 
884 {
885  if (!psip)
886  return false;
887 
888  QMutexLocker locker(&m_cacheLock);
889  if (m_cachedRefCnt[psip] > 0)
890  {
891  m_cachedSlatedForDeletion[psip] = 1;
892  return false;
893  }
894  if (TableID::MGT == psip->TableID())
895  {
896  if (psip == m_cachedMgt)
897  m_cachedMgt = nullptr;
898  delete psip;
899  }
900  else if ((TableID::TVCT == psip->TableID()) &&
901  m_cachedTvcts[psip->tsheader()->PID()])
902  {
903  m_cachedTvcts[psip->tsheader()->PID()] = nullptr;
904  delete psip;
905  }
906  else if ((TableID::CVCT == psip->TableID()) &&
907  m_cachedCvcts[psip->tsheader()->PID()])
908  {
909  m_cachedCvcts[psip->tsheader()->PID()] = nullptr;
910  delete psip;
911  }
912  else
913  {
915  }
916  psip_refcnt_map_t::iterator it;
917  it = m_cachedSlatedForDeletion.find(psip);
918  if (it != m_cachedSlatedForDeletion.end())
919  m_cachedSlatedForDeletion.erase(it);
920 
921  return true;
922 }
923 
925 {
926  for (auto & tvct : tvcts)
927  ReturnCachedTable(tvct);
928  tvcts.clear();
929 }
930 
932 {
933  for (auto & cvct : cvcts)
934  ReturnCachedTable(cvct);
935  cvcts.clear();
936 }
937 
939 {
940  QMutexLocker locker(&m_listenerLock);
941 
942  if (std::any_of(m_atscMainListeners.cbegin(), m_atscMainListeners.cend(),
943  [val](auto & listener){ return val == listener; } ))
944  return;
945  m_atscMainListeners.push_back(val);
946 }
947 
949 {
950  QMutexLocker locker(&m_listenerLock);
951 
952  for (auto it = m_atscMainListeners.begin(); it != m_atscMainListeners.end(); ++it)
953  {
954  if (((void*)val) == ((void*)*it))
955  {
956  m_atscMainListeners.erase(it);
957  return;
958  }
959  }
960 }
961 
963 {
964  QMutexLocker locker(&m_listenerLock);
965 
966  if (std::any_of(m_scteMainlisteners.cbegin(), m_scteMainlisteners.cend(),
967  [val](auto & listener){ return val == listener; } ))
968  return;
969 
970  m_scteMainlisteners.push_back(val);
971 }
972 
974 {
975  QMutexLocker locker(&m_listenerLock);
976 
977  for (auto it = m_scteMainlisteners.begin(); it != m_scteMainlisteners.end(); ++it)
978  {
979  if (((void*)val) == ((void*)*it))
980  {
981  m_scteMainlisteners.erase(it);
982  return;
983  }
984  }
985 }
986 
988 {
989  QMutexLocker locker(&m_listenerLock);
990 
991  if (std::any_of(m_atscAuxListeners.cbegin(), m_atscAuxListeners.cend(),
992  [val](auto & listener){ return val == listener; } ))
993  return;
994 
995  m_atscAuxListeners.push_back(val);
996 }
997 
999 {
1000  QMutexLocker locker(&m_listenerLock);
1001 
1002  for (auto it = m_atscAuxListeners.begin(); it != m_atscAuxListeners.end(); ++it)
1003  {
1004  if (((void*)val) == ((void*)*it))
1005  {
1006  m_atscAuxListeners.erase(it);
1007  return;
1008  }
1009  }
1010 }
1011 
1013 {
1014  QMutexLocker locker(&m_listenerLock);
1015 
1016  if (std::any_of(m_atscEitListeners.cbegin(), m_atscEitListeners.cend(),
1017  [val](auto & listener){ return val == listener; } ))
1018  return;
1019 
1020  m_atscEitListeners.push_back(val);
1021 }
1022 
1024 {
1025  QMutexLocker locker(&m_listenerLock);
1026 
1027  for (auto it = m_atscEitListeners.begin(); it != m_atscEitListeners.end(); ++it)
1028  {
1029  if (((void*)val) == ((void*)*it))
1030  {
1031  m_atscEitListeners.erase(it);
1032  return;
1033  }
1034  }
1035 }
1036 
1038 {
1039  QMutexLocker locker(&m_listenerLock);
1040 
1041  if (std::any_of(m_atsc81EitListeners.cbegin(), m_atsc81EitListeners.cend(),
1042  [val](auto & listener){ return val == listener; } ))
1043  return;
1044 
1045  m_atsc81EitListeners.push_back(val);
1046 }
1047 
1049 {
1050  QMutexLocker locker(&m_listenerLock);
1051 
1052  for (auto it = m_atsc81EitListeners.begin(); it != m_atsc81EitListeners.end(); ++it)
1053  {
1054  if (((void*)val) == ((void*)*it))
1055  {
1056  m_atsc81EitListeners.erase(it);
1057  return;
1058  }
1059  }
1060 }
MPEGStreamData::m_cachedRefCnt
psip_refcnt_map_t m_cachedRefCnt
Definition: mpegstreamdata.h:359
MasterGuideTable::TableClass
int TableClass(uint i) const
Definition: atsctables.cpp:25
VirtualChannelTable
This table contains information about the channels transmitted on this multiplex.
Definition: atsctables.h:193
ATSCStreamData::m_atscAuxListeners
atsc_aux_listener_vec_t m_atscAuxListeners
Definition: atscstreamdata.h:139
TableID::SDTo
@ SDTo
Definition: mpegtables.h:277
ExtendedTextTable::SourceID
uint SourceID(void) const
Definition: atsctables.h:662
ATSCStreamData::AddATSCAuxListener
void AddATSCAuxListener(ATSCAuxStreamListener *val)
Definition: atscstreamdata.cpp:987
ATSCStreamData::VersionTVCT
int VersionTVCT(uint tsid) const
Definition: atscstreamdata.h:173
MPEGStreamData::m_cacheLock
QRecursiveMutex m_cacheLock
Definition: mpegstreamdata.h:355
ATSCMainStreamListener
Definition: streamlisteners.h:112
ATSCStreamData::ProcessVCT
void ProcessVCT(uint tsid, const VirtualChannelTable *vct)
Definition: atscstreamdata.cpp:572
ATSCStreamData::RemoveSCTEMainListener
void RemoveSCTEMainListener(SCTEMainStreamListener *val)
Definition: atscstreamdata.cpp:973
ATSCStreamData::~ATSCStreamData
~ATSCStreamData() override
Definition: atscstreamdata.cpp:44
PID::SCTE_PSIP_PID
@ SCTE_PSIP_PID
Definition: mpegtables.h:237
TableID::AETT
@ AETT
Definition: mpegtables.h:378
ATSCStreamData::DeleteCachedTable
bool DeleteCachedTable(const PSIPTable *psip) const override
Definition: atscstreamdata.cpp:883
EITHelper::AddETT
void AddETT(uint atsc_major, uint atsc_minor, const ExtendedTextTable *ett)
Definition: eithelper.cpp:206
cvct_vec_t
std::vector< const CableVirtualChannelTable * > cvct_vec_t
Definition: atscstreamdata.h:17
MPEGStreamData::SetDesiredProgram
void SetDesiredProgram(int p)
Definition: mpegstreamdata.cpp:65
NetworkTextTable
Definition: sctetables.h:255
DirectedChannelChangeTable
No one has had time to decode this table yet...
Definition: atsctables.h:761
ATSCStreamData::AddSCTEMainListener
void AddSCTEMainListener(SCTEMainStreamListener *val)
Definition: atscstreamdata.cpp:962
EITHelper::SetGPSOffset
void SetGPSOffset(uint gps_offset)
Definition: eithelper.h:108
TableID::DVBCA_83
@ DVBCA_83
Definition: mpegtables.h:299
TableID::DCCSCT
@ DCCSCT
Definition: mpegtables.h:375
TableStatusMap::SetSectionSeen
void SetSectionSeen(uint32_t key, int32_t version, uint32_t section, uint32_t last_section, uint32_t segment_last_section=0xffff)
Definition: tablestatus.cpp:65
ATSCStreamData::HasCachedAllCVCTs
bool HasCachedAllCVCTs(bool current=true) const
Definition: atscstreamdata.cpp:722
TableID::DCCT
@ DCCT
Definition: mpegtables.h:374
MPEGStreamData::DeleteCachedTable
virtual bool DeleteCachedTable(const PSIPTable *psip) const
Definition: mpegstreamdata.cpp:1538
RatingRegionTable
No one has had time to decode this table yet...
Definition: atsctables.h:745
ATSCStreamData::HasCachedMGT
bool HasCachedMGT(bool current=true) const
Definition: atscstreamdata.cpp:626
ATSCStreamData::m_cvctVersion
QMap< uint, int > m_cvctVersion
Definition: atscstreamdata.h:146
TableID::ETT
@ ETT
Definition: mpegtables.h:366
TableID::DVBCA_8a
@ DVBCA_8a
Definition: mpegtables.h:306
ATSCStreamData::HasChannel
bool HasChannel(uint major, uint minor) const
Definition: atscstreamdata.cpp:635
ATSCStreamData::m_mgtVersion
int m_mgtVersion
Definition: atscstreamdata.h:144
ATSCStreamData::GetCachedCVCTs
cvct_vec_t GetCachedCVCTs(bool current=true) const
Definition: atscstreamdata.cpp:840
tvct_vec_t
std::vector< const TerrestrialVirtualChannelTable * > tvct_vec_t
Definition: atscstreamdata.h:16
TableID::CVCT
@ CVCT
Definition: mpegtables.h:363
TableID::EIT
@ EIT
Definition: mpegtables.h:365
ATSCStreamData::m_tvctVersion
QMap< uint, int > m_tvctVersion
Definition: atscstreamdata.h:145
PESPacket::tsheader
const TSHeader * tsheader() const
Definition: pespacket.h:92
TSHeader::PID
unsigned int PID(void) const
Definition: tspacket.h:91
ATSCStreamData::m_sourceIdToAtscMajMin
QMap< uint, uint > m_sourceIdToAtscMajMin
Definition: atscstreamdata.h:133
ATSCStreamData::CacheCVCT
void CacheCVCT(uint pid, CableVirtualChannelTable *cvct)
Definition: atscstreamdata.cpp:875
MPEGStreamData::IsRedundant
virtual bool IsRedundant(uint pid, const PSIPTable &psip) const
Returns true if table already seen.
Definition: mpegstreamdata.cpp:641
ATSCStreamData::m_atscEttPids
atsc_ett_pid_map_t m_atscEttPids
Definition: atscstreamdata.h:131
SCTESystemTimeTable
This table contains the GPS time at the time of transmission.
Definition: sctetables.h:565
atscstreamdata.h
VirtualChannelTable::SourceID
uint SourceID(uint i) const
Definition: atsctables.h:304
ATSCStreamData::ProcessTVCT
void ProcessTVCT(uint tsid, const TerrestrialVirtualChannelTable *vct)
Definition: atscstreamdata.cpp:608
ProgramNameMessageTable
Definition: sctetables.h:642
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
uint_vec_t
std::vector< uint > uint_vec_t
Definition: mpegstreamdata.h:24
TableID::DVBCA_8c
@ DVBCA_8c
Definition: mpegtables.h:308
ATSCStreamData::HasCachedAnyCVCTs
bool HasCachedAnyCVCTs(bool current=true) const
Definition: atscstreamdata.cpp:763
DirectedChannelChangeSelectionCodeTable
No one has had time to decode this table yet...
Definition: atsctables.h:828
VirtualChannelTable::ProgramNumber
uint ProgramNumber(uint i) const
Definition: atsctables.h:271
ATSCStreamData::m_gpsUtcOffset
uint m_gpsUtcOffset
Definition: atscstreamdata.h:128
MasterGuideTable::TableCount
uint TableCount() const
Definition: atsctables.h:120
VirtualChannelTable::IsHiddenInGuide
bool IsHiddenInGuide(uint i) const
Definition: atsctables.h:292
MPEGStreamData::m_eitHelper
EITHelper * m_eitHelper
Definition: mpegstreamdata.h:319
ATSCStreamData::m_cachedMgt
MasterGuideTable * m_cachedMgt
Definition: atscstreamdata.h:151
ATSCStreamData::HandleTables
bool HandleTables(uint pid, const PSIPTable &psip) override
Process PSIP packets.
Definition: atscstreamdata.cpp:206
ATSCStreamData::AddATSCEITListener
void AddATSCEITListener(ATSCEITStreamListener *val)
Definition: atscstreamdata.cpp:1012
ATSCStreamData::HasCachedAllTVCTs
bool HasCachedAllTVCTs(bool current=true) const
Definition: atscstreamdata.cpp:691
PSIPTable::Section
uint Section(void) const
Definition: mpegtables.h:550
MythDate::current
QDateTime current(bool stripped)
Returns current Date and Time in UTC.
Definition: mythdate.cpp:14
MPEGStreamData::UpdateTimeOffset
void UpdateTimeOffset(uint64_t si_utc_time)
Definition: mpegstreamdata.cpp:838
VirtualChannelTable::IsHidden
bool IsHidden(uint i) const
Definition: atsctables.h:286
ATSCStreamData::ProcessMGT
void ProcessMGT(const MasterGuideTable *mgt)
Definition: atscstreamdata.cpp:543
ATSCStreamData::VersionRRT
int VersionRRT(uint region) const
Definition: atscstreamdata.h:189
ATSCStreamData::Reset
void Reset(void) override
Definition: atscstreamdata.h:37
sctetables.h
EITHelper::AddEIT
void AddEIT(uint atsc_major, uint atsc_minor, const EventInformationTable *eit)
Definition: eithelper.cpp:167
ATSCStreamData::SetVersionMGT
void SetVersionMGT(int version)
Definition: atscstreamdata.h:57
PSIPTable
A PSIP table is a variant of a PES packet containing an MPEG, ATSC or DVB table.
Definition: mpegtables.h:409
ATSCStreamData::GPSOffset
uint GPSOffset(void) const
Current UTC to GPS time offset in seconds.
Definition: atscstreamdata.h:47
ATSCStreamData::ReturnCachedTVCTTables
void ReturnCachedTVCTTables(tvct_vec_t &tvcts) const
Definition: atscstreamdata.cpp:924
TableClass::EIT
@ EIT
Definition: atsctables.h:68
VirtualChannelTable::MajorChannel
uint MajorChannel(uint i) const
Definition: atsctables.h:249
SystemTimeTable::GPSOffset
uint GPSOffset() const
Definition: atsctables.h:726
ATSCStreamData::m_atscEitPids
atsc_eit_pid_map_t m_atscEitPids
Definition: atscstreamdata.h:130
MPEGStreamData::ReturnCachedTable
virtual void ReturnCachedTable(const PSIPTable *psip) const
Definition: mpegstreamdata.cpp:1470
TableClass::ETTe
@ ETTe
Definition: atsctables.h:69
ATSCStreamData::m_atscEitListeners
atsc_eit_listener_vec_t m_atscEitListeners
Definition: atscstreamdata.h:140
minor
#define minor(X)
Definition: compat.h:78
TableID::TVCT
@ TVCT
Definition: mpegtables.h:362
ATSCStreamData::SetDesiredChannel
void SetDesiredChannel(int major, int minor)
Definition: atscstreamdata.cpp:57
ATSCStreamData::GetCachedTVCT
tvct_const_ptr_t GetCachedTVCT(uint pid, bool current=true) const
Definition: atscstreamdata.cpp:787
VirtualChannelTable::Find
int Find(int major, int minor) const
Definition: atsctables.cpp:484
MasterGuideTable::TablePID
uint TablePID(uint i) const
Definition: atsctables.h:132
ATSCStreamData::RemoveATSC81EITListener
void RemoveATSC81EITListener(ATSC81EITStreamListener *val)
Definition: atscstreamdata.cpp:1048
TableID::DVBCA_8d
@ DVBCA_8d
Definition: mpegtables.h:309
ATSC81EITStreamListener
Definition: streamlisteners.h:163
AggregateExtendedTextTable
SCTE 65 & ATSC/81 0xD7.
Definition: atsctables.h:949
ShortVirtualChannelTable
Definition: sctetables.h:496
ATSCStreamData::HasEITPIDChanges
bool HasEITPIDChanges(const uint_vec_t &in_use_pid) const override
Definition: atscstreamdata.cpp:492
ATSCStreamData::m_cachedCvcts
cvct_cache_t m_cachedCvcts
Definition: atscstreamdata.h:153
TableID::DVBCA_84
@ DVBCA_84
Definition: mpegtables.h:300
eithelper.h
MPEGStreamData::m_listenerLock
QRecursiveMutex m_listenerLock
Definition: mpegstreamdata.h:338
MPEGStreamData::HandleTables
virtual bool HandleTables(uint pid, const PSIPTable &psip)
Process PSIP packets.
Definition: mpegstreamdata.cpp:668
ATSCAuxStreamListener
Definition: streamlisteners.h:122
TableID::MGT
@ MGT
Definition: mpegtables.h:361
ATSCStreamData::VersionMGT
int VersionMGT() const
Definition: atscstreamdata.h:66
ATSCStreamData::HasCachedCVCT
bool HasCachedCVCT(uint pid, bool current=true) const
Definition: atscstreamdata.cpp:677
TableID::BAT
@ BAT
Definition: mpegtables.h:278
MPEGStreamData
Encapsulates data about MPEG stream and emits events for each table.
Definition: mpegstreamdata.h:85
TableID::NITo
@ NITo
Definition: mpegtables.h:276
TableID::DVBCA_86
@ DVBCA_86
Definition: mpegtables.h:302
ATSCStreamData::HasCachedTVCT
bool HasCachedTVCT(uint pid, bool current=true) const
Definition: atscstreamdata.cpp:663
TableID::NIT
@ NIT
Definition: mpegtables.h:270
ATSCStreamData::m_cachedTvcts
tvct_cache_t m_cachedTvcts
Definition: atscstreamdata.h:152
ATSCStreamData::ReturnCachedCVCTTables
void ReturnCachedCVCTTables(cvct_vec_t &cvcts) const
Definition: atscstreamdata.cpp:931
ProgramInformationMessageTable
Definition: sctetables.h:622
ATSCStreamData::ATSCStreamData
ATSCStreamData(int desiredMajorChannel, int desiredMinorChannel, int cardnum, bool cacheTables=false)
Initializes ATSCStreamData.
Definition: atscstreamdata.cpp:33
TableID::PIM
@ PIM
Definition: mpegtables.h:322
TableID::DVBCA_88
@ DVBCA_88
Definition: mpegtables.h:304
ATSCStreamData::m_desiredMinorChannel
int m_desiredMinorChannel
Definition: atscstreamdata.h:157
EventInformationTable
EventInformationTables contain program titles, start times, and channel information.
Definition: atsctables.h:525
uint
unsigned int uint
Definition: compat.h:81
TableID::AEIT
@ AEIT
Definition: mpegtables.h:377
ATSCStreamData::AddATSCMainListener
void AddATSCMainListener(ATSCMainStreamListener *val)
Definition: atscstreamdata.cpp:938
ATSCStreamData::m_desiredMajorChannel
int m_desiredMajorChannel
Definition: atscstreamdata.h:156
AggregateDataEventTable
Definition: sctetables.h:662
ATSCStreamData::RemoveATSCAuxListener
void RemoveATSCAuxListener(ATSCAuxStreamListener *val)
Definition: atscstreamdata.cpp:998
TableID::DVBCA_82
@ DVBCA_82
Definition: mpegtables.h:298
PSIPTable::LastSection
uint LastSection(void) const
Definition: mpegtables.h:553
ATSCStreamData::SetVersionRRT
void SetVersionRRT(uint region, int version)
Definition: atscstreamdata.h:63
PID::ATSC_PSIP_PID
@ ATSC_PSIP_PID
Definition: mpegtables.h:235
TableID::DVBCA_8b
@ DVBCA_8b
Definition: mpegtables.h:307
ATSCStreamData::GetCachedTVCTs
tvct_vec_t GetCachedTVCTs(bool current=true) const
Definition: atscstreamdata.cpp:821
ATSCStreamData::m_scteMainlisteners
scte_main_listener_vec_t m_scteMainlisteners
Definition: atscstreamdata.h:138
TableClass::TVCTc
@ TVCTc
Definition: atsctables.h:62
TableID::RRT
@ RRT
Definition: mpegtables.h:364
ATSCStreamData::CacheTVCT
void CacheTVCT(uint pid, TerrestrialVirtualChannelTable *tvct)
Definition: atscstreamdata.cpp:867
MPEGStreamData::IncrementRefCnt
void IncrementRefCnt(const PSIPTable *psip) const
Definition: mpegstreamdata.cpp:1532
EITHelper::GetGPSOffset
uint GetGPSOffset(void) const
Definition: eithelper.h:105
ATSCStreamData::RemoveATSCMainListener
void RemoveATSCMainListener(ATSCMainStreamListener *val)
Definition: atscstreamdata.cpp:948
TableID::STT
@ STT
Definition: mpegtables.h:367
MasterGuideTable
This table tells the decoder on which PIDs to find other tables, and their sizes and each table's cur...
Definition: atsctables.h:79
TableID::NTT
@ NTT
Definition: mpegtables.h:341
ATSCStreamData::CacheMGT
void CacheMGT(MasterGuideTable *mgt)
Definition: atscstreamdata.cpp:859
LOC
#define LOC
Definition: atscstreamdata.cpp:13
AggregateEventInformationTable
SCTE 65 & ATSC/81 0xD6.
Definition: atsctables.h:890
SCTEMainStreamListener
Definition: streamlisteners.h:144
ATSCStreamData::AddATSC81EITListener
void AddATSC81EITListener(ATSC81EITStreamListener *val)
Definition: atscstreamdata.cpp:1037
TableID::TOT
@ TOT
Definition: mpegtables.h:286
ExtendedTextTable::IsEventETM
bool IsEventETM(void) const
Definition: atsctables.h:661
PSIPTable::TableID
uint TableID(void) const
Definition: mpegtables.h:515
TableID::DVBCA_89
@ DVBCA_89
Definition: mpegtables.h:305
ATSCStreamData::IsRedundant
bool IsRedundant(uint pid, const PSIPTable &psip) const override
Returns true if table already seen.
Definition: atscstreamdata.cpp:158
PSIPTable::TableIDExtension
uint TableIDExtension(void) const
Definition: mpegtables.h:534
TableID::SDT
@ SDT
Definition: mpegtables.h:271
TerrestrialVirtualChannelTable
This table contains information about the terrestrial channels transmitted on this multiplex.
Definition: atsctables.h:350
TableID::TDT
@ TDT
Definition: mpegtables.h:273
TableID::DVBCA_8e
@ DVBCA_8e
Definition: mpegtables.h:310
MPEGStreamData::Reset
virtual void Reset(void)
Definition: mpegstreamdata.h:94
MPEGStreamData::m_cachedSlatedForDeletion
psip_refcnt_map_t m_cachedSlatedForDeletion
Definition: mpegstreamdata.h:360
TableID::PNM
@ PNM
Definition: mpegtables.h:323
ATSCStreamData::m_atsc81EitListeners
atsc81_eit_listener_vec_t m_atsc81EitListeners
Definition: atscstreamdata.h:141
ATSCStreamData::GetATSCMajorMinor
uint GetATSCMajorMinor(uint eit_sourceid) const
Definition: atscstreamdata.h:161
atsctables.h
CableVirtualChannelTable
This table contains information about the cable channels transmitted on this multiplex.
Definition: atsctables.h:419
MPEGStreamData::m_cacheTables
bool m_cacheTables
Definition: mpegstreamdata.h:354
ATSCEITStreamListener
Definition: streamlisteners.h:135
SystemTimeTable
This table contains the GPS time at the time of transmission.
Definition: atsctables.h:684
MPEGStreamData::AddListeningPID
virtual void AddListeningPID(uint pid, PIDPriority priority=kPIDPriorityNormal)
Definition: mpegstreamdata.h:120
ExtendedTextTable
ExtendedTextTable contain additional text not contained in EventInformationTables.
Definition: atsctables.h:626
SCTENetworkInformationTable
Definition: sctetables.h:191
ATSCStreamData::VersionCVCT
int VersionCVCT(uint tsid) const
Definition: atscstreamdata.h:181
TableID::STTscte
@ STTscte
Definition: mpegtables.h:343
ATSCStreamData::RemoveATSCEITListener
void RemoveATSCEITListener(ATSCEITStreamListener *val)
Definition: atscstreamdata.cpp:1023
ATSCStreamData::SetVersionCVCT
void SetVersionCVCT(uint tsid, int version)
Definition: atscstreamdata.h:61
TableStatusMap::IsSectionSeen
bool IsSectionSeen(uint32_t key, int32_t version, uint32_t section) const
Definition: tablestatus.cpp:73
ATSCStreamData::ProcessCVCT
void ProcessCVCT(uint tsid, const CableVirtualChannelTable *vct)
Definition: atscstreamdata.cpp:617
SystemTimeTable::UTCUnix
time_t UTCUnix(void) const
Definition: atsctables.h:722
ATSCStreamData::m_atscMainListeners
atsc_main_listener_vec_t m_atscMainListeners
Definition: atscstreamdata.h:137
TableID::ADET
@ ADET
Definition: mpegtables.h:348
MPEGStreamData::m_eitRate
float m_eitRate
Definition: mpegstreamdata.h:320
VirtualChannelTable::ModulationMode
uint ModulationMode(uint i) const
Definition: atsctables.h:259
MasterGuideTable::TableType
uint TableType(uint i) const
Definition: atsctables.h:124
ATSCStreamData::m_atscEitReset
bool m_atscEitReset
Definition: atscstreamdata.h:129
VirtualChannelTable::ChannelCount
uint ChannelCount() const
Definition: atsctables.h:225
ATSCStreamData::HasCachedAnyTVCTs
bool HasCachedAnyTVCTs(bool current=true) const
Definition: atscstreamdata.cpp:753
TableID::DVBCA_87
@ DVBCA_87
Definition: mpegtables.h:303
VirtualChannelTable::TransportStreamID
uint TransportStreamID() const
Definition: atsctables.h:222
nv_python_libs.bbciplayer.bbciplayer_api.version
string version
Definition: bbciplayer_api.py:77
TableID::DVBCA_81
@ DVBCA_81
Definition: mpegtables.h:297
MPEGStreamData::HasProgram
bool HasProgram(uint progNum) const
Definition: mpegstreamdata.cpp:1204
ATSCStreamData::GetCachedMGT
const MasterGuideTable * GetCachedMGT(bool current=true) const
Definition: atscstreamdata.cpp:773
TableID::DVBCA_85
@ DVBCA_85
Definition: mpegtables.h:301
PSIPTable::Version
uint Version(void) const
Definition: mpegtables.h:541
VirtualChannelTable::MinorChannel
uint MinorChannel(uint i) const
Definition: atsctables.h:254
TableID::NITscte
@ NITscte
Definition: mpegtables.h:340
find
static pid_list_t::iterator find(const PIDInfoMap &map, pid_list_t &list, pid_list_t::iterator begin, pid_list_t::iterator end, bool find_open)
Definition: dvbstreamhandler.cpp:363
EventInformationTable::SourceID
uint SourceID() const
Definition: atsctables.h:554
ATSCStreamData::GetCachedCVCT
cvct_const_ptr_t GetCachedCVCT(uint pid, bool current=true) const
Definition: atscstreamdata.cpp:804
TableID::SVCTscte
@ SVCTscte
Definition: mpegtables.h:342
ATSCStreamData::m_eitStatus
TableStatusMap m_eitStatus
Definition: atscstreamdata.h:148
TableClass::CVCTc
@ CVCTc
Definition: atsctables.h:64
ATSCStreamData::GetEITPIDChanges
bool GetEITPIDChanges(const uint_vec_t &cur_pids, uint_vec_t &add_pids, uint_vec_t &del_pids) const override
Definition: atscstreamdata.cpp:500
ATSCStreamData::SetVersionTVCT
void SetVersionTVCT(uint tsid, int version)
Definition: atscstreamdata.h:59