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*) = 0;
87  virtual void HandleCAT(const ConditionalAccessTable*) = 0;
88  virtual void HandlePMT(uint program_num, const ProgramMapTable*) = 0;
89  virtual void HandleEncryptionStatus(uint program_number, bool) = 0;
90  virtual void HandleSplice(const SpliceInformationTable*) { }
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_
Used to access the data of a Transport Stream packet.
Definition: tspacket.h:166
No one has had time to decode this table yet...
Definition: atsctables.h:781
virtual void HandleAEIT(uint pid, const AggregateEventInformationTable *)=0
virtual bool ProcessTSPacket(const TSPacket &tspacket)=0
virtual ~TSDataListener()=default
SCTE 65 & ATSC/81 0xD7.
Definition: atsctables.h:818
virtual void HandlePAT(const ProgramAssociationTable *)=0
This table tells the decoder on which PIDs to find A/V data.
Definition: dvbtables.h:101
virtual void HandleNTT(const NetworkTextTable *)=0
ExtendedTextTable contain additional text not contained in EventInformationTables.
Definition: atsctables.h:625
virtual void HandleNITo(const NetworkInformationTable *)=0
virtual void HandleSingleProgramPAT(ProgramAssociationTable *, bool insert)=0
virtual void HandleMGT(const MasterGuideTable *)=0
This table gives the current DVB stream time.
Definition: dvbtables.h:373
virtual void HandleCVCT(uint pid, const CableVirtualChannelTable *)=0
virtual ~ATSCMainStreamListener()=default
virtual ~PSStreamListener()=default
virtual void HandleETT(uint pid, const ExtendedTextTable *)=0
unsigned int uint
Definition: compat.h:140
virtual ~ATSCAuxStreamListener()=default
virtual void HandleADET(const AggregateDataEventTable *)=0
virtual ~DVBOtherStreamListener()=default
virtual void HandleSingleProgramPMT(ProgramMapTable *, bool insert)=0
virtual void HandleDCCT(const DirectedChannelChangeTable *)=0
virtual void AddData(const unsigned char *data, uint dataSize)=0
Callback function to add MPEG2 TS data.
virtual void HandleEIT(const DVBEventInformationTable *)=0
virtual void HandleAETT(uint pid, const AggregateExtendedTextTable *)=0
virtual void HandlePIM(const ProgramInformationMessageTable *)=0
virtual void HandleSTT(const SCTESystemTimeTable *)=0
virtual void HandleDCCSCT(const DirectedChannelChangeSelectionCodeTable *)=0
A PSIP table is a variant of a PES packet containing an MPEG, ATSC or DVB table.
Definition: mpegtables.h:371
virtual ~SCTEMainStreamListener()=default
virtual void HandleRRT(const RatingRegionTable *)=0
This table contains information about the cable channels transmitted on this multiplex.
Definition: atsctables.h:415
virtual ~DVBEITStreamListener()=default
virtual ~ATSCEITStreamListener()=default
No one has had time to decode this table yet...
Definition: atsctables.h:748
The CAT is used to transmit additional ConditionalAccessDescriptor instances, in addition to the ones...
Definition: mpegtables.h:818
No one has had time to decode this table yet...
Definition: atsctables.h:764
virtual ~TSPacketListener()=default
virtual ~MPEGSingleProgramStreamListener()=default
virtual bool ProcessAudioTSPacket(const TSPacket &tspacket)=0
virtual void HandleTVCT(uint pid, const TerrestrialVirtualChannelTable *)=0
virtual void HandleBAT(const BouquetAssociationTable *)=0
The Program Association Table lists all the programs in a stream, and is always found on PID 0.
Definition: mpegtables.h:579
virtual ~ATSC81EITStreamListener()=default
virtual void HandleSDTo(uint tsid, const ServiceDescriptionTable *)=0
EventInformationTables contain program titles, start times, and channel information.
Definition: atsctables.h:521
virtual ~TSPacketListenerAV()=default
virtual bool ProcessVideoTSPacket(const TSPacket &tspacket)=0
virtual ~DVBMainStreamListener()=default
virtual void HandlePNM(const ProgramNameMessageTable *)=0
virtual void HandleNIT(const SCTENetworkInformationTable *)=0
virtual ~MPEGStreamListener()=default
virtual void HandleSDT(uint tsid, const ServiceDescriptionTable *)=0
This table tells the decoder on which PIDs to find other tables, and their sizes and each table's cur...
Definition: atsctables.h:74
virtual void HandleTDT(const TimeDateTable *)=0
virtual void HandleVCT(uint pid, const VirtualChannelTable *)=0
virtual void HandlePMT(uint program_num, const ProgramMapTable *)=0
Allows us to transform TS packets to PES packets, which are used to hold multimedia streams and very ...
Definition: pespacket.h:25
This table contains information about the channels transmitted on this multiplex.
Definition: atsctables.h:189
virtual void HandleSTT(const SystemTimeTable *)=0
Tells what channels can be found on each transponder for one bouquet (a bunch of channels from one pr...
Definition: dvbtables.h:179
virtual void FindPSKeyFrames(const uint8_t *buffer, uint len)=0
virtual void HandleEIT(uint pid, const EventInformationTable *)=0
virtual void HandleSplice(const SpliceInformationTable *)
virtual void HandleEncryptionStatus(uint program_number, bool)=0
virtual void HandleSVCT(const ShortVirtualChannelTable *)=0
This table tells the decoder on which PIDs to find other tables.
Definition: dvbtables.h:21
This table contains the GPS time at the time of transmission.
Definition: atsctables.h:683
SCTE 65 & ATSC/81 0xD6.
Definition: atsctables.h:798
This table contains the GPS time at the time of transmission.
Definition: sctetables.h:568
This table contains information about the terrestrial channels transmitted on this multiplex.
Definition: atsctables.h:346
Encapsulates data about ATSC stream and emits events for most tables.
A PMT table maps a program described in the ProgramAssociationTable to various PID's which describe t...
Definition: mpegtables.h:656
virtual void HandleCAT(const ConditionalAccessTable *)=0
Encapsulates data about MPEG stream and emits events for each table.
virtual void HandleNIT(const NetworkInformationTable *)=0