MythTV  master
dvbstreamdata.cpp
Go to the documentation of this file.
1 // -*- Mode: c++ -*-
2 // Copyright (c) 2003-2004, Daniel Thor Kristjansson
3 #include <algorithm>
4 
5 #include <QSharedPointer>
6 #include "dvbstreamdata.h"
7 #include "dvbtables.h"
8 #include "mpegdescriptors.h"
9 #include "mpegtables.h"
10 #include "premieretables.h"
11 #include "eithelper.h"
12 
13 static constexpr uint8_t MCA_EIT_TSID { 136 };
14 
15 #define LOC QString("DVBStream[%1]: ").arg(m_cardId)
16 
17 // service_id is synonymous with the MPEG program number in the PMT.
18 DVBStreamData::DVBStreamData(uint desired_netid, uint desired_tsid,
19  int desired_program, int cardnum, bool cacheTables)
20  : MPEGStreamData(desired_program, cardnum, cacheTables),
21  m_desiredNetId(desired_netid), m_desiredTsId(desired_tsid)
22 {
23  m_nitStatus.SetVersion(-1,0);
28 }
29 
31 {
33 
34  QMutexLocker locker(&m_listenerLock);
35  m_dvbMainListeners.clear();
36  m_dvbOtherListeners.clear();
37  m_dvbEitListeners.clear();
38  m_dvbHasEit.clear();
39 }
40 
41 void DVBStreamData::SetDesiredService(uint netid, uint tsid, int serviceid)
42 {
43  bool reset = true;
44 
45  if (HasCachedAllSDT(tsid, true))
46  {
47  sdt_const_ptr_t first_sdt = GetCachedSDT(tsid, 0, true);
48  uint networkID = first_sdt->OriginalNetworkID();
49  if (networkID == netid)
50  {
51  reset = false;
52  m_desiredNetId = netid;
53  m_desiredTsId = tsid;
54  uint last_section = first_sdt->LastSection();
55  ProcessSDT(m_desiredTsId, first_sdt);
56  ReturnCachedTable(first_sdt);
57  for (uint i = 1; i <= last_section; ++i)
58  {
61  ReturnCachedTable(sdt);
62  }
63  SetDesiredProgram(serviceid);
64  }
65  }
66 
67  if (reset)
68  Reset(netid, tsid, serviceid);
69 }
70 
71 
76 bool DVBStreamData::IsRedundant(uint pid, const PSIPTable &psip) const
77 {
78  if (MPEGStreamData::IsRedundant(pid, psip))
79  return true;
80 
81  const int table_id = psip.TableID();
82  const int version = psip.Version();
83 
84  if (TableID::NIT == table_id)
85  {
86  return m_nitStatus.IsSectionSeen(version, psip.Section());
87  }
88 
89  if (TableID::SDT == table_id)
90  {
92  }
93 
94  if (TableID::TDT == table_id)
95  return false;
96 
97  if (TableID::BAT == table_id)
98  {
100  }
101 
102  bool is_eit = false;
103  if (PID::DVB_EIT_PID == pid || PID::FREESAT_EIT_PID == pid)
104  {
105  // Standard Now/Next Event Information Tables for this transport
106  is_eit |= TableID::PF_EIT == table_id;
107  // Standard Future Event Information Tables for this transport
108  is_eit |= (TableID::SC_EITbeg <= table_id &&
109  TableID::SC_EITend >= table_id);
110  }
111  if (is_eit)
112  {
113  uint service_id = psip.TableIDExtension();
114  uint key = (table_id<<16) | service_id;
115  return m_eitStatus.IsSectionSeen(key, version, psip.Section());
116  }
117 
119  // Other transport tables
120 
121  if (TableID::NITo == table_id)
122  {
123  return m_nitoStatus.IsSectionSeen(version, psip.Section());
124  }
125 
126  if (TableID::SDTo == table_id)
127  {
129  }
130 
131  if (PID::DVB_EIT_PID == pid || PID::FREESAT_EIT_PID == pid || PID::MCA_EIT_PID == pid)
132  {
133  // Standard Now/Next Event Information Tables for other transport
134  is_eit |= TableID::PF_EITo == table_id;
135  // Standard Future Event Information Tables for other transports
136  is_eit |= (TableID::SC_EITbego <= table_id &&
137  TableID::SC_EITendo >= table_id);
138  }
140  {
141  // Dish Network and Bev Long Term Future Event Information
142  // for all transports
143  is_eit |= (TableID::DN_EITbego <= table_id &&
144  TableID::DN_EITendo >= table_id);
145  }
146  if (is_eit)
147  {
148  uint service_id = psip.TableIDExtension();
149  uint key = (table_id<<16) | service_id;
150  return m_eitStatus.IsSectionSeen(key, version, psip.Section());
151  }
152 
153  if (((PID::PREMIERE_EIT_DIREKT_PID == pid) || (PID::PREMIERE_EIT_SPORT_PID == pid)) &&
154  TableID::PREMIERE_CIT == table_id)
155  {
156  uint content_id = PremiereContentInformationTable(psip).ContentID();
157  return m_citStatus.IsSectionSeen(content_id, version, psip.Section());
158  }
159 
160  return false;
161 }
162 
163 void DVBStreamData::Reset(uint desired_netid, uint desired_tsid,
164  int desired_serviceid)
165 {
166  MPEGStreamData::Reset(desired_serviceid);
167 
168  m_desiredNetId = desired_netid;
169  m_desiredTsId = desired_tsid;
170 
171  m_nitStatus.SetVersion(-1,0);
172  m_sdtStatus.clear();
173  m_eitStatus.clear();
174  m_citStatus.clear();
175 
176  m_nitoStatus.SetVersion(-1,0);
177  m_sdtoStatus.clear();
178  m_batStatus.clear();
179 
180  {
181  m_cacheLock.lock();
182 
183  for (const auto & nit : std::as_const(m_cachedNit))
184  DeleteCachedTable(nit);
185  m_cachedNit.clear();
186 
187  for (const auto & cached : std::as_const(m_cachedSdts))
188  DeleteCachedTable(cached);
189  m_cachedSdts.clear();
190 
191  for (const auto & cached : std::as_const(m_cachedBats))
192  DeleteCachedTable(cached);
193  m_cachedBats.clear();
194 
195  m_cacheLock.unlock();
196  }
200 }
201 
206 {
207  if (MPEGStreamData::HandleTables(pid, psip))
208  return true;
209 
210  // If the user specified a network ID and that network ID is a NITo then change that NITo into
211  // the NIT and change the NIT into a NITo. See ticket #7486.
212  if (m_dvbRealNetworkId > 0)
213  {
214  if ((psip.TableID() == TableID::NIT && psip.TableIDExtension() != (uint)m_dvbRealNetworkId) ||
215  (psip.TableID() == TableID::NITo && psip.TableIDExtension() == (uint)m_dvbRealNetworkId) )
216  {
217  auto *nit = new NetworkInformationTable(psip);
218  if (!nit->Mutate())
219  {
220  delete nit;
221  return true;
222  }
223  bool retval = HandleTables(pid, *nit);
224  delete nit;
225  return retval;
226  }
227  }
228 
229  if (IsRedundant(pid, psip))
230  return true;
231 
232  switch (psip.TableID())
233  {
234  case TableID::NIT:
235  {
236  m_nitStatus.SetSectionSeen(psip.Version(), psip.Section(),
237  psip.LastSection());
238 
239  if (m_cacheTables)
240  {
241  auto *nit = new NetworkInformationTable(psip);
242  CacheNIT(nit);
243  QMutexLocker locker(&m_listenerLock);
244  for (auto & listener : m_dvbMainListeners)
245  listener->HandleNIT(nit);
246  }
247  else
248  {
249  NetworkInformationTable nit(psip);
250  QMutexLocker locker(&m_listenerLock);
251  for (auto & listener : m_dvbMainListeners)
252  listener->HandleNIT(&nit);
253  }
254 
255  return true;
256  }
257  case TableID::SDT:
258  {
259  uint tsid = psip.TableIDExtension();
260  m_sdtStatus.SetSectionSeen(tsid, psip.Version(), psip.Section(),
261  psip.LastSection());
262 
263  if (m_cacheTables)
264  {
265  auto *sdt = new ServiceDescriptionTable(psip);
266  CacheSDT(sdt);
267  ProcessSDT(tsid, sdt);
268  }
269  else
270  {
271  ServiceDescriptionTable sdt(psip);
272  ProcessSDT(tsid, &sdt);
273  }
274 
275  return true;
276  }
277  case TableID::TDT:
278  {
279  TimeDateTable tdt(psip);
280 
281  UpdateTimeOffset(tdt.UTCUnix());
282 
283  QMutexLocker locker(&m_listenerLock);
284  for (auto & listener : m_dvbMainListeners)
285  listener->HandleTDT(&tdt);
286 
287  return true;
288  }
289  case TableID::NITo:
290  {
292  psip.LastSection());
293  NetworkInformationTable nit(psip);
294 
295  QMutexLocker locker(&m_listenerLock);
296  for (auto & listener : m_dvbOtherListeners)
297  listener->HandleNITo(&nit);
298 
299  return true;
300  }
301  case TableID::SDTo:
302  {
303  uint tsid = psip.TableIDExtension();
304  m_sdtoStatus.SetSectionSeen(tsid, psip.Version(), psip.Section(),
305  psip.LastSection());
306  ServiceDescriptionTable sdt(psip);
307 
308  // some providers send the SDT for the current multiplex as SDTo
309  // this routine changes the TableID to SDT and recalculates the CRC
310  if (m_desiredNetId == sdt.OriginalNetworkID() &&
311  m_desiredTsId == tsid)
312  {
313  auto *sdta = new ServiceDescriptionTable(psip);
314  if (!sdta->Mutate())
315  {
316  delete sdta;
317  return true;
318  }
319  if (m_cacheTables)
320  {
321  CacheSDT(sdta);
322  ProcessSDT(tsid, sdta);
323  }
324  else
325  {
326  ProcessSDT(tsid, sdta);
327  delete sdta;
328  }
329  return true;
330  }
331 
332  QMutexLocker locker(&m_listenerLock);
333  for (auto & listener : m_dvbOtherListeners)
334  listener->HandleSDTo(tsid, &sdt);
335 
336  return true;
337  }
338  case TableID::BAT:
339  {
340  uint bouquet_id = psip.TableIDExtension();
341  m_batStatus.SetSectionSeen(bouquet_id, psip.Version(), psip.Section(),
342  psip.LastSection());
343 
344  if (m_cacheTables)
345  {
346  auto *bat = new BouquetAssociationTable(psip);
347  CacheBAT(bat);
348  QMutexLocker locker(&m_listenerLock);
349  for (auto & listener : m_dvbOtherListeners)
350  listener->HandleBAT(bat);
351  }
352  else
353  {
354  BouquetAssociationTable bat(psip);
355  QMutexLocker locker(&m_listenerLock);
356  for (auto & listener : m_dvbOtherListeners)
357  listener->HandleBAT(&bat);
358  }
359 
360  return true;
361  }
362  }
363 
364  if ((PID::DVB_EIT_PID == pid || PID::DVB_DNLONG_EIT_PID == pid || PID::FREESAT_EIT_PID == pid ||
366  (PID::MCA_EIT_PID == pid)) || PID::DVB_BVLONG_EIT_PID == pid) &&
367 
369  {
370  QMutexLocker locker(&m_listenerLock);
371  if (m_dvbEitListeners.empty() && !m_eitHelper)
372  return true;
373 
374  uint service_id = psip.TableIDExtension();
375  uint key = (psip.TableID()<<16) | service_id;
376  m_eitStatus.SetSectionSeen(key, psip.Version(), psip.Section(),
377  psip.LastSection());
378 
379  DVBEventInformationTable eit(psip);
380  for (auto & listener : m_dvbEitListeners)
381  listener->HandleEIT(&eit);
382 
383  if (m_eitHelper)
384  m_eitHelper->AddEIT(&eit);
385 
386  return true;
387  }
388 
392  {
393  QMutexLocker locker(&m_listenerLock);
394  if (m_dvbEitListeners.empty() && !m_eitHelper)
395  return true;
396 
398  m_citStatus.SetSectionSeen(cit.ContentID(), psip.Version(), psip.Section(), psip.LastSection());
399 
400  for (auto & listener : m_dvbEitListeners)
401  listener->HandleEIT(&cit);
402 
403  if (m_eitHelper)
404  m_eitHelper->AddEIT(&cit);
405 
406  return true;
407  }
408 
409  return false;
410 }
411 
413 {
414  QMutexLocker locker(&m_listenerLock);
415 
416  for (uint i = 0; i < sdt->ServiceCount(); i++)
417  {
418  /*
419  * FIXME always signal EIT presence. We filter later. To many
420  * networks set these flags wrong.
421  * This allows the user to simply set useonairguide on a
422  * channel manually.
423  */
424 #if 0
425  if (sdt->HasEITSchedule(i) || sdt->HasEITPresentFollowing(i))
426 #endif
427  m_dvbHasEit[sdt->ServiceID(i)] = true;
428  }
429 
430  for (auto & listener : m_dvbMainListeners)
431  listener->HandleSDT(tsid, sdt);
432 }
433 
434 bool DVBStreamData::HasEITPIDChanges(const uint_vec_t &in_use_pids) const
435 {
436  QMutexLocker locker(&m_listenerLock);
437  bool want_eit = (m_eitRate >= 0.5F) && HasAnyEIT();
438  bool has_eit = !in_use_pids.empty();
439  return want_eit != has_eit;
440 }
441 
443  uint_vec_t &add_pids,
444  uint_vec_t &del_pids) const
445 {
446  QMutexLocker locker(&m_listenerLock);
447 
448  if ((m_eitRate >= 0.5F) && HasAnyEIT())
449  {
450  if (find(cur_pids.begin(), cur_pids.end(),
451  (uint) PID::DVB_EIT_PID) == cur_pids.end())
452  {
453  add_pids.push_back(PID::DVB_EIT_PID);
454  }
455 
456  if (m_dvbEitDishnetLong &&
457  find(cur_pids.begin(), cur_pids.end(),
458  (uint) PID::DVB_DNLONG_EIT_PID) == cur_pids.end())
459  {
460  add_pids.push_back(PID::DVB_DNLONG_EIT_PID);
461  }
462 
463  if (m_dvbEitDishnetLong &&
464  find(cur_pids.begin(), cur_pids.end(),
465  (uint) PID::DVB_BVLONG_EIT_PID) == cur_pids.end())
466  {
467  add_pids.push_back(PID::DVB_BVLONG_EIT_PID);
468  }
469 
470 #if 0
471  // OpenTV EIT pids
473  {
474  for (uint pid = PID::OTV_EIT_TIT_PID_START; pid <= PID::OTV_EIT_TIT_PID_END; pid++)
475  {
476  if (find(cur_pids.begin(), cur_pids.end(),
477  pid) == cur_pids.end())
478  add_pids.push_back(pid);
479  }
480  for (uint pid = PID::OTV_EIT_SUP_PID_START; pid <= PID::OTV_EIT_SUP_PID_END; pid++)
481  {
482  if (find(cur_pids.begin(), cur_pids.end(),
483  pid) == cur_pids.end())
484  add_pids.push_back(pid);
485  }
486  }
487 #endif
488 
490  find(cur_pids.begin(), cur_pids.end(),
491  (uint) PID::PREMIERE_EIT_DIREKT_PID) == cur_pids.end())
492  {
493  add_pids.push_back(PID::PREMIERE_EIT_DIREKT_PID);
494  }
495 
497  find(cur_pids.begin(), cur_pids.end(),
498  (uint) PID::PREMIERE_EIT_SPORT_PID) == cur_pids.end())
499  {
500  add_pids.push_back(PID::PREMIERE_EIT_SPORT_PID);
501  }
502 
504  find(cur_pids.begin(), cur_pids.end(),
505  (uint) PID::FREESAT_EIT_PID) == cur_pids.end())
506  {
507  add_pids.push_back(PID::FREESAT_EIT_PID);
508  }
509 
511  find(cur_pids.begin(), cur_pids.end(),
512  (uint) PID::MCA_EIT_PID) == cur_pids.end())
513  {
514  add_pids.push_back(PID::MCA_EIT_PID);
515  }
516 
517  }
518  else
519  {
520  if (find(cur_pids.begin(), cur_pids.end(),
521  (uint) PID::DVB_EIT_PID) != cur_pids.end())
522  {
523  del_pids.push_back(PID::DVB_EIT_PID);
524  }
525 
526  if (m_dvbEitDishnetLong &&
527  find(cur_pids.begin(), cur_pids.end(),
528  (uint) PID::DVB_DNLONG_EIT_PID) != cur_pids.end())
529  {
530  del_pids.push_back(PID::DVB_DNLONG_EIT_PID);
531  }
532 
533  if (m_dvbEitDishnetLong &&
534  find(cur_pids.begin(), cur_pids.end(),
535  (uint) PID::DVB_BVLONG_EIT_PID) != cur_pids.end())
536  {
537  del_pids.push_back(PID::DVB_BVLONG_EIT_PID);
538  }
539 
540 #if 0
541  // OpenTV EIT pids
543  {
544  for (uint pid = PID::OTV_EIT_TIT_PID_START; pid <= PID::OTV_EIT_TIT_PID_END; pid++)
545  {
546  if (find(cur_pids.begin(), cur_pids.end(),
547  pid) != cur_pids.end())
548  del_pids.push_back(pid);
549  }
551  {
552  if (find(cur_pids.begin(), cur_pids.end(),
553  pid) != cur_pids.end())
554  del_pids.push_back(pid);
555  }
556  }
557 #endif
558 
560  find(cur_pids.begin(), cur_pids.end(),
561  (uint) PID::PREMIERE_EIT_DIREKT_PID) != cur_pids.end())
562  {
563  del_pids.push_back(PID::PREMIERE_EIT_DIREKT_PID);
564  }
565 
567  find(cur_pids.begin(), cur_pids.end(),
568  (uint) PID::PREMIERE_EIT_SPORT_PID) != cur_pids.end())
569  {
570  del_pids.push_back(PID::PREMIERE_EIT_SPORT_PID);
571  }
572 
574  find(cur_pids.begin(), cur_pids.end(),
575  (uint) PID::FREESAT_EIT_PID) != cur_pids.end())
576  {
577  del_pids.push_back(PID::FREESAT_EIT_PID);
578  }
579 
581  find(cur_pids.begin(), cur_pids.end(),
582  (uint) PID::MCA_EIT_PID) != cur_pids.end())
583  {
584  del_pids.push_back(PID::MCA_EIT_PID);
585  }
586  }
587 
588  return !add_pids.empty() || !del_pids.empty();
589 }
590 
592 {
593  return m_nitStatus.HasAllSections();
594 }
595 
597 {
598  return m_nitoStatus.HasAllSections();
599 }
600 
602 {
603  return m_sdtStatus.HasAllSections(tsid);
604 }
605 
607 {
608  return m_sdtoStatus.HasAllSections(tsid);
609 }
610 
612 {
613  return m_batStatus.HasAllSections(bid);
614 }
615 
617 {
618  QMutexLocker locker(&m_cacheLock);
619 
620  if (!current)
621  LOG(VB_GENERAL, LOG_WARNING, LOC +
622  "Currently we ignore \'current\' param");
623 
624  return !m_cachedNit.empty();
625 }
626 
628 {
629  QMutexLocker locker(&m_cacheLock);
630 
631  if (!current)
632  LOG(VB_GENERAL, LOG_WARNING, LOC +
633  "Currently we ignore \'current\' param");
634 
635  if (m_cachedNit.empty())
636  return false;
637 
638  uint last_section = (*m_cachedNit.begin())->LastSection();
639  if (!last_section)
640  return true;
641 
642  for (uint i = 0; i <= last_section; i++)
643  if (m_cachedNit.find(i) == m_cachedNit.end())
644  return false;
645 
646  return true;
647 }
648 
650 {
651  QMutexLocker locker(&m_cacheLock);
652 
653  if (!current)
654  LOG(VB_GENERAL, LOG_WARNING, LOC +
655  "Currently we ignore \'current\' param");
656 
657  for (uint i = 0; i <= 255; i++)
658  if (m_cachedBats.find((batid << 8) | i) != m_cachedBats.end())
659  return true;
660 
661  return false;
662 }
663 
665 {
666  QMutexLocker locker(&m_cacheLock);
667 
668  if (!current)
669  LOG(VB_GENERAL, LOG_WARNING, LOC +
670  "Currently we ignore \'current\' param");
671 
672  bat_cache_t::const_iterator it = m_cachedBats.constFind(batid << 8);
673  if (it == m_cachedBats.constEnd())
674  return false;
675 
676  uint last_section = (*it)->LastSection();
677  if (!last_section)
678  return true;
679 
680  for (uint i = 1; i <= last_section; i++)
681  if (m_cachedBats.constFind((batid << 8) | i) == m_cachedBats.constEnd())
682  return false;
683 
684  return true;
685 }
686 
687 bool DVBStreamData::HasCachedAnyBATs(bool /*current*/) const
688 {
689  QMutexLocker locker(&m_cacheLock);
690  return !m_cachedBats.empty();
691 }
692 
694 {
695  QMutexLocker locker(&m_cacheLock);
696 
697  if (m_cachedBats.empty())
698  return false;
699 
700  for (auto it = m_cachedBats.cbegin(); it != m_cachedBats.cend(); ++it)
701  {
702  if (!HasCachedAllBAT(it.key() >> 8, current))
703  return false;
704  }
705 
706  return true;
707 }
708 
710 {
711  QMutexLocker locker(&m_cacheLock);
712 
713  if (!current)
714  LOG(VB_GENERAL, LOG_WARNING, LOC +
715  "Currently we ignore \'current\' param");
716 
717  sdt_cache_t::const_iterator it = m_cachedSdts.constFind(tsid << 8);
718  if (it == m_cachedSdts.constEnd())
719  return false;
720 
721  uint last_section = (*it)->LastSection();
722  if (!last_section)
723  return true;
724 
725  for (uint i = 1; i <= last_section; i++)
726  if (m_cachedSdts.constFind((tsid << 8) | i) == m_cachedSdts.constEnd())
727  return false;
728 
729  return true;
730 }
731 
733 {
734  QMutexLocker locker(&m_cacheLock);
735 
736  if (!current)
737  LOG(VB_GENERAL, LOG_WARNING, LOC +
738  "Currently we ignore \'current\' param");
739 
740  for (uint i = 0; i <= 255; i++)
741  if (m_cachedSdts.find((tsid << 8) | i) != m_cachedSdts.end())
742  return true;
743 
744  return false;
745 }
746 
748 {
749  QMutexLocker locker(&m_cacheLock);
750 
751  if (m_cachedNit.empty())
752  return false;
753 
754  for (auto *nit : std::as_const(m_cachedNit))
755  {
756  for (uint i = 0; i < nit->TransportStreamCount(); i++)
757  {
758  if (HasCachedAllSDT(nit->TSID(i), current))
759  return true;
760  }
761  }
762 
763  return false;
764 }
765 
766 bool DVBStreamData::HasCachedAnySDTs(bool /*current*/) const
767 {
768  QMutexLocker locker(&m_cacheLock);
769  return !m_cachedSdts.empty();
770 }
771 
773 {
774  QMutexLocker locker(&m_cacheLock);
775 
776  if (m_cachedNit.empty())
777  return false;
778 
779  for (auto *nit : std::as_const(m_cachedNit))
780  {
781  if ((int)nit->TransportStreamCount() > m_cachedSdts.size())
782  return false;
783 
784  for (uint i = 0; i < nit->TransportStreamCount(); i++)
785  if (!HasCachedAllSDT(nit->TSID(i), current))
786  return false;
787  }
788 
789  return true;
790 }
791 
793  uint section_num, bool current) const
794 {
795  QMutexLocker locker(&m_cacheLock);
796 
797  if (!current)
798  LOG(VB_GENERAL, LOG_WARNING, LOC +
799  "Currently we ignore \'current\' param");
800 
801  nit_ptr_t nit = nullptr;
802 
803  nit_cache_t::const_iterator it = m_cachedNit.constFind(section_num);
804  if (it != m_cachedNit.constEnd())
805  IncrementRefCnt(nit = *it);
806 
807  return nit;
808 }
809 
811 {
812  QMutexLocker locker(&m_cacheLock);
813 
814  nit_vec_t nits;
815 
816  for (uint i = 0; i < 256; i++)
817  {
819  if (nit)
820  nits.push_back(nit);
821  }
822 
823  return nits;
824 }
825 
827  uint batid, uint section_num, bool current) const
828 {
829  QMutexLocker locker(&m_cacheLock);
830 
831  if (!current)
832  LOG(VB_GENERAL, LOG_WARNING, LOC +
833  "Currently we ignore \'current\' param");
834 
835  bat_ptr_t bat = nullptr;
836 
837  uint key = (batid << 8) | section_num;
838  bat_cache_t::const_iterator it = m_cachedBats.constFind(key);
839  if (it != m_cachedBats.constEnd())
840  IncrementRefCnt(bat = *it);
841 
842  return bat;
843 }
844 
846 {
847  QMutexLocker locker(&m_cacheLock);
848 
849  if (!current)
850  LOG(VB_GENERAL, LOG_WARNING, LOC +
851  "Currently we ignore \'current\' param");
852 
853  bat_vec_t bats;
854 
855  for (auto *bat : std::as_const(m_cachedBats))
856  {
857  IncrementRefCnt(bat);
858  bats.push_back(bat);
859  }
860 
861  return bats;
862 }
863 
865  uint tsid, uint section_num, bool current) const
866 {
867  QMutexLocker locker(&m_cacheLock);
868 
869  if (!current)
870  LOG(VB_GENERAL, LOG_WARNING, LOC +
871  "Currently we ignore \'current\' param");
872 
873  sdt_ptr_t sdt = nullptr;
874 
875  uint key = (tsid << 8) | section_num;
876  sdt_cache_t::const_iterator it = m_cachedSdts.constFind(key);
877  if (it != m_cachedSdts.constEnd())
878  IncrementRefCnt(sdt = *it);
879 
880  return sdt;
881 }
882 
884 {
885  QMutexLocker locker(&m_cacheLock);
886 
887  if (!current)
888  LOG(VB_GENERAL, LOG_WARNING, LOC +
889  "Currently we ignore \'current\' param");
890 
891  sdt_vec_t sdts;
892  sdt_const_ptr_t sdt = GetCachedSDT(tsid, 0);
893 
894  if (sdt)
895  {
896  uint lastSection = sdt->LastSection();
897 
898  sdts.push_back(sdt);
899 
900  for (uint section = 1; section <= lastSection; section++)
901  {
902  sdt = GetCachedSDT(tsid, section);
903 
904  if (sdt)
905  sdts.push_back(sdt);
906  }
907  }
908 
909  return sdts;
910 }
911 
913 {
914  QMutexLocker locker(&m_cacheLock);
915 
916  if (!current)
917  LOG(VB_GENERAL, LOG_WARNING, LOC +
918  "Currently we ignore \'current\' param");
919 
920  sdt_vec_t sdts;
921 
922  for (auto *sdt : std::as_const(m_cachedSdts))
923  {
924  IncrementRefCnt(sdt);
925  sdts.push_back(sdt);
926  }
927 
928  return sdts;
929 }
930 
932 {
933  for (auto & sdt : sdts)
934  ReturnCachedTable(sdt);
935  sdts.clear();
936 }
937 
939 {
940  if (!psip)
941  return false;
942 
943  uint tid = psip->TableIDExtension(); // For SDTs
944  uint bid = psip->TableIDExtension(); // For BATs
945 
946  QMutexLocker locker(&m_cacheLock);
947  if (m_cachedRefCnt[psip] > 0)
948  {
949  m_cachedSlatedForDeletion[psip] = 1;
950  return false;
951  }
952  if ((TableID::NIT == psip->TableID()) &&
953  m_cachedNit[psip->Section()])
954  {
955  m_cachedNit[psip->Section()] = nullptr;
956  delete psip;
957  }
958  else if ((TableID::SDT == psip->TableID()) &&
959  m_cachedSdts[tid << 8 | psip->Section()])
960  {
961  m_cachedSdts[tid << 8 | psip->Section()] = nullptr;
962  delete psip;
963  }
964  else if ((TableID::BAT == psip->TableID()) &&
965  m_cachedBats[bid << 8 | psip->Section()])
966  {
967  m_cachedBats[bid << 8 | psip->Section()] = nullptr;
968  delete psip;
969  }
970  else
971  {
973  }
974  psip_refcnt_map_t::iterator it;
975  it = m_cachedSlatedForDeletion.find(psip);
976  if (it != m_cachedSlatedForDeletion.end())
977  m_cachedSlatedForDeletion.erase(it);
978 
979  return true;
980 }
981 
983 {
984  QMutexLocker locker(&m_cacheLock);
985 
986  nit_cache_t::iterator it = m_cachedNit.find(nit->Section());
987  if (it != m_cachedNit.end())
988  DeleteCachedTable(*it);
989 
990  m_cachedNit[nit->Section()] = nit;
991 }
992 
994 {
995  uint key = (bat->BouquetID() << 8) | bat->Section();
996 
997  QMutexLocker locker(&m_cacheLock);
998 
999  bat_cache_t::iterator it = m_cachedBats.find(key);
1000  if (it != m_cachedBats.end())
1001  DeleteCachedTable(*it);
1002 
1003  m_cachedBats[key] = bat;
1004 }
1005 
1007 {
1008  uint key = (sdt->TSID() << 8) | sdt->Section();
1009 
1010  QMutexLocker locker(&m_cacheLock);
1011 
1012  sdt_cache_t::iterator it = m_cachedSdts.find(key);
1013  if (it != m_cachedSdts.end())
1014  DeleteCachedTable(*it);
1015 
1016  m_cachedSdts[key] = sdt;
1017 }
1018 
1020 {
1021  QMutexLocker locker(&m_listenerLock);
1022 
1023  if (std::any_of(m_dvbMainListeners.cbegin(), m_dvbMainListeners.cend(),
1024  [val](auto & listener){ return val == listener; } ))
1025  return;
1026 
1027  m_dvbMainListeners.push_back(val);
1028 }
1029 
1031 {
1032  QMutexLocker locker(&m_listenerLock);
1033 
1034  for (auto it = m_dvbMainListeners.begin(); it != m_dvbMainListeners.end(); ++it)
1035  {
1036  if (((void*)val) == ((void*)*it))
1037  {
1038  m_dvbMainListeners.erase(it);
1039  return;
1040  }
1041  }
1042 }
1043 
1045 {
1046  QMutexLocker locker(&m_listenerLock);
1047 
1048  if (std::any_of(m_dvbOtherListeners.cbegin(), m_dvbOtherListeners.cend(),
1049  [val](auto & listener){ return val == listener; } ))
1050  return;
1051 
1052  m_dvbOtherListeners.push_back(val);
1053 }
1054 
1056 {
1057  QMutexLocker locker(&m_listenerLock);
1058 
1059  for (auto it = m_dvbOtherListeners.begin(); it != m_dvbOtherListeners.end(); ++it)
1060  {
1061  if (((void*)val) == ((void*)*it))
1062  {
1063  m_dvbOtherListeners.erase(it);
1064  return;
1065  }
1066  }
1067 }
1068 
1070 {
1071  QMutexLocker locker(&m_listenerLock);
1072 
1073  if (std::any_of(m_dvbEitListeners.cbegin(), m_dvbEitListeners.cend(),
1074  [val](auto & listener){ return val == listener; } ))
1075  return;
1076 
1077  m_dvbEitListeners.push_back(val);
1078 }
1079 
1081 {
1082  QMutexLocker locker(&m_listenerLock);
1083 
1084  for (auto it = m_dvbEitListeners.begin(); it != m_dvbEitListeners.end(); ++it)
1085  {
1086  if (((void*)val) == ((void*)*it))
1087  {
1088  m_dvbEitListeners.erase(it);
1089  return;
1090  }
1091  }
1092 }
MPEGStreamData::m_cachedRefCnt
psip_refcnt_map_t m_cachedRefCnt
Definition: mpegstreamdata.h:359
DVBStreamData::RemoveDVBMainListener
void RemoveDVBMainListener(DVBMainStreamListener *val)
Definition: dvbstreamdata.cpp:1030
PID::OTV_EIT_SUP_PID_START
@ OTV_EIT_SUP_PID_START
Definition: mpegtables.h:251
DVBStreamData::HasCachedAnySDT
bool HasCachedAnySDT(uint tsid, bool current=true) const
Definition: dvbstreamdata.cpp:732
TableID::SDTo
@ SDTo
Definition: mpegtables.h:277
DVBStreamData::GetCachedBATs
bat_vec_t GetCachedBATs(bool current=true) const
Definition: dvbstreamdata.cpp:845
DVBStreamData::GetCachedSDTs
sdt_vec_t GetCachedSDTs(bool current=true) const
Definition: dvbstreamdata.cpp:912
DVBStreamData::DVBStreamData
DVBStreamData(uint desired_netid, uint desired_tsid, int desired_program, int cardnum, bool cacheTables=false)
Definition: dvbstreamdata.cpp:18
DVBEventInformationTable
Definition: dvbtables.h:293
MPEGStreamData::m_cacheLock
QRecursiveMutex m_cacheLock
Definition: mpegstreamdata.h:355
DVBStreamData::IsRedundant
bool IsRedundant(uint pid, const PSIPTable &psip) const override
Returns true if table already seen.
Definition: dvbstreamdata.cpp:76
PremiereContentInformationTable
Definition: premieretables.h:10
DVBStreamData::HasCachedAnySDTs
bool HasCachedAnySDTs(bool current=true) const
Definition: dvbstreamdata.cpp:766
DVBStreamData::HasCachedAllSDTs
bool HasCachedAllSDTs(bool current=true) const
Definition: dvbstreamdata.cpp:772
PID::DVB_DNLONG_EIT_PID
@ DVB_DNLONG_EIT_PID
Definition: mpegtables.h:222
DVBStreamData::HasCachedAllBATs
bool HasCachedAllBATs(bool current=true) const
Definition: dvbstreamdata.cpp:693
MCA_EIT_TSID
static constexpr uint8_t MCA_EIT_TSID
Definition: dvbstreamdata.cpp:13
MPEGStreamData::SetDesiredProgram
void SetDesiredProgram(int p)
Definition: mpegstreamdata.cpp:65
mpegdescriptors.h
TimeDateTable
This table gives the current DVB stream time.
Definition: dvbtables.h:381
TableStatus::HasAllSections
bool HasAllSections() const
Definition: tablestatus.cpp:49
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
TableStatusMap::HasAllSections
bool HasAllSections(uint32_t key) const
Definition: tablestatus.cpp:81
PID::DVB_SDT_PID
@ DVB_SDT_PID
Definition: mpegtables.h:216
MPEGStreamData::DeleteCachedTable
virtual bool DeleteCachedTable(const PSIPTable *psip) const
Definition: mpegstreamdata.cpp:1538
DVBStreamData::m_dvbEitListeners
dvb_eit_listener_vec_t m_dvbEitListeners
Definition: dvbstreamdata.h:147
BouquetAssociationTable::BouquetID
uint BouquetID() const
Definition: dvbtables.h:203
DVBStreamData::m_batStatus
TableStatusMap m_batStatus
Definition: dvbstreamdata.h:157
MPEGStreamData::IsRedundant
virtual bool IsRedundant(uint pid, const PSIPTable &psip) const
Returns true if table already seen.
Definition: mpegstreamdata.cpp:641
DVBStreamData::m_eitStatus
TableStatusMap m_eitStatus
Definition: dvbstreamdata.h:152
PID::DVB_EIT_PID
@ DVB_EIT_PID
Definition: mpegtables.h:217
bat_const_ptr_t
BouquetAssociationTable const * bat_const_ptr_t
Definition: dvbstreamdata.h:23
ServiceDescriptionTable::ServiceID
uint ServiceID(uint i) const
service_id 16 0.0+p
Definition: dvbtables.h:148
DVBStreamData::m_cachedSdts
sdt_cache_t m_cachedSdts
Definition: dvbstreamdata.h:161
DVBStreamData::Reset
void Reset(void) override
Definition: dvbstreamdata.h:41
DVBStreamData::m_dvbHasEit
dvb_has_eit_t m_dvbHasEit
Tell us if the DVB service has EIT.
Definition: dvbstreamdata.h:142
OriginalNetworkID::MCA
@ MCA
Definition: mpegdescriptors.h:297
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
uint_vec_t
std::vector< uint > uint_vec_t
Definition: mpegstreamdata.h:24
TableID::SC_EITbego
@ SC_EITbego
Definition: mpegtables.h:282
DVBStreamData::HasAllNIToSections
bool HasAllNIToSections(void) const
Definition: dvbstreamdata.cpp:596
bat_vec_t
std::vector< const BouquetAssociationTable * > bat_vec_t
Definition: dvbstreamdata.h:24
DVBStreamData::HandleTables
bool HandleTables(uint pid, const PSIPTable &psip) override
Process PSIP packets.
Definition: dvbstreamdata.cpp:205
MPEGStreamData::m_eitHelper
EITHelper * m_eitHelper
Definition: mpegstreamdata.h:319
DVBStreamData::DeleteCachedTable
bool DeleteCachedTable(const PSIPTable *psip) const override
Definition: dvbstreamdata.cpp:938
DVBStreamData::HasCachedAnyBAT
bool HasCachedAnyBAT(uint batid, bool current=true) const
Definition: dvbstreamdata.cpp:649
DVBStreamData::m_sdtStatus
TableStatusMap m_sdtStatus
Definition: dvbstreamdata.h:151
PSIPTable::Section
uint Section(void) const
Definition: mpegtables.h:550
nit_const_ptr_t
NetworkInformationTable const * nit_const_ptr_t
Definition: dvbstreamdata.h:12
MythDate::current
QDateTime current(bool stripped)
Returns current Date and Time in UTC.
Definition: mythdate.cpp:14
DVBStreamData::HasAllBATSections
bool HasAllBATSections(uint bid) const
Definition: dvbstreamdata.cpp:611
MPEGStreamData::UpdateTimeOffset
void UpdateTimeOffset(uint64_t si_utc_time)
Definition: mpegstreamdata.cpp:838
DVBStreamData::m_sdtoStatus
TableStatusMap m_sdtoStatus
Definition: dvbstreamdata.h:156
DVBStreamData::GetCachedBAT
bat_const_ptr_t GetCachedBAT(uint batid, uint section_num, bool current=true) const
Definition: dvbstreamdata.cpp:826
EITHelper::AddEIT
void AddEIT(uint atsc_major, uint atsc_minor, const EventInformationTable *eit)
Definition: eithelper.cpp:167
TableStatus::IsSectionSeen
bool IsSectionSeen(int32_t version, uint32_t section) const
Definition: tablestatus.cpp:41
PSIPTable
A PSIP table is a variant of a PES packet containing an MPEG, ATSC or DVB table.
Definition: mpegtables.h:409
DVBStreamData::AddDVBEITListener
void AddDVBEITListener(DVBEITStreamListener *val)
Definition: dvbstreamdata.cpp:1069
DVBEventInformationTable::IsEIT
static bool IsEIT(uint table_id)
Definition: dvbtables.cpp:280
DVBStreamData::ProcessSDT
void ProcessSDT(uint tsid, const ServiceDescriptionTable *sdt)
Definition: dvbstreamdata.cpp:412
PID::DVB_TDT_PID
@ DVB_TDT_PID
Definition: mpegtables.h:219
DVBStreamData::HasCachedAllSDT
bool HasCachedAllSDT(uint tsid, bool current=true) const
Definition: dvbstreamdata.cpp:709
MPEGStreamData::ReturnCachedTable
virtual void ReturnCachedTable(const PSIPTable *psip) const
Definition: mpegstreamdata.cpp:1470
ServiceDescriptionTable::ServiceCount
uint ServiceCount() const
Number of services.
Definition: dvbtables.h:143
DVBStreamData::GetCachedNIT
nit_const_ptr_t GetCachedNIT(uint section_num, bool current=true) const
Definition: dvbstreamdata.cpp:792
sdt_vec_t
std::vector< const ServiceDescriptionTable * > sdt_vec_t
Definition: dvbstreamdata.h:18
OriginalNetworkID::SES2
@ SES2
Definition: mpegdescriptors.h:292
MPEGStreamData::m_desiredProgram
int m_desiredProgram
Definition: mpegstreamdata.h:363
ServiceDescriptionTable::OriginalNetworkID
uint OriginalNetworkID() const
original_network_id 16 8.0
Definition: dvbtables.h:139
LOC
#define LOC
Definition: dvbstreamdata.cpp:15
sdt_const_ptr_t
ServiceDescriptionTable const * sdt_const_ptr_t
Definition: dvbstreamdata.h:17
DVBStreamData::CacheBAT
void CacheBAT(BouquetAssociationTable *bat)
Definition: dvbstreamdata.cpp:993
eithelper.h
DVBStreamData::HasCachedAllBAT
bool HasCachedAllBAT(uint batid, bool current=true) const
Definition: dvbstreamdata.cpp:664
DVBStreamData::CacheNIT
void CacheNIT(NetworkInformationTable *nit)
Definition: dvbstreamdata.cpp:982
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
DVBStreamData::m_dvbMainListeners
dvb_main_listener_vec_t m_dvbMainListeners
Definition: dvbstreamdata.h:145
TableID::BAT
@ BAT
Definition: mpegtables.h:278
MPEGStreamData
Encapsulates data about MPEG stream and emits events for each table.
Definition: mpegstreamdata.h:85
DVBStreamData::HasCachedAllNIT
bool HasCachedAllNIT(bool current=true) const
Definition: dvbstreamdata.cpp:627
TableID::NITo
@ NITo
Definition: mpegtables.h:276
TimeDateTable::UTCUnix
time_t UTCUnix(void) const
Definition: dvbtables.h:401
ServiceDescriptionTable
This table tells the decoder on which PIDs to find A/V data.
Definition: dvbtables.h:108
TableID::DN_EITendo
@ DN_EITendo
Definition: mpegtables.h:315
TableID::NIT
@ NIT
Definition: mpegtables.h:270
DVBStreamData::RemoveDVBOtherListener
void RemoveDVBOtherListener(DVBOtherStreamListener *val)
Definition: dvbstreamdata.cpp:1055
PID::DVB_NIT_PID
@ DVB_NIT_PID
Definition: mpegtables.h:215
DVBStreamData::GetCachedSDT
sdt_const_ptr_t GetCachedSDT(uint tsid, uint section_num, bool current=true) const
Definition: dvbstreamdata.cpp:864
dvbtables.h
mpegtables.h
DVBStreamData::HasAnyEIT
bool HasAnyEIT(void) const
Definition: dvbstreamdata.h:177
TableID::PREMIERE_CIT
@ PREMIERE_CIT
Definition: mpegtables.h:389
DVBStreamData::HasCachedAnyBATs
bool HasCachedAnyBATs(bool current=true) const
Definition: dvbstreamdata.cpp:687
uint
unsigned int uint
Definition: compat.h:81
PremiereContentInformationTable::ContentID
uint ContentID(void) const
Definition: premieretables.h:19
PSIPTable::LastSection
uint LastSection(void) const
Definition: mpegtables.h:553
DVBStreamData::SetDesiredService
void SetDesiredService(uint netid, uint tsid, int serviceid)
Definition: dvbstreamdata.cpp:41
MPEGStreamData::IncrementRefCnt
void IncrementRefCnt(const PSIPTable *psip) const
Definition: mpegstreamdata.cpp:1532
dvbstreamdata.h
DVBStreamData::HasAllSDToSections
bool HasAllSDToSections(uint tsid) const
Definition: dvbstreamdata.cpp:606
DVBStreamData::m_citStatus
TableStatusMap m_citStatus
Definition: dvbstreamdata.h:153
TableID::PF_EIT
@ PF_EIT
Definition: mpegtables.h:272
DVBStreamData::m_dvbOtherListeners
dvb_other_listener_vec_t m_dvbOtherListeners
Definition: dvbstreamdata.h:146
DVBStreamData::CacheSDT
void CacheSDT(ServiceDescriptionTable *sdt)
Definition: dvbstreamdata.cpp:1006
DVBMainStreamListener
Definition: streamlisteners.h:172
BouquetAssociationTable
Tells what channels can be found on each transponder for one bouquet (a bunch of channels from one pr...
Definition: dvbtables.h:187
PremiereContentInformationTable::IsEIT
static bool IsEIT(uint table_id)
Definition: premieretables.cpp:3
ServiceDescriptionTable::HasEITPresentFollowing
bool HasEITPresentFollowing(uint i) const
Definition: dvbtables.h:153
DVBStreamData::AddDVBMainListener
void AddDVBMainListener(DVBMainStreamListener *val)
Definition: dvbstreamdata.cpp:1019
PID::OTV_EIT_TIT_PID_START
@ OTV_EIT_TIT_PID_START
Definition: mpegtables.h:249
DVBStreamData::HasAllNITSections
bool HasAllNITSections(void) const
Definition: dvbstreamdata.cpp:591
TableID::DN_EITbego
@ DN_EITbego
Definition: mpegtables.h:314
nit_vec_t
std::vector< const NetworkInformationTable * > nit_vec_t
Definition: dvbstreamdata.h:13
PID::PREMIERE_EIT_DIREKT_PID
@ PREMIERE_EIT_DIREKT_PID
Definition: mpegtables.h:231
DVBStreamData::RemoveDVBEITListener
void RemoveDVBEITListener(DVBEITStreamListener *val)
Definition: dvbstreamdata.cpp:1080
PSIPTable::TableID
uint TableID(void) const
Definition: mpegtables.h:515
PSIPTable::TableIDExtension
uint TableIDExtension(void) const
Definition: mpegtables.h:534
DVBStreamData::m_desiredTsId
uint m_desiredTsId
Definition: dvbstreamdata.h:134
TableID::SDT
@ SDT
Definition: mpegtables.h:271
DVBStreamData::m_cachedNit
nit_cache_t m_cachedNit
Definition: dvbstreamdata.h:160
DVBStreamData::m_nitStatus
TableStatus m_nitStatus
Definition: dvbstreamdata.h:150
TableID::PF_EITo
@ PF_EITo
Definition: mpegtables.h:279
TableID::TDT
@ TDT
Definition: mpegtables.h:273
TableStatus::SetVersion
void SetVersion(int32_t version, uint32_t last_section)
Definition: tablestatus.cpp:21
MPEGStreamData::Reset
virtual void Reset(void)
Definition: mpegstreamdata.h:94
MPEGStreamData::m_cachedSlatedForDeletion
psip_refcnt_map_t m_cachedSlatedForDeletion
Definition: mpegstreamdata.h:360
DVBStreamData::HasCachedSDT
bool HasCachedSDT(bool current=true) const
Definition: dvbstreamdata.cpp:747
premieretables.h
OriginalNetworkID::PREMIERE
@ PREMIERE
Definition: mpegdescriptors.h:295
DVBOtherStreamListener
Definition: streamlisteners.h:182
MPEGStreamData::m_cacheTables
bool m_cacheTables
Definition: mpegstreamdata.h:354
PID::PREMIERE_EIT_SPORT_PID
@ PREMIERE_EIT_SPORT_PID
Definition: mpegtables.h:232
MPEGStreamData::AddListeningPID
virtual void AddListeningPID(uint pid, PIDPriority priority=kPIDPriorityNormal)
Definition: mpegstreamdata.h:120
DVBStreamData::m_nitoStatus
TableStatus m_nitoStatus
Definition: dvbstreamdata.h:155
DVBStreamData::HasEITPIDChanges
bool HasEITPIDChanges(const uint_vec_t &in_use_pids) const override
Definition: dvbstreamdata.cpp:434
DVBStreamData::HasAllSDTSections
bool HasAllSDTSections(uint tsid) const
Definition: dvbstreamdata.cpp:601
ServiceDescriptionTable::HasEITSchedule
bool HasEITSchedule(uint i) const
Definition: dvbtables.h:151
TableStatusMap::IsSectionSeen
bool IsSectionSeen(uint32_t key, int32_t version, uint32_t section) const
Definition: tablestatus.cpp:73
DVBStreamData::m_cachedBats
bat_cache_t m_cachedBats
Definition: dvbstreamdata.h:162
DVBStreamData::HasCachedAnyNIT
bool HasCachedAnyNIT(bool current=true) const
Definition: dvbstreamdata.cpp:616
MPEGStreamData::m_eitRate
float m_eitRate
Definition: mpegstreamdata.h:320
PID::DVB_BVLONG_EIT_PID
@ DVB_BVLONG_EIT_PID
Definition: mpegtables.h:225
TableID::SC_EITbeg
@ SC_EITbeg
Definition: mpegtables.h:280
PID::FREESAT_EIT_PID
@ FREESAT_EIT_PID
Definition: mpegtables.h:241
DVBStreamData::~DVBStreamData
~DVBStreamData() override
Definition: dvbstreamdata.cpp:30
DVBStreamData::GetEITPIDChanges
bool GetEITPIDChanges(const uint_vec_t &cur_pids, uint_vec_t &add_pids, uint_vec_t &del_pids) const override
Definition: dvbstreamdata.cpp:442
TableID::SC_EITendo
@ SC_EITendo
Definition: mpegtables.h:283
DVBEITStreamListener
Definition: streamlisteners.h:192
TableID::SC_EITend
@ SC_EITend
Definition: mpegtables.h:281
DVBStreamData::ReturnCachedSDTTables
void ReturnCachedSDTTables(sdt_vec_t &sdts) const
Definition: dvbstreamdata.cpp:931
nv_python_libs.bbciplayer.bbciplayer_api.version
string version
Definition: bbciplayer_api.py:77
DVBStreamData::m_dvbEitDishnetLong
bool m_dvbEitDishnetLong
Decode DishNet's long-term DVB EIT.
Definition: dvbstreamdata.h:140
DVBStreamData::AddDVBOtherListener
void AddDVBOtherListener(DVBOtherStreamListener *val)
Definition: dvbstreamdata.cpp:1044
DVBStreamData::m_dvbRealNetworkId
int m_dvbRealNetworkId
Definition: dvbstreamdata.h:137
TableStatus::SetSectionSeen
void SetSectionSeen(int32_t version, uint32_t section, uint32_t last_section, uint32_t segment_last_section=0xffff)
Definition: tablestatus.cpp:30
PID::OTV_EIT_SUP_PID_END
@ OTV_EIT_SUP_PID_END
Definition: mpegtables.h:252
PSIPTable::Version
uint Version(void) const
Definition: mpegtables.h:541
ServiceDescriptionTable::TSID
uint TSID() const
transport_stream_id 16 3.0 0x0000
Definition: dvbtables.h:136
PID::MCA_EIT_PID
@ MCA_EIT_PID
Definition: mpegtables.h:228
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
PID::OTV_EIT_TIT_PID_END
@ OTV_EIT_TIT_PID_END
Definition: mpegtables.h:250
DVBStreamData::GetCachedSDTSections
sdt_vec_t GetCachedSDTSections(uint tsid, bool current=true) const
Definition: dvbstreamdata.cpp:883
NetworkInformationTable
This table tells the decoder on which PIDs to find other tables.
Definition: dvbtables.h:28
DVBStreamData::m_desiredNetId
uint m_desiredNetId
DVB table monitoring.
Definition: dvbstreamdata.h:133