MythTV  0.28pre
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
dvbdescriptors.h
Go to the documentation of this file.
1 // -*- Mode: c++ -*-
2 // Copyright (c) 2003-2004, Daniel Thor Kristjansson
3 #ifndef _DVB_DESCRIPTORS_H_
4 #define _DVB_DESCRIPTORS_H_
5 
6 #include <QMutex>
7 #include <QString>
8 
9 #include "mythtvexp.h" // MTV_PUBLIC - Symbol Visibility
10 #include "mpegdescriptors.h"
11 #include "programinfo.h" // for subtitle types and audio and video properties
12 
13 /*
14 // needed for scanning
15  conditional_access = 0x09, // maybe
16  satellite_delivery_system = 0x43,*
17  cable_delivery_system = 0x44,*
18  service = 0x48,*
19  terrestrial_delivery_system = 0x5A,*
20  frequency_list = 0x62,*
21 
22 // needed for captions
23  teletext = 0x56,
24  subtitling = 0x59,
25 
26 // needed for sound
27  registration = 0x05,
28  AC3 = 0x6A,
29 
30 // needed for eit
31  short_event = 0x4D,
32  extended_event = 0x4E,
33  content = 0x54,
34 */
35 
36 static QString coderate_inner(uint coderate);
37 
38 extern QString dvb_decode_text(const unsigned char *src, uint length,
39  const unsigned char *encoding_override,
40  uint encoding_override_length);
41 
42 inline QString dvb_decode_text(const unsigned char *src, uint length)
43 {
44  return dvb_decode_text(src, length, NULL, 0);
45 }
46 
47 QString dvb_decode_short_name(const unsigned char *src, uint raw_length);
48 
49 #define byteBCDH2int(i) (i >> 4)
50 #define byteBCDL2int(i) (i & 0x0f)
51 #define byteBCD2int(i) (byteBCDH2int(i) * 10 + byteBCDL2int(i))
52 #define byte2BCD2int(i, j) \
53  (byteBCDH2int(i) * 1000 + byteBCDL2int(i) * 100 + \
54  byteBCDH2int(j) * 10 + byteBCDL2int(j))
55 #define byte3BCD2int(i, j, k) \
56  (byteBCDH2int(i) * 100000 + byteBCDL2int(i) * 10000 + \
57  byteBCDH2int(j) * 1000 + byteBCDL2int(j) * 100 + \
58  byteBCDH2int(k) * 10 + byteBCDL2int(k))
59 #define byte4BCD2int(i, j, k, l) \
60  (byteBCDH2int(i) * 10000000LL + byteBCDL2int(i) * 1000000 + \
61  byteBCDH2int(j) * 100000 + byteBCDL2int(j) * 10000 + \
62  byteBCDH2int(k) * 1000 + byteBCDL2int(k) * 100 + \
63  byteBCDH2int(l) * 10 + byteBCDL2int(l))
64 
65 // DVB Bluebook A038 (Sept 2011) p 77
67 {
68  public:
69  NetworkNameDescriptor(const unsigned char *data, int len = 300) :
70  MPEGDescriptor(data, len, DescriptorID::network_name) { }
71  // Name bits loc expected value
72  // descriptor_tag 8 0.0 0x40
73  // descriptor_length 8 1.0
74  // for (i=0;i<N;i++){ char 8 uimsbf }
75  QString Name(void) const
76  { return dvb_decode_text(_data+2, DescriptorLength()); }
77  QString ShortName(void) const
79  QString toString(void) const
80  { return QString("NetworkNameDescriptor: ")+Name(); }
81 };
82 
83 // DVB Bluebook A038 (Sept 2011) p 63
85 {
86  public:
87  LinkageDescriptor(const unsigned char *data, int len = 300) :
88  MPEGDescriptor(data, len, DescriptorID::linkage)
89  {
90  if (!_data)
91  return;
92  if (DescriptorLength() < 7)
93  {
94  _data = NULL;
95  }
96  else if (kMobileHandOver == LinkageType())
97  {
98  uint end = 8;
99  if (DescriptorLength() < end)
100  {
101  _data = NULL;
102  return;
103  }
104  end += (HasMobileNetworkID()) ? 2 : 0;
105  end += (HasMobileInitialServiceID()) ? 2 : 0;
106  if (DescriptorLength() < end)
107  _data = NULL;
108  m_offset = end + 2;
109  }
110  else if (kEventLinkage == LinkageType())
111  {
112  if (DescriptorLength() < 10)
113  _data = NULL;
114  m_offset = 12;
115  }
116  }
117  // Name bits loc expected value
118  // descriptor_tag 8 0.0 0x4A
119  // descriptor_length 8 1.0
120  // transport_stream_id 16 2.0
121  uint TSID(void) const { return (_data[2]<<8) | _data[3]; }
122  // original_network_id 16 4.0
123  uint OriginalNetworkID() const { return (_data[4]<<8) | _data[5]; }
124  // service_id 16 6.0
125  uint ServiceID(void) const { return (_data[6]<<8) | _data[7]; }
126  // linkage_type 8 8.0
127  enum
128  {
130  kEPGService = 0x02,
135  kRCSMap = 0x07,
142  };
143  uint LinkageType(void) const { return _data[8]; }
144  QString LinkageTypeString(void) const;
145 
146  // if (linkage_type == 0x08)
147  // {
148  // hand-over_type 4 9.0
149  enum
150  {
154  };
155  uint MobileHandOverType(void) const { return _data[9]>>4; }
156  QString MobileHandOverTypeString(void) const;
157  // reserved_future_use 3 9.4
158  // origin_type 1 9.7
159  enum
160  {
161  kOriginNIT = 0x0,
162  kOriginSDT = 0x1,
163  };
164  uint MobileOriginType(void) const { return _data[9]&0x1; }
165  QString MobileOriginTypeString(void) const;
166  // if (hand-over_type == 0x01 || hand-over_type == 0x02 ||
167  // hand-over_type == 0x03)
168  // { network_id 16 10.0 }
169  bool HasMobileNetworkID(void) const
170  { return bool(MobileHandOverType() & 0x3); }
171  uint MobileNetworkID(void) const { return (_data[10]<<8) | _data[11]; }
172  // if (origin_type ==0x00)
173  // { initial_service_id 16 HasNetworkID()?10.0:12.0 }
174  bool HasMobileInitialServiceID(void) const
175  { return kOriginNIT == MobileOriginType(); }
177  {
178  return HasMobileNetworkID() ?
179  ((_data[12]<<8) | _data[13]) : ((_data[10]<<8) | _data[11]);
180  }
181  // }
182  // if (linkage_type == 0x0D)
183  // {
184  // target_event_id 16 9.0
185  uint TargetEventID(void) const { return (_data[9]<<8) | _data[10]; }
186  // target_listed 1 11.0
187  bool IsTargetListed(void) const { return _data[11]&0x80; }
188  // event_simulcast 1 11.1
189  bool IsEventSimulcast(void) const { return _data[11]&0x40; }
190  // reserved 6 11.2
191  // }
192  // for (i=0;i<N;i++)
193  // { private_data_byte 8 bslbf }
194  const unsigned char *PrivateData(void) const
195  { return &_data[m_offset]; }
197  { return DescriptorLength() + 2 - m_offset; }
198 
199  private:
201 };
202 
203 // DVB Bluebook A038 (Sept 2011) p 38
205 {
206  public:
207  AdaptationFieldDataDescriptor(const unsigned char *data, int len = 300) :
208  MPEGDescriptor(data, len, DescriptorID::adaptation_field_data, 1) { }
209  // Name bits loc expected value
210  // descriptor_tag 8 0.0 0x70
211  // descriptor_length 8 1.0
212  // adapt_field_data_id 8 2.0
213  uint AdaptationFieldDataID(void) const { return _data[2]; }
214  QString toString(void) const
215  {
216  return QString("AdaptationFieldDataDescriptor "
217  "adaptation_field_data_identifier(%1)")
218  .arg(AdaptationFieldDataID());
219  }
220 };
221 
222 // DVB Bluebook A038 (Sept 2011) p 38
224 {
225  public:
226  AncillaryDataDescriptor(const unsigned char *data, int len = 300) :
227  MPEGDescriptor(data, len, DescriptorID::ancillary_data, 1) { }
228  // Name bits loc expected value
229  // descriptor_tag 8 0.0 0x6b
230  // descriptor_length 8 1.0
231  // ancillary_data_id 8 2.0
232  uint AncillaryDataID(void) const { return _data[2]; }
233  QString toString(void) const
234  {
235  return QString("AncillaryDataDescriptor "
236  "ancillary_data_identifier(%1)")
237  .arg(AncillaryDataID());
238  }
239 };
240 
241 // DVB Bluebook A038 (Sept 2011) p 39
243 {
244  public:
245  AnnouncementSupportDescriptor(const unsigned char *data, int len = 300) :
246  MPEGDescriptor(data, len, DescriptorID::announcement_support) { }
247  // Name bits loc expected value
248  // descriptor_tag 8 0.0 0x6e
249  // descriptor_length 8 1.0
250  // announcmnt_supprt_indic 16 2.0
251  // for (i=0; i<N; i++)
252  // {
253  // announcement_type 4 0.0+p
254  // reserved_future_use 1 0.4+p
255  // reference_type 3 0.5+p
256  // if (reference_type & 0x3)
257  // {
258  // original_network_id 16 0.0+p
259  // transport_stream_id 16 2.0+p
260  // service_id 16 4.0+p
261  // component_tag 8 6.0+p
262  // } 7.0
263  // }
264 };
265 
266 // DVB Bluebook A038 (Sept 2011) p 41
268 {
269  public:
270  BouquetNameDescriptor(const unsigned char *data, int len = 300) :
271  MPEGDescriptor(data, len, DescriptorID::bouquet_name) { }
272  // Name bits loc expected value
273  // descriptor_tag 8 0.0 0x47
274  // descriptor_length 8 1.0
275  // for(i=0;i<N;i++) { char 8 }
276  QString BouquetName(void) const
277  { return dvb_decode_text(_data+2, _data[1]); }
278  QString BouquetShortName(void) const
279  { return dvb_decode_short_name(_data+2, _data[1]); }
280 
281  QString toString(void) const
282  {
283  return QString("BouquetNameDescriptor: Bouquet Name(%1)")
284  .arg(BouquetName());
285  }
286 };
287 
288 // DVB Bluebook A038 (Sept 2011) p 41
290 {
291  public:
292  CAIdentifierDescriptor(const unsigned char *data, int len = 300) :
293  MPEGDescriptor(data, len, DescriptorID::ca_identifier) { }
294  // Name bits loc expected value
295  // descriptor_tag 8 0.0 0x53
296  // descriptor_length 8 1.0
297  //
298  uint CASystemCount(void) const { return DescriptorLength() >> 1; }
299  // for (i=0; i<N; i++)
300  // { CA_system_id 16 }
301  int CASystemId(uint i) const
302  { return (_data[2 + i*2] << 8) | _data[3 + i*2]; }
303  QString toString(void) const;
304 };
305 
306 // DVB Bluebook A038 (Sept 2011) p 42
308 {
309  public:
310  CellFrequencyLinkDescriptor(const unsigned char *data, int len = 300) :
311  MPEGDescriptor(data, len, DescriptorID::cell_frequency_link) { }
312  // Name bits loc expected value
313  // descriptor_tag 8 0.0 0x6d
314  // descriptor_length 8 1.0
315  // for (i=0; i<N; i++)
316  // {
317  // cell_id 16 0.0+p
318  // frequency 32 2.0+p
319  // subcell_info_loop_len 8 6.0+p
320  // for (j=0;j<N;j++)
321  // {
322  // cell_id_extension 8 0.0+p2
323  // transposer_freq 32 1.0+p2
324  // } 5.0
325  // }
326 };
327 
328 // DVB Bluebook A038 (Sept 2011) p 42
330 {
331  public:
332  CellListDescriptor(const unsigned char *data, int len = 300) :
333  MPEGDescriptor(data, len, DescriptorID::cell_list) { }
334  // Name bits loc expected value
335  // descriptor_tag 8 0.0 0x6c
336  // descriptor_length 8 1.0
337  // for (i=0; i<N; i++)
338  // {
339  // cell_id 16 0.0+p
340  // cell_latitude 16 2.0+p
341  // cell_longitude 16 4.0+p
342  // cell_extent_of_lat 12 6.0+p
343  // cell_extent_of_longit 12 7.4+p
344  // subcell_info_loop_len 8 9.0+p
345  // for (j=0;j<N;j++)
346  // {
347  // cell_id_extension 8 0.0+p2
348  // subcell_latitude 16 1.0+p2
349  // subcell_longitude 16 3.0+p2
350  // subcell_ext_of_lat 12 4.0+p2
351  // subcell_ext_of_long 12 5.4+p2
352  // } 7.0
353  // }
354 };
355 
356 // DVB Bluebook A038 (Sept 2011) p 44
358 {
359  public:
360  ComponentDescriptor(const unsigned char *data, int len = 300) :
361  MPEGDescriptor(data, len, DescriptorID::component) { }
362  // Name bits loc expected value
363  // descriptor_tag 8 0.0 0x50
364  // descriptor_length 8 1.0
365  // reserved_future_use 4 2.0
366  // stream_content 4 2.4
367  uint StreamContent(void) const { return _data[2] & 0xf; }
368  // component_type 8 3.0
369  uint ComponentType(void) const { return _data[3]; }
370  // component_tag 8 4.0
371  uint ComponentTag(void) const { return _data[4]; }
372  // ISO_639_language_code 24 5.0
373  int LanguageKey(void) const
374  { return iso639_str3_to_key(&_data[5]); }
375  QString LanguageString(void) const
376  { return iso639_key_to_str3(LanguageKey()); }
377  int CanonicalLanguageKey(void) const
379  QString CanonicalLanguageString(void) const
381  //
382  // for (i=0; i<N; i++) { text_char 8 }
383 
384  bool IsVideo(void) const
385  {
386  return 0x1 == StreamContent() || // MPEG-2
387  0x5 == StreamContent() || // H.264
388  0x9 == StreamContent(); // HEVC
389  }
390  bool IsAudio(void) const
391  {
392  switch(StreamContent())
393  {
394  case 0x02:
395  case 0x04:
396  case 0x06:
397  case 0x07:
398  return true;
399  default:
400  return false;
401  }
402  }
403  bool IsSubtitle(void) const { return 0x3 == StreamContent(); }
404 
405  unsigned char VideoProperties(void) const
406  {
407  if (0x1 == StreamContent())
408  return MPEG2Properties();
409  if (0x5 == StreamContent())
410  return VID_AVC | AVCProperties();
411  if (0x9 == StreamContent())
412  return /* VID_HEVC | */ HEVCProperties();
413 
414  return VID_UNKNOWN;
415  }
416 
417  unsigned char MPEG2Properties(void) const
418  {
419  switch(ComponentType())
420  {
421  case 0x2: case 0x3: case 0x4:
422  case 0x6: case 0x7: case 0x8:
423  return VID_WIDESCREEN;
424  case 0x09:
425  case 0x0D:
426  return VID_HDTV;
427  case 0x0A: case 0x0B: case 0x0C:
428  case 0x0E: case 0x0F: case 0x10:
429  return VID_WIDESCREEN | VID_HDTV;
430  default:
431  return VID_UNKNOWN;
432  }
433  }
434 
435  unsigned char AVCProperties(void) const
436  {
437  switch(ComponentType())
438  {
439  case 0x3: case 0x4:
440  case 0x7: case 0x8:
441  return VID_WIDESCREEN;
442  case 0x0B: case 0x0C:
443  case 0x0F: case 0x10:
444  return VID_WIDESCREEN | VID_HDTV;
445  case 0x80: case 0x81:
446  case 0x82: case 0x83:
447  return VID_WIDESCREEN | VID_HDTV | VID_3DTV;
448  default:
449  return VID_UNKNOWN;
450  }
451  }
452 
453  unsigned char HEVCProperties(void) const
454  {
455  switch(ComponentType())
456  {
457  case 0x0: case 0x1:
458  case 0x2: case 0x3:
459  return VID_HDTV;
460  case 0x5:
461  return VID_HDTV; // | VID_UHDTV;
462  default:
463  return VID_UNKNOWN;
464  }
465  }
466 
467  unsigned char AudioProperties(void) const
468  {
469  switch (StreamContent())
470  {
471  case 0x2:
472  return MP2Properties();
473  case 0x04:
474  return AC3Properties();
475  case 0x06:
476  return HEAACProperties();
477  default:
478  return AUD_UNKNOWN;
479  }
480  }
481 
482  unsigned char MP2Properties(void) const
483  {
484  switch (ComponentType())
485  {
486  case 0x1:
487  return AUD_MONO;
488  case 0x3:
489  return AUD_STEREO;
490  case 0x5:
491  return AUD_SURROUND;
492  case 0x40:
493  return AUD_VISUALIMPAIR;
494  case 0x41:
495  return AUD_HARDHEAR;
496  default:
497  return AUD_UNKNOWN;
498  }
499  }
500 
501  unsigned char AC3Properties(void) const
502  {
503  unsigned char properties = AUD_UNKNOWN;
504 
505  switch (ComponentType() & 0x7)
506  {
507  case 0x0:
508  properties |= AUD_MONO;
509  break;
510  case 0x2:
511  properties |= AUD_STEREO;
512  break;
513  case 0x3:
514  properties |= AUD_DOLBY;
515  break;
516  case 0x4: case 0x5:
517  properties |= AUD_SURROUND;
518  break;
519  }
520 
521  if (((ComponentType() >> 3) & 0x7) == 0x2)
522  properties |= AUD_VISUALIMPAIR;
523 
524  if (((ComponentType() >> 3) & 0x7) == 0x3)
525  properties |= AUD_HARDHEAR;
526 
527  return properties;
528  }
529 
530  unsigned char HEAACProperties(void) const
531  {
532  switch (ComponentType())
533  {
534  case 0x1:
535  return AUD_MONO;
536  case 0x3:
537  case 0x43:
538  return AUD_STEREO;
539  case 0x5:
540  return AUD_SURROUND;
541  case 0x40:
542  case 0x44:
543  return AUD_VISUALIMPAIR;
544  case 0x41:
545  case 0x45:
546  return AUD_HARDHEAR;
547  default:
548  return AUD_UNKNOWN;
549  }
550  }
551 
552  unsigned char SubtitleType(void) const
553  {
554  if (!IsSubtitle())
555  return SUB_UNKNOWN;
556 
557  switch (ComponentType())
558  {
559  case 0x1:
560  case 0x3:
561  case 0x10: case 0x11: case 0x12: case 0x13:
562  return SUB_NORMAL;
563  case 0x20: case 0x21: case 0x22: case 0x23:
564  return SUB_HARDHEAR;
565  default:
566  return SUB_UNKNOWN;
567  }
568  }
569 
570  QString toString(void) const
571  {
572  return QString("ComponentDescriptor(stream_content: 0x%1, "
573  "component_type: 0x%2)").arg(StreamContent(), 0, 16)
574  .arg(ComponentType(), 0, 16);
575  }
576 };
577 
578 // DVB Bluebook A038 (Sept 2011) p 46
580 {
581  public:
582  ContentDescriptor(const unsigned char *data, int len = 300) :
584  // Name bits loc expected value
585  // descriptor_tag 8 0.0 0x54
586  // descriptor_length 8 1.0
587 
588  uint Count(void) const { return DescriptorLength() >> 1; }
589  // for (i=0;i<N;i++)
590  // {
591  // content_nibble_level_1 4 0.0+p
592  uint Nibble1(uint i) const { return _data[2 + (i<<1)] >> 4; }
593  // content_nibble_level_2 4 0.4+p
594  uint Nibble2(uint i) const { return _data[2 + (i<<1)] & 0xf; }
595 
596  uint Nibble(uint i) const { return _data[2 + (i<<1)]; }
597 
598  // user_nibble 4 1.0+p
599  uint UserNibble1(uint i) const { return _data[3 + (i<<1)] >> 4; }
600  // user_nibble 4 1.4+p
601  uint UserNibble2(uint i) const { return _data[3 + (i<<1)] & 0xf; }
602  uint UserNibble(uint i) const { return _data[3 + (i<<1)]; }
603  // } 2.0
604 
606  QString GetDescription(uint i) const;
607  QString toString(void) const;
608 
609  protected:
610  static void Init(void);
611 
612  protected:
613  static QMutex categoryLock;
614  static QMap<uint,QString> categoryDesc;
615  static volatile bool categoryDescExists;
616 };
617 
618 // DVB Bluebook A038 (Sept 2011) p 49
620 {
621  public:
622  CountryAvailabilityDescriptor(const unsigned char *data, int len = 300) :
623  MPEGDescriptor(data, len, DescriptorID::country_availability) { }
624  // Name bits loc expected value
625  // descriptor_tag 8 0.0 0x49
626  // descriptor_length 8 1.0
627 
628  uint CountryCount(void) const { return ((DescriptorLength() - 1) / 3); }
629 
630  // country_avail_flag 1 2.0
631  bool IsAvailable(void) const { return (_data[2] & 0x1); }
632  // reserved_future_use 7 2.1
633  //
634  // for (i=0; i<N; i++)
635  // { country_code 24 }
636  QString CountryNames(void) const
637  {
638  QString countries="";
639  for (uint i=0; i<CountryCount(); i++)
640  {
641  if (i!=0) countries.append(" ");
642  countries.append(QString::fromLatin1(
643  (const char *)_data+(3*(i+1)), 3));
644  };
645  return countries;
646  }
647 
648  QString toString(void) const
649  {
650  return QString("CountryAvailabilityDescriptor: Available(%1) in (%2)")
651  .arg(IsAvailable()).arg(CountryNames());
652  }
653 };
654 
655 // DVB Bluebook A038 (Sept 2011) p 50
657 {
658  public:
659  DataBroadcastDescriptor(const unsigned char *data, int len = 300) :
660  MPEGDescriptor(data, len, DescriptorID::data_broadcast) { }
661  // Name bits loc expected value
662  // descriptor_tag 8 0.0 0x64
663  // descriptor_length 8 1.0
664 
665  // data_broadcast_id 16 2.0
666  uint DataBroadcastId(void) const { return _data[2] << 8 | _data[3]; }
667  // component_tag 8 4.0
668  uint DataComponentTag(void) const { return _data[4]; }
669  // selector_length 8 5.0
670  uint SelectorLength(void) const { return _data[5]; }
671  // for (i=0; i<selector_length; i++)
672  // {
673  // selector_byte 8
674  const unsigned char *Selector(void) const { return &_data[6]; }
675  // }
676  // ISO_639_language_code 24
677  int LanguageKey(void) const
678  { return iso639_str3_to_key(&_data[6 + SelectorLength()]); }
679  QString LanguageString(void) const
680  { return iso639_key_to_str3(LanguageKey()); }
681  int CanonicalLanguageKey(void) const
683  QString CanonicalLanguageString(void) const
685  // text_length 8
686  uint TextLength(void) const { return _data[6 + SelectorLength() + 3]; }
687  // for (i=0; i<text_length; i++) { text_char 8 }
688  QString Text(void) const
689  {
690  return dvb_decode_text(&_data[6 + SelectorLength() + 4], TextLength());
691  }
692 
693  QString toString(void) const;
694 };
695 
696 // DVB Bluebook A038 (Sept 2011) p 51
698 {
699  public:
700  DataBroadcastIdDescriptor(const unsigned char *data, int len = 300) :
701  MPEGDescriptor(data, len, DescriptorID::data_broadcast_id) { }
702  // Name bits loc expected value
703  // descriptor_tag 8 0.0 0x66
704  // descriptor_length 8 1.0
705 
706  // data_broadcast_id 16 2.0
707  uint DataBroadCastId(void) const { return _data[2] << 8 | _data[3]; }
708  // for(i=0; i < N;i++ )
709  // { id_selector_byte 8 }
710 };
711 
712 // DVB Bluebook A038 (Sept 2011) p 51
714 {
715  public:
716  CableDeliverySystemDescriptor(const unsigned char *data, int len = 300) :
717  MPEGDescriptor(data, len, DescriptorID::cable_delivery_system) { }
718  // Name bits loc expected value
719  // descriptor_tag 8 0.0 0x44
720  // descriptor_length 8 1.0
721 
722  // frequency 32 2.0
723  uint FrequencyRaw(void) const
724  {
725  return ((_data[2]<<24) | (_data[3]<<16) |
726  (_data[4]<<8) | (_data[5]));
727  }
728  unsigned long long FrequencyHz(void) const
729  {
730  return byte4BCD2int(_data[2], _data[3], _data[4], _data[5]) * 100;
731  }
732  // reserved_future_use 12 6.0
733  // FEC_outer 4 7.4
734  enum
735  {
738  };
739  uint FECOuter(void) const { return _data[7] & 0xf; }
740  QString FECOuterString(void) const
741  {
742  return (FECOuter() == kOuterFEC_None) ? "None" :
743  ((FECOuter() == kOuterFEC_RS204_RS188) ? "RS(204/188)" : "unknown");
744  }
745  // modulation 8 8.0
746  enum
747  {
753  };
754  uint Modulation(void) const { return _data[8]; }
755  QString ModulationString(void) const
756  {
757  static QString ms[] =
758  { "auto", "qam_16", "qam_32", "qam_64", "qam_128", "qam_256" };
759  return (Modulation() <= kModulationQAM256) ?
760  ms[Modulation()] : QString("auto");
761  }
762  // symbol_rate 28 9.0
763  uint SymbolRateRaw(void) const
764  {
765  return ((_data[9]<<20) | (_data[10]<<12) |
766  (_data[11]<<4) | (_data[12]>>4));
767  }
768  uint SymbolRateHz(void) const
769  {
770  return ((byte3BCD2int(_data[9], _data[10], _data[11]) * 1000) +
771  (byteBCDH2int(_data[12]) * 100));
772  }
773  // FEC_inner 4 12.4
774  enum
775  {
783  };
784  uint FECInner(void) const { return _data[12] & 0xf; }
785  QString FECInnerString(void) const { return coderate_inner(FECInner()); }
786  QString toString(void) const;
787 };
788 
789 // DVB Bluebook A038 (Sept 2011) p 53
791 {
792  public:
794  const unsigned char *data, int len = 300) :
795  MPEGDescriptor(data, len, DescriptorID::satellite_delivery_system) { }
796  // Name bits loc expected value
797  // descriptor_tag 8 0.0 0x43
798  // descriptor_length 8 1.0
799 
801  uint FrequencyRaw(void) const
802  {
803  return ((_data[2]<<24) | (_data[3]<<16) |
804  (_data[4]<<8) | (_data[5]));
805  }
806  unsigned long long FrequencyHz(void) const
807  {
808  return byte4BCD2int(_data[2], _data[3], _data[4], _data[5]) * 10;
809  }
811  uint OrbitalPosition(void) const
812  { return byte2BCD2int(_data[6], _data[7]); }
813  QString OrbitalPositionString(void) const
814  {
815  uint num = OrbitalPosition();
816  return QString("%1.%2 %3").arg(num / 10).arg(num % 10)
817  .arg((IsEast()) ? "East" : "West");
818  }
819  double OrbitalPositionFloat() const
820  { return ((double) OrbitalPosition()) / 10.0; }
822  bool IsEast(void) const { return (_data[8]&0x80); }
823  bool IsWest(void) const { return !IsEast(); }
824  // polarization 2 8.1
825  uint Polarization(void) const { return (_data[8]>>5)&0x3; }
826  QString PolarizationString() const
827  {
828  static QString ps[] = { "h", "v", "l", "r" };
829  return ps[Polarization()];
830  }
831  bool IsCircularPolarization(void) const { return (_data[8]>>6)&0x1; }
832  bool IsLinearPolarization(void) const { return !((_data[8]>>6)&0x1); }
833  bool IsHorizontalLeftPolarization(void) const { return (_data[8]>>5)&0x1; }
835  { return !((_data[8]>>5)&0x1); }
836  // roll off 2 8.3
837  enum
838  {
843  };
844  uint RollOff(void) const { return (_data[8]>>3)&0x3; }
845  QString RollOffString(void) const
846  {
847  static QString ro[] = { "0.35", "0.20", "0.25", "auto" };
848  return ro[RollOff()];
849  }
850  // modulation system 1 8.5
851  uint ModulationSystem(void) const { return (_data[8]>>2)&0x1; }
852  QString ModulationSystemString(void) const
853  {
854  return ModulationSystem() ? "DVB-S2" : "DVB-S";
855  }
856  // modulation 2 8.6
857  enum
858  {
859  kModulationQPSK_NS = 0x0, // Non standard QPSK for Bell ExpressVu
860  // should be "auto" according to DVB SI standard
864  };
865  uint Modulation(void) const { return _data[8]&0x03; }
866  QString ModulationString(void) const
867  {
868  static QString ms[] = { "qpsk", "qpsk", "8psk", "qam_16" };
869  return ms[Modulation()];
870  }
871  // symbol_rate 28 9.0
872  uint SymbolRate(void) const
873  {
874  return ((_data[9]<<20) | (_data[10]<<12) |
875  (_data[11]<<4) | (_data[12]>>4));
876  }
877  uint SymbolRateHz(void) const
878  {
879  return ((byte3BCD2int(_data[9], _data[10], _data[11]) * 1000) +
880  (byteBCDH2int(_data[12]) * 100));
881  }
882  // FEC_inner 4 12.4
883  enum
884  {
892  };
893  uint FECInner(void) const { return _data[12] & 0xf; }
894  QString FECInnerString(void) const { return coderate_inner(FECInner()); }
895 
896  QString toString(void) const;
897 };
898 
899 // DVB Bluebook A038 (Sept 2011) p 55
901 {
902  public:
904  const unsigned char *data, int len = 300) :
905  MPEGDescriptor(data, len, DescriptorID::terrestrial_delivery_system) { }
906  // Name bits loc expected value
907  // descriptor_tag 8 0.0 0x5a
908  // descriptor_length 8 1.0
909 
910  // centre_frequency 32 2.0
911  uint Frequency(void) const
912  {
913  return ((_data[2]<<24) | (_data[3]<<16) |
914  (_data[4]<<8) | (_data[5]));
915  }
916  uint64_t FrequencyHz(void) const { return uint64_t(Frequency()) * 10ULL; }
917 
918  // bandwidth 3 6.0
919  enum
920  {
925  };
926  uint Bandwidth(void) const { return _data[6]>>5; }
927  uint BandwidthHz(void) const { return (8 - Bandwidth()) * 1000000; }
928  QString BandwidthString(void) const
929  {
930  static QString bs[] = { "8", "7", "6", "5" };
931  return (Bandwidth() <= kBandwidth5Mhz) ? bs[Bandwidth()] : "auto";
932  }
933  // priority 1 6.3
934  bool HighPriority(void) const { return _data[6] & 0x10; }
935  // time_slicing_indicator 1 6.4
936  bool IsTimeSlicingIndicatorUsed(void) const { return !(_data[6] & 0x08); }
937  // MPE-FEC_indicator 1 6.5
938  bool IsMPE_FECUsed(void) const { return !(_data[6] & 0x04); }
939  // reserved_future_use 2 6.6
940  // constellation 2 7.0
941  enum
942  {
947  };
948  uint Constellation(void) const { return _data[7]>>6; }
949  QString ConstellationString(void) const
950  {
951  static QString cs[] = { "qpsk", "qam_16", "qam_64", "qam_256" };
952  return (Constellation() <= kConstellationQAM256) ?
953  cs[Constellation()] : "auto";
954  }
955  // hierarchy_information 3 7.2
956  enum
957  {
966  };
967  uint Hierarchy(void) const { return (_data[7]>>3) & 0x7; }
968 
970  QString HierarchyString(void) const
971  {
972  static QString hs[] = { "n", "1", "2", "4", "a", "a", "a", "a" };
973  return hs[Hierarchy()];
974  }
975  bool NativeInterleaver(void) const { return _data[7] & 0x20; }
976  uint Alpha(void) const
977  {
978  uint i = (_data[7]>>3) & 0x3;
979  return (0x2 == i) ? 4 : i;
980  }
981  // code_rate-HP_stream 3 7.5
982  enum
983  {
989  };
990  uint CodeRateHP(void) const { return _data[7] & 0x7; }
991  QString CodeRateHPString(void) const
992  {
993  static QString cr[] = {
994  "1/2", "2/3", "3/4", "5/6", "7/8", "auto", "auto", "auto"
995  };
996  return cr[CodeRateHP()];
997  }
998  // code_rate-LP_stream 3 8.0
999  uint CodeRateLP(void) const { return (_data[8]>>5) & 0x7; }
1000  QString CodeRateLPString(void) const
1001  {
1002  static QString cr[] = {
1003  "1/2", "2/3", "3/4", "5/6", "7/8", "auto", "auto", "auto"
1004  };
1005  return cr[CodeRateLP()];
1006  }
1007  // guard_interval 2 8.3
1008  enum
1009  {
1014  };
1015  uint GuardInterval(void) const { return (_data[8]>>3) & 0x3; }
1016  QString GuardIntervalString(void) const
1017  {
1018  static QString gi[] = { "1/32", "1/16", "1/8", "1/4" };
1019  return gi[GuardInterval()];
1020  }
1021  // transmission_mode 2 8.5
1022  enum
1023  {
1027  };
1028  uint TransmissionMode(void) const { return (_data[8]>>1) & 0x3; }
1029  QString TransmissionModeString(void) const
1030  {
1031  static QString tm[] = { "2", "8", "4", "auto" };
1032  return tm[TransmissionMode()];
1033  }
1034  // other_frequency_flag 1 8.7
1035  bool OtherFrequencyInUse(void) const { return _data[8] & 0x1; }
1036  // reserved_future_use 32 9.0
1037 
1038  QString toString(void) const;
1039 };
1040 
1041 // DVB Bluebook A038 (Sept 2011) p 58
1043 {
1044  public:
1045  DSNGDescriptor(const unsigned char *data, int len = 300) :
1046  MPEGDescriptor(data, len, DescriptorID::dsng) { }
1047  // Name bits loc expected value
1048  // descriptor_tag 8 0.0 0x68
1049  // descriptor_length 8 1.0
1050  // for (i=0;i<N;i++) { byte 8 }
1051 };
1052 
1053 // DVB Bluebook A038 (Sept 2011) p 58
1055 {
1056  public:
1057  ExtendedEventDescriptor(const unsigned char *data, int len = 300) :
1058  MPEGDescriptor(data, len, DescriptorID::extended_event) { }
1059  // Name bits loc expected value
1060  // descriptor_tag 8 0.0 0x4e
1061  // descriptor_length 8 1.0
1062 
1063  // descriptor_number 4 2.0
1064  uint DescriptorNumber(void) const { return _data[2] >> 4; }
1065  // last_number 4 2.4
1066  uint LastNumber(void) const { return _data[2] & 0xf; }
1067  // ISO_639_language_code 24 3.0
1068  int LanguageKey(void) const
1069  { return iso639_str3_to_key(&_data[3]); }
1070  QString LanguageString(void) const
1071  { return iso639_key_to_str3(LanguageKey()); }
1072  int CanonicalLanguageKey(void) const
1074  QString CanonicalLanguageString(void) const
1076  // length_of_items 8 6.0
1077  uint LengthOfItems(void) const { return _data[6]; }
1078  // for ( i=0;i<N;i++)
1079  // {
1080  // item_description_len 8 0.0+p
1081  // for (j=0;j<N;j++) { item_desc_char 8 }
1082  // item_length 8 1.0+p2
1083  // for (j=0;j<N;j++) { item_char 8 }
1084  // }
1085  // text_length 8
1086  uint TextLength(void) const { return _data[7 + _data[6]]; }
1087  // for (i=0; i<N; i++) { text_char 8 }
1088  QString Text(void) const
1089  { return dvb_decode_text(&_data[8 + _data[6]], TextLength()); }
1090 
1091  // HACK beg -- Pro7Sat is missing encoding
1092  QString Text(const unsigned char *encoding_override,
1093  uint encoding_length) const
1094  {
1095  return dvb_decode_text(&_data[8 + _data[6]], TextLength(),
1096  encoding_override, encoding_length);
1097  }
1098  // HACK end -- Pro7Sat is missing encoding
1099 };
1100 
1101 // DVB Bluebook A038 (Sept 2011) p 60
1103 {
1104  public:
1105  FrequencyListDescriptor(const unsigned char *data, int len = 300) :
1106  MPEGDescriptor(data, len, DescriptorID::frequency_list) { }
1107  // Name bits loc expected value
1108  // descriptor_tag 8 0.0 0x62
1109  // descriptor_length 8 1.0
1110 
1111  // reserved_future_use 6 2.0
1112  // coding_type 2 2.6
1113  enum
1114  {
1119  };
1120  uint CodingType(void) const { return _data[2] & 0x3; }
1121  // for (i=0;I<N;i++)
1122  // {
1123  // centre_frequency 32
1124  // }
1125  uint FrequencyCount() const { return DescriptorLength()>>2; }
1126  unsigned long long Frequency(uint i) const
1127  {
1129  return ((_data[3 + (i<<2)]<<24) | (_data[4 + (i<<2)]<<16) |
1130  (_data[5 + (i<<2)]<<8) | (_data[6 + (i<<2)]));
1131  else
1132  return byte4BCD2int(_data[3 + (i<<2)], _data[4 + (i<<2)],
1133  _data[5 + (i<<2)], _data[6 + (i<<2)]);
1134  }
1135  unsigned long long FrequencyHz(uint i) const
1136  {
1137  return Frequency(i) *
1138  ((kCodingTypeTerrestrial == CodingType()) ? 10 : 100);
1139  }
1140 
1141  QString toString(void) const;
1142 };
1143 
1144 // DVB Bluebook A038 (Sept 2011) p 70
1145 // ETSI EN 300 468 p 58
1147 {
1148  public:
1149  LocalTimeOffsetDescriptor(const unsigned char *data, int len = 300) :
1150  MPEGDescriptor(data, len, DescriptorID::local_time_offset) { }
1151  // Name bits loc expected value
1152  // descriptor_tag 8 0.0 0x58
1153  // descriptor_length 8 1.0
1154  uint Count(void) const { return DescriptorLength() / 13; }
1155  // for(i=0;i<N;i++)
1156  // {
1157  // country_code 24 0.0+p
1159  {
1160  int o = 2 + i*13;
1161  return ((_data[o] << 16) | (_data[o+1] << 8) | _data[o+2]);
1162  }
1163  QString CountryCodeString(uint i) const
1164  {
1165  int o = 2 + i*13;
1166  return QString(_data[o]) + QChar(_data[o+1]) + QChar(_data[o+2]);
1167  }
1168  // country_region_id 6 3.0+p
1169  uint CountryRegionId(uint i) const { return _data[2 + i*13 + 3] >> 2; }
1170  // reserved 1 3.6+p
1171  // local_time_off_polarity 1 3.7+p
1174  { return _data[2 + i*13 + 3] & 0x01; }
1175  // local_time_offset 16 4.0+p
1177  { return (_data[2 + i*13 + 4] << 8) | _data[2 + i*13 + 5]; }
1179  { return (LocalTimeOffsetPolarity(i) ? -1 : +1) * LocalTimeOffset(i); }
1180  // time_of_change 40 6.0+p
1181  // TODO decode this
1182  // next_time_offset 16 11.0+p
1184  { return (_data[2 + i*13 + 11]<<8) | _data[2 + i*13 + 12]; }
1185  // } 13.0
1186  QString toString(void) const;
1187 };
1188 
1189 // DVB Bluebook A038 (Sept 2011) p 71
1191 {
1192  public:
1193  MosaicDescriptor(const unsigned char *data, int len = 300) :
1194  MPEGDescriptor(data, len, DescriptorID::mosaic) { }
1195  // Name bits loc expected value
1196  // descriptor_tag 8 0.0 0x51
1197  // descriptor_length 8 1.0
1198 
1199  // mosaic_entry_point 1 2.0
1200  // num_horiz_elem_cells 3 2.1
1201  // reserved_future_use 1 2.4
1202  // num_vert_elem_cells 3 2.5
1203  // for (i=0;i<N; i++)
1204  // {
1205  // logical_cell_id 6 0.0+p
1206  // reserved_future_use 7 0.6+p
1207  // logical_cell_pres_info 3 1.5+p
1208  // elem_cell_field_len 8 2.0+p
1209  // for (i=0; j<elementary_cell_field_length; j++)
1210  // {
1211  // reserved_future_use 2
1212  // elementary_cell_id 6
1213  // }
1214  // cell_linkage_info 8
1215  // if (cell_linkage_info == 0x01)
1216  // {
1217  // bouquet_id 16
1218  // }
1219  // if (cell_linkage_info == 0x02)
1220  // {
1221  // original_network_id 16
1222  // transport_stream_id 16
1223  // service_id 16
1224  // }
1225  // if (cell_linkage_info == 0x03)
1226  // {
1227  // original_network_id 16
1228  // transport_stream_id 16
1229  // service_id 16
1230  // }
1231  // if (cell_linkage_info == 0x04)
1232  // {
1233  // original_network_id 16
1234  // transport_stream_id 16
1235  // service_id 16
1236  // event_id 16
1237  // }
1238  // }
1239 };
1240 
1241 // DVB Bluebook A038 (Sept 2011) p 74
1243 {
1244  public:
1246  const unsigned char *data, int len = 300) :
1247  MPEGDescriptor(data, len, DescriptorID::multilingual_bouquet_name) { }
1248  // Name bits loc expected value
1249  // descriptor_tag 8 0.0 0x5c
1250  // descriptor_length 8 1.0
1251 
1252  // for (i=0;i<N;i++)
1253  // {
1254  // ISO_639_language_code 24
1255  // bouquet_name_length 8
1256  // for (j=0;j<N;j++) { char 8 }
1257  // }
1258 };
1259 
1260 // DVB Bluebook A038 (Sept 2011) p 75
1262 {
1263  public:
1265  const unsigned char *data, int len = 300) :
1266  MPEGDescriptor(data, len, DescriptorID::multilingual_network_name)
1267  {
1268  // Name bits loc expected value
1269  // descriptor_tag 8 0.0 0x5b
1270  // descriptor_length 8 1.0
1271  }
1272 
1273  // for (i=0;i<N;i++)
1274  // {
1275  // ISO_639_language_code 24
1276  // network_name_length 8
1277  // for (j=0;j<N;j++) { char 8 }
1278  // }
1279 };
1280 
1281 // DVB Bluebook A038 (Sept 2011) p 76
1283 {
1284  public:
1286  const unsigned char *data, int len = 300) :
1287  MPEGDescriptor(data, len, DescriptorID::multilingual_service_name) { }
1288  // Name bits loc expected value
1289  // descriptor_tag 8 0.0 0x5d
1290  // descriptor_length 8 1.0
1291 
1292  // for (i=0;i<N;i++)
1293  // {
1294  // ISO_639_language_code 24
1295  // service_provider_name_length 8
1296  // for (j=0;j<N;j++) { char 8 }
1297  // service_name_length 8
1298  // for (j=0;j<N;j++) { char 8 }
1299  // }
1300 };
1301 
1302 // DVB Bluebook A038 (Sept 2011) p 76
1304 {
1305  public:
1306  NVODReferenceDescriptor(const unsigned char *data, int len = 300) :
1307  MPEGDescriptor(data, len, DescriptorID::nvod_reference) { }
1308  // Name bits loc expected value
1309  // descriptor_tag 8 0.0 0x4b
1310  // descriptor_length 8 1.0
1311  uint Count(void) const { return DescriptorLength() / 6; }
1312 
1313  // for (i=0;i<N;i++)
1314  // {
1315  // transport_stream_id 16
1317  { return (_data[i * 6 + 2] << 8) | _data[i * 6 + 3]; }
1318  // original_network_id 16
1320  { return (_data[i * 6 + 4] << 8) | _data[i * 6 + 5]; }
1321  // service_id 16
1323  { return (_data[i * 6 + 6] << 8) | _data[i * 6 + 7]; }
1324  // }
1325  QString toString(void) const;
1326 };
1327 
1328 // DVB Bluebook A038 (Sept 2011) p 78
1330 {
1331  public:
1332  ParentalRatingDescriptor(const unsigned char *data, int len = 300) :
1333  MPEGDescriptor(data, len, DescriptorID::parental_rating) { }
1334  // Name bits loc expected value
1335  // descriptor_tag 8 0.0 0x55
1336  // descriptor_length 8 1.0
1337  uint Count(void) const { return DescriptorLength() / 4; }
1338 
1339  // for (i=0; i<N; i++)
1340  // {
1341  // country_code 24
1342  // rating 8
1343  // }
1344 };
1345 
1346 // DVB Bluebook A038 (Sept 2011) p 78 (see also ETSI EN 300 231 PDC)
1348 {
1349  public:
1350  PDCDescriptor(const unsigned char *data, int len = 300) :
1351  MPEGDescriptor(data, len, DescriptorID::pdc, 3) { }
1352  // Name bits loc expected value
1353  // descriptor_tag 8 0.0 0x69
1354  // descriptor_length 8 1.0
1355 
1356  // reserved_future_use 4 2.0
1357  // program_id_label 20 2.4
1358  uint ProgramIdLabel(void) const
1359  { return (_data[2] & 0x0F) << 16 | _data[3] << 8 | _data[4]; }
1360  QString toString(void) const
1361  {
1362  return QString("PDCDescriptor program_id_label(%1)")
1363  .arg(ProgramIdLabel());
1364  }
1365 };
1366 
1367 // DVB Bluebook A038 (Sept 2011) p 79 (see also ETSI TS 101 162)
1369 {
1370  public:
1371  PrivateDataSpecifierDescriptor(const unsigned char *data, int len = 300) :
1372  MPEGDescriptor(data, len, DescriptorID::private_data_specifier) { }
1373  // Name bits loc expected value
1374  // descriptor_tag 8 0.0 0x5f
1375  // descriptor_length 8 1.0
1376 
1377  // private_data_specifier 32 2.0
1378  uint32_t PrivateDataSpecifier (void) const
1379  {
1380  return (_data[2] << 24 | _data[3] << 16 | _data[4] << 8 | _data[5]);
1381  }
1382 };
1383 
1384 // DVB Bluebook A038 (Sept 2011) p 79
1386 {
1387  public:
1388  ScramblingDescriptor(const unsigned char *data, int len = 300) :
1389  MPEGDescriptor(data, len, DescriptorID::scrambling, 1) { }
1390  // Name bits loc expected value
1391  // descriptor_tag 8 0.0 0x65
1392  // descriptor_length 8 1.0
1393 
1394  // scrambling_mode 8 2.0
1395  uint ScramblingMode(void) const { return _data[2]; }
1396  QString toString(void) const
1397  {
1398  return QString("ScramblingDescriptor scrambling_mode(%1)")
1399  .arg(ScramblingMode());
1400  }
1401 };
1402 
1403 // Map serviceid's to their types
1405 {
1406  public:
1407  ServiceDescriptorMapping(const uint serviceid) { m_serviceid = serviceid; }
1408  enum
1409  {
1443 
1444  };
1445  uint ServiceType(void) const { return m_serviceid; }
1446  bool IsDTV(void) const
1447  {
1448  return ((ServiceType() == kServiceTypeDigitalTelevision) ||
1449  (ServiceType() ==
1451  IsHDTV() ||
1465  }
1466  bool IsDigitalAudio(void) const
1467  {
1468  return ((ServiceType() == kServiceTypeDigitalRadioSound) ||
1470  }
1471  bool IsHDTV(void) const
1472  {
1473  return
1474  (ServiceType() == kServiceTypeHDTV) ||
1477  }
1478  bool IsTeletext(void) const
1479  {
1481  }
1482  QString toString(void) const;
1483 
1484  private:
1486 };
1487 
1488 // DVB Bluebook A038 (Sept 2011) p 80
1490 {
1491  public:
1492  ServiceDescriptor(const unsigned char *data, int len = 300) :
1493  MPEGDescriptor(data, len, DescriptorID::service) { }
1494  // Name bits loc expected value
1495  // descriptor_tag 8 0.0 0x48
1496  // descriptor_length 8 1.0
1497 
1498  // service_type 8 2.0
1499  uint ServiceType(void) const { return _data[2]; }
1500  // svc_provider_name_len 8 3.0
1501  uint ServiceProviderNameLength(void) const { return _data[3]; }
1502  // for (i=0;i<N;I++) { char 8 }
1503  QString ServiceProviderName(void) const
1504  { return dvb_decode_text(_data + 4, ServiceProviderNameLength()); }
1505  QString ServiceProviderShortName(void) const
1506  {
1508  }
1509  // service_name_length 8
1511  { return _data[4 + ServiceProviderNameLength()]; }
1512  // for (i=0;i<N;I++) { char 8 }
1513  QString ServiceName(void) const
1514  {
1516  ServiceNameLength());
1517  }
1518  QString ServiceShortName(void) const
1519  {
1521  ServiceNameLength());
1522  }
1523  bool IsDTV(void) const
1524  { return ServiceDescriptorMapping(ServiceType()).IsDTV(); }
1525  bool IsDigitalAudio(void) const
1527  bool IsHDTV(void) const
1529  bool IsTeletext(void) const
1531 
1532  QString toString(void) const
1533  {
1534  return QString("ServiceDescriptor: %1 %2").arg(ServiceName())
1536  }
1537 };
1538 
1539 // DVB Bluebook A038 (Sept 2011) p 82
1541 {
1542  public:
1543  ServiceAvailabilityDescriptor(const unsigned char *data, int len = 300) :
1544  MPEGDescriptor(data, len, DescriptorID::service_availability) { }
1545  // Name bits loc expected value
1546  // descriptor_tag 8 0.0 0x72
1547  // descriptor_length 8 1.0
1548 
1549  // availability_flag 1 2.0
1550  // reserved 7 2.1
1551  // for (i=0;i<N;i++) { cell_id 16 }
1552 };
1553 
1554 // DVB Bluebook A038 (Sept 2011) p 82
1556 {
1557  public:
1558  ServiceListDescriptor(const unsigned char *data, int len = 300) :
1559  MPEGDescriptor(data, len, DescriptorID::service_list) { }
1560  // Name bits loc expected value
1561  // descriptor_tag 8 0.0 0x41
1562  // descriptor_length 8 1.0
1563 
1564  // for (i=0;i<N;I++)
1565  // {
1566  // service_id 16 0.0+p
1567  // service_type 8 2.0+p
1568  // }
1569  uint ServiceCount(void) const { return DescriptorLength() / 3; }
1570 
1572  { return (_data[2+i*3] << 8) | _data[3+i*3]; }
1573 
1574  uint ServiceType(uint i) const { return _data[4+i*3]; }
1575 
1576  QString toString(void) const
1577  {
1578  QString str = QString("ServiceListDescriptor: %1 Services\n")
1579  .arg(ServiceCount());
1580  for (uint i=0; i<ServiceCount(); i++)
1581  {
1582  if (i!=0) str.append("\n");
1583  str.append(QString(" Service (%1) Type%2").arg(ServiceID(i))
1585  }
1586  return str;
1587  }
1588 };
1589 
1590 // DVB Bluebook A038 (Sept 2011) p 82
1592 {
1593  public:
1594  ServiceMoveDescriptor(const unsigned char *data, int len = 300) :
1595  MPEGDescriptor(data, len, DescriptorID::service_move) { }
1596  // Name bits loc expected value
1597  // descriptor_tag 8 0.0 0x60
1598  // descriptor_length 8 1.0
1599 
1600  // new_original_network_id 16 2.0
1601  // new_transport_stream_id 16 4.0
1602  // new_service_id 16 6.0
1603 };
1604 
1605 // DVB Bluebook A038 (Sept 2011) p 83
1607 {
1608  public:
1609  ShortEventDescriptor(const unsigned char *data, int len = 300) :
1610  MPEGDescriptor(data, len, DescriptorID::short_event) { }
1611  // Name bits loc expected value
1612  // descriptor_tag 8 0.0 0x4d
1613  // descriptor_length 8 1.0
1614 
1615  // ISO_639_language_code 24 2.0
1616  int LanguageKey(void) const
1617  { return iso639_str3_to_key(&_data[2]); }
1618  QString LanguageString(void) const
1619  { return iso639_key_to_str3(LanguageKey()); }
1620  int CanonicalLanguageKey(void) const
1622  QString CanonicalLanguageString(void) const
1624  // event_name_length 8 5.0
1625  uint EventNameLength(void) const { return _data[5]; }
1626  // for (i=0;i<event_name_length;i++) { event_name_char 8 }
1627  QString EventName(void) const
1628  { return dvb_decode_text(&_data[6], _data[5]); }
1629  QString EventShortName(void) const
1630  { return dvb_decode_short_name(&_data[6], _data[5]); }
1631  // text_length 8
1632  uint TextLength(void) const { return _data[6 + _data[5]]; }
1633  // for (i=0;i<text_length;i++) { text_char 8 }
1634  QString Text(void) const
1635  { return dvb_decode_text(&_data[7 + _data[5]], TextLength()); }
1636 
1637  // HACK beg -- Pro7Sat is missing encoding
1638  QString EventName(const unsigned char *encoding_override,
1639  uint encoding_length) const
1640  {
1641  return dvb_decode_text(&_data[6], _data[5],
1642  encoding_override, encoding_length);
1643  }
1644 
1645  QString Text(const unsigned char *encoding_override,
1646  uint encoding_length) const
1647  {
1648  return dvb_decode_text(&_data[7 + _data[5]], TextLength(),
1649  encoding_override, encoding_length);
1650  }
1651  // HACK end -- Pro7Sat is missing encoding
1652 
1653  QString toString(void) const
1654  { return LanguageString() + " : " + EventName() + " : " + Text(); }
1655 };
1656 
1657 // DVB Bluebook A038 (Sept 2011) p 84
1659 {
1660  public:
1661  ShortSmoothingBufferDescriptor(const unsigned char *data, int len = 300) :
1662  MPEGDescriptor(data, len, DescriptorID::short_smoothing_buffer) { }
1663  // Name bits loc expected value
1664  // descriptor_tag 8 0.0 0x61
1665  // descriptor_length 8 1.0
1666 
1667  // sb_size 2 2.0
1668  // sb_leak_rate 6 2.2
1669  // for (i=0; i<N; i++)
1670  // { DVB_reserved 8 }
1671 };
1672 
1673 // DVB Bluebook A038 (Sept 2011) p 85
1677 {
1678  public:
1679  StreamIdentifierDescriptor(const unsigned char *data, int len = 300) :
1680  MPEGDescriptor(data, len, DescriptorID::stream_identifier, 1) { }
1681  // Name bits loc expected value
1682  // descriptor_tag 8 0.0 0x52
1683  // descriptor_length 8 1.0 0x01
1684 
1685  // component_tag 8 2.0
1686  uint ComponentTag(void) const { return _data[2]; }
1687  QString toString(void) const
1688  {
1689  return QString("Stream Identifier Descriptor (0x52): ComponentTag=0x%1")
1690  .arg(ComponentTag(),1,16);
1691  }
1692 };
1693 
1694 // DVB Bluebook A038 (Sept 2011) p 86
1696 {
1697  public:
1698  StuffingDescriptor(const unsigned char *data, int len = 300) :
1699  MPEGDescriptor(data, len, DescriptorID::dvb_stuffing) { }
1700  // Name bits loc expected value
1701  // descriptor_tag 8 0.0 0x42
1702  // descriptor_length 8 1.0
1703  // stuffing_byte * 2.0
1704  QString toString(void) const
1705  {
1706  return QString("Stuffing Descriptor (0x42) length(%1)")
1707  .arg(DescriptorLength());
1708  }
1709 };
1710 
1711 // DVB Bluebook A038 (Sept 2011) p 86
1713 {
1714  public:
1715  SubtitlingDescriptor(const unsigned char *data, int len = 300) :
1716  MPEGDescriptor(data, len, DescriptorID::subtitling) { }
1717  // Name bits loc expected value
1718  // descriptor_tag 8 0.0 0x59
1719  // descriptor_length 8 1.0
1720 
1721  uint StreamCount(void) const { return DescriptorLength() >> 3; }
1722  // for (i= 0;i<N;I++)
1723  // {
1724  // ISO_639_language_code 24 0.0+(i*8)
1725  int LanguageKey(uint i) const
1726  { return iso639_str3_to_key(&_data[2 + (i<<3)]); }
1727  QString LanguageString(uint i) const
1728  { return iso639_key_to_str3(LanguageKey(i)); }
1733 
1734  // subtitling_type 8 3.0+(i*8)
1736  { return _data[5 + (i<<3)]; }
1737  // composition_page_id 16 4.0+(i*8)
1739  { return (_data[6 + (i<<3)] << 8) | _data[7 + (i<<3)]; }
1740  // ancillary_page_id 16 6.0+(i*8)
1742  { return (_data[8 + (i<<3)] << 8) | _data[9 + (i<<3)]; }
1743  // } 8.0
1744 };
1745 
1746 // DVB Bluebook A038 (Sept 2011) p 87
1748 {
1749  public:
1750  TelephoneDescriptor(const unsigned char *data, int len = 300) :
1751  MPEGDescriptor(data, len, DescriptorID::telephone) { }
1752  // Name bits loc expected value
1753  // descriptor_tag 8 0.0 0x57
1754  // descriptor_length 8 1.0
1755 
1756  // reserved_future_use 2 2.0
1757  // foreign_availability 1 2.2
1758  // connection_type 5 2.3
1759  // reserved_future_use 1 3.0
1760  // country_prefix_length 2 3.1
1761  // i18n_area_code_len 3 3.4
1762  // operator_code_length 2 3.6
1763  // reserved_future_use 1 3.7
1764  // national_area_code_len 3 4.0
1765  // core_number_length 4 4.4
1766  //
1767  // for (i=0; i<N; i++)
1768  // { country_prefix_char 8 }
1769  // for (i=0; i<N; i++)
1770  // { international_area_code_char 8 }
1771  // for (i=0; i<N; i++)
1772  // { operator_code_char 8 }
1773  // for (i=0; i<N; i++)
1774  // { national_area_code_char 8 }
1775  // for (i=0; i<N; i++)
1776  // { core_number_char 8 }
1777 };
1778 
1779 // DVB Bluebook A038 (Sept 2011) p 88
1781 {
1782  public:
1783  TeletextDescriptor(const unsigned char *data, int len = 300) :
1784  MPEGDescriptor(data, len, DescriptorID::teletext) { }
1785  // Name bits loc expected value
1786  // descriptor_tag 8 0.0 0x56
1787  // descriptor_length 8 1.0
1788 
1789  uint StreamCount(void) const { return DescriptorLength() / 5; }
1790 
1791  // for (i=0; i<N; i++)
1792  // {
1793  // ISO_639_language_code 24 0.0
1794  int LanguageKey(uint i) const
1795  { return iso639_str3_to_key(&_data[2 + (i*5)]); }
1796  QString LanguageString(uint i) const
1797  { return iso639_key_to_str3(LanguageKey(i)); }
1802  // teletext_type 5 3.0
1804  { return _data[5 + (i*5)] >> 3; }
1805  // teletext_magazine_num 3 3.5
1807  { return _data[5 + (i*5)] & 0x7; }
1808  // teletext_page_num 8 4.0
1810  { return _data[6 + (i*5)]; }
1811  // } 5.0
1812  QString toString(void) const;
1813 };
1814 
1815 // DVB Bluebook A038 (Sept 2011) p 89
1817 {
1818  public:
1819  TimeShiftedEventDescriptor(const unsigned char *data, int len = 300) :
1820  MPEGDescriptor(data, len, DescriptorID::time_shifted_event) { }
1821  // Name bits loc expected value
1822  // descriptor_tag 8 0.0 0x4f
1823  // descriptor_length 8 1.0
1824 
1825  // reference_service_id 16 2.0
1826  // reference_event_id 16 4.0
1827 };
1828 
1829 // DVB Bluebook A038 (Sept 2011) p 90
1831 {
1832  public:
1833  TimeShiftedServiceDescriptor(const unsigned char *data, int len = 300) :
1834  MPEGDescriptor(data, len, DescriptorID::dvb_time_shifted_service) { }
1835  // Name bits loc expected value
1836  // descriptor_tag 8 0.0 0x4c
1837  // descriptor_length 8 1.0
1838 
1839  // reference_service_id 16 2.0
1840 };
1841 
1842 // DVB Bluebook A038 (Sept 2011) p 90
1844 {
1845  public:
1846  TransportStreamDescriptor(const unsigned char *data, int len = 300) :
1847  MPEGDescriptor(data, len, DescriptorID::transport_stream) { }
1848  // Name bits loc expected value
1849  // descriptor_tag 8 0.0 0x67
1850  // descriptor_length 8 1.0
1851 
1852  // for (i=0; i<N; i++) { byte 8 }
1853  QString Data(void) const
1854  { return dvb_decode_text(&_data[2], DescriptorLength()); }
1855  QString toString(void) const
1856  { return QString("TransportStreamDescriptor data(%1)").arg(Data()); }
1857 };
1858 
1859 // DVB Bluebook A038 (Sept 2011) p 91
1861 {
1862  public:
1863  VBIDataDescriptor(const unsigned char *data, int len = 300) :
1864  MPEGDescriptor(data, len, DescriptorID::vbi_data) { }
1865  // Name bits loc expected value
1866  // descriptor_tag 8 0.0 0x45
1867  // descriptor_length 8 1.0
1868 
1869  // for (i=0; i<N; i++)
1870  // {
1871  // data_service_id 8 0.0+p
1872  // data_service_length 8 1.0+p
1873  // if ((data_service_id&0x7) && data_service_id!=0x3))
1874  // {
1875  // for (i=0; i<N; i++)
1876  // {
1877  // reserved 2 2.0+p2
1878  // field_parity 1 2.2+p2
1879  // line_offset 5 2.3+p2
1880  // }
1881  // }
1882  // else
1883  // {
1884  // for (i=0; i<N; i++) { reserved 8 }
1885  // }
1886  // }
1887 };
1888 
1889 // DVB Bluebook A038 (Sept 2011) p 92
1891 {
1892  public:
1893  VBITeletextDescriptor(const unsigned char *data, int len = 300) :
1894  MPEGDescriptor(data, len, DescriptorID::vbi_teletext) { }
1895  // Name bits loc expected value
1896  // descriptor_tag 8 0.0 0x46
1897  // descriptor_length 8 1.0
1898 
1899  // for (i=0;i<N;i++)
1900  // {
1901  // ISO_639_language_code 24 0.0+p
1902  // teletext_type 5 3.0+p
1903  // teletext_magazine_num 3 3.5+p
1904  // teletext_page_num 8 4.0+p
1905  // } 5.0
1906 };
1907 
1908 // DVB Bluebook A038 (Sept 2011) p 119
1910 {
1911  public:
1912  PartialTransportStreamDescriptor(const unsigned char *data, int len = 300) :
1913  MPEGDescriptor(data, len, DescriptorID::partial_transport_stream) { }
1914  // Name bits loc expected value
1915  // descriptor_tag 8 0.0 0x63
1916  // descriptor_length 8 1.0
1917 
1918  // DVB_reserved_future_use 2 2.0
1919  // peak_rate 22 2.2
1920  uint PeakRate(void) const
1921  { return (_data[2] & 0x3f) << 16 | _data[3] | _data[4]; }
1922  // DVB_reserved_future_use 2 5.0
1923  // min_overall_smooth_rate 22 5.2
1924  uint SmoothRate(void) const
1925  { return (_data[5] & 0x3f) << 16 | _data[6] | _data[7]; }
1926  // DVB_reserved_future_use 2 8.0
1927  // max_overall_smooth_buf 14 8.2
1928  uint SmoothBuf(void) const { return ((_data[8] & 0x3f) << 8) | _data[9]; }
1929  QString toString(void) const;
1930 };
1931 
1932 
1933 // a_52a.pdf p125 Table A7 (for DVB)
1935 {
1936  public:
1937  AC3Descriptor(const unsigned char *data, int len = 300) :
1938  MPEGDescriptor(data, len, DescriptorID::ac3) { }
1939  // Name bits loc expected value
1940  // descriptor_tag 8 0.0 0x6A
1941  // descriptor_length 8 1.0
1942 
1943  // component_type_flag 1 2.0
1944  bool HasComponentType(void) const { return _data[2] & 0x80; }
1945  // bsid_flag 1 2.1
1946  bool HasBSID(void) const { return _data[2] & 0x40; }
1947  // mainid_flag 1 2.2
1948  bool HasMainID(void) const { return _data[2] & 0x20; }
1949  // asvc_flag 1 2.3
1950  bool HasASVC(void) const { return _data[2] & 0x10; }
1951  // reserved_flags 4 2.4
1952  // if (component_type_flag == 1)
1953  // { component_type 8 uimsbf }
1954  uint ComponentType(void) const { return _data[3]; }
1955  // if (bsid_flag == 1)
1956  // { bsid 8 uimsbf }
1957  uint BSID(void) const
1958  { return (HasComponentType()) ? _data[4] : _data[3]; }
1959  // if (mainid_flag == 1)
1960  // { mainid 8 uimsbf }
1961  uint MainID(void) const
1962  {
1963  int offset = 3;
1964  offset += (HasComponentType()) ? 1 : 0;
1965  offset += (HasBSID()) ? 1 : 0;
1966  return _data[offset];
1967  }
1968  // if (asvc_flag==1)
1969  // { asvc 8 uimsbf }
1970  uint ASVC(void) const
1971  {
1972  int offset = 3;
1973  offset += (HasComponentType()) ? 1 : 0;
1974  offset += (HasBSID()) ? 1 : 0;
1975  offset += (HasMainID()) ? 1 : 0;
1976  return _data[offset];
1977  }
1978  // for (I=0;I<N;I++)
1979  // { additional_info[i] N*8 uimsbf }
1980  //};
1981  QString toString(void) const;
1982 };
1983 
1984 static QString coderate_inner(uint cr)
1985 {
1986  switch (cr)
1987  {
1988  case 0x0: return "auto"; // not actually defined in spec
1989  case 0x1: return "1/2";
1990  case 0x2: return "2/3";
1991  case 0x3: return "3/4";
1992  case 0x4: return "5/6";
1993  case 0x5: return "7/8";
1994  case 0x8: return "8/9";
1995  case 0xf: return "none";
1996  default: return "auto"; // not actually defined in spec
1997  }
1998 }
1999 
2009 {
2010  public:
2011  DVBLogicalChannelDescriptor(const unsigned char *data, int len = 300) :
2012  MPEGDescriptor(data, len, PrivateDescriptorID::dvb_logical_channel_descriptor) { }
2013  // Name bits loc expected value
2014  // descriptor_tag 8 0.0 0x83
2015  // descriptor_length 8 1.0
2016 
2017  uint ChannelCount(void) const { return DescriptorLength() >> 2; }
2018 
2020  { return (_data[2 + (i<<2)] << 8) | _data[3 + (i<<2)]; }
2021 
2023  { return ((_data[4 + (i<<2)] << 8) | _data[5 + (i<<2)]) & 0x3ff; }
2024 
2025  QString toString(void) const;
2026 };
2027 
2028 // ETSI TS 102 323 (TV Anytime)
2030 {
2031  public:
2032  DVBContentIdentifierDescriptor(const unsigned char *data, int len = 300) :
2033  MPEGDescriptor(data, len, DescriptorID::dvb_content_identifier)
2034  {
2035  size_t length;
2036  size_t count = 0;
2037  uint8_t position = 2;
2038 
2039  memset ((void *) m_crid, 0, sizeof(m_crid));
2040 
2041  while (_data[1] >= position)
2042  {
2043  length = _data[position+1];
2044  m_crid[count] = &_data[position];
2045  count++;
2046  position+=length+2;
2047  }
2048  m_cridCount = count;
2049  }
2050  // Name bits loc expected value
2051  // descriptor_tag 8 0.0 0x76
2052  // descriptor_length 8 1.0
2053 
2054  uint ContentType(size_t n=0) const { return m_crid[n][0] >> 2; }
2055 
2056  uint ContentEncoding(size_t n=0) const { return m_crid[n][0] & 0x03; }
2057 
2058  // A content identifier is a URI. It may contain UTF-8 encoded using %XX.
2059  QString ContentId(size_t n=0) const
2060  {
2061  int length = m_crid[n][1];
2062  int positionOfHash = length-1;
2063  while (positionOfHash >= 0) {
2064  if (m_crid[n][2 + positionOfHash] == '#') {
2065  length = positionOfHash; /* remove the hash and the following IMI */
2066  break;
2067  }
2068  positionOfHash--;
2069  }
2070  return QString::fromLatin1((const char *)&m_crid[n][2], length);
2071  }
2072 
2073  size_t CRIDCount() const
2074  {
2075  return m_cridCount;
2076  }
2077 
2078  private:
2079  size_t m_cridCount;
2080  const uint8_t *m_crid[8];
2081 };
2082 
2083 // ETSI TS 102 323 (TV Anytime)
2085 {
2086  public:
2087  DefaultAuthorityDescriptor(const unsigned char *data, int len = 300) :
2088  MPEGDescriptor(data, len, DescriptorID::default_authority) { }
2089  // Name bits loc expected value
2090  // descriptor_tag 8 0.0 0x73
2091  // descriptor_length 8 1.0
2092 
2093  QString DefaultAuthority(void) const
2094  {
2095  return QString::fromLatin1((const char *)_data+2, _data[1]);
2096  }
2097 
2098  QString toString(void) const
2099  {
2100  return QString("DefaultAuthorityDescriptor: Authority(%1)")
2101  .arg(DefaultAuthority());
2102  }
2103 };
2104 
2105 /*
2106  * private UPC Cablecom (Austria) episode descriptor for Horizon middleware
2107  */
2109 {
2110  public:
2111  PrivateUPCCablecomEpisodeTitleDescriptor(const unsigned char *data, int len = 300) :
2112  MPEGDescriptor(data, len, PrivateDescriptorID::upc_event_episode_title) { }
2113  // Name bits loc expected value
2114  // descriptor_tag 8 0.0 0xa7
2115  // descriptor_length 8 1.0
2116 
2117  // ISO_639_language_code 24 2.0
2118  int LanguageKey(void) const
2119  {
2120  return iso639_str3_to_key(&_data[2]);
2121  }
2122  QString LanguageString(void) const
2123  {
2124  return iso639_key_to_str3(LanguageKey());
2125  }
2126  int CanonicalLanguageKey(void) const
2127  {
2129  }
2130  QString CanonicalLanguageString(void) const
2131  {
2133  }
2134 
2135  uint TextLength(void) const
2136  {
2137  return _data[1] - 3;
2138  }
2139 
2140  QString Text(void) const
2141  {
2142  return dvb_decode_text(&_data[5], TextLength());
2143  }
2144 };
2145 
2146 #endif
uint CASystemCount(void) const
bool IsDigitalAudio(void) const
bool IsLinearPolarization(void) const
uint AdaptationFieldDataID(void) const
MYTH_GLsizeiptr const GLvoid * data
QString BouquetName(void) const
uint OriginalNetworkID() const
CellFrequencyLinkDescriptor(const unsigned char *data, int len=300)
QString ServiceName(void) const
ContentDescriptor(const unsigned char *data, int len=300)
uint TeletextType(uint i) const
QString DefaultAuthority(void) const
QString toString(void) const
MultilingualServiceNameDescriptor(const unsigned char *data, int len=300)
PrivateDataSpecifierDescriptor(const unsigned char *data, int len=300)
bool HasBSID(void) const
DVBLogicalChannelDescriptor(const unsigned char *data, int len=300)
QString dvb_decode_text(const unsigned char *src, uint length, const unsigned char *encoding_override, uint encoding_override_length)
uint DescriptorNumber(void) const
PDCDescriptor(const unsigned char *data, int len=300)
uint AncillaryPageID(uint i) const
CAIdentifierDescriptor(const unsigned char *data, int len=300)
NVODReferenceDescriptor(const unsigned char *data, int len=300)
bool IsHorizontalLeftPolarization(void) const
MultilingualBouquetNameDescriptor(const unsigned char *data, int len=300)
QString Name(void) const
const unsigned char * PrivateData(void) const
bool HasASVC(void) const
BouquetNameDescriptor(const unsigned char *data, int len=300)
int LanguageKey(uint i) const
QString toString(void) const
bool LocalTimeOffsetPolarity(uint i) const
-1 if true, +1 if false (behind utc, ahead of utc, resp).
ShortEventDescriptor(const unsigned char *data, int len=300)
uint TextLength(void) const
QString toString(void) const
QString LanguageString(void) const
QString Text(void) const
QString EventName(void) const
int LanguageKey(void) const
ScramblingDescriptor(const unsigned char *data, int len=300)
bool IsTimeSlicingIndicatorUsed(void) const
uint ServiceID(void) const
QString FECInnerString(void) const
uint ContentType(size_t n=0) const
uint Nibble(uint i) const
uint StreamContent(void) const
QString LanguageString(uint i) const
QString CanonicalLanguageString(uint i) const
QString CanonicalLanguageString(void) const
int CanonicalLanguageKey(void) const
QString toString(void) const
QString toString(void) const
CellListDescriptor(const unsigned char *data, int len=300)
TeletextDescriptor(const unsigned char *data, int len=300)
This is used to label streams so the can be treated differently, for instance each stream may get it'...
unsigned char VideoProperties(void) const
bool IsSubtitle(void) const
QString toString(void) const
bool IsTeletext(void) const
DefaultAuthorityDescriptor(const unsigned char *data, int len=300)
QString toString(void) const
QString ModulationString(void) const
bool IsTeletext(void) const
unsigned char AudioProperties(void) const
uint TSID(void) const
DVB Logical Channel Descriptor.
unsigned char HEAACProperties(void) const
int CanonicalLanguageKey(void) const
bool
Definition: pxsup2dast.c:30
const unsigned char * Selector(void) const
QString toString(void) const
unsigned char AVCProperties(void) const
DSNGDescriptor(const unsigned char *data, int len=300)
ComponentDescriptor(const unsigned char *data, int len=300)
unsigned int uint
Definition: compat.h:139
int LanguageKey(void) const
ServiceDescriptor(const unsigned char *data, int len=300)
QString CanonicalLanguageString(uint i) const
PartialTransportStreamDescriptor(const unsigned char *data, int len=300)
QString CanonicalLanguageString(void) const
QString LanguageString(void) const
static int iso639_str3_to_key(const unsigned char *iso639_2)
Definition: iso639.h:62
QString toString(void) const
QString GetDescription(uint i) const
uint NextTimeOffset(uint i) const
int iso639_key_to_canonical_key(int iso639_2)
Definition: iso639.cpp:119
AnnouncementSupportDescriptor(const unsigned char *data, int len=300)
uint ServiceID(uint i) const
QString toString(void) const
QString toString(void) const
bool IsHDTV(void) const
QString HierarchyString(void) const
CountryAvailabilityDescriptor(const unsigned char *data, int len=300)
TimeShiftedServiceDescriptor(const unsigned char *data, int len=300)
uint SubtitleType(uint i) const
ServiceMoveDescriptor(const unsigned char *data, int len=300)
QString MobileHandOverTypeString(void) const
QString LanguageString(void) const
QString FECOuterString(void) const
QString EventName(const unsigned char *encoding_override, uint encoding_length) const
int LanguageKey(void) const
uint Nibble1(uint i) const
uint LocalTimeOffset(uint i) const
QString LanguageString(void) const
QString toString(void) const
bool IsDTV(void) const
uint DescriptorLength(void) const
uint AncillaryDataID(void) const
uint UserNibble(uint i) const
StuffingDescriptor(const unsigned char *data, int len=300)
QString toString(void) const
bool IsCircularPolarization(void) const
VBIDataDescriptor(const unsigned char *data, int len=300)
uint UserNibble1(uint i) const
uint OrbitalPosition(void) const
orbital_position 16 6.0
QString RollOffString(void) const
uint TextLength(void) const
voidpf uLong offset
Definition: ioapi.h:142
unsigned char HEVCProperties(void) const
bool IsVideo(void) const
uint TeletextMagazineNum(uint i) const
QString BouquetShortName(void) const
QString toString(void) const
bool IsTargetListed(void) const
SubtitlingDescriptor(const unsigned char *data, int len=300)
TerrestrialDeliverySystemDescriptor(const unsigned char *data, int len=300)
LocalTimeOffsetDescriptor(const unsigned char *data, int len=300)
uint ServiceNameLength(void) const
static void Init(void)
unsigned char AC3Properties(void) const
uint EventNameLength(void) const
static int x2
Definition: mythsocket.cpp:61
QString Text(void) const
uint ServiceProviderNameLength(void) const
uint ProgramIdLabel(void) const
QString GuardIntervalString(void) const
uint StreamCount(void) const
unsigned long long FrequencyHz(void) const
QString Text(void) const
int CanonicalLanguageKey(void) const
int LanguageKey(uint i) const
DVBContentIdentifierDescriptor(const unsigned char *data, int len=300)
QString toString(void) const
QString ModulationString(void) const
QString CountryCodeString(uint i) const
QString LinkageTypeString(void) const
MosaicDescriptor(const unsigned char *data, int len=300)
int CASystemId(uint i) const
static QString coderate_inner(uint coderate)
unsigned long long FrequencyHz(uint i) const
PrivateUPCCablecomEpisodeTitleDescriptor(const unsigned char *data, int len=300)
int CanonicalLanguageKey(uint i) const
uint DataComponentTag(void) const
VBITeletextDescriptor(const unsigned char *data, int len=300)
bool IsVerticalRightPolarization(void) const
int CanonicalLanguageKey(void) const
uint ComponentTag(void) const
DataBroadcastDescriptor(const unsigned char *data, int len=300)
int LanguageKey(void) const
uint MobileInitialServiceID(void) const
AC3Descriptor(const unsigned char *data, int len=300)
uint Count(void) const
static volatile bool categoryDescExists
unsigned char SubtitleType(void) const
bool HasMobileNetworkID(void) const
QString toString(void) const
ExtendedEventDescriptor(const unsigned char *data, int len=300)
print OF $response content
Definition: yrnoxml.pl:260
static QMap< uint, QString > categoryDesc
FrequencyListDescriptor(const unsigned char *data, int len=300)
QString ContentId(size_t n=0) const
bool HasComponentType(void) const
QString toString(void) const
MultilingualNetworkNameDescriptor(const unsigned char *data, int len=300)
QString Text(const unsigned char *encoding_override, uint encoding_length) const
uint FrequencyRaw(void) const
uint SelectorLength(void) const
AncillaryDataDescriptor(const unsigned char *data, int len=300)
TimeShiftedEventDescriptor(const unsigned char *data, int len=300)
uint MobileHandOverType(void) const
int LocalTimeOffsetWithPolarity(uint i) const
QString ServiceProviderName(void) const
unsigned long long Frequency(uint i) const
QString toString(void) const
ServiceDescriptorMapping(const uint serviceid)
QString toString(void) const
bool HasMobileInitialServiceID(void) const
QString BandwidthString(void) const
uint BSID(void) const
uint SymbolRateHz(void) const
QString toString(void) const
AdaptationFieldDataDescriptor(const unsigned char *data, int len=300)
uint DataBroadcastId(void) const
ShortSmoothingBufferDescriptor(const unsigned char *data, int len=300)
uint ServiceType(void) const
ProgramInfo::CategoryType GetMythCategory(uint i) const
SatelliteDeliverySystemDescriptor(const unsigned char *data, int len=300)
uint LinkageType(void) const
uint ChannelCount(void) const
QString CanonicalLanguageString(void) const
bool HasMainID(void) const
QString TransmissionModeString(void) const
uint CountryRegionId(uint i) const
static int x5
Definition: mythsocket.cpp:64
uint ComponentTag(void) const
uint OriginalNetworkId(uint i) const
uint ServiceID(uint i) const
NetworkNameDescriptor(const unsigned char *data, int len=300)
int CanonicalLanguageKey(uint i) const
uint ScramblingMode(void) const
uint Nibble2(uint i) const
QString OrbitalPositionString(void) const
bool IsEast(void) const
west_east_flag 1 8.0
uint ServiceId(uint i) const
QString toString(void) const
QString ServiceProviderShortName(void) const
uint FrequencyCount() const
QString Text(const unsigned char *encoding_override, uint encoding_length) const
uint LengthOfItems(void) const
uint ContentEncoding(size_t n=0) const
uint PrivateDataLength(void) const
uint UserNibble2(uint i) const
QString MobileOriginTypeString(void) const
TransportStreamDescriptor(const unsigned char *data, int len=300)
uint Count(void) const
uint TransportStreamId(uint i) const
unsigned char MP2Properties(void) const
uint ServiceCount(void) const
const unsigned char * _data
uint ServiceType(uint i) const
uint Count(void) const
QString ConstellationString(void) const
QString toString(void) const
QString toString(void) const
QString Data(void) const
static QString iso639_key_to_str3(int code)
Definition: iso639.h:45
uint MainID(void) const
uint32_t PrivateDataSpecifier(void) const
uint CompositionPageID(uint i) const
QString EventShortName(void) const
QString FECInnerString(void) const
uint TeletextPageNum(uint i) const
bool IsHDTV(void) const
QString ShortName(void) const
QString dvb_decode_short_name(const unsigned char *src, uint raw_length)
QString ServiceShortName(void) const
QString toString(void) const
unsigned char MPEG2Properties(void) const
uint TextLength(void) const
QString toString(void) const
uint SymbolRateRaw(void) const
uint MobileNetworkID(void) const
QString toString(void) const
DataBroadcastIdDescriptor(const unsigned char *data, int len=300)
uint LastNumber(void) const
uint DataBroadCastId(void) const
uint TargetEventID(void) const
uint StreamCount(void) const
TelephoneDescriptor(const unsigned char *data, int len=300)
uint CountryCount(void) const
ServiceAvailabilityDescriptor(const unsigned char *data, int len=300)
ServiceListDescriptor(const unsigned char *data, int len=300)
QString ModulationSystemString(void) const
uint CodingType(void) const
bool IsDigitalAudio(void) const
uint CountryCode(uint i) const
bool IsAudio(void) const
static int x3
Definition: mythsocket.cpp:62
ParentalRatingDescriptor(const unsigned char *data, int len=300)
LinkageDescriptor(const unsigned char *data, int len=300)
bool IsEventSimulcast(void) const
uint ChannelNumber(uint i) const
uint ServiceType(void) const
unsigned long long FrequencyHz(void) const
uint FrequencyRaw(void) const
frequency 32 2.0
bool IsDTV(void) const
uint ComponentType(void) const
static QMutex categoryLock
uint ComponentType(void) const
QString LanguageString(uint i) const
uint MobileOriginType(void) const
GLenum GLsizei len
uint ASVC(void) const
QString CodeRateHPString(void) const
static int x1
Definition: mythsocket.cpp:60
CableDeliverySystemDescriptor(const unsigned char *data, int len=300)
StreamIdentifierDescriptor(const unsigned char *data, int len=300)
QString CanonicalLanguageString(void) const
QString CountryNames(void) const