MythTV  master
streamlisteners.h
Go to the documentation of this file.
1 // -*- Mode: c++ -*-
2 #ifndef STREAMLISTENERS_H
3 #define STREAMLISTENERS_H
4 
5 #include "libmythbase/mythdate.h"
6 #include "tspacket.h"
7 
8 class TSPacket;
9 class TSPacket_nonconst;
10 class PESPacket;
11 class PSIPTable;
12 
13 class MPEGStreamData;
14 class ATSCStreamData;
15 class SCTEStreamData;
16 class DVBStreamData;
17 class ScanStreamData;
18 
21 class ProgramMapTable;
23 
24 class SystemTimeTable;
25 class MasterGuideTable;
30 class ExtendedTextTable;
31 class RatingRegionTable;
36 
39 class NetworkTextTable;
44 
48 class TimeDateTable;
51 
53 {
54  public:
56  virtual void AddData(const unsigned char *data, uint dataSize) = 0;
57 
58  protected:
59  virtual ~TSDataListener() = default;
60 };
61 
63 {
64  public:
65  virtual bool ProcessTSPacket(const TSPacket& tspacket) = 0;
66 
67  protected:
68  virtual ~TSPacketListener() = default;
69 };
70 
72 {
73  public:
74  virtual bool ProcessVideoTSPacket(const TSPacket& tspacket) = 0;
75  virtual bool ProcessAudioTSPacket(const TSPacket& tspacket) = 0;
76 
77  protected:
78  virtual ~TSPacketListenerAV() = default;
79 };
80 
82 {
83  protected:
84  virtual ~MPEGStreamListener() = default;
85  public:
86  virtual void HandlePAT(const ProgramAssociationTable *pat) = 0;
87  virtual void HandleCAT(const ConditionalAccessTable *cat) = 0;
88  virtual void HandlePMT(uint program_num, const ProgramMapTable *pmt) = 0;
89  virtual void HandleEncryptionStatus(uint program_number, bool encrypted) = 0;
90  virtual void HandleSplice(const SpliceInformationTable */*sit*/) { }
91 };
92 
94 {
95  protected:
96  virtual ~MPEGSingleProgramStreamListener() = default;
97  public:
99  bool insert) = 0;
100  virtual void HandleSingleProgramPMT(ProgramMapTable*, bool insert) = 0;
101 };
102 
104 {
105  public:
106  virtual void FindPSKeyFrames(const uint8_t *buffer, uint len) = 0;
107 
108  protected:
109  virtual ~PSStreamListener() = default;
110 };
111 
113 {
114  protected:
115  virtual ~ATSCMainStreamListener() = default;
116  public:
117  virtual void HandleSTT(const SystemTimeTable*) = 0;
118  virtual void HandleMGT(const MasterGuideTable*) = 0;
119  virtual void HandleVCT(uint pid, const VirtualChannelTable*) = 0;
120 };
121 
123 {
124  protected:
125  virtual ~ATSCAuxStreamListener() = default;
126  public:
127  virtual void HandleTVCT(uint pid,const TerrestrialVirtualChannelTable*)=0;
128  virtual void HandleCVCT(uint pid, const CableVirtualChannelTable*) = 0;
129  virtual void HandleRRT(const RatingRegionTable*) = 0;
130  virtual void HandleDCCT(const DirectedChannelChangeTable*) = 0;
131  virtual void HandleDCCSCT(
133 };
134 
136 {
137  protected:
138  virtual ~ATSCEITStreamListener() = default;
139  public:
140  virtual void HandleEIT( uint pid, const EventInformationTable*) = 0;
141  virtual void HandleETT( uint pid, const ExtendedTextTable*) = 0;
142 };
143 
144 class SCTEMainStreamListener // only adds the things not in ATSC
145 {
146  protected:
147  virtual ~SCTEMainStreamListener() = default;
148  public:
149  // SCTE 65
150  virtual void HandleNIT(const SCTENetworkInformationTable*) = 0;
151  virtual void HandleSTT(const SCTESystemTimeTable*) = 0;
152  virtual void HandleNTT(const NetworkTextTable*) = 0;
153  virtual void HandleSVCT(const ShortVirtualChannelTable*) = 0;
154 
155  // SCTE 57
156  virtual void HandlePIM(const ProgramInformationMessageTable*) = 0;
157  virtual void HandlePNM(const ProgramNameMessageTable*) = 0;
158 
159  // SCTE 80
160  virtual void HandleADET(const AggregateDataEventTable*) = 0;
161 };
162 
163 class ATSC81EITStreamListener // ATSC A/81, & SCTE 65
164 {
165  protected:
166  virtual ~ATSC81EITStreamListener() = default;
167  public:
168  virtual void HandleAEIT(uint pid, const AggregateEventInformationTable*)=0;
169  virtual void HandleAETT(uint pid, const AggregateExtendedTextTable*) = 0;
170 };
171 
173 {
174  protected:
175  virtual ~DVBMainStreamListener() = default;
176  public:
177  virtual void HandleTDT(const TimeDateTable*) = 0;
178  virtual void HandleNIT(const NetworkInformationTable*) = 0;
179  virtual void HandleSDT(uint tsid, const ServiceDescriptionTable*) = 0;
180 };
181 
183 {
184  protected:
185  virtual ~DVBOtherStreamListener() = default;
186  public:
187  virtual void HandleNITo(const NetworkInformationTable*) = 0;
188  virtual void HandleSDTo(uint tsid, const ServiceDescriptionTable*) = 0;
189  virtual void HandleBAT(const BouquetAssociationTable*) = 0;
190 };
191 
193 {
194  protected:
195  virtual ~DVBEITStreamListener() = default;
196  public:
197  virtual void HandleEIT(const DVBEventInformationTable*) = 0;
198  virtual void HandleEIT(const PremiereContentInformationTable*) = 0;
199 };
200 
201 
202 #endif // STREAMLISTENERS_H
SCTEMainStreamListener::HandlePIM
virtual void HandlePIM(const ProgramInformationMessageTable *)=0
VirtualChannelTable
This table contains information about the channels transmitted on this multiplex.
Definition: atsctables.h:193
DVBEITStreamListener::~DVBEITStreamListener
virtual ~DVBEITStreamListener()=default
PSStreamListener
Definition: streamlisteners.h:103
DVBOtherStreamListener::HandleBAT
virtual void HandleBAT(const BouquetAssociationTable *)=0
DVBOtherStreamListener::HandleSDTo
virtual void HandleSDTo(uint tsid, const ServiceDescriptionTable *)=0
DVBEventInformationTable
Definition: dvbtables.h:293
SCTEMainStreamListener::HandleNIT
virtual void HandleNIT(const SCTENetworkInformationTable *)=0
PremiereContentInformationTable
Definition: premieretables.h:10
ATSCMainStreamListener
Definition: streamlisteners.h:112
MPEGStreamListener::HandleCAT
virtual void HandleCAT(const ConditionalAccessTable *cat)=0
NetworkTextTable
Definition: sctetables.h:255
DirectedChannelChangeTable
No one has had time to decode this table yet...
Definition: atsctables.h:761
TimeDateTable
This table gives the current DVB stream time.
Definition: dvbtables.h:381
SCTEMainStreamListener::HandleSTT
virtual void HandleSTT(const SCTESystemTimeTable *)=0
MPEGSingleProgramStreamListener::HandleSingleProgramPMT
virtual void HandleSingleProgramPMT(ProgramMapTable *, bool insert)=0
RatingRegionTable
No one has had time to decode this table yet...
Definition: atsctables.h:745
hardwareprofile.devicelist.cat
def cat(file_name)
Definition: devicelist.py:95
TSPacketListenerAV::ProcessAudioTSPacket
virtual bool ProcessAudioTSPacket(const TSPacket &tspacket)=0
ProgramMapTable
A PMT table maps a program described in the ProgramAssociationTable to various PID's which describe t...
Definition: mpegtables.h:694
SCTEMainStreamListener::~SCTEMainStreamListener
virtual ~SCTEMainStreamListener()=default
ATSCAuxStreamListener::HandleDCCT
virtual void HandleDCCT(const DirectedChannelChangeTable *)=0
SpliceInformationTable
Definition: mpegtables.h:1029
SCTESystemTimeTable
This table contains the GPS time at the time of transmission.
Definition: sctetables.h:565
SCTEMainStreamListener::HandleSVCT
virtual void HandleSVCT(const ShortVirtualChannelTable *)=0
ProgramNameMessageTable
Definition: sctetables.h:642
ATSCAuxStreamListener::HandleTVCT
virtual void HandleTVCT(uint pid, const TerrestrialVirtualChannelTable *)=0
TSPacketListener::~TSPacketListener
virtual ~TSPacketListener()=default
TSDataListener
Definition: streamlisteners.h:52
TSPacketListener
Definition: streamlisteners.h:62
TSDataListener::AddData
virtual void AddData(const unsigned char *data, uint dataSize)=0
Callback function to add MPEG2 TS data.
MPEGSingleProgramStreamListener
Definition: streamlisteners.h:93
DirectedChannelChangeSelectionCodeTable
No one has had time to decode this table yet...
Definition: atsctables.h:828
TSPacketListener::ProcessTSPacket
virtual bool ProcessTSPacket(const TSPacket &tspacket)=0
ScanStreamData
Definition: scanstreamdata.h:11
PSStreamListener::FindPSKeyFrames
virtual void FindPSKeyFrames(const uint8_t *buffer, uint len)=0
MPEGStreamListener::HandlePMT
virtual void HandlePMT(uint program_num, const ProgramMapTable *pmt)=0
MPEGSingleProgramStreamListener::~MPEGSingleProgramStreamListener
virtual ~MPEGSingleProgramStreamListener()=default
SCTEMainStreamListener::HandlePNM
virtual void HandlePNM(const ProgramNameMessageTable *)=0
ATSCEITStreamListener::HandleEIT
virtual void HandleEIT(uint pid, const EventInformationTable *)=0
PSIPTable
A PSIP table is a variant of a PES packet containing an MPEG, ATSC or DVB table.
Definition: mpegtables.h:409
TSPacketListenerAV::~TSPacketListenerAV
virtual ~TSPacketListenerAV()=default
ATSCAuxStreamListener::~ATSCAuxStreamListener
virtual ~ATSCAuxStreamListener()=default
mythdate.h
SCTEMainStreamListener::HandleNTT
virtual void HandleNTT(const NetworkTextTable *)=0
MPEGStreamListener::HandleEncryptionStatus
virtual void HandleEncryptionStatus(uint program_number, bool encrypted)=0
ATSC81EITStreamListener
Definition: streamlisteners.h:163
AggregateExtendedTextTable
SCTE 65 & ATSC/81 0xD7.
Definition: atsctables.h:949
ShortVirtualChannelTable
Definition: sctetables.h:496
MPEGStreamListener
Definition: streamlisteners.h:81
TSPacketListenerAV
Definition: streamlisteners.h:71
TSPacket
Used to access the data of a Transport Stream packet.
Definition: tspacket.h:205
ATSCStreamData
Encapsulates data about ATSC stream and emits events for most tables.
Definition: atscstreamdata.h:29
ATSCAuxStreamListener
Definition: streamlisteners.h:122
DVBMainStreamListener::HandleTDT
virtual void HandleTDT(const TimeDateTable *)=0
ATSCMainStreamListener::HandleVCT
virtual void HandleVCT(uint pid, const VirtualChannelTable *)=0
MPEGStreamData
Encapsulates data about MPEG stream and emits events for each table.
Definition: mpegstreamdata.h:85
ServiceDescriptionTable
This table tells the decoder on which PIDs to find A/V data.
Definition: dvbtables.h:108
ATSC81EITStreamListener::HandleAETT
virtual void HandleAETT(uint pid, const AggregateExtendedTextTable *)=0
DVBStreamData
Definition: dvbstreamdata.h:33
MPEGStreamListener::HandlePAT
virtual void HandlePAT(const ProgramAssociationTable *pat)=0
tspacket.h
ProgramInformationMessageTable
Definition: sctetables.h:622
ATSCMainStreamListener::HandleSTT
virtual void HandleSTT(const SystemTimeTable *)=0
ATSCAuxStreamListener::HandleCVCT
virtual void HandleCVCT(uint pid, const CableVirtualChannelTable *)=0
ATSC81EITStreamListener::~ATSC81EITStreamListener
virtual ~ATSC81EITStreamListener()=default
ATSCAuxStreamListener::HandleRRT
virtual void HandleRRT(const RatingRegionTable *)=0
EventInformationTable
EventInformationTables contain program titles, start times, and channel information.
Definition: atsctables.h:525
uint
unsigned int uint
Definition: compat.h:81
ATSCMainStreamListener::~ATSCMainStreamListener
virtual ~ATSCMainStreamListener()=default
AggregateDataEventTable
Definition: sctetables.h:662
TSDataListener::~TSDataListener
virtual ~TSDataListener()=default
ProgramAssociationTable
The Program Association Table lists all the programs in a stream, and is always found on PID 0.
Definition: mpegtables.h:617
PSStreamListener::~PSStreamListener
virtual ~PSStreamListener()=default
DVBMainStreamListener::~DVBMainStreamListener
virtual ~DVBMainStreamListener()=default
DVBOtherStreamListener::~DVBOtherStreamListener
virtual ~DVBOtherStreamListener()=default
DVBOtherStreamListener::HandleNITo
virtual void HandleNITo(const NetworkInformationTable *)=0
PESPacket
Allows us to transform TS packets to PES packets, which are used to hold multimedia streams and very ...
Definition: pespacket.h:27
MasterGuideTable
This table tells the decoder on which PIDs to find other tables, and their sizes and each table's cur...
Definition: atsctables.h:79
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:187
AggregateEventInformationTable
SCTE 65 & ATSC/81 0xD6.
Definition: atsctables.h:890
ATSCAuxStreamListener::HandleDCCSCT
virtual void HandleDCCSCT(const DirectedChannelChangeSelectionCodeTable *)=0
SCTEMainStreamListener
Definition: streamlisteners.h:144
ATSCEITStreamListener::~ATSCEITStreamListener
virtual ~ATSCEITStreamListener()=default
ATSCEITStreamListener::HandleETT
virtual void HandleETT(uint pid, const ExtendedTextTable *)=0
TerrestrialVirtualChannelTable
This table contains information about the terrestrial channels transmitted on this multiplex.
Definition: atsctables.h:350
ConditionalAccessTable
The CAT is used to transmit additional ConditionalAccessDescriptor instances, in addition to the ones...
Definition: mpegtables.h:857
MPEGStreamListener::HandleSplice
virtual void HandleSplice(const SpliceInformationTable *)
Definition: streamlisteners.h:90
DVBMainStreamListener::HandleSDT
virtual void HandleSDT(uint tsid, const ServiceDescriptionTable *)=0
MPEGStreamListener::~MPEGStreamListener
virtual ~MPEGStreamListener()=default
CableVirtualChannelTable
This table contains information about the cable channels transmitted on this multiplex.
Definition: atsctables.h:419
DVBOtherStreamListener
Definition: streamlisteners.h:182
ATSCEITStreamListener
Definition: streamlisteners.h:135
SystemTimeTable
This table contains the GPS time at the time of transmission.
Definition: atsctables.h:684
ExtendedTextTable
ExtendedTextTable contain additional text not contained in EventInformationTables.
Definition: atsctables.h:626
SCTENetworkInformationTable
Definition: sctetables.h:191
TSPacketListenerAV::ProcessVideoTSPacket
virtual bool ProcessVideoTSPacket(const TSPacket &tspacket)=0
DVBMainStreamListener::HandleNIT
virtual void HandleNIT(const NetworkInformationTable *)=0
DVBEITStreamListener
Definition: streamlisteners.h:192
SCTEMainStreamListener::HandleADET
virtual void HandleADET(const AggregateDataEventTable *)=0
DVBEITStreamListener::HandleEIT
virtual void HandleEIT(const DVBEventInformationTable *)=0
ATSCMainStreamListener::HandleMGT
virtual void HandleMGT(const MasterGuideTable *)=0
MPEGSingleProgramStreamListener::HandleSingleProgramPAT
virtual void HandleSingleProgramPAT(ProgramAssociationTable *, bool insert)=0
ATSC81EITStreamListener::HandleAEIT
virtual void HandleAEIT(uint pid, const AggregateEventInformationTable *)=0
NetworkInformationTable
This table tells the decoder on which PIDs to find other tables.
Definition: dvbtables.h:28