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
7
8#define LOC QString("TSStream[%1](0x%2): ").arg(m_cardId).arg((intptr_t)this, QT_POINTER_SIZE, 16, QChar('0'))
9
17{
18}
19
24{
25 bool ok = !tspacket.TransportError();
26
27 if (IsEncryptionTestPID(tspacket.PID()))
28 LOG(VB_GENERAL, LOG_DEBUG, LOC + "ProcessTSPacket: Encrypted.");
29
30 if (!ok)
31 LOG(VB_GENERAL, LOG_DEBUG, LOC + "ProcessTSPacket: Transport Error.");
32
33 if (tspacket.Scrambled())
34 LOG(VB_GENERAL, LOG_DEBUG, LOC + "ProcessTSPacket: Scrambled.");
35
36 for (auto & listener : m_tsWritingListeners)
37 listener->ProcessTSPacket(tspacket);
38
39 return true;
40}
Encapsulates data about MPEG stream and emits events for each table.
ts_listener_vec_t m_tsWritingListeners
bool IsEncryptionTestPID(uint pid) const
unsigned int PID(void) const
Definition: tspacket.h:93
bool TransportError(void) const
Definition: tspacket.h:86
bool Scrambled(void) const
Definition: tspacket.h:112
Used to access the data of a Transport Stream packet.
Definition: tspacket.h:208
bool ProcessTSPacket(const TSPacket &tspacket) override
Write out all packets without any filtering.
TSStreamData(int cardnum)
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
#define LOC
Definition: tsstreamdata.cpp:8
VERBOSE_PREAMBLE false
Definition: verbosedefs.h:89