MythTV  master
sctetables.h
Go to the documentation of this file.
1 // -*- Mode: c++ -*-
22 #ifndef _SCTE_TABLES_H_
23 #define _SCTE_TABLES_H_
24 
25 #include <cassert>
26 
27 // MythTV
28 #include "mpegtables.h"
29 #include "mythtvexp.h"
30 #include "iso639.h"
31 
32 // NOTE: MasterGuideTable defined in atsctables.h
33 // NOTE: VirtualChannelTable defined in atsctables.h
34 
35 // NOTE: Section 4.4.1 specifies that we should not attempt to
36 // use tables carrying a protocol_version greater than
37 // the one we are familiar with, as of the SCTE65-2002
38 // standard 0 is the only recognized version.
39 
41 {
42  public:
44  const unsigned char *beg, const unsigned char *end) :
45  _beg(beg), _end(end) { }
46 
47  // number_of_carriers 8 0.0+_beg
48  uint NumberOfCarriers(void) const { return _beg[0]; }
49  // spacing_unit 1 1.0+_beg
50  enum // Table 5.4 Spacing Unit & Table 5.5 frequency unit
51  {
52  k10000Hz = 0x0,
53  k125000Hz = 0x1,
54  };
55  uint SpacingUnit(void) const { return _beg[1]>>7; }
56  uint SpacingUnitHz(void) const { return SpacingUnit() ? 125000 : 1000; }
57  // zero 1 1.1+_beg
58  // frequency_spacing 14 1.2+_beg
59  uint FrequencySpacing(void) const
60  { return ((_beg[1] & 0x3) << 8) | _beg[2]; }
62  { return FrequencySpacing() * SpacingUnitHz(); }
63  // frequency_unit 1 3.0+_beg
64  uint FrequencyUnit(void) const { return _beg[3]>>7; }
65  uint FrequencyUnitHz(void) const { return FrequencyUnit() ? 125000 : 1000; }
66  // first_carrier_frequency 15 3.1+_beg
68  { return ((_beg[3] & 0x3) << 8) | _beg[4]; }
69  uint64_t FirstCarrierFrequencyHz(void) const
70  { return (uint64_t)FirstCarrierFrequency() * FrequencyUnitHz(); }
71 
72  // descriptors_count 8 5.0+_beg
73  uint DescriptorsCount(void) const { return _beg[5]; }
74  // for (i=0; i<descriptors_count; i++) {
75  // descriptor() ? ?.0
76  // }
77  uint DescriptorsLength(void) const { return _end - _beg - 6; }
78  const unsigned char *Descriptors(void) const { return _beg + 6; }
79 
80  QString toString(void) const;
81  QString toStringXML(uint indent_level) const;
82 
83  private:
84  const unsigned char *_beg;
85  const unsigned char *_end;
86 };
87 
89 {
90  public:
91  ModulationModeSubtable(const unsigned char *beg, const unsigned char *end) :
92  _beg(beg), _end(end) { }
93  // transmission_system 4 0.0+_beg
94  enum // Table 5.7 TransmissionSystem
95  {
99  kTSITUQPSK = 3,
100  kTSATSC = 4,
102  // all other values are reserved
103  // ITU Rec. J.83 Annex A is the 8Mhz global standard,
104  // Annex B is the 6Mhz North American standard and
105  // Annex C is the 6Mhz Japanese standard. (QAM)
106  };
107  uint TransmissionSystem(void) const { return _beg[0] >> 4; }
108  QString TransmissionSystemString(void) const;
109  // inner_coding_mode 4 0.4+_beg
110  enum // Table 5.8
111  {
114  // reserved = 2,
116  // reserved = 4,
118  // reserved = 6,
122  // reserved = 10,
124  // reserved = 12,
125  // reserved = 13,
126  // reserved = 14,
127  kNone = 15,
128  // all other values are reserved
129  };
130  uint InnerCodingMode(void) const { return _beg[0] & 0xf; }
131  QString InnerCodingModeString(void) const;
132  // split_bitstream_mode 1 1.0+_beg
133  bool SplitBitstreamMode(void) const { return ( _beg[1] & 0x80 ) != 0; }
134  // zero 2 1.1+_beg
135  // modulation_format 5 1.3+_beg
136  enum // Table 5.9
137  {
138  kUnknown = 0,
139  kQPSK = 1,
140  kBPSK = 2,
141  kOQPSK = 3,
142  kVSB8 = 4,
143  kVSB16 = 5,
144  kQAM16 = 6,
145  kQAM32 = 7,
146  kQAM64 = 8,
147  kQAM80 = 9, // last modulation format that 65 & 57 agree on
148  kQAM96 = 10,
149  kQAM112 = 11,
150  kQAM128 = 12,
151  kQAM160 = 13,
152  kQAM192 = 14,
153  kQAM224 = 15,
154  kQAM256 = 16,
155  kQAM320 = 17,
156  kQAM384 = 18,
157  kQAM448 = 19,
158  kQAM512 = 20,
159  kQAM640 = 21,
160  kQAM768 = 22,
161  kQAM896 = 23,
162  kQAM1024 = 24,
163  // all other values are reserved
164  };
165  uint ModulationFormat(void) const { return _beg[1] & 0x1f; }
166  QString ModulationFormatString(void) const;
167  // zero 4 2.0+_beg
168  // symbol_rate 28 2.4+_beg
169  uint SymbolRate(void) const
170  {
171  return (((_beg[2]&0xf)<<24) | (_beg[3]<<16) |
172  (_beg[4]<<8) | (_beg[5]));
173  }
174  // descriptors_count 8 6.0+_beg
175  uint DescriptorsCount(void) const { return _beg[6]; }
176  // for (i=0; i<descriptors_count; i++) {
177  // descriptor() ? ?.0
178  // }
179  uint DescriptorsLength(void) const { return _end - _beg - 7; }
180  const unsigned char *Descriptors(void) const { return _beg + 7; }
181 
182  QString toString(void) const;
183  QString toStringXML(uint indent_level) const;
184 
185  private:
186  const unsigned char *_beg;
187  const unsigned char *_end;
188 };
189 
191 {
192  public:
194  PSIPTable(table)
195  {
197  Parse();
198  }
199  explicit SCTENetworkInformationTable(const PSIPTable &table) : PSIPTable(table)
200  {
202  Parse();
203  }
205  // SCTE65-2002, page 15, Table 5.1
206  // Name bits loc expected value
207  // table_id 8 0.0 0xC2
208  // zero 2 1.0 0
209  // reserved 2 1.2 3
210  // section_length 12 1.4
211  // ^^^ All above this line provided by PSIPTable
212  // zero 3 3.0 0
213  // protocol_version 5 3.3 0
214  // first_index 8 4.0 (value of 0 is illegal)
215  uint FirstIndex(void) const { return pesdata()[4]; }
216  // number_of_records 8 5.0
217  uint NumberOfRecords(void) const { return pesdata()[5]; }
218  // transmission_medium 4 6.0 0
219  uint TransmissionMedium(void) const { return pesdata()[6] >> 4; }
220  // table_subtype 4 6.4
221  enum // Table 5.2 NIT Subtype
222  {
223  kInvalid = 0x0,
224  kCarrierDefinitionSubtable = 0x1,
225  kModulationModeSubtable = 0x2,
226  // all other values are reserved
227  };
228  uint TableSubtype(void) const { return pesdata()[6] & 0xf; }
229  // for (i = 0; i < number_of_records; i++) {
230  // if (kCarrierDefinitionSubtable == table_subtype) {
232  { return CarrierDefinitionSubtable(_ptrs[i], _ptrs[i+1]); }
233  // if (kModulationModeSubtable == table_subtype) {
235  { return ModulationModeSubtable(_ptrs[i], _ptrs[i+1]); }
236 
237  // }
238  // for (i=0; i<N; i++)
239  // descriptor() ? ?.0 optional (determined by looking
240  // at section_length)
242  { return SectionLength() - (_ptrs.back() - pesdata()) - 4/*CRC*/; }
243  const unsigned char * Descriptors(void) const { return _ptrs.back(); }
244  // CRC_32 32
245 
246  bool Parse(void);
247  QString toString(void) const override; // PSIPTable
248  QString toStringXML(uint indent_level) const override; // PSIPTable
249 
250  private:
251  vector<const unsigned char*> _ptrs;
252 };
253 
255 {
256  public:
258  PSIPTable(table)
259  {
261  Parse();
262  }
263  explicit NetworkTextTable(const PSIPTable &table) : PSIPTable(table)
264  {
266  Parse();
267  }
269  // SCTE65-2002, page 20, Table 5.10
270  // Name bits loc expected value
271  // table_id 8 0.0 0xC3
272  // zero 2 1.0 0
273  // reserved 2 1.2 3
274  // section_length 12 1.4
275  // ^^^ All above this line provided by PSIPTable
276  // zero 3 3.0 0
277  // protocol_version 5 3.3 0
278  // iso_639_language_code 24 4.0 see ISO 639.2/B
279  // * the value 0xFFFFFFFF shall match any language when text
280  // is only available in one language
281  int LanguageKey(void) const
282  { return iso639_str3_to_key(pesdata() + 4); }
283  QString LanguageString(void) const
284  { return iso639_key_to_str3(LanguageKey()); }
285  int CanonicalLanguageKey(void) const
286  { return iso639_key_to_canonical_key(LanguageKey()); }
287  QString CanonicalLanguageString(void) const
288  { return iso639_key_to_str3(CanonicalLanguageKey()); }
289  // transmission_medium 4 7.0 0
290  uint TransmissionMedium(void) const { return pesdata()[7] >> 4; }
291  // table_subtype 4 7.4 see Table 5.11
292  enum
293  {
294  kInvalid = 0x0,
295  kSourceNameSubtable = 0x6,
296  // all other values are reserved
297  };
298  uint TableSubtype(void) const { return pesdata()[7] & 0xf; }
299  // if (kSourceNameSubtable == table_subtype) {
300  // number_of_SNS_records 8 8.0
301  // for (i=0; i<number_of_SNS_records; i++) {
302  // application_type 1 0.0+_ptrs[i]
303  // zero 7 0.1+_ptrs[i] 0
304  // if (application_type)
305  // application_id 16 1.0+_ptrs[i]
306  // else
307  // source_id 16 1.0+_ptrs[i]
308  // name_length 8 3.0+_ptrs[i]
309  // source_name() name_length*8 4.0+_ptrs[i]
310  // sns_descriptors_count 8 4.0+ptrs[i]+name_length
311  // for (i = 0; i < sns_descriptors_count; i++)
312  // descriptor ? ?.0
313  // }
314  // }
315  // for (i=0; i<N; i++)
316  // descriptor() ? ?.0 optional (determined by looking
317  // at section_length)
318  // CRC_32 32
319 
320  void Parse(void) const;
321  QString toString(void) const override; // PSIPTable
322  QString toStringXML(uint indent_level) const override; // PSIPTable
323 };
324 
326 {
327  public:
328  explicit DefinedChannelsMapSubtable(const unsigned char *data) : _data(data) {}
329  // zero 4 7.0 0
330  // first_virtual_channel 12 7.4
332  { return ((_data[7]<<8) | _data[8]) & 0xfff; }
333  // zero 1 9.0
334  // DCM_data_length 7 9.1
335  uint DCMDataLength(void) const { return _data[9] & 0x7f; }
336  // for (i=0; i<DCM_data_length; i++) {
337  // range_defined 1 10.0+i
338  bool RangeDefined(uint i) const { return ( _data[10+i] & 0x80 ) != 0; }
339  // channels_count 7 10.1+i
340  uint ChannelsCount(uint i) const { return _data[10+i] & 0x7f; }
341  // }
342 
343  QString toStringXML(uint indent_level) const;
344  uint Size(void) const { return DCMDataLength() + 3; }
345 
346  private:
347  const unsigned char *_data;
348 };
349 
351 {
352  public:
354  const unsigned char *data, const vector<const unsigned char*> &ptrs) :
355  _data(data), _ptrs(ptrs) {}
356 
357  // zero 2 7.0
358  // descriptors_included 1 7.2
359  bool DescriptorsIncluded(void) const { return ( _data[7] & 0x20 ) != 0; }
360  // zero 5 7.3
361  // splice 1 8.0
362  bool Splice(void) const { return ( _data[8] & 0x80 ) != 0; }
363  // zero 7 8.1
364  // activation_time 32 9.0
366  {
367  return ((_data[9] << 24) | (_data[10] << 24) |
368  (_data[11] << 24) | _data[12]);
369  }
373  QDateTime ActivationTimeUTC(uint offset = 0) const
374  {
375  QDateTime dt;
376 #if QT_VERSION < QT_VERSION_CHECK(5,8,0)
377  dt.setTime_t(GPS_EPOCH + offset + ActivationTimeRaw());
378 #else
379  dt.setSecsSinceEpoch(GPS_EPOCH + offset + ActivationTimeRaw());
380 #endif
381  return dt;
382  }
383  // number_of_VC_records 8 13.0
384  uint NumberOfVCRecords(void) const { return _data[13]; }
385 
386  // for (i = 0; i < number_of_VC_records; i++) {
387  // zero 4 0.0+_ptrs[i]
388  // virtual_channel_number 12 0.4+_ptrs[i]
390  { return ((_ptrs[i][0]<<8) | _ptrs[i][1]) & 0xfff; }
391  // application_virtual_channel 1 2.0+_ptrs[i]
392  bool ApplicationVirtualChannel(uint i) const { return ( _ptrs[i][1] & 0x80 ) != 0; }
393  // zero 1 2.1+_ptrs[i]
394  // path_select 1 2.2+_ptrs[i]
395  enum // Table 5.18 path select
396  {
397  kPath1 = 0x0,
398  kPath2 = 0x1,
399  };
400  uint PathSelect(uint i) const { return (_ptrs[i][2]>>5) & 0x1; }
401  QString PathSelectString(uint i) const
402  { return PathSelect(i) ? "Path 2" : "Path 1"; }
403  // transport_type 1 2.3+_ptrs[i]
404  enum // Table 5.19 transport type
405  {
408  };
409  uint TransportType(uint i) const { return (_ptrs[i][2]>>4) & 0x1; }
410  QString TransportTypeString(uint i) const
411  { return TransportType(i) ? "Non-MPEG-2" : "MPEG-2"; }
412  // channel_type 4 2.4+_ptrs[i]
413  enum // Table 5.20 channel type
414  {
417  // all other values are reserved
418  };
419  uint ChannelType(uint i) const { return _ptrs[i][2] & 0xf; }
420  QString ChannelTypeString(uint i) const
421  { return ChannelType(i) ? "Hidden" : "Normal"; }
422  // if (application_virtual_channel) {
423  // application_id 16 3.0+_ptrs[i]
424  uint ApplicationID(uint i) const { return (_ptrs[i][3]<<8) | _ptrs[i][4]; }
425  // } else {
426  // source_id 16 3.0+_ptrs[i]
427  uint SourceID(uint i) const { return (_ptrs[i][3]<<8) | _ptrs[i][4]; }
428  // }
429  // if (transport_type==MPEG_2) {
430  // CDS_reference 8 5.0+_ptrs[i]
431  uint CDSReference(uint i) const { return _ptrs[i][5]; }
432  // program_number 16 6.0+_ptrs[i]
433  uint ProgramNumber(uint i) const { return (_ptrs[i][6]<<8) | _ptrs[i][7]; }
434  // MMS_reference 8 8.0+_ptrs[i]
435  uint MMSReference(uint i) const { return _ptrs[i][8]; }
436  // } else {
437  // CDS_reference 8 5.0+_ptrs[i]
438  // scrambled 1 6.0+_ptrs[i]
439  bool Scrambled(uint i) const { return ( _ptrs[i][6] & 0x80 ) != 0; }
440  // zero 3 6.1+_ptrs[i]
441  // video_standard 4 6.4+_ptrs[i]
442  enum // Table 5.21 video standard
443  {
444  kNTSC = 0x0,
445  kPAL625 = 0x1,
446  kPAL525 = 0x2,
447  kSECAM = 0x3,
448  kMAC = 0x4,
449  // all other values are reserved
450  };
451  uint VideoStandard(uint i) const { return _ptrs[i][6] & 0xf; }
452  QString VideoStandardString(uint i) const;
453  // zero 16 7.0+_ptrs[i] 0
454  // }
455  // if (descriptors_included) {
456  // descriptors_count 8 9.0+_ptrs[i]
457  uint DescriptorsCount(uint i) const { return _ptrs[i][9]; }
458  // for (i = 0; i < descriptors_count; i++)
459  // descriptor()
460  uint DescriptorsLength(uint i) const { return _ptrs[i+1] - _ptrs[i] - 10; }
461  const unsigned char *Descriptors(uint i) const { return _ptrs[i] + 10; }
462  // }
463  // }
464 
465  QString toStringXML(uint indent_level) const;
466  uint Size(void) const { return _ptrs.back() - _data; }
467 
468  const unsigned char *_data;
469  const vector<const unsigned char*> &_ptrs;
470 };
471 
473 {
474  public:
475  explicit InverseChannelMapSubtable(const unsigned char *data) : _data(data) {}
476  // zero 4 7.0
477  // first_map_index 12 7.4
478  uint FirstMapIndex(void) const { return ((_data[7]<<8)|_data[8]) & 0xfff; }
479  // zero 1 9.0
480  // record_count 7 9.1
481  uint RecordCount(void) const { return _data[9] & 0x7f; }
482  // for (i=0; i<record_count; i++) {
483  // source_id 16 10.0+i*4
484  uint SourceID(uint i) const { return (_data[10+i*4]<<8) | _data[11+i*4]; }
485  // zero 4 12.0+i*4
486  // virtual_channel_number 12 12.4+i*4
488  { return ((_data[12+i*4]<<8) | _data[13+i*4]) & 0xfff; }
489  // }
490 
491  QString toStringXML(uint indent_level) const;
492  uint Size(void) const { return RecordCount() * 4 + 3; }
493 
494  private:
495  const unsigned char *_data;
496 };
497 
498 // AKA Short-form Virtual Channel Table
500 {
501  public:
503  PSIPTable(table)
504  {
506  Parse();
507  }
508  explicit ShortVirtualChannelTable(const PSIPTable &table) : PSIPTable(table)
509  {
511  Parse();
512  }
514  // Name bits loc expected value
515  // table_id 8 0.0 0xC4
516  // zero 2 1.0 0
517  // reserved 2 1.2 3
518  // section_length 12 1.4
519  // ^^^ All above this line provided by PSIPTable
520  // zero 3 3.0 0
521  // protocol_version 5 3.3 0
522  // transmission_medium 4 4.0 0
523  uint TransmissionMedium(void) const { return pesdata()[4] >> 4; }
524  // table_subtype 4 4.4
525  enum // Table 5.14 Table Subtype
526  {
527  kVirtualChannelMap = 0x0,
528  kDefinedChannelsMap = 0x1,
529  kInverseChannelMap = 0x2,
530  // all other values are reserved
531  };
532  uint TableSubtype(void) const { return pesdata()[4] & 0xf; }
533  QString TableSubtypeString(void) const;
534  // vct_id 16 5.0
535  uint ID(void) const { return (pesdata()[5]<<8) | pesdata()[6]; }
536  // if (table_subtype==kDefinedChannelsMap) {
538  { return DefinedChannelsMapSubtable(pesdata()); }
539  // }
540  // if (table_subtype==kVirtualChannelMap) {
542  { return VirtualChannelMapSubtable(pesdata(), _ptrs); }
543  // }
544  // if (table_subtype==kInverseChannelMap) {
546  { return InverseChannelMapSubtable(pesdata()); }
547  // }
548  // for (i=0; i<N; i++)
549  // descriptor() ? ?.0 optional (determined by looking
550  // at section_length)
552  { return SectionLength() - (_ptrs.back() - pesdata()) - 4/*CRC*/; }
553  const unsigned char * Descriptors(void) const { return _ptrs.back(); }
554  // }
555  // CRC_32 32
556 
557  bool Parse(void);
558  QString toString(void) const override; // PSIPTable
559  QString toStringXML(uint indent_level) const override; // PSIPTable
560 
561  private:
562  vector<const unsigned char*> _ptrs;
563 };
564 
569 {
570  public:
572  {
574  }
575  explicit SCTESystemTimeTable(const PSIPTable &table) : PSIPTable(table)
576  {
578  }
579 
580  // Name bits loc expected value
581  // table_id 8 0.0 0xC5
582  // zero 2 1.0 0
583  // reserved 2 1.2 3
584  // section_length 12 1.4
585  // ^^^ All above this line provided by PSIPTable
586  // zero 3 3.0 0
587  // protocol_version 5 3.3 0
588  // zero 8 4.0 0
589  // system_time 32 5.0
590  uint32_t SystemTimeRaw(void) const
591  {
592  return ((pesdata()[5] <<24) | (pesdata()[6]<<16) |
593  (pesdata()[7]<< 8) | pesdata()[8]);
594  }
595  QDateTime SystemTimeGPS(void) const
596  {
597  QDateTime dt;
598 #if QT_VERSION < QT_VERSION_CHECK(5,8,0)
599  dt.setTime_t(GPSUnix());
600 #else
601  dt.setSecsSinceEpoch(GPSUnix());
602 #endif
603  return dt;
604  }
605  QDateTime SystemTimeUTC(void) const
606  {
607  QDateTime dt;
608 #if QT_VERSION < QT_VERSION_CHECK(5,8,0)
609  dt.setTime_t(UTCUnix());
610 #else
611  dt.setSecsSinceEpoch(UTCUnix());
612 #endif
613  return dt;
614  }
615  time_t GPSUnix(void) const
616  { return GPS_EPOCH + SystemTimeRaw(); }
617  time_t UTCUnix(void) const
618  { return GPSUnix() - GPSUTCOffset(); }
619  // GPS_UTC_offset 8 9.0 (leap seconds since 1980)
620  uint GPSUTCOffset(void) const { return pesdata()[9]; }
621  // for (I = 0;I< N;I++) { descriptor() }
623  { return SectionLength() - 10/*bytes before desc*/ - 4/*CRC*/; }
624  const unsigned char * Descriptors(void) const { return pesdata() + 10; }
625 
626  // CRC_32 32
627 
628  QString toString(void) const override; // PSIPTable
629  QString toStringXML(uint indent_level) const override; // PSIPTable
630 };
631 
632 // PIM = 0xC0 -- Program Information Message (57 2003) PMT PID
634 {
635  public:
637  const ProgramInformationMessageTable &table) : PSIPTable(table)
638  {
640  }
641  explicit ProgramInformationMessageTable(const PSIPTable &table) : PSIPTable(table)
642  {
644  }
645 
646  QString toString(void) const override // PSIPTable
647  { return "Program Information Message\n"; }
648  QString toStringXML(uint /*indent_level*/) const override // PSIPTable
649  { return "<ProgramInformationMessage />"; }
650 };
651 
652 // PNM = 0xC1 -- Program Name Message (57 2003) PMT PID
654 {
655  public:
657  const ProgramNameMessageTable &table) : PSIPTable(table)
658  {
660  }
661  explicit ProgramNameMessageTable(const PSIPTable &table) : PSIPTable(table)
662  {
664  }
665 
666  QString toString(void) const override // PSIPTable
667  { return "Program Name Message\n"; }
668  QString toStringXML(uint /*indent_level*/) const override // PSIPTable
669  { return "<ProgramNameMessage />"; }
670 };
671 
672 // ADET = 0xD9 -- Aggregate Data Event Table (80 2002)
674 {
675  public:
677  const AggregateDataEventTable &table) : PSIPTable(table)
678  {
680  }
681  explicit AggregateDataEventTable(const PSIPTable &table) : PSIPTable(table)
682  {
684  }
685 
686  QString toString(void) const override; // PSIPTable
687  QString toStringXML(uint indent_level) const override; // PSIPTable
688 };
689 
690 
691 #endif // _SCTE_TABLES_H_
uint GPSUTCOffset(void) const
Definition: sctetables.h:620
const unsigned char * pesdata() const
Definition: pespacket.h:163
Specified in Annex B of ITU Rec. J.83.
Definition: sctetables.h:98
uint SourceID(uint i) const
Definition: sctetables.h:484
uint FirstMapIndex(void) const
Definition: sctetables.h:478
uint DescriptorsCount(void) const
Definition: sctetables.h:73
uint SpacingUnitHz(void) const
Definition: sctetables.h:56
uint TransmissionSystem(void) const
Definition: sctetables.h:107
ISO 639-1 and ISO 639-2 support functions.
uint TransmissionMedium(void) const
Definition: sctetables.h:290
uint TransmissionMedium(void) const
Definition: sctetables.h:523
ShortVirtualChannelTable(const ShortVirtualChannelTable &table)
Definition: sctetables.h:502
ITU-R Rec. BO.1211:1995 (QPSK)
Definition: sctetables.h:99
uint DescriptorsLength(void) const
Definition: sctetables.h:241
uint InnerCodingMode(void) const
Definition: sctetables.h:130
QString VideoStandardString(uint i) const
Definition: sctetables.cpp:372
QDateTime ActivationTimeUTC(uint offset=0) const
Definition: sctetables.h:373
uint DescriptorsLength(void) const
Definition: sctetables.h:622
#define GPS_EPOCH
Seconds between start of GPS time and the start of UNIX time.
Definition: mpegtables.h:28
uint DescriptorsLength(void) const
Definition: sctetables.h:77
uint FrequencyUnit(void) const
Definition: sctetables.h:64
uint VirtualChannelNumber(uint i) const
Definition: sctetables.h:389
const unsigned char * Descriptors(void) const
Definition: sctetables.h:553
ProgramNameMessageTable(const ProgramNameMessageTable &table)
Definition: sctetables.h:656
NetworkTextTable(const NetworkTextTable &table)
Definition: sctetables.h:257
QString toString(MarkTypes type)
SCTENetworkInformationTable(const SCTENetworkInformationTable &table)
Definition: sctetables.h:193
AggregateDataEventTable(const PSIPTable &table)
Definition: sctetables.h:681
uint SymbolRate(void) const
Definition: sctetables.h:169
const int kInvalid
QString toString(void) const override
Definition: sctetables.h:666
uint FrequencyUnitHz(void) const
Definition: sctetables.h:65
uint SectionLength(void) const
Definition: mpegtables.h:490
uint DCMDataLength(void) const
Definition: sctetables.h:335
bool DescriptorsIncluded(void) const
Definition: sctetables.h:359
bool Scrambled(uint i) const
Definition: sctetables.h:439
SCTENetworkInformationTable(const PSIPTable &table)
Definition: sctetables.h:199
uint DescriptorsLength(void) const
Definition: sctetables.h:551
const unsigned char * _end
Definition: sctetables.h:187
uint DescriptorsCount(void) const
Definition: sctetables.h:175
from SCTE 57 – DigiCipher II
Definition: sctetables.h:101
unsigned int uint
Definition: compat.h:140
time_t UTCUnix(void) const
Definition: sctetables.h:617
AggregateDataEventTable(const AggregateDataEventTable &table)
Definition: sctetables.h:676
uint Size(void) const
Definition: sctetables.h:344
static int iso639_str3_to_key(const unsigned char *iso639_2)
Definition: iso639.h:63
uint RecordCount(void) const
Definition: sctetables.h:481
ModulationModeSubtable(const unsigned char *beg, const unsigned char *end)
Definition: sctetables.h:91
int iso639_key_to_canonical_key(int iso639_2)
Definition: iso639.cpp:121
vector< const unsigned char * > _ptrs
Definition: sctetables.h:562
QString CanonicalLanguageString(void) const
Definition: sctetables.h:287
uint NumberOfVCRecords(void) const
Definition: sctetables.h:384
uint PathSelect(uint i) const
Definition: sctetables.h:400
NetworkTextTable(const PSIPTable &table)
Definition: sctetables.h:263
CarrierDefinitionSubtable CarrierDefinition(uint i) const
Definition: sctetables.h:231
uint SpacingUnit(void) const
Definition: sctetables.h:55
VirtualChannelMapSubtable VirtualChannelMap(void) const
Definition: sctetables.h:541
const unsigned char * _data
Definition: sctetables.h:347
ModulationModeSubtable ModulationMode(uint i) const
Definition: sctetables.h:234
InverseChannelMapSubtable(const unsigned char *data)
Definition: sctetables.h:475
ProgramInformationMessageTable(const ProgramInformationMessageTable &table)
Definition: sctetables.h:636
uint32_t SystemTimeRaw(void) const
Definition: sctetables.h:590
DefinedChannelsMapSubtable DefinedChannelsMap(void) const
Definition: sctetables.h:537
A PSIP table is a variant of a PES packet containing an MPEG, ATSC or DVB table.
Definition: mpegtables.h:371
Specified in Annex A of ITU Rec. J.83.
Definition: sctetables.h:97
uint64_t FirstCarrierFrequencyHz(void) const
Definition: sctetables.h:69
#define MTV_PUBLIC
Definition: mythtvexp.h:15
const unsigned char * _beg
Definition: sctetables.h:186
uint FirstCarrierFrequency(void) const
Definition: sctetables.h:67
const vector< const unsigned char * > & _ptrs
Definition: sctetables.h:469
uint ChannelType(uint i) const
Definition: sctetables.h:419
uint TableSubtype(void) const
Definition: sctetables.h:532
int CanonicalLanguageKey(void) const
Definition: sctetables.h:285
uint ModulationFormat(void) const
Definition: sctetables.h:165
const unsigned char * Descriptors(void) const
Definition: sctetables.h:180
InverseChannelMapSubtable InverseChannelMap(void) const
Definition: sctetables.h:545
uint CDSReference(uint i) const
Definition: sctetables.h:431
uint DescriptorsLength(uint i) const
Definition: sctetables.h:460
const unsigned char * Descriptors(void) const
Definition: sctetables.h:624
uint VirtualChannelNumber(uint i) const
Definition: sctetables.h:487
uint ActivationTimeRaw(void) const
Definition: sctetables.h:365
uint TransmissionMedium(void) const
Definition: sctetables.h:219
uint FirstVirtualChannel(void) const
Definition: sctetables.h:331
uint DescriptorsCount(uint i) const
Definition: sctetables.h:457
ProgramInformationMessageTable(const PSIPTable &table)
Definition: sctetables.h:641
QDateTime SystemTimeGPS(void) const
Definition: sctetables.h:595
SCTESystemTimeTable(const SCTESystemTimeTable &table)
Definition: sctetables.h:571
DefinedChannelsMapSubtable(const unsigned char *data)
Definition: sctetables.h:328
CarrierDefinitionSubtable(const unsigned char *beg, const unsigned char *end)
Definition: sctetables.h:43
uint ProgramNumber(uint i) const
Definition: sctetables.h:433
uint ChannelsCount(uint i) const
Definition: sctetables.h:340
uint TransportType(uint i) const
Definition: sctetables.h:409
int LanguageKey(void) const
Definition: sctetables.h:281
uint Size(void) const
Definition: sctetables.h:466
bool RangeDefined(uint i) const
Definition: sctetables.h:338
QString toStringXML(uint) const override
Definition: sctetables.h:648
uint ID(void) const
Definition: sctetables.h:535
uint DescriptorsLength(void) const
Definition: sctetables.h:179
const unsigned char * _beg
Definition: sctetables.h:84
ProgramNameMessageTable(const PSIPTable &table)
Definition: sctetables.h:661
QString ChannelTypeString(uint i) const
Definition: sctetables.h:420
uint TableID(void) const
Definition: mpegtables.h:479
const unsigned char * Descriptors(void) const
Definition: sctetables.h:78
QString TransmissionSystemString(void) const
Definition: sctetables.cpp:65
#define assert(x)
QString InnerCodingModeString(void) const
Definition: sctetables.cpp:79
bool SplitBitstreamMode(void) const
Definition: sctetables.h:133
QString toStringXML(uint indent_level) const
Definition: sctetables.cpp:134
uint VideoStandard(uint i) const
Definition: sctetables.h:451
const unsigned char * _data
Definition: sctetables.h:468
uint SourceID(uint i) const
Definition: sctetables.h:427
VirtualChannelMapSubtable(const unsigned char *data, const vector< const unsigned char * > &ptrs)
Definition: sctetables.h:353
QString toStringXML(uint indent_level) const
Definition: sctetables.cpp:385
virtual QString toString(void) const
Definition: mpegtables.cpp:757
uint ApplicationID(uint i) const
Definition: sctetables.h:424
QString LanguageString(void) const
Definition: sctetables.h:283
QString toStringXML(uint) const override
Definition: sctetables.h:668
bool ApplicationVirtualChannel(uint i) const
Definition: sctetables.h:392
bool Splice(void) const
Definition: sctetables.h:362
uint TableSubtype(void) const
Definition: sctetables.h:228
static QString iso639_key_to_str3(int code)
Definition: iso639.h:46
uint Size(void) const
Definition: sctetables.h:492
QString PathSelectString(uint i) const
Definition: sctetables.h:401
QString ModulationFormatString(void) const
Definition: sctetables.cpp:96
time_t GPSUnix(void) const
Definition: sctetables.h:615
vector< const unsigned char * > _ptrs
Definition: sctetables.h:251
ShortVirtualChannelTable(const PSIPTable &table)
Definition: sctetables.h:508
QDateTime SystemTimeUTC(void) const
Definition: sctetables.h:605
uint TableSubtype(void) const
Definition: sctetables.h:298
uint NumberOfCarriers(void) const
Definition: sctetables.h:48
const unsigned char * Descriptors(void) const
Definition: sctetables.h:243
const unsigned char * _end
Definition: sctetables.h:85
This table contains the GPS time at the time of transmission.
Definition: sctetables.h:568
virtual QString toStringXML(uint indent_level) const
Definition: mpegtables.cpp:775
uint FirstIndex(void) const
Definition: sctetables.h:215
const unsigned char * Descriptors(uint i) const
Definition: sctetables.h:461
QString toString(void) const override
Definition: sctetables.h:646
uint NumberOfRecords(void) const
Definition: sctetables.h:217
SCTESystemTimeTable(const PSIPTable &table)
Definition: sctetables.h:575
static int x3
Definition: mythsocket.cpp:62
QString TransportTypeString(uint i) const
Definition: sctetables.h:410
uint FrequencySpacingHz(void) const
Definition: sctetables.h:61
SCTE System information tables.
Definition: sctetables.h:40
QString toString(void) const
Definition: sctetables.cpp:129
uint FrequencySpacing(void) const
Definition: sctetables.h:59
const unsigned char * _data
Definition: sctetables.h:495
uint MMSReference(uint i) const
Definition: sctetables.h:435