MythTV  master
tsstreamdata.cpp
Go to the documentation of this file.
1 // -*- Mode: c++ -*-
2 // Copyright (c) 2015, Digital Nirvana
3 
4 #include "tsstreamdata.h"
5 
6 #define LOC QString("TSStream[%1](0x%2): ").arg(m_cardId).arg((intptr_t)this, QT_POINTER_SIZE, 16, QChar('0'))
7 
14 TSStreamData::TSStreamData(int cardnum) : MPEGStreamData(-1, cardnum, false)
15 {
16 }
17 
22 {
23  bool ok = !tspacket.TransportError();
24 
25  if (IsEncryptionTestPID(tspacket.PID()))
26  LOG(VB_GENERAL, LOG_DEBUG, LOC + "ProcessTSPacket: Encrypted.");
27 
28  if (!ok)
29  LOG(VB_GENERAL, LOG_DEBUG, LOC + "ProcessTSPacket: Transport Error.");
30 
31  if (tspacket.Scrambled())
32  LOG(VB_GENERAL, LOG_DEBUG, LOC + "ProcessTSPacket: Scrambled.");
33 
34  for (auto & listener : m_tsWritingListeners)
35  listener->ProcessTSPacket(tspacket);
36 
37  return true;
38 }
Used to access the data of a Transport Stream packet.
Definition: tspacket.h:166
bool ProcessTSPacket(const TSPacket &tspacket) override
Write out all packets without any filtering.
#define LOC
Definition: tsstreamdata.cpp:6
ts_listener_vec_t m_tsWritingListeners
bool IsEncryptionTestPID(uint pid) const
VERBOSE_PREAMBLE false
Definition: verbosedefs.h:85
bool TransportError(void) const
Definition: tspacket.h:64
unsigned int PID(void) const
Definition: tspacket.h:71
bool Scrambled(void) const
Definition: tspacket.h:90
TSStreamData(int cardnum)
Encapsulates data about MPEG stream and emits events for each table.
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:23