3 #ifndef _ATSC_TABLES_H_ 4 #define _ATSC_TABLES_H_ 122 return (_ptrs[i][0]<<8) | _ptrs[i][1];
125 QString TableClassString(
uint i)
const;
130 return ((_ptrs[i][2]<<8) | (_ptrs[i][3])) & 0x1fff;
136 return (_ptrs[i][4]) & 0x1f;
141 return ((_ptrs[i][5]<<24) | (_ptrs[i][6]<<16) |
142 (_ptrs[i][7]<<8) | (_ptrs[i][8]));
148 return ((_ptrs[i][9]<<8) | (_ptrs[i][10])) & 0xfff;
163 return ((_ptrs[TableCount()][0]<<8) |
164 (_ptrs[TableCount()][1])) & 0xfff;
169 return _ptrs[TableCount()]+2;
176 void Parse(
void)
const;
177 QString
toString(
void)
const override;
180 mutable vector<unsigned char*>
_ptrs;
227 if (i >= ChannelCount())
231 const unsigned short* ustr =
232 reinterpret_cast<const unsigned short*>(_ptrs[i]);
233 for (
int j=0; j<7; j++)
235 QChar c((ustr[j]<<8) | (ustr[j]>>8));
236 if (c != QChar(
'\0')) str.append(c);
238 return str.simplified();
247 return (((_ptrs[i][14])<<6)&0x3c0) | (_ptrs[i][15]>>2);
252 return (((_ptrs[i][15])<<8)&0x300) | _ptrs[i][16];
259 QString ModulationModeString(
uint i)
const;
264 return ((_ptrs[i][22]<<8) | _ptrs[i][23]);
269 return ((_ptrs[i][24]<<8) | _ptrs[i][25]);
274 return (_ptrs[i][26]>>6) & 0x03;
279 return bool(_ptrs[i][26] & 0x20);
284 return bool(_ptrs[i][26] & 0x10);
290 return bool(_ptrs[i][26] & 0
x2);
296 return _ptrs[i][27] & 0x3f;
298 QString ServiceTypeString(
uint i)
const;
302 return ((_ptrs[i][28]<<8) | _ptrs[i][29]);
308 return ((_ptrs[i][30]<<8) | _ptrs[i][31]) & 0x03ff;
320 uint i = ChannelCount();
321 return ((_ptrs[i][0]<<8) | _ptrs[i][1]) & 0x03ff;
326 return _ptrs[ChannelCount()]+2;
330 int Find(
int major,
int minor)
const;
331 QString GetExtendedChannelName(
uint idx)
const;
332 QString
toString(
void)
const override;
333 virtual QString ChannelString(
uint channel)
const = 0;
335 virtual QString ChannelStringXML(
uint indent_level,
uint channel)
const;
336 virtual QString XMLChannelValues(
uint indent_level,
uint channel)
const;
338 mutable vector<unsigned char*>
_ptrs;
478 if (SCTEIsChannelNumberOnePart(i))
493 return bool(_ptrs[i][26] & 0x8);
498 return bool(_ptrs[i][26] & 0
x4);
560 return ((_ptrs[i][0]<<8) | _ptrs[i][1])&0x3fff;
565 return ((_ptrs[i][2]<<24) | (_ptrs[i][3]<<16) |
566 (_ptrs[i][4]<<8) | (_ptrs[i][5]));
571 #if QT_VERSION < QT_VERSION_CHECK(5,8,0) 572 return MythDate::fromTime_t(
GPS_EPOCH + StartTimeRaw(i));
581 return (_ptrs[i][6]>>4)&3;
586 return ((_ptrs[i][6]<<16) | (_ptrs[i][7]<<8) |
587 (_ptrs[i][8])) & 0xfffff;
591 {
return _ptrs[i][9]; }
601 unsigned char *desc=_ptrs[i]+10+TitleLength(i);
602 return ((desc[0]<<8)|(desc[1]))&0xfff;
609 return _ptrs[i]+12+TitleLength(i);
617 mutable vector<unsigned char*>
_ptrs;
717 #if QT_VERSION < QT_VERSION_CHECK(5,8,0) 718 return MythDate::fromTime_t(
GPS_EPOCH + GPSRaw());
726 {
return GPSUnix() - GPSOffset(); }
741 QString
toString(
void)
const override;
812 {
return "AggregateEventInformationTable\n"; }
814 {
return "<AggregateEventInformationTable />"; }
832 {
return "AggregateExtendedTextTable\n"; }
834 {
return "<AggregateExtendedTextTable />"; }
837 #endif // _ATSC_TABLES_H_ const unsigned char * pesdata() const
No one has had time to decode this table yet...
const unsigned char * psipdata(void) const
QString toStringXML(uint) const override
DirectedChannelChangeTable(const PSIPTable &table)
uint MajorChannel(uint i) const
vector< unsigned char * > _ptrs
AggregateExtendedTextTable(const AggregateExtendedTextTable &table)
CableVirtualChannelTable(const PSIPTable &table)
#define GPS_EPOCH
Seconds between start of GPS time and the start of UNIX time.
uint MinorChannel(uint i) const
virtual QString XMLChannelValues(uint indent_level, uint channel) const
uint TableIDExtension(void) const
ExtendedTextTable contain additional text not contained in EventInformationTables.
uint ProgramNumber(uint i) const
uint ServiceType(uint i) const
const unsigned char * GlobalDescriptors() const
uint ExtendedTextTableID() const
~CableVirtualChannelTable()
uint SCTEOnePartChannel(uint i) const
bool IsOutOfBand(uint i) const
uint ChannelTransportStreamID(uint i) const
VirtualChannelTable(const VirtualChannelTable &table)
const unsigned char * GlobalDescriptors() const
uint ModulationMode(uint i) const
bool SCTEIsChannelNumberOnePart(uint i) const
bool IsHidden(uint i) const
A PSIP table is a variant of a PES packet containing an MPEG, ATSC or DVB table.
MBASE_PUBLIC QDateTime fromSecsSinceEpoch(uint seconds)
This function takes the number of seconds since the start of the epoch and returns a QDateTime with t...
This table contains information about the cable channels transmitted on this multiplex.
TerrestrialVirtualChannelTable(const PSIPTable &table)
uint ETMlocation(uint i) const
No one has had time to decode this table yet...
bool IsHiddenInGuide(uint i) const
uint ChannelCount() const
uint TableDescriptorsBytes(uint i) const
No one has had time to decode this table yet...
MasterGuideTable(const MasterGuideTable &table)
CableVirtualChannelTable(const CableVirtualChannelTable &table)
uint TablePID(uint i) const
virtual QString ChannelString(uint channel) const =0
uint GlobalDescriptorsLength() const
void SetExtendedTextTableID(uint id)
uint TableVersion(uint i) const
DirectedChannelChangeSelectionCodeTable(const PSIPTable &table)
DirectedChannelChangeSelectionCodeTable(const DirectedChannelChangeSelectionCodeTable &table)
AggregateExtendedTextTable(const PSIPTable &table)
const unsigned char * Descriptors(uint i) const
void SetTableIDExtension(uint len)
ExtendedTextTable(const PSIPTable &table)
bool IsAccessControlled(uint i) const
VirtualChannelTable(const PSIPTable &table)
bool IsEventETM(void) const
uint SourceID(uint i) const
uint TableDescriptorsLength(uint i) const
This table tells the decoder on which PIDs to find other tables, and their sizes and each table's cur...
bool IsChannelETM(void) const
vector< unsigned char * > _ptrs
const unsigned char * TableDescriptors(uint i) const
virtual QString toString(void) const
const MultipleStringStructure ExtendedTextMessage() const
RatingRegionTable(const RatingRegionTable &table)
This table contains information about the channels transmitted on this multiplex.
uint TableType(uint i) const
uint DescriptorsLength(uint i) const
~TerrestrialVirtualChannelTable()
bool SCTEIsChannelNumberTwoPart(uint i) const
TerrestrialVirtualChannelTable(const TerrestrialVirtualChannelTable &table)
ExtendedTextTable(const ExtendedTextTable &table)
bool IsPathSelect(uint i) const
virtual QString toStringXML(uint indent_level) const
This table contains information about the terrestrial channels transmitted on this multiplex.
RatingRegionTable(const PSIPTable &table)
uint TransportStreamID() const
DirectedChannelChangeTable(const DirectedChannelChangeTable &table)
uint GlobalDescriptorsLength() const
const QString ShortChannelName(uint i) const
MasterGuideTable(const PSIPTable &table)
uint SourceID(void) const
QString toString(void) const override