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 #define 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 : qAsConst(m_cachedNit))
184  DeleteCachedTable(nit);
185  m_cachedNit.clear();
186 
187  for (const auto & cached : qAsConst(m_cachedSdts))
188  DeleteCachedTable(cached);
189  m_cachedSdts.clear();
190 
191  for (const auto & cached : qAsConst(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 
503  if (find(cur_pids.begin(), cur_pids.end(),
504  (uint) PID::FREESAT_EIT_PID) == cur_pids.end())
505  {
506  add_pids.push_back(PID::FREESAT_EIT_PID);
507  }
508 
510  find(cur_pids.begin(), cur_pids.end(),
511  (uint) PID::MCA_EIT_PID) == cur_pids.end())
512  {
513  add_pids.push_back(PID::MCA_EIT_PID);
514  }
515 
516  }
517  else
518  {
519  if (find(cur_pids.begin(), cur_pids.end(),
520  (uint) PID::DVB_EIT_PID) != cur_pids.end())
521  {
522  del_pids.push_back(PID::DVB_EIT_PID);
523  }
524 
525  if (m_dvbEitDishnetLong &&
526  find(cur_pids.begin(), cur_pids.end(),
527  (uint) PID::DVB_DNLONG_EIT_PID) != cur_pids.end())
528  {
529  del_pids.push_back(PID::DVB_DNLONG_EIT_PID);
530  }
531 
532  if (m_dvbEitDishnetLong &&
533  find(cur_pids.begin(), cur_pids.end(),
534  (uint) PID::DVB_BVLONG_EIT_PID) != cur_pids.end())
535  {
536  del_pids.push_back(PID::DVB_BVLONG_EIT_PID);
537  }
538 
539 #if 0
540  // OpenTV EIT pids
542  {
543  for (uint pid = PID::OTV_EIT_TIT_PID_START; pid <= PID::OTV_EIT_TIT_PID_END; pid++)
544  {
545  if (find(cur_pids.begin(), cur_pids.end(),
546  pid) != cur_pids.end())
547  del_pids.push_back(pid);
548  }
550  {
551  if (find(cur_pids.begin(), cur_pids.end(),
552  pid) != cur_pids.end())
553  del_pids.push_back(pid);
554  }
555  }
556 #endif
557 
559  find(cur_pids.begin(), cur_pids.end(),
560  (uint) PID::PREMIERE_EIT_DIREKT_PID) != cur_pids.end())
561  {
562  del_pids.push_back(PID::PREMIERE_EIT_DIREKT_PID);
563  }
564 
566  find(cur_pids.begin(), cur_pids.end(),
567  (uint) PID::PREMIERE_EIT_SPORT_PID) != cur_pids.end())
568  {
569  del_pids.push_back(PID::PREMIERE_EIT_SPORT_PID);
570  }
571 
572  if (find(cur_pids.begin(), cur_pids.end(),
573  (uint) PID::FREESAT_EIT_PID) != cur_pids.end())
574  {
575  del_pids.push_back(PID::FREESAT_EIT_PID);
576  }
577 
579  find(cur_pids.begin(), cur_pids.end(),
580  (uint) PID::MCA_EIT_PID) != cur_pids.end())
581  {
582  del_pids.push_back(PID::MCA_EIT_PID);
583  }
584  }
585 
586  return !add_pids.empty() || !del_pids.empty();
587 }
588 
590 {
591  return m_nitStatus.HasAllSections();
592 }
593 
595 {
596  return m_nitoStatus.HasAllSections();
597 }
598 
600 {
601  return m_sdtStatus.HasAllSections(tsid);
602 }
603 
605 {
606  return m_sdtoStatus.HasAllSections(tsid);
607 }
608 
610 {
611  return m_batStatus.HasAllSections(bid);
612 }
613 
615 {
616  QMutexLocker locker(&m_cacheLock);
617 
618  if (!current)
619  LOG(VB_GENERAL, LOG_WARNING, LOC +
620  "Currently we ignore \'current\' param");
621 
622  return !m_cachedNit.empty();
623 }
624 
626 {
627  QMutexLocker locker(&m_cacheLock);
628 
629  if (!current)
630  LOG(VB_GENERAL, LOG_WARNING, LOC +
631  "Currently we ignore \'current\' param");
632 
633  if (m_cachedNit.empty())
634  return false;
635 
636  uint last_section = (*m_cachedNit.begin())->LastSection();
637  if (!last_section)
638  return true;
639 
640  for (uint i = 0; i <= last_section; i++)
641  if (m_cachedNit.find(i) == m_cachedNit.end())
642  return false;
643 
644  return true;
645 }
646 
648 {
649  QMutexLocker locker(&m_cacheLock);
650 
651  if (!current)
652  LOG(VB_GENERAL, LOG_WARNING, LOC +
653  "Currently we ignore \'current\' param");
654 
655  for (uint i = 0; i <= 255; i++)
656  if (m_cachedBats.find((batid << 8) | i) != m_cachedBats.end())
657  return true;
658 
659  return false;
660 }
661 
663 {
664  QMutexLocker locker(&m_cacheLock);
665 
666  if (!current)
667  LOG(VB_GENERAL, LOG_WARNING, LOC +
668  "Currently we ignore \'current\' param");
669 
670  bat_cache_t::const_iterator it = m_cachedBats.constFind(batid << 8);
671  if (it == m_cachedBats.constEnd())
672  return false;
673 
674  uint last_section = (*it)->LastSection();
675  if (!last_section)
676  return true;
677 
678  for (uint i = 1; i <= last_section; i++)
679  if (m_cachedBats.constFind((batid << 8) | i) == m_cachedBats.constEnd())
680  return false;
681 
682  return true;
683 }
684 
685 bool DVBStreamData::HasCachedAnyBATs(bool /*current*/) const
686 {
687  QMutexLocker locker(&m_cacheLock);
688  return !m_cachedBats.empty();
689 }
690 
692 {
693  QMutexLocker locker(&m_cacheLock);
694 
695  if (m_cachedBats.empty())
696  return false;
697 
698  for (auto it = m_cachedBats.cbegin(); it != m_cachedBats.cend(); ++it)
699  {
700  if (!HasCachedAllBAT(it.key() >> 8, current))
701  return false;
702  }
703 
704  return true;
705 }
706 
708 {
709  QMutexLocker locker(&m_cacheLock);
710 
711  if (!current)
712  LOG(VB_GENERAL, LOG_WARNING, LOC +
713  "Currently we ignore \'current\' param");
714 
715  sdt_cache_t::const_iterator it = m_cachedSdts.constFind(tsid << 8);
716  if (it == m_cachedSdts.constEnd())
717  return false;
718 
719  uint last_section = (*it)->LastSection();
720  if (!last_section)
721  return true;
722 
723  for (uint i = 1; i <= last_section; i++)
724  if (m_cachedSdts.constFind((tsid << 8) | i) == m_cachedSdts.constEnd())
725  return false;
726 
727  return true;
728 }
729 
731 {
732  QMutexLocker locker(&m_cacheLock);
733 
734  if (!current)
735  LOG(VB_GENERAL, LOG_WARNING, LOC +
736  "Currently we ignore \'current\' param");
737 
738  for (uint i = 0; i <= 255; i++)
739  if (m_cachedSdts.find((tsid << 8) | i) != m_cachedSdts.end())
740  return true;
741 
742  return false;
743 }
744 
746 {
747  QMutexLocker locker(&m_cacheLock);
748 
749  if (m_cachedNit.empty())
750  return false;
751 
752  for (auto *nit : qAsConst(m_cachedNit))
753  {
754  for (uint i = 0; i < nit->TransportStreamCount(); i++)
755  {
756  if (HasCachedAllSDT(nit->TSID(i), current))
757  return true;
758  }
759  }
760 
761  return false;
762 }
763 
764 bool DVBStreamData::HasCachedAnySDTs(bool /*current*/) const
765 {
766  QMutexLocker locker(&m_cacheLock);
767  return !m_cachedSdts.empty();
768 }
769 
771 {
772  QMutexLocker locker(&m_cacheLock);
773 
774  if (m_cachedNit.empty())
775  return false;
776 
777  for (auto *nit : qAsConst(m_cachedNit))
778  {
779  if ((int)nit->TransportStreamCount() > m_cachedSdts.size())
780  return false;
781 
782  for (uint i = 0; i < nit->TransportStreamCount(); i++)
783  if (!HasCachedAllSDT(nit->TSID(i), current))
784  return false;
785  }
786 
787  return true;
788 }
789 
791  uint section_num, bool current) const
792 {
793  QMutexLocker locker(&m_cacheLock);
794 
795  if (!current)
796  LOG(VB_GENERAL, LOG_WARNING, LOC +
797  "Currently we ignore \'current\' param");
798 
799  nit_ptr_t nit = nullptr;
800 
801  nit_cache_t::const_iterator it = m_cachedNit.constFind(section_num);
802  if (it != m_cachedNit.constEnd())
803  IncrementRefCnt(nit = *it);
804 
805  return nit;
806 }
807 
809 {
810  QMutexLocker locker(&m_cacheLock);
811 
812  nit_vec_t nits;
813 
814  for (uint i = 0; i < 256; i++)
815  {
817  if (nit)
818  nits.push_back(nit);
819  }
820 
821  return nits;
822 }
823 
825  uint batid, uint section_num, bool current) const
826 {
827  QMutexLocker locker(&m_cacheLock);
828 
829  if (!current)
830  LOG(VB_GENERAL, LOG_WARNING, LOC +
831  "Currently we ignore \'current\' param");
832 
833  bat_ptr_t bat = nullptr;
834 
835  uint key = (batid << 8) | section_num;
836  bat_cache_t::const_iterator it = m_cachedBats.constFind(key);
837  if (it != m_cachedBats.constEnd())
838  IncrementRefCnt(bat = *it);
839 
840  return bat;
841 }
842 
844 {
845  QMutexLocker locker(&m_cacheLock);
846 
847  if (!current)
848  LOG(VB_GENERAL, LOG_WARNING, LOC +
849  "Currently we ignore \'current\' param");
850 
851  bat_vec_t bats;
852 
853  for (auto *bat : qAsConst(m_cachedBats))
854  {
855  IncrementRefCnt(bat);
856  bats.push_back(bat);
857  }
858 
859  return bats;
860 }
861 
863  uint tsid, uint section_num, bool current) const
864 {
865  QMutexLocker locker(&m_cacheLock);
866 
867  if (!current)
868  LOG(VB_GENERAL, LOG_WARNING, LOC +
869  "Currently we ignore \'current\' param");
870 
871  sdt_ptr_t sdt = nullptr;
872 
873  uint key = (tsid << 8) | section_num;
874  sdt_cache_t::const_iterator it = m_cachedSdts.constFind(key);
875  if (it != m_cachedSdts.constEnd())
876  IncrementRefCnt(sdt = *it);
877 
878  return sdt;
879 }
880 
882 {
883  QMutexLocker locker(&m_cacheLock);
884 
885  if (!current)
886  LOG(VB_GENERAL, LOG_WARNING, LOC +
887  "Currently we ignore \'current\' param");
888 
889  sdt_vec_t sdts;
890  sdt_const_ptr_t sdt = GetCachedSDT(tsid, 0);
891 
892  if (sdt)
893  {
894  uint lastSection = sdt->LastSection();
895 
896  sdts.push_back(sdt);
897 
898  for (uint section = 1; section <= lastSection; section++)
899  {
900  sdt = GetCachedSDT(tsid, section);
901 
902  if (sdt)
903  sdts.push_back(sdt);
904  }
905  }
906 
907  return sdts;
908 }
909 
911 {
912  QMutexLocker locker(&m_cacheLock);
913 
914  if (!current)
915  LOG(VB_GENERAL, LOG_WARNING, LOC +
916  "Currently we ignore \'current\' param");
917 
918  sdt_vec_t sdts;
919 
920  for (auto *sdt : qAsConst(m_cachedSdts))
921  {
922  IncrementRefCnt(sdt);
923  sdts.push_back(sdt);
924  }
925 
926  return sdts;
927 }
928 
930 {
931  for (auto & sdt : sdts)
932  ReturnCachedTable(sdt);
933  sdts.clear();
934 }
935 
937 {
938  if (!psip)
939  return false;
940 
941  uint tid = psip->TableIDExtension(); // For SDTs
942  uint bid = psip->TableIDExtension(); // For BATs
943 
944  QMutexLocker locker(&m_cacheLock);
945  if (m_cachedRefCnt[psip] > 0)
946  {
947  m_cachedSlatedForDeletion[psip] = 1;
948  return false;
949  }
950  if ((TableID::NIT == psip->TableID()) &&
951  m_cachedNit[psip->Section()])
952  {
953  m_cachedNit[psip->Section()] = nullptr;
954  delete psip;
955  }
956  else if ((TableID::SDT == psip->TableID()) &&
957  m_cachedSdts[tid << 8 | psip->Section()])
958  {
959  m_cachedSdts[tid << 8 | psip->Section()] = nullptr;
960  delete psip;
961  }
962  else if ((TableID::BAT == psip->TableID()) &&
963  m_cachedBats[bid << 8 | psip->Section()])
964  {
965  m_cachedBats[bid << 8 | psip->Section()] = nullptr;
966  delete psip;
967  }
968  else
969  {
971  }
972  psip_refcnt_map_t::iterator it;
973  it = m_cachedSlatedForDeletion.find(psip);
974  if (it != m_cachedSlatedForDeletion.end())
975  m_cachedSlatedForDeletion.erase(it);
976 
977  return true;
978 }
979 
981 {
982  QMutexLocker locker(&m_cacheLock);
983 
984  nit_cache_t::iterator it = m_cachedNit.find(nit->Section());
985  if (it != m_cachedNit.end())
986  DeleteCachedTable(*it);
987 
988  m_cachedNit[nit->Section()] = nit;
989 }
990 
992 {
993  uint key = (bat->BouquetID() << 8) | bat->Section();
994 
995  QMutexLocker locker(&m_cacheLock);
996 
997  bat_cache_t::iterator it = m_cachedBats.find(key);
998  if (it != m_cachedBats.end())
999  DeleteCachedTable(*it);
1000 
1001  m_cachedBats[key] = bat;
1002 }
1003 
1005 {
1006  uint key = (sdt->TSID() << 8) | sdt->Section();
1007 
1008  QMutexLocker locker(&m_cacheLock);
1009 
1010  sdt_cache_t::iterator it = m_cachedSdts.find(key);
1011  if (it != m_cachedSdts.end())
1012  DeleteCachedTable(*it);
1013 
1014  m_cachedSdts[key] = sdt;
1015 }
1016 
1018 {
1019  QMutexLocker locker(&m_listenerLock);
1020 
1021  if (std::any_of(m_dvbMainListeners.cbegin(), m_dvbMainListeners.cend(),
1022  [val](auto & listener){ return val == listener; } ))
1023  return;
1024 
1025  m_dvbMainListeners.push_back(val);
1026 }
1027 
1029 {
1030  QMutexLocker locker(&m_listenerLock);
1031 
1032  for (auto it = m_dvbMainListeners.begin(); it != m_dvbMainListeners.end(); ++it)
1033  {
1034  if (((void*)val) == ((void*)*it))
1035  {
1036  m_dvbMainListeners.erase(it);
1037  return;
1038  }
1039  }
1040 }
1041 
1043 {
1044  QMutexLocker locker(&m_listenerLock);
1045 
1046  if (std::any_of(m_dvbOtherListeners.cbegin(), m_dvbOtherListeners.cend(),
1047  [val](auto & listener){ return val == listener; } ))
1048  return;
1049 
1050  m_dvbOtherListeners.push_back(val);
1051 }
1052 
1054 {
1055  QMutexLocker locker(&m_listenerLock);
1056 
1057  for (auto it = m_dvbOtherListeners.begin(); it != m_dvbOtherListeners.end(); ++it)
1058  {
1059  if (((void*)val) == ((void*)*it))
1060  {
1061  m_dvbOtherListeners.erase(it);
1062  return;
1063  }
1064  }
1065 }
1066 
1068 {
1069  QMutexLocker locker(&m_listenerLock);
1070 
1071  if (std::any_of(m_dvbEitListeners.cbegin(), m_dvbEitListeners.cend(),
1072  [val](auto & listener){ return val == listener; } ))
1073  return;
1074 
1075  m_dvbEitListeners.push_back(val);
1076 }
1077 
1079 {
1080  QMutexLocker locker(&m_listenerLock);
1081 
1082  for (auto it = m_dvbEitListeners.begin(); it != m_dvbEitListeners.end(); ++it)
1083  {
1084  if (((void*)val) == ((void*)*it))
1085  {
1086  m_dvbEitListeners.erase(it);
1087  return;
1088  }
1089  }
1090 }
MPEGStreamData::m_cachedRefCnt
psip_refcnt_map_t m_cachedRefCnt
Definition: mpegstreamdata.h:370
PID::PREMIERE_EIT_DIREKT_PID
@ PREMIERE_EIT_DIREKT_PID
Definition: mpegtables.h:231
DVBStreamData::RemoveDVBMainListener
void RemoveDVBMainListener(DVBMainStreamListener *val)
Definition: dvbstreamdata.cpp:1028
DVBStreamData::HasCachedAnySDT
bool HasCachedAnySDT(uint tsid, bool current=true) const
Definition: dvbstreamdata.cpp:730
DVBStreamData::GetCachedBATs
bat_vec_t GetCachedBATs(bool current=true) const
Definition: dvbstreamdata.cpp:843
DVBStreamData::GetCachedSDTs
sdt_vec_t GetCachedSDTs(bool current=true) const
Definition: dvbstreamdata.cpp:910
PID::PREMIERE_EIT_SPORT_PID
@ PREMIERE_EIT_SPORT_PID
Definition: mpegtables.h:232
TableID::TDT
@ TDT
Definition: mpegtables.h:273
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:295
MPEGStreamData::m_cacheLock
QRecursiveMutex m_cacheLock
Definition: mpegstreamdata.h:365
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:764
DVBStreamData::HasCachedAllSDTs
bool HasCachedAllSDTs(bool current=true) const
Definition: dvbstreamdata.cpp:770
DVBStreamData::HasCachedAllBATs
bool HasCachedAllBATs(bool current=true) const
Definition: dvbstreamdata.cpp:691
TableID::BAT
@ BAT
Definition: mpegtables.h:278
MPEGStreamData::SetDesiredProgram
void SetDesiredProgram(int p)
Definition: mpegstreamdata.cpp:66
mpegdescriptors.h
TimeDateTable
This table gives the current DVB stream time.
Definition: dvbtables.h:383
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
MPEGStreamData::DeleteCachedTable
virtual bool DeleteCachedTable(const PSIPTable *psip) const
Definition: mpegstreamdata.cpp:1526
DVBStreamData::m_dvbEitListeners
dvb_eit_listener_vec_t m_dvbEitListeners
Definition: dvbstreamdata.h:146
BouquetAssociationTable::BouquetID
uint BouquetID() const
Definition: dvbtables.h:205
DVBStreamData::m_batStatus
TableStatusMap m_batStatus
Definition: dvbstreamdata.h:156
MPEGStreamData::IsRedundant
virtual bool IsRedundant(uint pid, const PSIPTable &psip) const
Returns true if table already seen.
Definition: mpegstreamdata.cpp:647
DVBStreamData::m_eitStatus
TableStatusMap m_eitStatus
Definition: dvbstreamdata.h:151
bat_const_ptr_t
BouquetAssociationTable const * bat_const_ptr_t
Definition: dvbstreamdata.h:22
ServiceDescriptionTable::ServiceID
uint ServiceID(uint i) const
service_id 16 0.0+p
Definition: dvbtables.h:150
DVBStreamData::m_cachedSdts
sdt_cache_t m_cachedSdts
Definition: dvbstreamdata.h:160
DVBStreamData::Reset
void Reset(void) override
Definition: dvbstreamdata.h:40
PID::OTV_EIT_TIT_PID_START
@ OTV_EIT_TIT_PID_START
Definition: mpegtables.h:249
DVBStreamData::m_dvbHasEit
dvb_has_eit_t m_dvbHasEit
Tell us if the DVB service has EIT.
Definition: dvbstreamdata.h:141
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:23
uint_vec_t
std::vector< uint > uint_vec_t
Definition: mpegstreamdata.h:23
PID::OTV_EIT_SUP_PID_START
@ OTV_EIT_SUP_PID_START
Definition: mpegtables.h:251
TableID::SC_EITendo
@ SC_EITendo
Definition: mpegtables.h:283
DVBStreamData::HasAllNIToSections
bool HasAllNIToSections(void) const
Definition: dvbstreamdata.cpp:594
TableID::PREMIERE_CIT
@ PREMIERE_CIT
Definition: mpegtables.h:389
bat_vec_t
std::vector< const BouquetAssociationTable * > bat_vec_t
Definition: dvbstreamdata.h:23
PID::DVB_DNLONG_EIT_PID
@ DVB_DNLONG_EIT_PID
Definition: mpegtables.h:222
PID::DVB_TDT_PID
@ DVB_TDT_PID
Definition: mpegtables.h:219
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:318
DVBStreamData::DeleteCachedTable
bool DeleteCachedTable(const PSIPTable *psip) const override
Definition: dvbstreamdata.cpp:936
DVBStreamData::HasCachedAnyBAT
bool HasCachedAnyBAT(uint batid, bool current=true) const
Definition: dvbstreamdata.cpp:647
TableID::NIT
@ NIT
Definition: mpegtables.h:270
MCA_EIT_TSID
#define MCA_EIT_TSID
Definition: dvbstreamdata.cpp:13
DVBStreamData::m_sdtStatus
TableStatusMap m_sdtStatus
Definition: dvbstreamdata.h:150
PSIPTable::Section
uint Section(void) const
Definition: mpegtables.h:548
nit_const_ptr_t
NetworkInformationTable const * nit_const_ptr_t
Definition: dvbstreamdata.h:11
MythDate::current
QDateTime current(bool stripped)
Returns current Date and Time in UTC.
Definition: mythdate.cpp:10
DVBStreamData::HasAllBATSections
bool HasAllBATSections(uint bid) const
Definition: dvbstreamdata.cpp:609
MPEGStreamData::UpdateTimeOffset
void UpdateTimeOffset(uint64_t si_utc_time)
Definition: mpegstreamdata.cpp:844
PID::MCA_EIT_PID
@ MCA_EIT_PID
Definition: mpegtables.h:228
PID::FREESAT_EIT_PID
@ FREESAT_EIT_PID
Definition: mpegtables.h:241
DVBStreamData::m_sdtoStatus
TableStatusMap m_sdtoStatus
Definition: dvbstreamdata.h:155
DVBStreamData::GetCachedBAT
bat_const_ptr_t GetCachedBAT(uint batid, uint section_num, bool current=true) const
Definition: dvbstreamdata.cpp:824
EITHelper::AddEIT
void AddEIT(uint atsc_major, uint atsc_minor, const EventInformationTable *eit)
Definition: eithelper.cpp:151
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
TableID::SC_EITbego
@ SC_EITbego
Definition: mpegtables.h:282
DVBStreamData::AddDVBEITListener
void AddDVBEITListener(DVBEITStreamListener *val)
Definition: dvbstreamdata.cpp:1067
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_BVLONG_EIT_PID
@ DVB_BVLONG_EIT_PID
Definition: mpegtables.h:225
DVBStreamData::HasCachedAllSDT
bool HasCachedAllSDT(uint tsid, bool current=true) const
Definition: dvbstreamdata.cpp:707
MPEGStreamData::ReturnCachedTable
virtual void ReturnCachedTable(const PSIPTable *psip) const
Definition: mpegstreamdata.cpp:1458
OriginalNetworkID::PREMIERE
@ PREMIERE
Definition: mpegdescriptors.h:295
ServiceDescriptionTable::ServiceCount
uint ServiceCount() const
Number of services.
Definition: dvbtables.h:145
DVBStreamData::GetCachedNIT
nit_const_ptr_t GetCachedNIT(uint section_num, bool current=true) const
Definition: dvbstreamdata.cpp:790
TableID::SC_EITbeg
@ SC_EITbeg
Definition: mpegtables.h:280
sdt_vec_t
std::vector< const ServiceDescriptionTable * > sdt_vec_t
Definition: dvbstreamdata.h:17
MPEGStreamData::m_desiredProgram
int m_desiredProgram
Definition: mpegstreamdata.h:374
ServiceDescriptionTable::OriginalNetworkID
uint OriginalNetworkID() const
original_network_id 16 8.0
Definition: dvbtables.h:141
TableID::SC_EITend
@ SC_EITend
Definition: mpegtables.h:281
TableID::SDTo
@ SDTo
Definition: mpegtables.h:277
LOC
#define LOC
Definition: dvbstreamdata.cpp:15
sdt_const_ptr_t
ServiceDescriptionTable const * sdt_const_ptr_t
Definition: dvbstreamdata.h:16
DVBStreamData::CacheBAT
void CacheBAT(BouquetAssociationTable *bat)
Definition: dvbstreamdata.cpp:991
eithelper.h
DVBStreamData::HasCachedAllBAT
bool HasCachedAllBAT(uint batid, bool current=true) const
Definition: dvbstreamdata.cpp:662
TableID::SDT
@ SDT
Definition: mpegtables.h:271
DVBStreamData::CacheNIT
void CacheNIT(NetworkInformationTable *nit)
Definition: dvbstreamdata.cpp:980
MPEGStreamData::m_listenerLock
QRecursiveMutex m_listenerLock
Definition: mpegstreamdata.h:344
MPEGStreamData::HandleTables
virtual bool HandleTables(uint pid, const PSIPTable &psip)
Process PSIP packets.
Definition: mpegstreamdata.cpp:674
DVBStreamData::m_dvbMainListeners
dvb_main_listener_vec_t m_dvbMainListeners
Definition: dvbstreamdata.h:144
MPEGStreamData
Encapsulates data about MPEG stream and emits events for each table.
Definition: mpegstreamdata.h:84
DVBStreamData::HasCachedAllNIT
bool HasCachedAllNIT(bool current=true) const
Definition: dvbstreamdata.cpp:625
TimeDateTable::UTCUnix
time_t UTCUnix(void) const
Definition: dvbtables.h:403
ServiceDescriptionTable
This table tells the decoder on which PIDs to find A/V data.
Definition: dvbtables.h:110
OriginalNetworkID::MCA
@ MCA
Definition: mpegdescriptors.h:297
PID::DVB_SDT_PID
@ DVB_SDT_PID
Definition: mpegtables.h:216
DVBStreamData::RemoveDVBOtherListener
void RemoveDVBOtherListener(DVBOtherStreamListener *val)
Definition: dvbstreamdata.cpp:1053
DVBStreamData::GetCachedSDT
sdt_const_ptr_t GetCachedSDT(uint tsid, uint section_num, bool current=true) const
Definition: dvbstreamdata.cpp:862
dvbtables.h
mpegtables.h
DVBStreamData::HasAnyEIT
bool HasAnyEIT(void) const
Definition: dvbstreamdata.h:176
DVBStreamData::HasCachedAnyBATs
bool HasCachedAnyBATs(bool current=true) const
Definition: dvbstreamdata.cpp:685
uint
unsigned int uint
Definition: compat.h:144
PremiereContentInformationTable::ContentID
uint ContentID(void) const
Definition: premieretables.h:19
PSIPTable::LastSection
uint LastSection(void) const
Definition: mpegtables.h:551
PID::OTV_EIT_TIT_PID_END
@ OTV_EIT_TIT_PID_END
Definition: mpegtables.h:250
DVBStreamData::SetDesiredService
void SetDesiredService(uint netid, uint tsid, int serviceid)
Definition: dvbstreamdata.cpp:41
TableID::NITo
@ NITo
Definition: mpegtables.h:276
MPEGStreamData::IncrementRefCnt
void IncrementRefCnt(const PSIPTable *psip) const
Definition: mpegstreamdata.cpp:1520
dvbstreamdata.h
DVBStreamData::HasAllSDToSections
bool HasAllSDToSections(uint tsid) const
Definition: dvbstreamdata.cpp:604
DVBStreamData::m_citStatus
TableStatusMap m_citStatus
Definition: dvbstreamdata.h:152
TableID::DN_EITendo
@ DN_EITendo
Definition: mpegtables.h:315
DVBStreamData::m_dvbOtherListeners
dvb_other_listener_vec_t m_dvbOtherListeners
Definition: dvbstreamdata.h:145
DVBStreamData::CacheSDT
void CacheSDT(ServiceDescriptionTable *sdt)
Definition: dvbstreamdata.cpp:1004
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:189
PremiereContentInformationTable::IsEIT
static bool IsEIT(uint table_id)
Definition: premieretables.cpp:3
ServiceDescriptionTable::HasEITPresentFollowing
bool HasEITPresentFollowing(uint i) const
Definition: dvbtables.h:155
DVBStreamData::AddDVBMainListener
void AddDVBMainListener(DVBMainStreamListener *val)
Definition: dvbstreamdata.cpp:1017
DVBStreamData::HasAllNITSections
bool HasAllNITSections(void) const
Definition: dvbstreamdata.cpp:589
nit_vec_t
std::vector< const NetworkInformationTable * > nit_vec_t
Definition: dvbstreamdata.h:12
DVBStreamData::RemoveDVBEITListener
void RemoveDVBEITListener(DVBEITStreamListener *val)
Definition: dvbstreamdata.cpp:1078
PSIPTable::TableID
uint TableID(void) const
Definition: mpegtables.h:515
PSIPTable::TableIDExtension
uint TableIDExtension(void) const
Definition: mpegtables.h:532
DVBStreamData::m_desiredTsId
uint m_desiredTsId
Definition: dvbstreamdata.h:133
DVBStreamData::m_cachedNit
nit_cache_t m_cachedNit
Definition: dvbstreamdata.h:159
DVBStreamData::m_nitStatus
TableStatus m_nitStatus
Definition: dvbstreamdata.h:149
TableStatus::SetVersion
void SetVersion(int32_t version, uint32_t last_section)
Definition: tablestatus.cpp:21
MPEGStreamData::Reset
virtual void Reset(void)
Definition: mpegstreamdata.h:93
MPEGStreamData::m_cachedSlatedForDeletion
psip_refcnt_map_t m_cachedSlatedForDeletion
Definition: mpegstreamdata.h:371
DVBStreamData::HasCachedSDT
bool HasCachedSDT(bool current=true) const
Definition: dvbstreamdata.cpp:745
premieretables.h
DVBOtherStreamListener
Definition: streamlisteners.h:182
MPEGStreamData::m_cacheTables
bool m_cacheTables
Definition: mpegstreamdata.h:361
MPEGStreamData::AddListeningPID
virtual void AddListeningPID(uint pid, PIDPriority priority=kPIDPriorityNormal)
Definition: mpegstreamdata.h:119
DVBStreamData::m_nitoStatus
TableStatus m_nitoStatus
Definition: dvbstreamdata.h:154
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:599
ServiceDescriptionTable::HasEITSchedule
bool HasEITSchedule(uint i) const
Definition: dvbtables.h:153
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:161
DVBStreamData::HasCachedAnyNIT
bool HasCachedAnyNIT(bool current=true) const
Definition: dvbstreamdata.cpp:614
MPEGStreamData::m_eitRate
float m_eitRate
Definition: mpegstreamdata.h:319
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
DVBEITStreamListener
Definition: streamlisteners.h:192
TableID::PF_EIT
@ PF_EIT
Definition: mpegtables.h:272
PID::DVB_NIT_PID
@ DVB_NIT_PID
Definition: mpegtables.h:215
PID::DVB_EIT_PID
@ DVB_EIT_PID
Definition: mpegtables.h:217
DVBStreamData::ReturnCachedSDTTables
void ReturnCachedSDTTables(sdt_vec_t &sdts) const
Definition: dvbstreamdata.cpp:929
nv_python_libs.bbciplayer.bbciplayer_api.version
string version
Definition: bbciplayer_api.py:81
DVBStreamData::m_dvbEitDishnetLong
bool m_dvbEitDishnetLong
Decode DishNet's long-term DVB EIT.
Definition: dvbstreamdata.h:139
DVBStreamData::AddDVBOtherListener
void AddDVBOtherListener(DVBOtherStreamListener *val)
Definition: dvbstreamdata.cpp:1042
DVBStreamData::m_dvbRealNetworkId
int m_dvbRealNetworkId
Definition: dvbstreamdata.h:136
TableStatus::SetSectionSeen
void SetSectionSeen(int32_t version, uint32_t section, uint32_t last_section, uint32_t segment_last_section=0xffff)
Definition: tablestatus.cpp:30
PSIPTable::Version
uint Version(void) const
Definition: mpegtables.h:539
ServiceDescriptionTable::TSID
uint TSID() const
transport_stream_id 16 3.0 0x0000
Definition: dvbtables.h:138
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:356
PID::OTV_EIT_SUP_PID_END
@ OTV_EIT_SUP_PID_END
Definition: mpegtables.h:252
TableID::PF_EITo
@ PF_EITo
Definition: mpegtables.h:279
TableID::DN_EITbego
@ DN_EITbego
Definition: mpegtables.h:314
DVBStreamData::GetCachedSDTSections
sdt_vec_t GetCachedSDTSections(uint tsid, bool current=true) const
Definition: dvbstreamdata.cpp:881
NetworkInformationTable
This table tells the decoder on which PIDs to find other tables.
Definition: dvbtables.h:30
DVBStreamData::m_desiredNetId
uint m_desiredNetId
DVB table monitoring.
Definition: dvbstreamdata.h:132