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 }
false
VERBOSE_PREAMBLE false
Definition: verbosedefs.h:85
TSHeader::PID
unsigned int PID(void) const
Definition: tspacket.h:74
TSStreamData::TSStreamData
TSStreamData(int cardnum)
Definition: tsstreamdata.cpp:14
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:23
TSHeader::Scrambled
bool Scrambled(void) const
Definition: tspacket.h:93
TSStreamData::ProcessTSPacket
bool ProcessTSPacket(const TSPacket &tspacket) override
Write out all packets without any filtering.
Definition: tsstreamdata.cpp:21
MPEGStreamData::IsEncryptionTestPID
bool IsEncryptionTestPID(uint pid) const
Definition: mpegstreamdata.cpp:1793
TSPacket
Used to access the data of a Transport Stream packet.
Definition: tspacket.h:170
MPEGStreamData
Encapsulates data about MPEG stream and emits events for each table.
Definition: mpegstreamdata.h:86
LOC
#define LOC
Definition: tsstreamdata.cpp:6
MPEGStreamData::m_tsWritingListeners
ts_listener_vec_t m_tsWritingListeners
Definition: mpegstreamdata.h:341
tsstreamdata.h
TSHeader::TransportError
bool TransportError(void) const
Definition: tspacket.h:67