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