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() ||
387  0x5 == StreamContent();
388  }
389  bool IsAudio(void) const
390  {
391  switch(StreamContent())
392  {
393  case 0x02:
394  case 0x04:
395  case 0x06:
396  case 0x07:
397  return true;
398  default:
399  return false;
400  }
401  }
402  bool IsSubtitle(void) const { return 0x3 == StreamContent(); }
403 
404  unsigned char VideoProperties(void) const
405  {
406  if (0x1 == StreamContent())
407  return MPEG2Properties();
408  if (0x5 == StreamContent())
409  return VID_AVC | AVCProperties();
410 
411  return VID_UNKNOWN;
412  }
413 
414  unsigned char MPEG2Properties(void) const
415  {
416  switch(ComponentType())
417  {
418  case 0x2: case 0x3: case 0x4:
419  case 0x6: case 0x7: case 0x8:
420  return VID_WIDESCREEN;
421  case 0x09:
422  case 0x0D:
423  return VID_HDTV;
424  case 0x0A: case 0x0B: case 0x0C:
425  case 0x0E: case 0x0F: case 0x10:
426  return VID_WIDESCREEN | VID_HDTV;
427  default:
428  return VID_UNKNOWN;
429  }
430  }
431 
432  unsigned char AVCProperties(void) const
433  {
434  switch(ComponentType())
435  {
436  case 0x3: case 0x4:
437  case 0x7: case 0x8:
438  return VID_WIDESCREEN;
439  case 0x0B: case 0x0C:
440  case 0x0F: case 0x10:
441  return VID_WIDESCREEN | VID_HDTV;
442  case 0x80: case 0x81:
443  case 0x82: case 0x83:
444  return VID_WIDESCREEN | VID_HDTV | VID_3DTV;
445  default:
446  return VID_UNKNOWN;
447  }
448  }
449 
450  unsigned char AudioProperties(void) const
451  {
452  switch (StreamContent())
453  {
454  case 0x2:
455  return MP2Properties();
456  case 0x04:
457  return AC3Properties();
458  case 0x06:
459  return HEAACProperties();
460  default:
461  return AUD_UNKNOWN;
462  }
463  }
464 
465  unsigned char MP2Properties(void) const
466  {
467  switch (ComponentType())
468  {
469  case 0x1:
470  return AUD_MONO;
471  case 0x3:
472  return AUD_STEREO;
473  case 0x5:
474  return AUD_SURROUND;
475  case 0x40:
476  return AUD_VISUALIMPAIR;
477  case 0x41:
478  return AUD_HARDHEAR;
479  default:
480  return AUD_UNKNOWN;
481  }
482  }
483 
484  unsigned char AC3Properties(void) const
485  {
486  unsigned char properties = AUD_UNKNOWN;
487 
488  switch (ComponentType() & 0x7)
489  {
490  case 0x0:
491  properties |= AUD_MONO;
492  break;
493  case 0x2:
494  properties |= AUD_STEREO;
495  break;
496  case 0x3:
497  properties |= AUD_DOLBY;
498  break;
499  case 0x4: case 0x5:
500  properties |= AUD_SURROUND;
501  break;
502  }
503 
504  if (((ComponentType() >> 3) & 0x7) == 0x2)
505  properties |= AUD_VISUALIMPAIR;
506 
507  if (((ComponentType() >> 3) & 0x7) == 0x3)
508  properties |= AUD_HARDHEAR;
509 
510  return properties;
511  }
512 
513  unsigned char HEAACProperties(void) const
514  {
515  switch (ComponentType())
516  {
517  case 0x1:
518  return AUD_MONO;
519  case 0x3:
520  case 0x43:
521  return AUD_STEREO;
522  case 0x5:
523  return AUD_SURROUND;
524  case 0x40:
525  case 0x44:
526  return AUD_VISUALIMPAIR;
527  case 0x41:
528  case 0x45:
529  return AUD_HARDHEAR;
530  default:
531  return AUD_UNKNOWN;
532  }
533  }
534 
535  unsigned char SubtitleType(void) const
536  {
537  if (!IsSubtitle())
538  return SUB_UNKNOWN;
539 
540  switch (ComponentType())
541  {
542  case 0x1:
543  case 0x3:
544  case 0x10: case 0x11: case 0x12: case 0x13:
545  return SUB_NORMAL;
546  case 0x20: case 0x21: case 0x22: case 0x23:
547  return SUB_HARDHEAR;
548  default:
549  return SUB_UNKNOWN;
550  }
551  }
552 
553  QString toString(void) const
554  {
555  return QString("ComponentDescriptor(stream_content: 0x%1, "
556  "component_type: 0x%2)").arg(StreamContent(), 0, 16)
557  .arg(ComponentType(), 0, 16);
558  }
559 };
560 
561 // DVB Bluebook A038 (Sept 2011) p 46
563 {
564  public:
565  ContentDescriptor(const unsigned char *data, int len = 300) :
567  // Name bits loc expected value
568  // descriptor_tag 8 0.0 0x54
569  // descriptor_length 8 1.0
570 
571  uint Count(void) const { return DescriptorLength() >> 1; }
572  // for (i=0;i<N;i++)
573  // {
574  // content_nibble_level_1 4 0.0+p
575  uint Nibble1(uint i) const { return _data[2 + (i<<1)] >> 4; }
576  // content_nibble_level_2 4 0.4+p
577  uint Nibble2(uint i) const { return _data[2 + (i<<1)] & 0xf; }
578 
579  uint Nibble(uint i) const { return _data[2 + (i<<1)]; }
580 
581  // user_nibble 4 1.0+p
582  uint UserNibble1(uint i) const { return _data[3 + (i<<1)] >> 4; }
583  // user_nibble 4 1.4+p
584  uint UserNibble2(uint i) const { return _data[3 + (i<<1)] & 0xf; }
585  uint UserNibble(uint i) const { return _data[3 + (i<<1)]; }
586  // } 2.0
587 
589  QString GetDescription(uint i) const;
590  QString toString(void) const;
591 
592  protected:
593  static void Init(void);
594 
595  protected:
596  static QMutex categoryLock;
597  static QMap<uint,QString> categoryDesc;
598  static volatile bool categoryDescExists;
599 };
600 
601 // DVB Bluebook A038 (Sept 2011) p 49
603 {
604  public:
605  CountryAvailabilityDescriptor(const unsigned char *data, int len = 300) :
606  MPEGDescriptor(data, len, DescriptorID::country_availability) { }
607  // Name bits loc expected value
608  // descriptor_tag 8 0.0 0x49
609  // descriptor_length 8 1.0
610 
611  uint CountryCount(void) const { return ((DescriptorLength() - 1) / 3); }
612 
613  // country_avail_flag 1 2.0
614  bool IsAvailable(void) const { return (_data[2] & 0x1); }
615  // reserved_future_use 7 2.1
616  //
617  // for (i=0; i<N; i++)
618  // { country_code 24 }
619  QString CountryNames(void) const
620  {
621  QString countries="";
622  for (uint i=0; i<CountryCount(); i++)
623  {
624  if (i!=0) countries.append(" ");
625  countries.append(QString::fromLatin1(
626  (const char *)_data+(3*(i+1)), 3));
627  };
628  return countries;
629  }
630 
631  QString toString(void) const
632  {
633  return QString("CountryAvailabilityDescriptor: Available(%1) in (%2)")
634  .arg(IsAvailable()).arg(CountryNames());
635  }
636 };
637 
638 // DVB Bluebook A038 (Sept 2011) p 50
640 {
641  public:
642  DataBroadcastDescriptor(const unsigned char *data, int len = 300) :
643  MPEGDescriptor(data, len, DescriptorID::data_broadcast) { }
644  // Name bits loc expected value
645  // descriptor_tag 8 0.0 0x64
646  // descriptor_length 8 1.0
647 
648  // data_broadcast_id 16 2.0
649  uint DataBroadcastId(void) const { return _data[2] << 8 | _data[3]; }
650  // component_tag 8 4.0
651  uint DataComponentTag(void) const { return _data[4]; }
652  // selector_length 8 5.0
653  uint SelectorLength(void) const { return _data[5]; }
654  // for (i=0; i<selector_length; i++)
655  // {
656  // selector_byte 8
657  const unsigned char *Selector(void) const { return &_data[6]; }
658  // }
659  // ISO_639_language_code 24
660  int LanguageKey(void) const
661  { return iso639_str3_to_key(&_data[6 + SelectorLength()]); }
662  QString LanguageString(void) const
663  { return iso639_key_to_str3(LanguageKey()); }
664  int CanonicalLanguageKey(void) const
666  QString CanonicalLanguageString(void) const
668  // text_length 8
669  uint TextLength(void) const { return _data[6 + SelectorLength() + 3]; }
670  // for (i=0; i<text_length; i++) { text_char 8 }
671  QString Text(void) const
672  {
673  return dvb_decode_text(&_data[6 + SelectorLength() + 4], TextLength());
674  }
675 
676  QString toString(void) const;
677 };
678 
679 // DVB Bluebook A038 (Sept 2011) p 51
681 {
682  public:
683  DataBroadcastIdDescriptor(const unsigned char *data, int len = 300) :
684  MPEGDescriptor(data, len, DescriptorID::data_broadcast_id) { }
685  // Name bits loc expected value
686  // descriptor_tag 8 0.0 0x66
687  // descriptor_length 8 1.0
688 
689  // data_broadcast_id 16 2.0
690  uint DataBroadCastId(void) const { return _data[2] << 8 | _data[3]; }
691  // for(i=0; i < N;i++ )
692  // { id_selector_byte 8 }
693 };
694 
695 // DVB Bluebook A038 (Sept 2011) p 51
697 {
698  public:
699  CableDeliverySystemDescriptor(const unsigned char *data, int len = 300) :
700  MPEGDescriptor(data, len, DescriptorID::cable_delivery_system) { }
701  // Name bits loc expected value
702  // descriptor_tag 8 0.0 0x44
703  // descriptor_length 8 1.0
704 
705  // frequency 32 2.0
706  uint FrequencyRaw(void) const
707  {
708  return ((_data[2]<<24) | (_data[3]<<16) |
709  (_data[4]<<8) | (_data[5]));
710  }
711  unsigned long long FrequencyHz(void) const
712  {
713  return byte4BCD2int(_data[2], _data[3], _data[4], _data[5]) * 100;
714  }
715  // reserved_future_use 12 6.0
716  // FEC_outer 4 7.4
717  enum
718  {
721  };
722  uint FECOuter(void) const { return _data[7] & 0xf; }
723  QString FECOuterString(void) const
724  {
725  return (FECOuter() == kOuterFEC_None) ? "None" :
726  ((FECOuter() == kOuterFEC_RS204_RS188) ? "RS(204/188)" : "unknown");
727  }
728  // modulation 8 8.0
729  enum
730  {
736  };
737  uint Modulation(void) const { return _data[8]; }
738  QString ModulationString(void) const
739  {
740  static QString ms[] =
741  { "auto", "qam_16", "qam_32", "qam_64", "qam_128", "qam_256" };
742  return (Modulation() <= kModulationQAM256) ?
743  ms[Modulation()] : QString("auto");
744  }
745  // symbol_rate 28 9.0
746  uint SymbolRateRaw(void) const
747  {
748  return ((_data[9]<<20) | (_data[10]<<12) |
749  (_data[11]<<4) | (_data[12]>>4));
750  }
751  uint SymbolRateHz(void) const
752  {
753  return ((byte3BCD2int(_data[9], _data[10], _data[11]) * 1000) +
754  (byteBCDH2int(_data[12]) * 100));
755  }
756  // FEC_inner 4 12.4
757  enum
758  {
766  };
767  uint FECInner(void) const { return _data[12] & 0xf; }
768  QString FECInnerString(void) const { return coderate_inner(FECInner()); }
769  QString toString(void) const;
770 };
771 
772 // DVB Bluebook A038 (Sept 2011) p 53
774 {
775  public:
777  const unsigned char *data, int len = 300) :
778  MPEGDescriptor(data, len, DescriptorID::satellite_delivery_system) { }
779  // Name bits loc expected value
780  // descriptor_tag 8 0.0 0x43
781  // descriptor_length 8 1.0
782 
784  uint FrequencyRaw(void) const
785  {
786  return ((_data[2]<<24) | (_data[3]<<16) |
787  (_data[4]<<8) | (_data[5]));
788  }
789  unsigned long long FrequencyHz(void) const
790  {
791  return byte4BCD2int(_data[2], _data[3], _data[4], _data[5]) * 10;
792  }
794  uint OrbitalPosition(void) const
795  { return byte2BCD2int(_data[6], _data[7]); }
796  QString OrbitalPositionString(void) const
797  {
798  uint num = OrbitalPosition();
799  return QString("%1.%2 %3").arg(num / 10).arg(num % 10)
800  .arg((IsEast()) ? "East" : "West");
801  }
802  double OrbitalPositionFloat() const
803  { return ((double) OrbitalPosition()) / 10.0; }
805  bool IsEast(void) const { return (_data[8]&0x80); }
806  bool IsWest(void) const { return !IsEast(); }
807  // polarization 2 8.1
808  uint Polarization(void) const { return (_data[8]>>5)&0x3; }
809  QString PolarizationString() const
810  {
811  static QString ps[] = { "h", "v", "l", "r" };
812  return ps[Polarization()];
813  }
814  bool IsCircularPolarization(void) const { return (_data[8]>>6)&0x1; }
815  bool IsLinearPolarization(void) const { return !((_data[8]>>6)&0x1); }
816  bool IsHorizontalLeftPolarization(void) const { return (_data[8]>>5)&0x1; }
818  { return !((_data[8]>>5)&0x1); }
819  // roll off 2 8.3
820  enum
821  {
826  };
827  uint RollOff(void) const { return (_data[8]>>3)&0x3; }
828  QString RollOffString(void) const
829  {
830  static QString ro[] = { "0.35", "0.20", "0.25", "auto" };
831  return ro[RollOff()];
832  }
833  // modulation system 1 8.5
834  uint ModulationSystem(void) const { return (_data[8]>>2)&0x1; }
835  QString ModulationSystemString(void) const
836  {
837  return ModulationSystem() ? "DVB-S2" : "DVB-S";
838  }
839  // modulation 2 8.6
840  enum
841  {
842  kModulationQPSK_NS = 0x0, // Non standard QPSK for Bell ExpressVu
843  // should be "auto" according to DVB SI standard
847  };
848  uint Modulation(void) const { return _data[8]&0x03; }
849  QString ModulationString(void) const
850  {
851  static QString ms[] = { "qpsk", "qpsk", "8psk", "qam_16" };
852  return ms[Modulation()];
853  }
854  // symbol_rate 28 9.0
855  uint SymbolRate(void) const
856  {
857  return ((_data[9]<<20) | (_data[10]<<12) |
858  (_data[11]<<4) | (_data[12]>>4));
859  }
860  uint SymbolRateHz(void) const
861  {
862  return ((byte3BCD2int(_data[9], _data[10], _data[11]) * 1000) +
863  (byteBCDH2int(_data[12]) * 100));
864  }
865  // FEC_inner 4 12.4
866  enum
867  {
875  };
876  uint FECInner(void) const { return _data[12] & 0xf; }
877  QString FECInnerString(void) const { return coderate_inner(FECInner()); }
878 
879  QString toString(void) const;
880 };
881 
882 // DVB Bluebook A038 (Sept 2011) p 55
884 {
885  public:
887  const unsigned char *data, int len = 300) :
888  MPEGDescriptor(data, len, DescriptorID::terrestrial_delivery_system) { }
889  // Name bits loc expected value
890  // descriptor_tag 8 0.0 0x5a
891  // descriptor_length 8 1.0
892 
893  // centre_frequency 32 2.0
894  uint Frequency(void) const
895  {
896  return ((_data[2]<<24) | (_data[3]<<16) |
897  (_data[4]<<8) | (_data[5]));
898  }
899  uint64_t FrequencyHz(void) const { return uint64_t(Frequency()) * 10ULL; }
900 
901  // bandwidth 3 6.0
902  enum
903  {
908  };
909  uint Bandwidth(void) const { return _data[6]>>5; }
910  uint BandwidthHz(void) const { return (8 - Bandwidth()) * 1000000; }
911  QString BandwidthString(void) const
912  {
913  static QString bs[] = { "8", "7", "6", "5" };
914  return (Bandwidth() <= kBandwidth5Mhz) ? bs[Bandwidth()] : "auto";
915  }
916  // priority 1 6.3
917  bool HighPriority(void) const { return _data[6] & 0x10; }
918  // time_slicing_indicator 1 6.4
919  bool IsTimeSlicingIndicatorUsed(void) const { return !(_data[6] & 0x08); }
920  // MPE-FEC_indicator 1 6.5
921  bool IsMPE_FECUsed(void) const { return !(_data[6] & 0x04); }
922  // reserved_future_use 2 6.6
923  // constellation 2 7.0
924  enum
925  {
929  };
930  uint Constellation(void) const { return _data[7]>>6; }
931  QString ConstellationString(void) const
932  {
933  static QString cs[] = { "qpsk", "qam_16", "qam_64" };
934  return (Constellation() <= kConstellationQAM64) ?
935  cs[Constellation()] : "auto";
936  }
937  // hierarchy_information 3 7.2
938  enum
939  {
948  };
949  uint Hierarchy(void) const { return (_data[7]>>3) & 0x7; }
950 
952  QString HierarchyString(void) const
953  {
954  static QString hs[] = { "n", "1", "2", "4", "a", "a", "a", "a" };
955  return hs[Hierarchy()];
956  }
957  bool NativeInterleaver(void) const { return _data[7] & 0x20; }
958  uint Alpha(void) const
959  {
960  uint i = (_data[7]>>3) & 0x3;
961  return (0x2 == i) ? 4 : i;
962  }
963  // code_rate-HP_stream 3 7.5
964  enum
965  {
971  };
972  uint CodeRateHP(void) const { return _data[7] & 0x7; }
973  QString CodeRateHPString(void) const
974  {
975  static QString cr[] = {
976  "1/2", "2/3", "3/4", "5/6", "7/8", "auto", "auto", "auto"
977  };
978  return cr[CodeRateHP()];
979  }
980  // code_rate-LP_stream 3 8.0
981  uint CodeRateLP(void) const { return (_data[8]>>5) & 0x7; }
982  QString CodeRateLPString(void) const
983  {
984  static QString cr[] = {
985  "1/2", "2/3", "3/4", "5/6", "7/8", "auto", "auto", "auto"
986  };
987  return cr[CodeRateLP()];
988  }
989  // guard_interval 2 8.3
990  enum
991  {
996  };
997  uint GuardInterval(void) const { return (_data[8]>>3) & 0x3; }
998  QString GuardIntervalString(void) const
999  {
1000  static QString gi[] = { "1/32", "1/16", "1/8", "1/4" };
1001  return gi[GuardInterval()];
1002  }
1003  // transmission_mode 2 8.5
1004  enum
1005  {
1009  };
1010  uint TransmissionMode(void) const { return (_data[8]>>1) & 0x3; }
1011  QString TransmissionModeString(void) const
1012  {
1013  static QString tm[] = { "2", "8", "4", "auto" };
1014  return tm[TransmissionMode()];
1015  }
1016  // other_frequency_flag 1 8.7
1017  bool OtherFrequencyInUse(void) const { return _data[8] & 0x1; }
1018  // reserved_future_use 32 9.0
1019 
1020  QString toString(void) const;
1021 };
1022 
1023 // DVB Bluebook A038 (Sept 2011) p 58
1025 {
1026  public:
1027  DSNGDescriptor(const unsigned char *data, int len = 300) :
1028  MPEGDescriptor(data, len, DescriptorID::dsng) { }
1029  // Name bits loc expected value
1030  // descriptor_tag 8 0.0 0x68
1031  // descriptor_length 8 1.0
1032  // for (i=0;i<N;i++) { byte 8 }
1033 };
1034 
1035 // DVB Bluebook A038 (Sept 2011) p 58
1037 {
1038  public:
1039  ExtendedEventDescriptor(const unsigned char *data, int len = 300) :
1040  MPEGDescriptor(data, len, DescriptorID::extended_event) { }
1041  // Name bits loc expected value
1042  // descriptor_tag 8 0.0 0x4e
1043  // descriptor_length 8 1.0
1044 
1045  // descriptor_number 4 2.0
1046  uint DescriptorNumber(void) const { return _data[2] >> 4; }
1047  // last_number 4 2.4
1048  uint LastNumber(void) const { return _data[2] & 0xf; }
1049  // ISO_639_language_code 24 3.0
1050  int LanguageKey(void) const
1051  { return iso639_str3_to_key(&_data[3]); }
1052  QString LanguageString(void) const
1053  { return iso639_key_to_str3(LanguageKey()); }
1054  int CanonicalLanguageKey(void) const
1056  QString CanonicalLanguageString(void) const
1058  // length_of_items 8 6.0
1059  uint LengthOfItems(void) const { return _data[6]; }
1060  // for ( i=0;i<N;i++)
1061  // {
1062  // item_description_len 8 0.0+p
1063  // for (j=0;j<N;j++) { item_desc_char 8 }
1064  // item_length 8 1.0+p2
1065  // for (j=0;j<N;j++) { item_char 8 }
1066  // }
1067  // text_length 8
1068  uint TextLength(void) const { return _data[7 + _data[6]]; }
1069  // for (i=0; i<N; i++) { text_char 8 }
1070  QString Text(void) const
1071  { return dvb_decode_text(&_data[8 + _data[6]], TextLength()); }
1072 
1073  // HACK beg -- Pro7Sat is missing encoding
1074  QString Text(const unsigned char *encoding_override,
1075  uint encoding_length) const
1076  {
1077  return dvb_decode_text(&_data[8 + _data[6]], TextLength(),
1078  encoding_override, encoding_length);
1079  }
1080  // HACK end -- Pro7Sat is missing encoding
1081 };
1082 
1083 // DVB Bluebook A038 (Sept 2011) p 60
1085 {
1086  public:
1087  FrequencyListDescriptor(const unsigned char *data, int len = 300) :
1088  MPEGDescriptor(data, len, DescriptorID::frequency_list) { }
1089  // Name bits loc expected value
1090  // descriptor_tag 8 0.0 0x62
1091  // descriptor_length 8 1.0
1092 
1093  // reserved_future_use 6 2.0
1094  // coding_type 2 2.6
1095  enum
1096  {
1101  };
1102  uint CodingType(void) const { return _data[2] & 0x3; }
1103  // for (i=0;I<N;i++)
1104  // {
1105  // centre_frequency 32
1106  // }
1107  uint FrequencyCount() const { return DescriptorLength()>>2; }
1108  unsigned long long Frequency(uint i) const
1109  {
1111  return ((_data[3 + (i<<2)]<<24) | (_data[4 + (i<<2)]<<16) |
1112  (_data[5 + (i<<2)]<<8) | (_data[6 + (i<<2)]));
1113  else
1114  return byte4BCD2int(_data[3 + (i<<2)], _data[4 + (i<<2)],
1115  _data[5 + (i<<2)], _data[6 + (i<<2)]);
1116  }
1117  unsigned long long FrequencyHz(uint i) const
1118  {
1119  return Frequency(i) *
1120  ((kCodingTypeTerrestrial == CodingType()) ? 10 : 100);
1121  }
1122 
1123  QString toString(void) const;
1124 };
1125 
1126 // DVB Bluebook A038 (Sept 2011) p 70
1127 // ETSI EN 300 468 p 58
1129 {
1130  public:
1131  LocalTimeOffsetDescriptor(const unsigned char *data, int len = 300) :
1132  MPEGDescriptor(data, len, DescriptorID::local_time_offset) { }
1133  // Name bits loc expected value
1134  // descriptor_tag 8 0.0 0x58
1135  // descriptor_length 8 1.0
1136  uint Count(void) const { return DescriptorLength() / 13; }
1137  // for(i=0;i<N;i++)
1138  // {
1139  // country_code 24 0.0+p
1141  {
1142  int o = 2 + i*13;
1143  return ((_data[o] << 16) | (_data[o+1] << 8) | _data[o+2]);
1144  }
1145  QString CountryCodeString(uint i) const
1146  {
1147  int o = 2 + i*13;
1148  return QString(_data[o]) + QChar(_data[o+1]) + QChar(_data[o+2]);
1149  }
1150  // country_region_id 6 3.0+p
1151  uint CountryRegionId(uint i) const { return _data[2 + i*13 + 3] >> 2; }
1152  // reserved 1 3.6+p
1153  // local_time_off_polarity 1 3.7+p
1156  { return _data[2 + i*13 + 3] & 0x01; }
1157  // local_time_offset 16 4.0+p
1159  { return (_data[2 + i*13 + 4] << 8) | _data[2 + i*13 + 5]; }
1161  { return (LocalTimeOffsetPolarity(i) ? -1 : +1) * LocalTimeOffset(i); }
1162  // time_of_change 40 6.0+p
1163  // TODO decode this
1164  // next_time_offset 16 11.0+p
1166  { return (_data[2 + i*13 + 11]<<8) | _data[2 + i*13 + 12]; }
1167  // } 13.0
1168  QString toString(void) const;
1169 };
1170 
1171 // DVB Bluebook A038 (Sept 2011) p 71
1173 {
1174  public:
1175  MosaicDescriptor(const unsigned char *data, int len = 300) :
1176  MPEGDescriptor(data, len, DescriptorID::mosaic) { }
1177  // Name bits loc expected value
1178  // descriptor_tag 8 0.0 0x51
1179  // descriptor_length 8 1.0
1180 
1181  // mosaic_entry_point 1 2.0
1182  // num_horiz_elem_cells 3 2.1
1183  // reserved_future_use 1 2.4
1184  // num_vert_elem_cells 3 2.5
1185  // for (i=0;i<N; i++)
1186  // {
1187  // logical_cell_id 6 0.0+p
1188  // reserved_future_use 7 0.6+p
1189  // logical_cell_pres_info 3 1.5+p
1190  // elem_cell_field_len 8 2.0+p
1191  // for (i=0; j<elementary_cell_field_length; j++)
1192  // {
1193  // reserved_future_use 2
1194  // elementary_cell_id 6
1195  // }
1196  // cell_linkage_info 8
1197  // if (cell_linkage_info == 0x01)
1198  // {
1199  // bouquet_id 16
1200  // }
1201  // if (cell_linkage_info == 0x02)
1202  // {
1203  // original_network_id 16
1204  // transport_stream_id 16
1205  // service_id 16
1206  // }
1207  // if (cell_linkage_info == 0x03)
1208  // {
1209  // original_network_id 16
1210  // transport_stream_id 16
1211  // service_id 16
1212  // }
1213  // if (cell_linkage_info == 0x04)
1214  // {
1215  // original_network_id 16
1216  // transport_stream_id 16
1217  // service_id 16
1218  // event_id 16
1219  // }
1220  // }
1221 };
1222 
1223 // DVB Bluebook A038 (Sept 2011) p 74
1225 {
1226  public:
1228  const unsigned char *data, int len = 300) :
1229  MPEGDescriptor(data, len, DescriptorID::multilingual_bouquet_name) { }
1230  // Name bits loc expected value
1231  // descriptor_tag 8 0.0 0x5c
1232  // descriptor_length 8 1.0
1233 
1234  // for (i=0;i<N;i++)
1235  // {
1236  // ISO_639_language_code 24
1237  // bouquet_name_length 8
1238  // for (j=0;j<N;j++) { char 8 }
1239  // }
1240 };
1241 
1242 // DVB Bluebook A038 (Sept 2011) p 75
1244 {
1245  public:
1247  const unsigned char *data, int len = 300) :
1248  MPEGDescriptor(data, len, DescriptorID::multilingual_network_name)
1249  {
1250  // Name bits loc expected value
1251  // descriptor_tag 8 0.0 0x5b
1252  // descriptor_length 8 1.0
1253  }
1254 
1255  // for (i=0;i<N;i++)
1256  // {
1257  // ISO_639_language_code 24
1258  // network_name_length 8
1259  // for (j=0;j<N;j++) { char 8 }
1260  // }
1261 };
1262 
1263 // DVB Bluebook A038 (Sept 2011) p 76
1265 {
1266  public:
1268  const unsigned char *data, int len = 300) :
1269  MPEGDescriptor(data, len, DescriptorID::multilingual_service_name) { }
1270  // Name bits loc expected value
1271  // descriptor_tag 8 0.0 0x5d
1272  // descriptor_length 8 1.0
1273 
1274  // for (i=0;i<N;i++)
1275  // {
1276  // ISO_639_language_code 24
1277  // service_provider_name_length 8
1278  // for (j=0;j<N;j++) { char 8 }
1279  // service_name_length 8
1280  // for (j=0;j<N;j++) { char 8 }
1281  // }
1282 };
1283 
1284 // DVB Bluebook A038 (Sept 2011) p 76
1286 {
1287  public:
1288  NVODReferenceDescriptor(const unsigned char *data, int len = 300) :
1289  MPEGDescriptor(data, len, DescriptorID::nvod_reference) { }
1290  // Name bits loc expected value
1291  // descriptor_tag 8 0.0 0x4b
1292  // descriptor_length 8 1.0
1293  uint Count(void) const { return DescriptorLength() / 6; }
1294 
1295  // for (i=0;i<N;i++)
1296  // {
1297  // transport_stream_id 16
1299  { return (_data[i * 6 + 2] << 8) | _data[i * 6 + 3]; }
1300  // original_network_id 16
1302  { return (_data[i * 6 + 4] << 8) | _data[i * 6 + 5]; }
1303  // service_id 16
1305  { return (_data[i * 6 + 6] << 8) | _data[i * 6 + 7]; }
1306  // }
1307  QString toString(void) const;
1308 };
1309 
1310 // DVB Bluebook A038 (Sept 2011) p 78
1312 {
1313  public:
1314  ParentalRatingDescriptor(const unsigned char *data, int len = 300) :
1315  MPEGDescriptor(data, len, DescriptorID::parental_rating) { }
1316  // Name bits loc expected value
1317  // descriptor_tag 8 0.0 0x55
1318  // descriptor_length 8 1.0
1319  uint Count(void) const { return DescriptorLength() / 4; }
1320 
1321  // for (i=0; i<N; i++)
1322  // {
1323  // country_code 24
1324  // rating 8
1325  // }
1326 };
1327 
1328 // DVB Bluebook A038 (Sept 2011) p 78 (see also ETSI EN 300 231 PDC)
1330 {
1331  public:
1332  PDCDescriptor(const unsigned char *data, int len = 300) :
1333  MPEGDescriptor(data, len, DescriptorID::pdc, 3) { }
1334  // Name bits loc expected value
1335  // descriptor_tag 8 0.0 0x69
1336  // descriptor_length 8 1.0
1337 
1338  // reserved_future_use 4 2.0
1339  // program_id_label 20 2.4
1340  uint ProgramIdLabel(void) const
1341  { return (_data[2] & 0x0F) << 16 | _data[3] << 8 | _data[4]; }
1342  QString toString(void) const
1343  {
1344  return QString("PDCDescriptor program_id_label(%1)")
1345  .arg(ProgramIdLabel());
1346  }
1347 };
1348 
1349 // DVB Bluebook A038 (Sept 2011) p 79 (see also ETSI TS 101 162)
1351 {
1352  public:
1353  PrivateDataSpecifierDescriptor(const unsigned char *data, int len = 300) :
1354  MPEGDescriptor(data, len, DescriptorID::private_data_specifier) { }
1355  // Name bits loc expected value
1356  // descriptor_tag 8 0.0 0x5f
1357  // descriptor_length 8 1.0
1358 
1359  // private_data_specifier 32 2.0
1360 };
1361 
1362 // DVB Bluebook A038 (Sept 2011) p 79
1364 {
1365  public:
1366  ScramblingDescriptor(const unsigned char *data, int len = 300) :
1367  MPEGDescriptor(data, len, DescriptorID::scrambling, 1) { }
1368  // Name bits loc expected value
1369  // descriptor_tag 8 0.0 0x65
1370  // descriptor_length 8 1.0
1371 
1372  // scrambling_mode 8 2.0
1373  uint ScramblingMode(void) const { return _data[2]; }
1374  QString toString(void) const
1375  {
1376  return QString("ScramblingDescriptor scrambling_mode(%1)")
1377  .arg(ScramblingMode());
1378  }
1379 };
1380 
1381 // Map serviceid's to their types
1383 {
1384  public:
1385  ServiceDescriptorMapping(const uint serviceid) { m_serviceid = serviceid; }
1386  enum
1387  {
1421 
1422  };
1423  uint ServiceType(void) const { return m_serviceid; }
1424  bool IsDTV(void) const
1425  {
1426  return ((ServiceType() == kServiceTypeDigitalTelevision) ||
1427  (ServiceType() ==
1429  IsHDTV() ||
1443  }
1444  bool IsDigitalAudio(void) const
1445  {
1446  return ((ServiceType() == kServiceTypeDigitalRadioSound) ||
1448  }
1449  bool IsHDTV(void) const
1450  {
1451  return
1452  (ServiceType() == kServiceTypeHDTV) ||
1455  }
1456  bool IsTeletext(void) const
1457  {
1459  }
1460  QString toString(void) const;
1461 
1462  private:
1464 };
1465 
1466 // DVB Bluebook A038 (Sept 2011) p 80
1468 {
1469  public:
1470  ServiceDescriptor(const unsigned char *data, int len = 300) :
1471  MPEGDescriptor(data, len, DescriptorID::service) { }
1472  // Name bits loc expected value
1473  // descriptor_tag 8 0.0 0x48
1474  // descriptor_length 8 1.0
1475 
1476  // service_type 8 2.0
1477  uint ServiceType(void) const { return _data[2]; }
1478  // svc_provider_name_len 8 3.0
1479  uint ServiceProviderNameLength(void) const { return _data[3]; }
1480  // for (i=0;i<N;I++) { char 8 }
1481  QString ServiceProviderName(void) const
1482  { return dvb_decode_text(_data + 4, ServiceProviderNameLength()); }
1483  QString ServiceProviderShortName(void) const
1484  {
1486  }
1487  // service_name_length 8
1489  { return _data[4 + ServiceProviderNameLength()]; }
1490  // for (i=0;i<N;I++) { char 8 }
1491  QString ServiceName(void) const
1492  {
1494  ServiceNameLength());
1495  }
1496  QString ServiceShortName(void) const
1497  {
1499  ServiceNameLength());
1500  }
1501  bool IsDTV(void) const
1502  { return ServiceDescriptorMapping(ServiceType()).IsDTV(); }
1503  bool IsDigitalAudio(void) const
1505  bool IsHDTV(void) const
1507  bool IsTeletext(void) const
1509 
1510  QString toString(void) const
1511  {
1512  return QString("ServiceDescriptor: %1 %2").arg(ServiceName())
1514  }
1515 };
1516 
1517 // DVB Bluebook A038 (Sept 2011) p 82
1519 {
1520  public:
1521  ServiceAvailabilityDescriptor(const unsigned char *data, int len = 300) :
1522  MPEGDescriptor(data, len, DescriptorID::service_availability) { }
1523  // Name bits loc expected value
1524  // descriptor_tag 8 0.0 0x72
1525  // descriptor_length 8 1.0
1526 
1527  // availability_flag 1 2.0
1528  // reserved 7 2.1
1529  // for (i=0;i<N;i++) { cell_id 16 }
1530 };
1531 
1532 // DVB Bluebook A038 (Sept 2011) p 82
1534 {
1535  public:
1536  ServiceListDescriptor(const unsigned char *data, int len = 300) :
1537  MPEGDescriptor(data, len, DescriptorID::service_list) { }
1538  // Name bits loc expected value
1539  // descriptor_tag 8 0.0 0x41
1540  // descriptor_length 8 1.0
1541 
1542  // for (i=0;i<N;I++)
1543  // {
1544  // service_id 16 0.0+p
1545  // service_type 8 2.0+p
1546  // }
1547  uint ServiceCount(void) const { return DescriptorLength() / 3; }
1548 
1550  { return (_data[2+i*3] << 8) | _data[3+i*3]; }
1551 
1552  uint ServiceType(uint i) const { return _data[4+i*3]; }
1553 
1554  QString toString(void) const
1555  {
1556  QString str = QString("ServiceListDescriptor: %1 Services\n")
1557  .arg(ServiceCount());
1558  for (uint i=0; i<ServiceCount(); i++)
1559  {
1560  if (i!=0) str.append("\n");
1561  str.append(QString(" Service (%1) Type%2").arg(ServiceID(i))
1563  }
1564  return str;
1565  }
1566 };
1567 
1568 // DVB Bluebook A038 (Sept 2011) p 82
1570 {
1571  public:
1572  ServiceMoveDescriptor(const unsigned char *data, int len = 300) :
1573  MPEGDescriptor(data, len, DescriptorID::service_move) { }
1574  // Name bits loc expected value
1575  // descriptor_tag 8 0.0 0x60
1576  // descriptor_length 8 1.0
1577 
1578  // new_original_network_id 16 2.0
1579  // new_transport_stream_id 16 4.0
1580  // new_service_id 16 6.0
1581 };
1582 
1583 // DVB Bluebook A038 (Sept 2011) p 83
1585 {
1586  public:
1587  ShortEventDescriptor(const unsigned char *data, int len = 300) :
1588  MPEGDescriptor(data, len, DescriptorID::short_event) { }
1589  // Name bits loc expected value
1590  // descriptor_tag 8 0.0 0x4d
1591  // descriptor_length 8 1.0
1592 
1593  // ISO_639_language_code 24 2.0
1594  int LanguageKey(void) const
1595  { return iso639_str3_to_key(&_data[2]); }
1596  QString LanguageString(void) const
1597  { return iso639_key_to_str3(LanguageKey()); }
1598  int CanonicalLanguageKey(void) const
1600  QString CanonicalLanguageString(void) const
1602  // event_name_length 8 5.0
1603  uint EventNameLength(void) const { return _data[5]; }
1604  // for (i=0;i<event_name_length;i++) { event_name_char 8 }
1605  QString EventName(void) const
1606  { return dvb_decode_text(&_data[6], _data[5]); }
1607  QString EventShortName(void) const
1608  { return dvb_decode_short_name(&_data[6], _data[5]); }
1609  // text_length 8
1610  uint TextLength(void) const { return _data[6 + _data[5]]; }
1611  // for (i=0;i<text_length;i++) { text_char 8 }
1612  QString Text(void) const
1613  { return dvb_decode_text(&_data[7 + _data[5]], TextLength()); }
1614 
1615  // HACK beg -- Pro7Sat is missing encoding
1616  QString EventName(const unsigned char *encoding_override,
1617  uint encoding_length) const
1618  {
1619  return dvb_decode_text(&_data[6], _data[5],
1620  encoding_override, encoding_length);
1621  }
1622 
1623  QString Text(const unsigned char *encoding_override,
1624  uint encoding_length) const
1625  {
1626  return dvb_decode_text(&_data[7 + _data[5]], TextLength(),
1627  encoding_override, encoding_length);
1628  }
1629  // HACK end -- Pro7Sat is missing encoding
1630 
1631  QString toString(void) const
1632  { return LanguageString() + " : " + EventName() + " : " + Text(); }
1633 };
1634 
1635 // DVB Bluebook A038 (Sept 2011) p 84
1637 {
1638  public:
1639  ShortSmoothingBufferDescriptor(const unsigned char *data, int len = 300) :
1640  MPEGDescriptor(data, len, DescriptorID::short_smoothing_buffer) { }
1641  // Name bits loc expected value
1642  // descriptor_tag 8 0.0 0x61
1643  // descriptor_length 8 1.0
1644 
1645  // sb_size 2 2.0
1646  // sb_leak_rate 6 2.2
1647  // for (i=0; i<N; i++)
1648  // { DVB_reserved 8 }
1649 };
1650 
1651 // DVB Bluebook A038 (Sept 2011) p 85
1655 {
1656  public:
1657  StreamIdentifierDescriptor(const unsigned char *data, int len = 300) :
1658  MPEGDescriptor(data, len, DescriptorID::stream_identifier, 1) { }
1659  // Name bits loc expected value
1660  // descriptor_tag 8 0.0 0x52
1661  // descriptor_length 8 1.0 0x01
1662 
1663  // component_tag 8 2.0
1664  uint ComponentTag(void) const { return _data[2]; }
1665  QString toString(void) const
1666  {
1667  return QString("Stream Identifier Descriptor (0x52): ComponentTag=0x%1")
1668  .arg(ComponentTag(),1,16);
1669  }
1670 };
1671 
1672 // DVB Bluebook A038 (Sept 2011) p 86
1674 {
1675  public:
1676  StuffingDescriptor(const unsigned char *data, int len = 300) :
1677  MPEGDescriptor(data, len, DescriptorID::dvb_stuffing) { }
1678  // Name bits loc expected value
1679  // descriptor_tag 8 0.0 0x42
1680  // descriptor_length 8 1.0
1681  // stuffing_byte * 2.0
1682  QString toString(void) const
1683  {
1684  return QString("Stuffing Descriptor (0x42) length(%1)")
1685  .arg(DescriptorLength());
1686  }
1687 };
1688 
1689 // DVB Bluebook A038 (Sept 2011) p 86
1691 {
1692  public:
1693  SubtitlingDescriptor(const unsigned char *data, int len = 300) :
1694  MPEGDescriptor(data, len, DescriptorID::subtitling) { }
1695  // Name bits loc expected value
1696  // descriptor_tag 8 0.0 0x59
1697  // descriptor_length 8 1.0
1698 
1699  uint StreamCount(void) const { return DescriptorLength() >> 3; }
1700  // for (i= 0;i<N;I++)
1701  // {
1702  // ISO_639_language_code 24 0.0+(i*8)
1703  int LanguageKey(uint i) const
1704  { return iso639_str3_to_key(&_data[2 + (i<<3)]); }
1705  QString LanguageString(uint i) const
1706  { return iso639_key_to_str3(LanguageKey(i)); }
1711 
1712  // subtitling_type 8 3.0+(i*8)
1714  { return _data[5 + (i<<3)]; }
1715  // composition_page_id 16 4.0+(i*8)
1717  { return (_data[6 + (i<<3)] << 8) | _data[7 + (i<<3)]; }
1718  // ancillary_page_id 16 6.0+(i*8)
1720  { return (_data[8 + (i<<3)] << 8) | _data[9 + (i<<3)]; }
1721  // } 8.0
1722 };
1723 
1724 // DVB Bluebook A038 (Sept 2011) p 87
1726 {
1727  public:
1728  TelephoneDescriptor(const unsigned char *data, int len = 300) :
1729  MPEGDescriptor(data, len, DescriptorID::telephone) { }
1730  // Name bits loc expected value
1731  // descriptor_tag 8 0.0 0x57
1732  // descriptor_length 8 1.0
1733 
1734  // reserved_future_use 2 2.0
1735  // foreign_availability 1 2.2
1736  // connection_type 5 2.3
1737  // reserved_future_use 1 3.0
1738  // country_prefix_length 2 3.1
1739  // i18n_area_code_len 3 3.4
1740  // operator_code_length 2 3.6
1741  // reserved_future_use 1 3.7
1742  // national_area_code_len 3 4.0
1743  // core_number_length 4 4.4
1744  //
1745  // for (i=0; i<N; i++)
1746  // { country_prefix_char 8 }
1747  // for (i=0; i<N; i++)
1748  // { international_area_code_char 8 }
1749  // for (i=0; i<N; i++)
1750  // { operator_code_char 8 }
1751  // for (i=0; i<N; i++)
1752  // { national_area_code_char 8 }
1753  // for (i=0; i<N; i++)
1754  // { core_number_char 8 }
1755 };
1756 
1757 // DVB Bluebook A038 (Sept 2011) p 88
1759 {
1760  public:
1761  TeletextDescriptor(const unsigned char *data, int len = 300) :
1762  MPEGDescriptor(data, len, DescriptorID::teletext) { }
1763  // Name bits loc expected value
1764  // descriptor_tag 8 0.0 0x56
1765  // descriptor_length 8 1.0
1766 
1767  uint StreamCount(void) const { return DescriptorLength() / 5; }
1768 
1769  // for (i=0; i<N; i++)
1770  // {
1771  // ISO_639_language_code 24 0.0
1772  int LanguageKey(uint i) const
1773  { return iso639_str3_to_key(&_data[2 + (i*5)]); }
1774  QString LanguageString(uint i) const
1775  { return iso639_key_to_str3(LanguageKey(i)); }
1780  // teletext_type 5 3.0
1782  { return _data[5 + (i*5)] >> 3; }
1783  // teletext_magazine_num 3 3.5
1785  { return _data[5 + (i*5)] & 0x7; }
1786  // teletext_page_num 8 4.0
1788  { return _data[6 + (i*5)]; }
1789  // } 5.0
1790  QString toString(void) const;
1791 };
1792 
1793 // DVB Bluebook A038 (Sept 2011) p 89
1795 {
1796  public:
1797  TimeShiftedEventDescriptor(const unsigned char *data, int len = 300) :
1798  MPEGDescriptor(data, len, DescriptorID::time_shifted_event) { }
1799  // Name bits loc expected value
1800  // descriptor_tag 8 0.0 0x4f
1801  // descriptor_length 8 1.0
1802 
1803  // reference_service_id 16 2.0
1804  // reference_event_id 16 4.0
1805 };
1806 
1807 // DVB Bluebook A038 (Sept 2011) p 90
1809 {
1810  public:
1811  TimeShiftedServiceDescriptor(const unsigned char *data, int len = 300) :
1812  MPEGDescriptor(data, len, DescriptorID::dvb_time_shifted_service) { }
1813  // Name bits loc expected value
1814  // descriptor_tag 8 0.0 0x4c
1815  // descriptor_length 8 1.0
1816 
1817  // reference_service_id 16 2.0
1818 };
1819 
1820 // DVB Bluebook A038 (Sept 2011) p 90
1822 {
1823  public:
1824  TransportStreamDescriptor(const unsigned char *data, int len = 300) :
1825  MPEGDescriptor(data, len, DescriptorID::transport_stream) { }
1826  // Name bits loc expected value
1827  // descriptor_tag 8 0.0 0x67
1828  // descriptor_length 8 1.0
1829 
1830  // for (i=0; i<N; i++) { byte 8 }
1831  QString Data(void) const
1832  { return dvb_decode_text(&_data[2], DescriptorLength()); }
1833  QString toString(void) const
1834  { return QString("TransportStreamDescriptor data(%1)").arg(Data()); }
1835 };
1836 
1837 // DVB Bluebook A038 (Sept 2011) p 91
1839 {
1840  public:
1841  VBIDataDescriptor(const unsigned char *data, int len = 300) :
1842  MPEGDescriptor(data, len, DescriptorID::vbi_data) { }
1843  // Name bits loc expected value
1844  // descriptor_tag 8 0.0 0x45
1845  // descriptor_length 8 1.0
1846 
1847  // for (i=0; i<N; i++)
1848  // {
1849  // data_service_id 8 0.0+p
1850  // data_service_length 8 1.0+p
1851  // if ((data_service_id&0x7) && data_service_id!=0x3))
1852  // {
1853  // for (i=0; i<N; i++)
1854  // {
1855  // reserved 2 2.0+p2
1856  // field_parity 1 2.2+p2
1857  // line_offset 5 2.3+p2
1858  // }
1859  // }
1860  // else
1861  // {
1862  // for (i=0; i<N; i++) { reserved 8 }
1863  // }
1864  // }
1865 };
1866 
1867 // DVB Bluebook A038 (Sept 2011) p 92
1869 {
1870  public:
1871  VBITeletextDescriptor(const unsigned char *data, int len = 300) :
1872  MPEGDescriptor(data, len, DescriptorID::vbi_teletext) { }
1873  // Name bits loc expected value
1874  // descriptor_tag 8 0.0 0x46
1875  // descriptor_length 8 1.0
1876 
1877  // for (i=0;i<N;i++)
1878  // {
1879  // ISO_639_language_code 24 0.0+p
1880  // teletext_type 5 3.0+p
1881  // teletext_magazine_num 3 3.5+p
1882  // teletext_page_num 8 4.0+p
1883  // } 5.0
1884 };
1885 
1886 // DVB Bluebook A038 (Sept 2011) p 119
1888 {
1889  public:
1890  PartialTransportStreamDescriptor(const unsigned char *data, int len = 300) :
1891  MPEGDescriptor(data, len, DescriptorID::partial_transport_stream) { }
1892  // Name bits loc expected value
1893  // descriptor_tag 8 0.0 0x63
1894  // descriptor_length 8 1.0
1895 
1896  // DVB_reserved_future_use 2 2.0
1897  // peak_rate 22 2.2
1898  uint PeakRate(void) const
1899  { return (_data[2] & 0x3f) << 16 | _data[3] | _data[4]; }
1900  // DVB_reserved_future_use 2 5.0
1901  // min_overall_smooth_rate 22 5.2
1902  uint SmoothRate(void) const
1903  { return (_data[5] & 0x3f) << 16 | _data[6] | _data[7]; }
1904  // DVB_reserved_future_use 2 8.0
1905  // max_overall_smooth_buf 14 8.2
1906  uint SmoothBuf(void) const { return ((_data[8] & 0x3f) << 8) | _data[9]; }
1907  QString toString(void) const;
1908 };
1909 
1910 
1911 // a_52a.pdf p125 Table A7 (for DVB)
1913 {
1914  public:
1915  AC3Descriptor(const unsigned char *data, int len = 300) :
1916  MPEGDescriptor(data, len, DescriptorID::ac3) { }
1917  // Name bits loc expected value
1918  // descriptor_tag 8 0.0 0x6A
1919  // descriptor_length 8 1.0
1920 
1921  // component_type_flag 1 2.0
1922  bool HasComponentType(void) const { return _data[2] & 0x80; }
1923  // bsid_flag 1 2.1
1924  bool HasBSID(void) const { return _data[2] & 0x40; }
1925  // mainid_flag 1 2.2
1926  bool HasMainID(void) const { return _data[2] & 0x20; }
1927  // asvc_flag 1 2.3
1928  bool HasASVC(void) const { return _data[2] & 0x10; }
1929  // reserved_flags 4 2.4
1930  // if (component_type_flag == 1)
1931  // { component_type 8 uimsbf }
1932  uint ComponentType(void) const { return _data[3]; }
1933  // if (bsid_flag == 1)
1934  // { bsid 8 uimsbf }
1935  uint BSID(void) const
1936  { return (HasComponentType()) ? _data[4] : _data[3]; }
1937  // if (mainid_flag == 1)
1938  // { mainid 8 uimsbf }
1939  uint MainID(void) const
1940  {
1941  int offset = 3;
1942  offset += (HasComponentType()) ? 1 : 0;
1943  offset += (HasBSID()) ? 1 : 0;
1944  return _data[offset];
1945  }
1946  // if (asvc_flag==1)
1947  // { asvc 8 uimsbf }
1948  uint ASVC(void) const
1949  {
1950  int offset = 3;
1951  offset += (HasComponentType()) ? 1 : 0;
1952  offset += (HasBSID()) ? 1 : 0;
1953  offset += (HasMainID()) ? 1 : 0;
1954  return _data[offset];
1955  }
1956  // for (I=0;I<N;I++)
1957  // { additional_info[i] N*8 uimsbf }
1958  //};
1959  QString toString(void) const;
1960 };
1961 
1962 static QString coderate_inner(uint cr)
1963 {
1964  switch (cr)
1965  {
1966  case 0x0: return "auto"; // not actually defined in spec
1967  case 0x1: return "1/2";
1968  case 0x2: return "2/3";
1969  case 0x3: return "3/4";
1970  case 0x4: return "5/6";
1971  case 0x5: return "7/8";
1972  case 0x8: return "8/9";
1973  case 0xf: return "none";
1974  default: return "auto"; // not actually defined in spec
1975  }
1976 }
1977 
1979 {
1980  public:
1981  UKChannelListDescriptor(const unsigned char *data, int len = 300) :
1982  MPEGDescriptor(data, len, PrivateDescriptorID::dvb_uk_channel_list) { }
1983  // Name bits loc expected value
1984  // descriptor_tag 8 0.0 0x83
1985  // descriptor_length 8 1.0
1986 
1987  uint ChannelCount(void) const { return DescriptorLength() >> 2; }
1988 
1990  { return (_data[2 + (i<<2)] << 8) | _data[3 + (i<<2)]; }
1991 
1993  { return ((_data[4 + (i<<2)] << 8) | _data[5 + (i<<2)]) & 0x3ff; }
1994 
1995  QString toString(void) const;
1996 };
1997 
1998 // ETSI TS 102 323 (TV Anytime)
2000 {
2001  public:
2002  DVBContentIdentifierDescriptor(const unsigned char *data, int len = 300) :
2003  MPEGDescriptor(data, len, DescriptorID::dvb_content_identifier)
2004  {
2005  size_t length;
2006  size_t count = 0;
2007  uint8_t position = 2;
2008 
2009  memset ((void *) m_crid, 0, sizeof(m_crid));
2010 
2011  while (_data[1] >= position)
2012  {
2013  length = _data[position+1];
2014  m_crid[count] = &_data[position];
2015  count++;
2016  position+=length+2;
2017  }
2018  m_cridCount = count;
2019  }
2020  // Name bits loc expected value
2021  // descriptor_tag 8 0.0 0x76
2022  // descriptor_length 8 1.0
2023 
2024  uint ContentType(size_t n=0) const { return m_crid[n][0] >> 2; }
2025 
2026  uint ContentEncoding(size_t n=0) const { return m_crid[n][0] & 0x03; }
2027 
2028  // A content identifier is a URI. It may contain UTF-8 encoded using %XX.
2029  QString ContentId(size_t n=0) const
2030  {
2031  int length = m_crid[n][1];
2032  int positionOfHash = length-1;
2033  while (positionOfHash >= 0) {
2034  if (m_crid[n][2 + positionOfHash] == '#') {
2035  length = positionOfHash; /* remove the hash and the following IMI */
2036  break;
2037  }
2038  positionOfHash--;
2039  }
2040  return QString::fromLatin1((const char *)&m_crid[n][2], length);
2041  }
2042 
2043  size_t CRIDCount() const
2044  {
2045  return m_cridCount;
2046  }
2047 
2048  private:
2049  size_t m_cridCount;
2050  const uint8_t *m_crid[8];
2051 };
2052 
2053 // ETSI TS 102 323 (TV Anytime)
2055 {
2056  public:
2057  DefaultAuthorityDescriptor(const unsigned char *data, int len = 300) :
2058  MPEGDescriptor(data, len, DescriptorID::default_authority) { }
2059  // Name bits loc expected value
2060  // descriptor_tag 8 0.0 0x73
2061  // descriptor_length 8 1.0
2062 
2063  QString DefaultAuthority(void) const
2064  {
2065  return QString::fromLatin1((const char *)_data+2, _data[1]);
2066  }
2067 
2068  QString toString(void) const
2069  {
2070  return QString("DefaultAuthorityDescriptor: Authority(%1)")
2071  .arg(DefaultAuthority());
2072  }
2073 };
2074 
2075 #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
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
unsigned char HEAACProperties(void) const
GLenum GLsizei len
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:135
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:63
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:117
AnnouncementSupportDescriptor(const unsigned char *data, int len=300)
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
return memset(s, c, len)
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
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:56
QString Text(void) const
UKChannelListDescriptor(const unsigned char *data, int len=300)
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 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
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)
uint ChannelCount(void) const
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
uint ServiceID(uint i) 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
QString CanonicalLanguageString(void) const
bool HasMainID(void) const
QString TransmissionModeString(void) const
uint CountryRegionId(uint i) const
static int x5
Definition: mythsocket.cpp:59
uint ComponentTag(void) const
uint OriginalNetworkId(uint i) const
QString CodeRateLPString(void) 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 ChannelNumber(uint i) 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:46
uint MainID(void) const
QString toString(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:57
ParentalRatingDescriptor(const unsigned char *data, int len=300)
LinkageDescriptor(const unsigned char *data, int len=300)
bool IsEventSimulcast(void) const
uint ServiceType(void) const
src
Definition: minilzo.cpp:2074
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
uint ASVC(void) const
QString CodeRateHPString(void) const
static int x1
Definition: mythsocket.cpp:55
CableDeliverySystemDescriptor(const unsigned char *data, int len=300)
StreamIdentifierDescriptor(const unsigned char *data, int len=300)
QString CanonicalLanguageString(void) const
QString CountryNames(void) const