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