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 "tspacket.h"
6 #include "mythdate.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:190
DVBEITStreamListener::~DVBEITStreamListener
virtual ~DVBEITStreamListener()=default
PSStreamListener
Definition: streamlisteners.h:104
DVBOtherStreamListener::HandleBAT
virtual void HandleBAT(const BouquetAssociationTable *)=0
DVBOtherStreamListener::HandleSDTo
virtual void HandleSDTo(uint tsid, const ServiceDescriptionTable *)=0
DVBEventInformationTable
Definition: dvbtables.h:296
SCTEMainStreamListener::HandleNIT
virtual void HandleNIT(const SCTENetworkInformationTable *)=0
PremiereContentInformationTable
Definition: premieretables.h:11
ATSCMainStreamListener
Definition: streamlisteners.h:113
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:756
TimeDateTable
This table gives the current DVB stream time.
Definition: dvbtables.h:384
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:740
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:682
SCTEMainStreamListener::~SCTEMainStreamListener
virtual ~SCTEMainStreamListener()=default
ATSCAuxStreamListener::HandleDCCT
virtual void HandleDCCT(const DirectedChannelChangeTable *)=0
SpliceInformationTable
Definition: mpegtables.h:1017
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:53
TSPacketListener
Definition: streamlisteners.h:63
TSDataListener::AddData
virtual void AddData(const unsigned char *data, uint dataSize)=0
Callback function to add MPEG2 TS data.
MPEGSingleProgramStreamListener
Definition: streamlisteners.h:94
DirectedChannelChangeSelectionCodeTable
No one has had time to decode this table yet...
Definition: atsctables.h:773
TSPacketListener::ProcessTSPacket
virtual bool ProcessTSPacket(const TSPacket &tspacket)=0
ScanStreamData
Definition: scanstreamdata.h:14
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:399
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:164
AggregateExtendedTextTable
SCTE 65 & ATSC/81 0xD7.
Definition: atsctables.h:810
ShortVirtualChannelTable
Definition: sctetables.h:496
MPEGStreamListener
Definition: streamlisteners.h:82
TSPacketListenerAV
Definition: streamlisteners.h:72
TSPacket
Used to access the data of a Transport Stream packet.
Definition: tspacket.h:170
ATSCStreamData
Encapsulates data about ATSC stream and emits events for most tables.
Definition: atscstreamdata.h:29
ATSCAuxStreamListener
Definition: streamlisteners.h:123
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:86
ServiceDescriptionTable
This table tells the decoder on which PIDs to find A/V data.
Definition: dvbtables.h:111
DVBEITStreamListener::HandleEIT
virtual void HandleEIT(const PremiereContentInformationTable *)=0
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:521
uint
unsigned int uint
Definition: compat.h:140
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:605
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:28
MasterGuideTable
This table tells the decoder on which PIDs to find other tables, and their sizes and each table's cur...
Definition: atsctables.h:75
DVBMainStreamListener
Definition: streamlisteners.h:173
BouquetAssociationTable
Tells what channels can be found on each transponder for one bouquet (a bunch of channels from one pr...
Definition: dvbtables.h:190
AggregateEventInformationTable
SCTE 65 & ATSC/81 0xD6.
Definition: atsctables.h:790
ATSCAuxStreamListener::HandleDCCSCT
virtual void HandleDCCSCT(const DirectedChannelChangeSelectionCodeTable *)=0
SCTEMainStreamListener
Definition: streamlisteners.h:145
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:346
ConditionalAccessTable
The CAT is used to transmit additional ConditionalAccessDescriptor instances, in addition to the ones...
Definition: mpegtables.h:845
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:415
DVBOtherStreamListener
Definition: streamlisteners.h:183
ATSCEITStreamListener
Definition: streamlisteners.h:136
SystemTimeTable
This table contains the GPS time at the time of transmission.
Definition: atsctables.h:679
ExtendedTextTable
ExtendedTextTable contain additional text not contained in EventInformationTables.
Definition: atsctables.h:621
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:193
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:31