MythTV  master
dvbdescriptors.cpp
Go to the documentation of this file.
1 // C headers
2 #include <iconv.h>
3 #include <unistd.h>
4 #include <algorithm>
5 #include <cerrno>
6 
7 // Qt headers
8 #include <QCoreApplication>
9 
10 // MythTV headers
11 #include "dvbdescriptors.h"
12 #include "iso6937tables.h"
13 #include "freesat_huffman.h"
15 #include "libmyth/programinfo.h"
16 
17 
18 static QString decode_iso6937(const unsigned char *buf, uint length)
19 {
20  // ISO/IEC 6937 to unicode (UCS2) convertor...
21  // This is a composed encoding - accent first then plain character
22  QString result = "";
23  ushort ch = 0x20;
24  for (uint i = 0; (i < length) && buf[i]; i++)
25  {
26  if (ch == 0xFFFF)
27  {
28  // Process second byte of two byte character
29  const iso6937table * foo = iso6937table_secondary[buf[i-1]];
30  ch = (*foo)[buf[i]];
31  if (ch == 0xFFFF)
32  {
33  // If no valid code found in secondary table,
34  // reprocess this second byte as first byte.
35  ch = iso6937table_base[buf[i]];
36  if (ch == 0xFFFF)
37  continue; // process second byte
38  }
39  }
40  else
41  {
42  // Process first character of two possible characters.
43  // double byte characters have a sentinel (0xffff) in this table.
44  ch = iso6937table_base[buf[i]];
45  if (ch == 0xFFFF)
46  continue; // process second byte
47 
48  }
49  result += QChar(ch);
50  }
51  return result;
52 }
53 
54 // Set up a context for iconv, and call it repeatedly until finished.
55 // The iconv function stops whenever an unknown character is seen in
56 // the input stream. Handle inserting a � character and continuing, so
57 // that the resulting output is the same as QTextCodec::toUnicode.
58 static QString iconv_helper(int which, char *buf, size_t length)
59 {
60  QString codec = QString("iso-8859-%1").arg(which);
61  iconv_t conv = iconv_open("utf-16", qPrintable(codec));
62  if (conv == (iconv_t) -1)
63  return "";
64 
65  // Allocate room for the output, including space for the Byte
66  // Order Mark.
67  size_t outmaxlen = length * 2 + 2;
68  QByteArray outbytes;
69  outbytes.resize(outmaxlen);
70  char *outp = outbytes.data();
71  size_t outremain = outmaxlen;
72 
73  // Conversion loop
74  while (length > 0)
75  {
76  size_t ret = iconv(conv, &buf, &length, &outp, &outremain);
77  if (ret == size_t(-1))
78  {
79  if (errno == EILSEQ)
80  {
81  buf++; length -= 1;
82  // Invalid Unicode character. Stuff a U+FFFD �
83  // replacement character into the output like Qt.
84  // Need to check the Byte Order Mark U+FEFF set by
85  // iconv and match the ordering being used. (This
86  // doesn't necessarily follow HAVE_BIGENDIAN.)
87  if (outbytes[0] == static_cast<char>(0xFE))
88  { // Big endian
89  *outp++ = 0xFF; *outp++ = 0xFD;
90  }
91  else
92  {
93  *outp++ = 0xFD; *outp++ = 0xFF;
94  }
95  outremain -= 2;
96  }
97  else
98  {
99  // Invalid or incomplete multibyte character in
100  // input. Should never happen when converting from
101  // iso-8859.
102  length = 0;
103  }
104  }
105  }
106 
107  // Remove the Byte Order Mark for compatability with
108  // QTextCodec::toUnicode. Do not replace the ::fromUtf16 call with
109  // the faster QString constructor, as the latter doesn't read the
110  // BOM and convert the string to host byte order.
111  QString result =
112  QString::fromUtf16(reinterpret_cast<char16_t*>(outbytes.data()),
113  (outmaxlen-outremain)/2);
114 
115  iconv_close(conv);
116  return result;
117 }
118 
119 static QString decode_text(const unsigned char *buf, uint length);
120 
121 // Decode a text string according to ETSI EN 300 468 Annex A
122 QString dvb_decode_text(const unsigned char *src, uint raw_length,
123  const enc_override &encoding_override)
124 {
125  if (!raw_length)
126  return "";
127 
128  if (src[0] == 0x1f)
129  return freesat_huffman_to_string(src, raw_length);
130 
131  /* UCS-2 aka ISO/IEC 10646-1 Basic Multilingual Plane */
132  if (src[0] == 0x11)
133  {
134  size_t length = (raw_length - 1) / 2;
135  auto *to = new QChar[length];
136  for (size_t i=0; i<length; i++)
137  to[i] = QChar((src[1 + i*2] << 8) + src[1 + i*2 + 1]);
138  QString to2(to, length);
139  delete [] to;
140  return to2;
141  }
142 
143  if (((0x11 < src[0]) && (src[0] < 0x15)) ||
144  ((0x15 < src[0]) && (src[0] < 0x1f)))
145  {
146  // TODO: Handle multi-byte encodings
147  LOG(VB_SIPARSER, LOG_ERR,
148  "dvb_decode_text: Multi-byte coded text is not yet supported.");
149  return "";
150  }
151 
152  // if a override encoding is specified and the default ISO 6937 encoding
153  // would be used copy the override encoding in front of the text
154  auto *dst = new unsigned char[raw_length + encoding_override.size()];
155 
156  uint length = 0;
157  if (!encoding_override.empty() && (src[0] >= 0x20)) {
158  std::copy(encoding_override.cbegin(), encoding_override.cend(), dst);
159  length = encoding_override.size();
160  }
161 
162  // Strip formatting characters
163  for (uint i = 0; i < raw_length; i++)
164  {
165  if ((src[i] < 0x80) || (src[i] > 0x9F))
166  {
167  dst[length++] = src[i];
168  // replace CR/LF with a space
169  }
170  else if (src[i] == 0x8A)
171  {
172  dst[length++] = 0x20;
173  }
174  }
175 
176  // Exit on empty string, sans formatting.
177 
178  QString sStr = (!length) ? "" : decode_text(dst, length);
179 
180  delete [] dst;
181 
182  return sStr;
183 }
184 
185 static QString decode_text(const unsigned char *buf, uint length)
186 {
187  // Decode using the correct text codec
188  if (buf[0] >= 0x20)
189  {
190  return decode_iso6937(buf, length);
191  }
192  if ((buf[0] >= 0x01) && (buf[0] <= 0x0B))
193  {
194  return iconv_helper(4 + buf[0], (char*)(buf + 1), length - 1);
195  }
196  if (buf[0] == 0x10)
197  {
198  // If the first byte of the text field has a value "0x10"
199  // then the following two bytes carry a 16-bit value (uimsbf) N
200  // to indicate that the remaining data of the text field is
201  // coded using the character code table specified by
202  // ISO Standard 8859, parts 1 to 9
203 
204  uint code = buf[1] << 8 | buf[2];
205  if (code <= 15)
206  return iconv_helper(code, (char*)(buf + 3), length - 3);
207  return QString::fromLocal8Bit((char*)(buf + 3), length - 3);
208  }
209  if (buf[0] == 0x15) // Already Unicode
210  {
211  return QString::fromUtf8((char*)(buf + 1), length - 1);
212  }
213 
214  // Unknown/invalid encoding - assume local8Bit
215  return QString::fromLocal8Bit((char*)(buf + 1), length - 1);
216 }
217 
218 
219 QString dvb_decode_short_name(const unsigned char *src, uint raw_length)
220 {
221  if (raw_length > 50)
222  {
223  LOG(VB_SIPARSER, LOG_WARNING,
224  QString("dvb_decode_short_name: name is %1 chars "
225  "long. Unlikely to be a short name.")
226  .arg(raw_length));
227  return "";
228  }
229 
230  if (((0x10 < src[0]) && (src[0] < 0x15)) ||
231  ((0x15 < src[0]) && (src[0] < 0x20)))
232  {
233  // TODO: Handle multi-byte encodings
234  LOG(VB_SIPARSER, LOG_ERR, "dvb_decode_short_name: "
235  "Multi-byte coded text is not yet supported.");
236  return "";
237  }
238 
239  auto *dst = new unsigned char[raw_length];
240  uint length = 0;
241 
242  // check for emphasis control codes
243  for (uint i = 0; i < raw_length; i++)
244  {
245  if (src[i] == 0x86)
246  {
247  while ((++i < raw_length) && (src[i] != 0x87))
248  {
249  if ((src[i] < 0x80) || (src[i] > 0x9F))
250  {
251  dst[length++] = src[i];
252  }
253  // replace CR/LF with a space
254  else if (src[i] == 0x8A)
255  {
256  dst[length++] = 0x20;
257  }
258  }
259  }
260  }
261 
262  QString sStr = (!length) ? dvb_decode_text(src, raw_length)
263  : decode_text(dst, length);
264 
265  delete [] dst;
266 
267  return sStr;
268 }
269 
271 QMap<uint,QString> ContentDescriptor::s_categoryDesc;
272 volatile bool ContentDescriptor::s_categoryDescExists = false;
273 
275 {
276  if (0x1 == Nibble1(i))
278  if (0x4 == Nibble1(i))
281 }
282 
283 const std::array<const std::string,14> linkage_types
284 {
285  "Reserved(0x00)",
286  "Information Service",
287  "EPG Service",
288  "CA Replacement Service",
289  "TS Containing Complete Network/Bouquet SI",
290  "Service Replacement Service",
291  "Data Broadcast Service",
292  "RCS Map",
293  "Mobile Hand-Over",
294  "System Software Update Service",
295  "TS Containing SSU, BAT or NIT",
296  "IP/MAC Notification Service",
297  "TS Containing INT, BAT or NIT",
298  "Event Linkage",
299 };
300 
301 
303 {
304  if (LinkageType() < linkage_types.size())
305  return QString::fromStdString(linkage_types[LinkageType()]);
306  if ((LinkageType() <= 0x7f) || (LinkageType() == 0xff))
307  return QString("Reserved(0x%1)").arg(LinkageType(),2,16,QChar('0'));
308  return QString("User Defined(0x%1)").arg(LinkageType(),2,16,QChar('0'));
309 }
310 
312 {
314  return "Hand-Over to an Identical Service";
316  return "Hand-Over to a Local Variation";
318  return "Hand-over to an Associated Service";
319  return "Reserved";
320 }
321 
323 {
325  Init();
326 
327  QMutexLocker locker(&s_categoryLock);
328 
329  // Try to get detailed description
330  QMap<uint,QString>::const_iterator it = s_categoryDesc.constFind(Nibble(i));
331  if (it != s_categoryDesc.constEnd())
332  return *it;
333 
334  // Fall back to category description
335  it = s_categoryDesc.constFind(Nibble1(i)<<4);
336  if (it != s_categoryDesc.constEnd())
337  return *it;
338 
339  // Found nothing? Just return empty string.
340  return "";
341 }
342 
344 {
345  QString tmp("ContentDescriptor: ");
346  for (uint i = 0; i < Count(); i++)
348  return tmp;
349 }
350 
352 {
353  QMutexLocker locker(&s_categoryLock);
354 
356  return;
357 
358  //: %1 is the main category, %2 is the subcategory
359  QString subCatStr = QCoreApplication::translate("(Categories)",
360  "%1 - %2", "Category with subcategory display");
361 
362  s_categoryDesc[0x10] = QCoreApplication::translate("(Categories)", "Movie");
363  s_categoryDesc[0x11] = subCatStr
364  .arg(QCoreApplication::translate("(Categories)", "Movie"),
365  QCoreApplication::translate("(Categories)", "Detective/Thriller"));
366  s_categoryDesc[0x12] = subCatStr
367  .arg(QCoreApplication::translate("(Categories)", "Movie"),
368  QCoreApplication::translate("(Categories)",
369  "Adventure/Western/War"));
370  s_categoryDesc[0x13] = subCatStr
371  .arg(QCoreApplication::translate("(Categories)", "Movie"),
372  QCoreApplication::translate("(Categories)",
373  "Science Fiction/Fantasy/Horror"));
374  s_categoryDesc[0x14] = subCatStr
375  .arg(QCoreApplication::translate("(Categories)", "Movie"),
376  QCoreApplication::translate("(Categories)", "Comedy"));
377  s_categoryDesc[0x15] = subCatStr
378  .arg(QCoreApplication::translate("(Categories)", "Movie"),
379  QCoreApplication::translate("(Categories)",
380  "Soap/Melodrama/Folkloric"));
381  s_categoryDesc[0x16] = subCatStr
382  .arg(QCoreApplication::translate("(Categories)", "Movie"),
383  QCoreApplication::translate("(Categories)", "Romance"));
384  s_categoryDesc[0x17] = subCatStr
385  .arg(QCoreApplication::translate("(Categories)","Movie"),
386  QCoreApplication::translate("(Categories)",
387  "Serious/Classical/Religious/Historical Movie/Drama"));
388  s_categoryDesc[0x18] = subCatStr
389  .arg(QCoreApplication::translate("(Categories)","Movie"),
390  QCoreApplication::translate("(Categories)", "Adult",
391  "Adult Movie"));
392 
393  s_categoryDesc[0x20] = QCoreApplication::translate("(Categories)", "News");
394  s_categoryDesc[0x21] = QCoreApplication::translate("(Categories)",
395  "News/Weather Report");
396  s_categoryDesc[0x22] = QCoreApplication::translate("(Categories)",
397  "News Magazine");
398  s_categoryDesc[0x23] = QCoreApplication::translate("(Categories)",
399  "Documentary");
400  s_categoryDesc[0x24] = QCoreApplication::translate("(Categories)",
401  "Intelligent Programs");
402 
403  s_categoryDesc[0x30] = QCoreApplication::translate("(Categories)",
404  "Entertainment");
405  s_categoryDesc[0x31] = QCoreApplication::translate("(Categories)",
406  "Game Show");
407  s_categoryDesc[0x32] = QCoreApplication::translate("(Categories)",
408  "Variety Show");
409  s_categoryDesc[0x33] = QCoreApplication::translate("(Categories)",
410  "Talk Show");
411 
412  s_categoryDesc[0x40] = QCoreApplication::translate("(Categories)",
413  "Sports");
414  s_categoryDesc[0x41] = QCoreApplication::translate("(Categories)",
415  "Special Events (World Cup, World Series, etc)");
416  s_categoryDesc[0x42] = QCoreApplication::translate("(Categories)",
417  "Sports Magazines");
418  s_categoryDesc[0x43] = QCoreApplication::translate("(Categories)",
419  "Football (Soccer)");
420  s_categoryDesc[0x44] = QCoreApplication::translate("(Categories)",
421  "Tennis/Squash");
422  s_categoryDesc[0x45] = QCoreApplication::translate("(Categories)",
423  "Misc. Team Sports");
424  // not football/soccer
425  s_categoryDesc[0x46] = QCoreApplication::translate("(Categories)",
426  "Athletics");
427  s_categoryDesc[0x47] = QCoreApplication::translate("(Categories)",
428  "Motor Sport");
429  s_categoryDesc[0x48] = QCoreApplication::translate("(Categories)",
430  "Water Sport");
431  s_categoryDesc[0x49] = QCoreApplication::translate("(Categories)",
432  "Winter Sports");
433  s_categoryDesc[0x4A] = QCoreApplication::translate("(Categories)",
434  "Equestrian");
435  s_categoryDesc[0x4B] = QCoreApplication::translate("(Categories)",
436  "Martial Sports");
437 
438  s_categoryDesc[0x50] = QCoreApplication::translate("(Categories)", "Kids");
439  s_categoryDesc[0x51] = QCoreApplication::translate("(Categories)",
440  "Pre-School Children's Programs");
441  s_categoryDesc[0x52] = QCoreApplication::translate("(Categories)",
442  "Entertainment Programs for 6 to 14");
443  s_categoryDesc[0x53] = QCoreApplication::translate("(Categories)",
444  "Entertainment Programs for 10 to 16");
445  s_categoryDesc[0x54] = QCoreApplication::translate("(Categories)",
446  "Informational/Educational");
447  s_categoryDesc[0x55] = QCoreApplication::translate("(Categories)",
448  "Cartoons/Puppets");
449 
450  s_categoryDesc[0x60] = QCoreApplication::translate("(Categories)",
451  "Music/Ballet/Dance");
452  s_categoryDesc[0x61] = QCoreApplication::translate("(Categories)",
453  "Rock/Pop");
454  s_categoryDesc[0x62] = QCoreApplication::translate("(Categories)",
455  "Classical Music");
456  s_categoryDesc[0x63] = QCoreApplication::translate("(Categories)",
457  "Folk Music");
458  s_categoryDesc[0x64] = QCoreApplication::translate("(Categories)",
459  "Jazz");
460  s_categoryDesc[0x65] = QCoreApplication::translate("(Categories)",
461  "Musical/Opera");
462  s_categoryDesc[0x66] = QCoreApplication::translate("(Categories)",
463  "Ballet");
464 
465  s_categoryDesc[0x70] = QCoreApplication::translate("(Categories)",
466  "Arts/Culture");
467  s_categoryDesc[0x71] = QCoreApplication::translate("(Categories)",
468  "Performing Arts");
469  s_categoryDesc[0x72] = QCoreApplication::translate("(Categories)",
470  "Fine Arts");
471  s_categoryDesc[0x73] = QCoreApplication::translate("(Categories)",
472  "Religion");
473  s_categoryDesc[0x74] = QCoreApplication::translate("(Categories)",
474  "Popular Culture/Traditional Arts");
475  s_categoryDesc[0x75] = QCoreApplication::translate("(Categories)",
476  "Literature");
477  s_categoryDesc[0x76] = QCoreApplication::translate("(Categories)",
478  "Film/Cinema");
479  s_categoryDesc[0x77] = QCoreApplication::translate("(Categories)",
480  "Experimental Film/Video");
481  s_categoryDesc[0x78] = QCoreApplication::translate("(Categories)",
482  "Broadcasting/Press");
483  s_categoryDesc[0x79] = QCoreApplication::translate("(Categories)",
484  "New Media");
485  s_categoryDesc[0x7A] = QCoreApplication::translate("(Categories)",
486  "Arts/Culture Magazines");
487  s_categoryDesc[0x7B] = QCoreApplication::translate("(Categories)", "Fashion");
488 
489  s_categoryDesc[0x80] = QCoreApplication::translate("(Categories)",
490  "Social/Political/Economics");
491  s_categoryDesc[0x81] = QCoreApplication::translate("(Categories)",
492  "Magazines/Reports/Documentary");
493  s_categoryDesc[0x82] = QCoreApplication::translate("(Categories)",
494  "Economics/Social Advisory");
495  s_categoryDesc[0x83] = QCoreApplication::translate("(Categories)",
496  "Remarkable People");
497 
498  s_categoryDesc[0x90] = QCoreApplication::translate("(Categories)",
499  "Education/Science/Factual");
500  s_categoryDesc[0x91] = QCoreApplication::translate("(Categories)",
501  "Nature/Animals/Environment");
502  s_categoryDesc[0x92] = QCoreApplication::translate("(Categories)",
503  "Technology/Natural Sciences");
504  s_categoryDesc[0x93] = QCoreApplication::translate("(Categories)",
505  "Medicine/Physiology/Psychology");
506  s_categoryDesc[0x94] = QCoreApplication::translate("(Categories)",
507  "Foreign Countries/Expeditions");
508  s_categoryDesc[0x95] = QCoreApplication::translate("(Categories)",
509  "Social/Spiritual Sciences");
510  s_categoryDesc[0x96] = QCoreApplication::translate("(Categories)",
511  "Further Education");
512  s_categoryDesc[0x97] = QCoreApplication::translate("(Categories)",
513  "Languages");
514 
515  s_categoryDesc[0xA0] = QCoreApplication::translate("(Categories)",
516  "Leisure/Hobbies");
517  s_categoryDesc[0xA1] = QCoreApplication::translate("(Categories)",
518  "Tourism/Travel");
519  s_categoryDesc[0xA2] = QCoreApplication::translate("(Categories)",
520  "Handicraft");
521  s_categoryDesc[0xA3] = QCoreApplication::translate("(Categories)",
522  "Motoring");
523  s_categoryDesc[0xA4] = QCoreApplication::translate("(Categories)",
524  "Fitness & Health");
525  s_categoryDesc[0xA5] = QCoreApplication::translate("(Categories)", "Cooking");
526  s_categoryDesc[0xA6] = QCoreApplication::translate("(Categories)",
527  "Advertizement/Shopping");
528  s_categoryDesc[0xA7] = QCoreApplication::translate("(Categories)",
529  "Gardening");
530  // Special
531  s_categoryDesc[0xB0] = QCoreApplication::translate("(Categories)",
532  "Original Language");
533  s_categoryDesc[0xB1] = QCoreApplication::translate("(Categories)",
534  "Black & White");
535  s_categoryDesc[0xB2] = QCoreApplication::translate("(Categories)",
536  "\"Unpublished\" Programs");
537  s_categoryDesc[0xB3] = QCoreApplication::translate("(Categories)",
538  "Live Broadcast");
539  // UK Freeview custom id
540  s_categoryDesc[0xF0] = QCoreApplication::translate("(Categories)",
541  "Drama");
542 
543  s_categoryDescExists = true;
544 }
545 
547 {
548  QString str = "FrequencyListDescriptor: frequencies: ";
549 
550  for (uint i = 0; i < FrequencyCount(); i++)
551  {
552  str += QString("%1").arg(FrequencyHz(i));
553  str += (i+1 < FrequencyCount()) ? ((i+4)%10) ? ", " : ",\n " : "";
554  }
555 
556  return str;
557 }
558 
560 {
561  QString str = "";
562 
563  if (IsDTV())
564  str.append(" (TV)");
565  else if (IsDigitalAudio())
566  str.append(" (Radio)");
567  else if (IsHDTV())
568  str.append(" (HDTV)");
569  else if (IsUHDTV())
570  str.append(" (UHDTV)");
571  else if (IsTeletext())
572  str.append(" (Teletext)");
573  else
574  str.append(QString(" (Unknown 0x%1)").arg(ServiceType(),2,16,QChar('0')));
575 
576  return str;
577 }
578 
580 {
581  QString ret = QString("Subtitling Descriptor ");
582  ret += QString("tag(0x%1) ").arg(DescriptorTag(),2,16,QChar('0'));
583  ret += QString("length(%1)").arg(DescriptorLength());
584 
585  for (uint i = 0; i < StreamCount(); i++)
586  {
587  ret.append("\n ");
588  ret.append(QString("type(0x%1) composition_page_id(%2) ancillary_page_id(%3) lang(%4)")
589  .arg(SubtitleType(i),2,16,QChar('0'))
590  .arg(CompositionPageID(i))
591  .arg(AncillaryPageID(i))
592  .arg(LanguageString(i)));
593  }
594 
595  return ret;
596 }
597 
598 QString TeletextDescriptor::toString(void) const
599 {
600  QString ret = QString("Teletext Descriptor ");
601  ret += QString("tag(0x%1) ").arg(DescriptorTag(),2,16,QChar('0'));
602  ret += QString("length(%1)").arg(DescriptorLength());
603 
604  for (uint i = 0; i < StreamCount(); i++)
605  {
606  ret.append("\n ");
607  ret.append(QString("type(%1) mag(%2) page(%3) lang(%4)")
608  .arg(TeletextType(i))
609  .arg(TeletextMagazineNum(i), 0, 16)
610  .arg(TeletextPageNum(i), 2, 16, QChar('0'))
611  .arg(LanguageString(i)));
612  }
613 
614  return ret;
615 }
616 
618 {
619  QString str = QString("CableDeliverySystemDescriptor ");
620  str += QString("tag(0x%1) ").arg(DescriptorTag(),2,16,QChar('0'));
621  str += QString("length(%1)").arg(DescriptorLength());
622 
623  str.append(QString("Frequency: %1\n").arg(FrequencyHz()));
624  str.append(QString(" Mod=%1, SymbR=%2, FECInner=%3, FECOuter=%4")
625  .arg(ModulationString(),
626  QString::number(SymbolRateHz()),
627  FECInnerString(),
628  FECOuterString()));
629 
630  return str;
631 }
632 
634 {
635  QString str = QString("SatelliteDeliverySystemDescriptor ");
636  str += QString("tag(0x%1) ").arg(DescriptorTag(),2,16,QChar('0'));
637  str += QString("length(%1) ").arg(DescriptorLength());
638 
639  str.append(QString("Frequency: %1, Type: %2\n").arg(FrequencykHz())
640  .arg(ModulationSystemString()));
641  str.append(QString(" Mod=%1, SymbR=%2, FECInner=%3, Orbit=%4, Pol=%5")
642  .arg(ModulationString(),
643  QString::number(SymbolRateHz()),
644  FECInnerString(),
646  PolarizationString()));
647 
648  return str;
649 }
650 
652 {
653  QString str = QString("TerrestrialDeliverySystemDescriptor ");
654  str += QString("tag(0x%1) ").arg(DescriptorTag(),2,16,QChar('0'));
655  str += QString("length(%1) ").arg(DescriptorLength());
656 
657  str.append(QString("Frequency: %1\n").arg(FrequencyHz()));
658  str.append(QString(" BW=%1MHz C=%2 HP=%3 LP=%4 GI=%5 TransMode=%6k")
659  .arg(BandwidthString(),
665 
666  return str;
667 }
668 
669 // 0x79
671 {
672  QString str = QString("S2SatelliteDeliverySystemDescriptor ");
673  str += QString("tag(0x%1) ").arg(DescriptorTag(),2,16,QChar('0'));
674  str += QString("length(%1) ").arg(DescriptorLength());
675 
676  str.append(QString("\n ScramblingSequenceSelector(%1)").arg(ScramblingSequenceSelector()));
677  str.append(QString(" MultipleInputStreamFlag(%1)").arg(MultipleInputStreamFlag()));
678  str.append(QString("\n NotTimesliceFlag(%1)").arg(NotTimesliceFlag()));
679  str.append(QString(" TSGSMode(%1)").arg(TSGSMode()));
680  //
681  // TBD
682  //
683  str.append(" Dumping\n");
684  str.append(hexdump());
685  return str;
686 }
687 
688 // 0x7F 0x00
690 {
691  QString str = QString("ImageIconDescriptor ");
692  str += QString("tag(0x%1) ").arg(DescriptorTag(),2,16,QChar('0'));
693  str += QString("length(%1) ").arg(DescriptorLength());
694  str += QString("extension(0x%1) ").arg(DescriptorTagExtension(),2,16,QChar('0'));
695  str += QString("number %1/%2").arg(DescriptorNumber()).arg(LastDescriptorNumber());
696  //
697  // TBD
698  //
699  str.append(" Dumping\n");
700  str.append(hexdump());
701  return str;
702 }
703 
704 // 0x7F 0x04
706 {
707  m_cellPtrs.clear();
708  m_subCellPtrs.clear();
709 
710  const unsigned char *cp = m_data + 8;
711  for (uint i=0; (cp - m_data + 4) < DescriptorLength(); i++)
712  {
713  m_cellPtrs.push_back(cp);
714  cp += TFSFlag() ? (2 + 1 + FrequencyLoopLength(i)) : (2 + 4);
715  m_subCellPtrs.push_back(cp);
716  cp += 1 + SubcellInfoLoopLength(i);
717  }
718 }
719 
721 {
722  QString str = QString("T2DeliverySystemDescriptor ");
723  str += QString("tag(0x%1) ").arg(DescriptorTag(),2,16,QChar('0'));
724  str += QString("length(%1) ").arg(DescriptorLength());
725  str += QString("extension(0x%1) ").arg(DescriptorTagExtension(),2,16,QChar('0'));
726  str += QString("plp_id(%1) ").arg(PlpID());
727  str += QString("T2_system_id(%1)").arg(T2SystemID());
728  if (DescriptorLength() > 4)
729  {
730  str += QString("\n %1 ").arg(SisoMisoString());
731  str += QString("BW=%1MHz ").arg(BandwidthString());
732  str += QString("GI=%1 ").arg(GuardIntervalString());
733  str += QString("TransMode=%1 ").arg(TransmissionModeString());
734  str += QString("OF=%1 ").arg(OtherFrequencyFlag());
735  str += QString("TFS=%1 ").arg(TFSFlag());
736  }
737  if (DescriptorLength() > 6)
738  {
739  for (uint i=0; i < NumCells(); i++)
740  {
741  str += QString("\n ");
742  str += QString("cell_id:%1 ").arg(CellID(i));
743  str += QString("centre_frequency:");
744  if (TFSFlag())
745  {
746  for (uint j=0; j<FrequencyLoopLength(i)/4; j++)
747  {
748  str += QString(" %1").arg(CentreFrequency(i,j));
749  }
750  }
751  else
752  {
753  str += QString(" %1").arg(CentreFrequency(i));
754  }
755  for (uint j=0; j<SubcellInfoLoopLength(i)/5; j++)
756  {
757  str += QString("\n ");
758  str += QString("cell_id_extension:%1 ").arg(CellIDExtension(i,j));
759  str += QString("transposer_frequency:%1").arg(TransposerFrequency(i,j));
760  }
761  }
762  }
763  str.append(" Dumping\n");
764  str.append(hexdump());
765  return str;
766 }
767 
768 // 0x7F 0x05
770 {
771  QString str = QString("SHDeliverySystemDescriptor ");
772  str += QString("tag(0x%1 ").arg(DescriptorTag(),2,16,QChar('0'));
773  str += QString("length(%1) ").arg(DescriptorLength());
774  str += QString("0x%1) ").arg(DescriptorTagExtension(),2,16,QChar('0'));
775  //
776  // TBD
777  //
778  str.append(" Dumping\n");
779  str.append(hexdump());
780  return str;
781 }
782 
783 // 0x7F 0x06
785 {
786  QString str = QString("SupplementaryAudioDescriptor ");
787  str += QString("(0x%1 ").arg(DescriptorTag(),2,16,QChar('0'));
788  str += QString("0x%1) ").arg(DescriptorTagExtension(),2,16,QChar('0'));
789  str += QString("length(%1)").arg(DescriptorLength());
790  str += QString("\n ");
791  str += QString("mix_type(%1) ").arg(MixType());
792  str += QString("editorial_classification(%1)").arg(EditorialClassification());
793  str += QString("\n ");
794  str += QString("language_code_present(%1)").arg(LanguageCodePresent());
795  if (LanguageCodePresent() && DescriptorLength() >= 4)
796  {
797  str += QString(" language_code(%1)").arg(LanguageString());
798  }
799  //
800  str.append(" Dumping\n");
801  str.append(hexdump());
802  return str;
803 }
804 
805 // 0x7F 0x07
807 {
808  QString str = QString("NetworkChangeNotiyDescriptor ");
809  str += QString("(0x%1 ").arg(DescriptorTag(),2,16,QChar('0'));
810  str += QString("0x%1) ").arg(DescriptorTagExtension(),2,16,QChar('0'));
811  //
812  str.append(" Dumping\n");
813  str.append(hexdump());
814  return str;
815 }
816 
817 // 0x7F 0x08
819 {
820  QString str = QString("MessageDescriptor ");
821  str += QString("(0x%1 ").arg(DescriptorTag(),2,16,QChar('0'));
822  str += QString("0x%1) ").arg(DescriptorTagExtension(),2,16,QChar('0'));
823  str += QString("length(%1)").arg(DescriptorLength());
824  str += QString("\n ");
825  str += QString("message_id(%1) ").arg(MessageID());
826  str += QString("language_code(%1)").arg(LanguageString());
827  str += QString("\n ");
828  str += QString("text_char(\"%1\")").arg(Message());
829  //
830  str.append(" Dumping\n");
831  str.append(hexdump());
832  return str;
833 }
834 
835 // 0x7F 0x09
837 {
838  QString str = QString("TargetRegionDescriptor ");
839  str += QString("(0x%1 ").arg(DescriptorTag(),2,16,QChar('0'));
840  str += QString("0x%1) ").arg(DescriptorTagExtension(),2,16,QChar('0'));
841  str += QString("length(%1)").arg(DescriptorLength());
842  str += QString("\n ");
843  str += QString("country_code(%1) ").arg(CountryCodeString());
844  //
845  // TBD
846  //
847  str.append(" Dumping\n");
848  str.append(hexdump());
849  return str;
850 }
851 
852 // 0x7F 0x0A
854 {
855  QString str = QString("TargetRegionNameDescriptor ");
856  str += QString("(0x%1 ").arg(DescriptorTag(),2,16,QChar('0'));
857  str += QString("0x%1) ").arg(DescriptorTagExtension(),2,16,QChar('0'));
858  str += QString("length(%1)").arg(DescriptorLength());
859  str += QString("\n ");
860  str += QString("country_code(%1) ").arg(CountryCodeString());
861  str += QString("language_code(%1)").arg(LanguageString());
862  //
863  // TBD
864  //
865  str.append(" Dumping\n");
866  str.append(hexdump());
867  return str;
868 }
869 
870 // 0x7F 0x0B
872 {
873  QString str = QString("ServiceRelocatedDescriptor ");
874  str += QString("(0x%1 ").arg(DescriptorTag(),2,16,QChar('0'));
875  str += QString("0x%1) ").arg(DescriptorTagExtension(),2,16,QChar('0'));
876  str += QString("length(%1)").arg(DescriptorLength());
877  str += QString("\n ");
878  str += QString("old_original_network_id(%1) ").arg(OldOriginalNetworkID());
879  str += QString("old_transport_id(%1) ").arg(OldTransportID());
880  str += QString("old_service_id(%1) ").arg(OldServiceID());
881  //
882  str.append(" Dumping\n");
883  str.append(hexdump());
884  return str;
885 }
886 
887 // 0x7F 0x0D
889 {
890  QString str = QString("C2DeliverySystemDescriptor ");
891  str += QString("(0x%1 ").arg(DescriptorTag(),2,16,QChar('0'));
892  str += QString("0x%1) ").arg(DescriptorTagExtension(),2,16,QChar('0'));
893  str += QString("length(%1)").arg(DescriptorLength());
894  //
895  // TBD
896  //
897  str.append(" Dumping\n");
898  str.append(hexdump());
899  return str;
900 }
901 
902 // 0x7F 0x17
904 {
905  QString str = QString("S2XSatelliteDeliverySystemDescriptor ");
906  str += QString("(0x%1 ").arg(DescriptorTag(),2,16,QChar('0'));
907  str += QString("0x%1) ").arg(DescriptorTagExtension(),2,16,QChar('0'));
908  str += QString("length(%1)").arg(DescriptorLength());
909  //
910  // TBD
911  //
912  str.append(" Dumping\n");
913  str.append(hexdump());
914  return str;
915 }
916 
918 {
919  QString ret = "UKChannelListDescriptor sid->chan_num: ";
920  for (uint i = 0; i < ChannelCount(); i++)
921  {
922  ret += QString("%1->%2").arg(ServiceID(i)).arg(ChannelNumber(i));
923  ret += (i+1 < ChannelCount()) ? ((i+4)%10) ? ", " : ",\n " : "";
924  }
925  return ret;
926 }
927 
929 {
930  QString ret = "DVBSimulcastChannelDescriptor sid->chan_num: ";
931  for (uint i = 0; i < ChannelCount(); i++)
932  {
933  ret += QString("%1->%2").arg(ServiceID(i)).arg(ChannelNumber(i));
934  ret += (i+1 < ChannelCount()) ? ((i+3)%10) ? ", " : ",\n " : "";
935  }
936  return ret;
937 }
938 
940 {
941  QString ret = "Sky Logical Channel Number Descriptor ";
942  ret += QString("(0x%1) ").arg(DescriptorTag(),2,16,QChar('0'));
943  ret += QString("length(%1)").arg(DescriptorLength());
944 
945  ret += QString("\n RegionID (%1) (0x%2) Raw (0x%3)")
946  .arg(RegionID()).arg(RegionID(),4,16,QChar('0')).arg(RegionRaw(),4,16,QChar('0'));
947 
948  for (uint i=0; i<ServiceCount(); i++)
949  {
950  ret += QString("\n ServiceID (%1) (0x%2) ").arg(ServiceID(i)).arg(ServiceID(i),4,16,QChar('0'));
951  ret += QString("ServiceType (0x%1) ").arg(ServiceType(i),2,16,QChar('0'));
952  ret += QString("LCN (%1) ").arg(LogicalChannelNumber(i));
953  ret += QString("ChannelID(0x%1) ").arg(ChannelID(i),4,16,QChar('0'));
954  ret += QString("Flags(0x%1) ").arg(Flags(i),4,16,QChar('0'));
955  }
956 
957  return ret;
958 }
959 
961 {
962  QString ret = "Freesat Logical Channel Number Descriptor ";
963  ret += QString("(0x%1)").arg(DescriptorTag(),2,16,QChar('0'));
964  ret += QString(" length(%1)").arg(DescriptorLength());
965 
966  for (uint i=0; i<ServiceCount(); i++)
967  {
968  ret += QString("\n ServiceID (%1) (0x%2) ").arg(ServiceID(i)).arg(ServiceID(i),4,16,QChar('0'));
969  ret += QString("ChanID (0x%1)").arg(ChanID(i), 4, 16, QChar('0'));
970  for (uint j=0; j<LCNCount(i); j++)
971  {
972  ret += QString("\n LCN: %1 Region: %2").arg(LogicalChannelNumber(i,j),3).arg(RegionID(i,j));
973  }
974  }
975  return ret;
976 }
977 
979 {
980  QString ret = "Freesat Region Descriptor ";
981  ret += QString("(0x%1)").arg(DescriptorTag(),2,16,QChar('0'));
982  ret += QString(" length(%1)").arg(DescriptorLength());
983 
984  for (uint i=0; i<RegionCount(); ++i)
985  {
986  uint region_id = RegionID(i);
987  QString language = Language(i);
988  QString region_name = RegionName(i);
989  ret += QString("\n Region (%1) (%2) '%3'")
990  .arg(region_id,2).arg(language, region_name);
991  }
992  return ret;
993 }
994 
996 {
997  QString ret = QString("Freesat Callsign Descriptor ");
998  ret += QString("tag(0x%1) ").arg(DescriptorTag(),2,16,QChar('0'));
999  ret += QString("length(%1)").arg(DescriptorLength());
1000  ret += QString(" (%1) '%2'").arg(Language(), Callsign());
1001  return ret;
1002 }
1003 
1005 {
1006  QString ret = QString("OpenTV ChannelList Descriptor region: %1 sid->chan_num(id): ").arg(RegionID());
1007  for (uint i = 0; i < ChannelCount(); i++)
1008  {
1009  ret += QString("%1->%2(%3)").arg(ServiceID(i)).arg(ChannelNumber(i)).arg(ChannelID(i));
1010  ret += (i+1<ChannelCount()) ? ", " : "";
1011  }
1012  return ret;
1013 }
1014 
1016 {
1017  QString ret = QString("ApplicationSignallingDescriptor ");
1018  ret += QString("tag(0x%1) ").arg(DescriptorTag(),2,16,QChar('0'));
1019  ret += QString("length(%1)").arg(DescriptorLength());
1020  for (uint i = 0; i < Count(); ++i)
1021  {
1022  ret += "\n ";
1023  ret += QString("application_type(%1) ").arg(ApplicationType(i));
1024  ret += QString("AIT_version_number(%1)").arg(AITVersionNumber(i));
1025  }
1026  return ret;
1027 }
1028 
1030 {
1031  QString ret = QString("CAIdentifierDescriptor ");
1032  for (uint i = 0; i < CASystemCount(); ++i)
1033  {
1034  ret += QString("ca_system_id(0x%1) ")
1035  .arg(CASystemId(i), 0, 16);
1036  }
1037  return ret;
1038 }
1039 
1041 {
1042  QString ret = QString("DataBroadcastDescriptor: "
1043  "data_broadcast_id(%1) "
1044  "component_tag(%1) ")
1045  .arg(DataBroadcastId(), 0, 10)
1046  .arg(DataComponentTag(), 0, 10);
1047 
1048  ret += QString("selector(0x ");
1049  for (uint i = 0; i < SelectorLength(); i++)
1050  ret += QString("%1 ").arg(Selector()[i], 0, 16);
1051  ret += ") ";
1052 
1053  ret += QString("ISO_639_language_code(%1) ")
1054  .arg(LanguageString());
1055 
1056  ret += QString("text(%1) ") + Text();
1057 
1058  return ret;
1059 }
1060 
1062 {
1063  QString ret = QString("LocalTimeOffsetDescriptor ");
1064  uint count = Count();
1065  for (uint i = 0; i < count; ++i)
1066  {
1067  ret += QString("country_code(%1) country_region_id(0x%2) "
1068  "local_time_offset_with_polarity(%3) "
1069  "time_of_change(TODO)")
1070  .arg(CountryCodeString(i))
1071  .arg(CountryRegionId(i), 0, 16)
1072  .arg(LocalTimeOffsetWithPolarity(i));
1073  // TODO add time of change
1074  }
1075  return ret;
1076 }
1077 
1079 {
1080  QString ret = QString("NVODReferenceDescriptor ");
1081  for (uint i = 0; i < Count(); ++i)
1082  {
1083  ret += QString("transport_stream_id(0x%1) original_network_id(0x%2) "
1084  "service_id(0x%3) ")
1085  .arg(TransportStreamId(i), 0, 16)
1086  .arg(OriginalNetworkId(i), 0, 16)
1087  .arg(ServiceId(i), 0, 16);
1088  }
1089  return ret;
1090 }
1091 
1093 {
1094  return QString("PartialTransportStreamDescriptor peak_rate(%1) "
1095  "min_overall_smooth_rate(%2) max_overall_smooth_buf(3)")
1096  .arg(PeakRate()).arg(SmoothRate()).arg(SmoothBuf());
1097 }
1098 
1099 QString AC3Descriptor::toString(void) const
1100 {
1101  QString ret = QString("AC-3 Descriptor ");
1102  ret += QString("tag(%1) length(%2) ").arg(DescriptorTag(), DescriptorLength());
1103  if (HasComponentType())
1104  ret += QString("type(0x%1) ").arg(ComponentType(), 2, 16, QChar('0'));
1105  if (HasBSID())
1106  ret += QString("bsid(0x%1) ").arg(BSID(), 2, 16, QChar('0'));
1107  if (HasMainID())
1108  ret += QString("mainid(0x%1) ").arg(MainID(), 2, 16, QChar('0'));
1109  if (HasASVC())
1110  ret += QString("asvc(0x%1) ").arg(ASVC(), 2, 16, QChar('0'));
1111  return ret;
1112 }
1113 
1114 QMultiMap<QString,QString> ExtendedEventDescriptor::Items(void) const
1115 {
1116  QMultiMap<QString, QString> ret;
1117 
1118  uint index = 0;
1119 
1120  /* handle all items
1121  * minimum item size is for 8bit length + 8bit length
1122  */
1123  while (LengthOfItems() - index >= 2)
1124  {
1125  QString item_description = dvb_decode_text (&m_data[8 + index], m_data[7 + index]);
1126  index += 1 + m_data[7 + index];
1127  QString item = dvb_decode_text (&m_data[8 + index], m_data[7 + index]);
1128  index += 1 + m_data[7 + index];
1129  ret.insert (item_description, item);
1130  }
1131 
1132  return ret;
1133 }
TeletextDescriptor::TeletextMagazineNum
uint TeletextMagazineNum(uint i) const
Definition: dvbdescriptors.h:2371
freesat_huffman_to_string
QString freesat_huffman_to_string(const unsigned char *compressed, uint size)
Definition: freesat_huffman.cpp:7
SatelliteDeliverySystemDescriptor::OrbitalPositionString
QString OrbitalPositionString(void) const
Definition: dvbdescriptors.h:847
OpenTVChannelListDescriptor::ChannelID
uint ChannelID(uint i) const
Definition: dvbdescriptors.h:2858
T2DeliverySystemDescriptor::TransmissionModeString
QString TransmissionModeString(void) const
Definition: dvbdescriptors.h:1213
S2SatelliteDeliverySystemDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:670
TargetRegionNameDescriptor::CountryCodeString
QString CountryCodeString(void) const
Definition: dvbdescriptors.h:1428
CableDeliverySystemDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:617
ContentDescriptor::GetMythCategory
ProgramInfo::CategoryType GetMythCategory(uint i) const
Definition: dvbdescriptors.cpp:274
T2DeliverySystemDescriptor::GuardIntervalString
QString GuardIntervalString(void) const
Definition: dvbdescriptors.h:1195
T2DeliverySystemDescriptor::CellIDExtension
uint CellIDExtension(uint i, uint j) const
Definition: dvbdescriptors.h:1237
MPEGDescriptor::DescriptorTag
uint DescriptorTag(void) const
Definition: mpegdescriptors.h:345
TerrestrialDeliverySystemDescriptor::GuardIntervalString
QString GuardIntervalString(void) const
Definition: dvbdescriptors.h:1049
MPEGDescriptor::DescriptorLength
uint DescriptorLength(void) const
Definition: mpegdescriptors.h:346
T2DeliverySystemDescriptor::OtherFrequencyFlag
uint OtherFrequencyFlag(void) const
Definition: dvbdescriptors.h:1219
SkyLCNDescriptor::Flags
uint Flags(int i) const
Definition: dvbdescriptors.h:2831
ContentDescriptor::Nibble1
uint Nibble1(uint i) const
Definition: dvbdescriptors.h:624
ContentDescriptor::GetDescription
QString GetDescription(uint i) const
Definition: dvbdescriptors.cpp:322
FreesatLCNDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:960
ImageIconDescriptor::DescriptorNumber
uint DescriptorNumber(void) const
Definition: dvbdescriptors.h:1093
AC3Descriptor::ASVC
uint ASVC(void) const
Definition: dvbdescriptors.h:2536
LocalTimeOffsetDescriptor::LocalTimeOffsetWithPolarity
int LocalTimeOffsetWithPolarity(uint i) const
Definition: dvbdescriptors.h:1686
MPEGDescriptor::hexdump
QString hexdump(void) const
Definition: mpegdescriptors.cpp:736
ApplicationSignallingDescriptor::ApplicationType
uint ApplicationType(uint i) const
Definition: dvbdescriptors.h:227
MessageDescriptor::LanguageString
QString LanguageString(void) const
Definition: dvbdescriptors.h:1360
NVODReferenceDescriptor::Count
uint Count(void) const
Definition: dvbdescriptors.h:1817
MessageDescriptor::MessageID
uint MessageID(void) const
Definition: dvbdescriptors.h:1355
MessageDescriptor::Message
QString Message(void) const
Definition: dvbdescriptors.h:1364
SubtitlingDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:579
FreesatCallsignDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:995
S2SatelliteDeliverySystemDescriptor::NotTimesliceFlag
uint NotTimesliceFlag() const
Definition: dvbdescriptors.h:2974
DVBSimulcastChannelDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:928
T2DeliverySystemDescriptor::NumCells
uint NumCells(void) const
Definition: dvbdescriptors.h:1223
CableDeliverySystemDescriptor::FECOuterString
QString FECOuterString(void) const
Definition: dvbdescriptors.h:774
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
LinkageDescriptor::kHandOverIdentical
@ kHandOverIdentical
Definition: dvbdescriptors.h:159
SHDeliverySystemDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:769
PartialTransportStreamDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:1092
OpenTVChannelListDescriptor::RegionID
uint RegionID() const
Definition: dvbdescriptors.h:2849
ServiceDescriptorMapping::IsUHDTV
bool IsUHDTV(void) const
Definition: dvbdescriptors.h:2034
CableDeliverySystemDescriptor::FrequencyHz
unsigned long long FrequencyHz(void) const
Definition: dvbdescriptors.h:760
NVODReferenceDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:1078
T2DeliverySystemDescriptor::SubcellInfoLoopLength
uint SubcellInfoLoopLength(uint i) const
Definition: dvbdescriptors.h:1236
enc_override
std::vector< uint8_t > enc_override
Definition: dvbdescriptors.h:40
LocalTimeOffsetDescriptor::CountryRegionId
uint CountryRegionId(uint i) const
Definition: dvbdescriptors.h:1677
dvb_decode_text
QString dvb_decode_text(const unsigned char *src, uint raw_length, const enc_override &encoding_override)
Definition: dvbdescriptors.cpp:122
CableDeliverySystemDescriptor::FECInnerString
QString FECInnerString(void) const
Definition: dvbdescriptors.h:819
DataBroadcastDescriptor::LanguageString
QString LanguageString(void) const
Definition: dvbdescriptors.h:711
decode_iso6937
static QString decode_iso6937(const unsigned char *buf, uint length)
Definition: dvbdescriptors.cpp:18
CAIdentifierDescriptor::CASystemCount
uint CASystemCount(void) const
Definition: dvbdescriptors.h:329
T2DeliverySystemDescriptor::TFSFlag
uint TFSFlag(void) const
Definition: dvbdescriptors.h:1220
DataBroadcastDescriptor::DataBroadcastId
uint DataBroadcastId(void) const
Definition: dvbdescriptors.h:698
DVBSimulcastChannelDescriptor::ChannelNumber
uint ChannelNumber(uint i) const
Definition: dvbdescriptors.h:2616
FrequencyListDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:546
FreesatLCNDescriptor::LCNCount
uint LCNCount(int i) const
Definition: dvbdescriptors.h:2673
ContentDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:343
tmp
static guint32 * tmp
Definition: goom_core.cpp:26
T2DeliverySystemDescriptor::BandwidthString
QString BandwidthString(void) const
Definition: dvbdescriptors.h:1176
ProgramInfo::kCategoryMovie
@ kCategoryMovie
Definition: programinfo.h:76
T2DeliverySystemDescriptor::CentreFrequency
uint CentreFrequency(uint i) const
Definition: dvbdescriptors.h:1227
x4
static int x4
Definition: mythsocket.cpp:53
OpenTVChannelListDescriptor::ChannelCount
uint ChannelCount(void) const
Definition: dvbdescriptors.h:2847
decode_text
static QString decode_text(const unsigned char *buf, uint length)
Definition: dvbdescriptors.cpp:185
SubtitlingDescriptor::AncillaryPageID
uint AncillaryPageID(uint i) const
Definition: dvbdescriptors.h:2305
FreesatRegionDescriptor::RegionCount
uint RegionCount(void) const
Definition: dvbdescriptors.h:2727
ServiceDescriptorMapping::ServiceType
uint ServiceType(void) const
Definition: dvbdescriptors.h:2000
NVODReferenceDescriptor::ServiceId
uint ServiceId(uint i) const
Definition: dvbdescriptors.h:1828
ContentDescriptor::Count
uint Count(void) const
Definition: dvbdescriptors.h:620
iso6937tables.h
programinfo.h
ProgramInfo::kCategoryTVShow
@ kCategoryTVShow
Definition: programinfo.h:77
TerrestrialDeliverySystemDescriptor::BandwidthString
QString BandwidthString(void) const
Definition: dvbdescriptors.h:961
mythlogging.h
ContentDescriptor::s_categoryDesc
static QMap< uint, QString > s_categoryDesc
Definition: dvbdescriptors.h:646
PartialTransportStreamDescriptor::SmoothRate
uint SmoothRate(void) const
Definition: dvbdescriptors.h:2489
AC3Descriptor::HasASVC
bool HasASVC(void) const
Definition: dvbdescriptors.h:2516
C2DeliverySystemDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:888
DVBLogicalChannelDescriptor::ChannelCount
uint ChannelCount(void) const
Definition: dvbdescriptors.h:2583
S2SatelliteDeliverySystemDescriptor::TSGSMode
uint TSGSMode() const
Definition: dvbdescriptors.h:2979
MythFile::copy
MBASE_PUBLIC long long copy(QFile &dst, QFile &src, uint block_size=0)
Copies src file to dst file.
Definition: mythmiscutil.cpp:264
ServiceDescriptorMapping::IsTeletext
bool IsTeletext(void) const
Definition: dvbdescriptors.h:2040
linkage_types
const std::array< const std::string, 14 > linkage_types
Definition: dvbdescriptors.cpp:284
T2DeliverySystemDescriptor::FrequencyLoopLength
uint FrequencyLoopLength(uint i) const
Definition: dvbdescriptors.h:1225
S2SatelliteDeliverySystemDescriptor::MultipleInputStreamFlag
uint MultipleInputStreamFlag() const
Definition: dvbdescriptors.h:2969
ImageIconDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:689
ProgramInfo::kCategorySports
@ kCategorySports
Definition: programinfo.h:77
ExtendedEventDescriptor::Items
QMultiMap< QString, QString > Items(void) const
Definition: dvbdescriptors.cpp:1114
AC3Descriptor::HasMainID
bool HasMainID(void) const
Definition: dvbdescriptors.h:2514
SubtitlingDescriptor::StreamCount
uint StreamCount(void) const
Definition: dvbdescriptors.h:2285
TeletextDescriptor::StreamCount
uint StreamCount(void) const
Definition: dvbdescriptors.h:2354
CAIdentifierDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:1029
ServiceRelocatedDescriptor::OldServiceID
uint OldServiceID(void) const
Definition: dvbdescriptors.h:1470
x1
static int x1
Definition: mythsocket.cpp:50
MPEGDescriptor::m_data
const unsigned char * m_data
Definition: mpegdescriptors.h:370
DVBLogicalChannelDescriptor::ChannelNumber
uint ChannelNumber(uint i) const
Definition: dvbdescriptors.h:2588
TerrestrialDeliverySystemDescriptor::ConstellationString
QString ConstellationString(void) const
Definition: dvbdescriptors.h:982
LinkageDescriptor::kHandOverAssociatedService
@ kHandOverAssociatedService
Definition: dvbdescriptors.h:161
SatelliteDeliverySystemDescriptor::FECInnerString
QString FECInnerString(void) const
Definition: dvbdescriptors.h:927
NVODReferenceDescriptor::OriginalNetworkId
uint OriginalNetworkId(uint i) const
Definition: dvbdescriptors.h:1825
SubtitlingDescriptor::LanguageString
QString LanguageString(uint i) const
Definition: dvbdescriptors.h:2291
FreesatLCNDescriptor::ServiceID
uint ServiceID(int i) const
Definition: dvbdescriptors.h:2667
T2DeliverySystemDescriptor::m_subCellPtrs
std::vector< const unsigned char * > m_subCellPtrs
Definition: dvbdescriptors.h:1248
LinkageDescriptor::kHandOverLocalVariation
@ kHandOverLocalVariation
Definition: dvbdescriptors.h:160
MPEGDescriptor::DescriptorTagExtension
uint DescriptorTagExtension(void) const
Definition: mpegdescriptors.h:347
ApplicationSignallingDescriptor::AITVersionNumber
uint AITVersionNumber(uint i) const
Definition: dvbdescriptors.h:229
uint
unsigned int uint
Definition: compat.h:79
SkyLCNDescriptor::ServiceType
uint ServiceType(int i) const
Definition: dvbdescriptors.h:2822
SupplementaryAudioDescriptor::LanguageCodePresent
uint LanguageCodePresent(void) const
Definition: dvbdescriptors.h:1304
PartialTransportStreamDescriptor::PeakRate
uint PeakRate(void) const
Definition: dvbdescriptors.h:2485
SkyLCNDescriptor::ChannelID
uint ChannelID(int i) const
Definition: dvbdescriptors.h:2825
ProgramInfo::CategoryType
CategoryType
Definition: programinfo.h:76
ContentDescriptor::s_categoryDescExists
static volatile bool s_categoryDescExists
Definition: dvbdescriptors.h:647
iso6937table_base
const iso6937table iso6937table_base
Definition: iso6937tables.cpp:7
S2XSatelliteDeliverySystemDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:903
ServiceRelocatedDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:871
T2DeliverySystemDescriptor::SisoMisoString
QString SisoMisoString(void) const
Definition: dvbdescriptors.h:1152
TargetRegionNameDescriptor::LanguageString
QString LanguageString(void) const
Definition: dvbdescriptors.h:1438
ContentDescriptor::s_categoryLock
static QMutex s_categoryLock
Definition: dvbdescriptors.h:645
myth_category_type_to_string
QString myth_category_type_to_string(ProgramInfo::CategoryType category_type)
Definition: programinfo.cpp:128
SkyLCNDescriptor::ServiceID
uint ServiceID(int i) const
Definition: dvbdescriptors.h:2819
NVODReferenceDescriptor::TransportStreamId
uint TransportStreamId(uint i) const
Definition: dvbdescriptors.h:1822
DataBroadcastDescriptor::Selector
const unsigned char * Selector(void) const
Definition: dvbdescriptors.h:706
AC3Descriptor::HasBSID
bool HasBSID(void) const
Definition: dvbdescriptors.h:2512
AC3Descriptor::ComponentType
uint ComponentType(void) const
Definition: dvbdescriptors.h:2520
FreesatLCNDescriptor::RegionID
uint RegionID(int i, int j) const
Definition: dvbdescriptors.h:2679
FreesatRegionDescriptor::Language
QString Language(uint i) const
Definition: dvbdescriptors.h:2733
ExtendedEventDescriptor::LengthOfItems
uint LengthOfItems(void) const
Definition: dvbdescriptors.h:1580
ApplicationSignallingDescriptor::Count
uint Count() const
Definition: dvbdescriptors.h:226
SupplementaryAudioDescriptor::LanguageString
QString LanguageString(void) const
Definition: dvbdescriptors.h:1309
T2DeliverySystemDescriptor::CellID
uint CellID(uint i) const
Definition: dvbdescriptors.h:1224
TerrestrialDeliverySystemDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:651
TerrestrialDeliverySystemDescriptor::CodeRateLPString
QString CodeRateLPString(void) const
Definition: dvbdescriptors.h:1033
iso6937table_secondary
const std::array< const iso6937table *, 256 > iso6937table_secondary
Definition: iso6937tables.cpp:1027
T2DeliverySystemDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:720
T2DeliverySystemDescriptor::m_cellPtrs
std::vector< const unsigned char * > m_cellPtrs
Definition: dvbdescriptors.h:1247
TargetRegionDescriptor::CountryCodeString
QString CountryCodeString(void) const
Definition: dvbdescriptors.h:1393
SkyLCNDescriptor::LogicalChannelNumber
uint LogicalChannelNumber(int i) const
Definition: dvbdescriptors.h:2828
FreesatCallsignDescriptor::Callsign
QString Callsign(void) const
Definition: dvbdescriptors.h:2773
LocalTimeOffsetDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:1061
OpenTVChannelListDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:1004
CAIdentifierDescriptor::CASystemId
int CASystemId(uint i) const
Definition: dvbdescriptors.h:332
DataBroadcastDescriptor::SelectorLength
uint SelectorLength(void) const
Definition: dvbdescriptors.h:702
FreesatRegionDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:978
ImageIconDescriptor::LastDescriptorNumber
uint LastDescriptorNumber(void) const
Definition: dvbdescriptors.h:1099
ServiceDescriptorMapping::IsHDTV
bool IsHDTV(void) const
Definition: dvbdescriptors.h:2027
AC3Descriptor::MainID
uint MainID(void) const
Definition: dvbdescriptors.h:2527
LocalTimeOffsetDescriptor::CountryCodeString
QString CountryCodeString(uint i) const
Definition: dvbdescriptors.h:1669
DVBLogicalChannelDescriptor::ServiceID
uint ServiceID(uint i) const
Definition: dvbdescriptors.h:2585
ServiceRelocatedDescriptor::OldTransportID
uint OldTransportID(void) const
Definition: dvbdescriptors.h:1469
SupplementaryAudioDescriptor::MixType
uint MixType(void) const
Definition: dvbdescriptors.h:1295
SatelliteDeliverySystemDescriptor::ModulationSystemString
QString ModulationSystemString(void) const
Definition: dvbdescriptors.h:885
LinkageDescriptor::LinkageTypeString
QString LinkageTypeString(void) const
Definition: dvbdescriptors.cpp:302
CableDeliverySystemDescriptor::ModulationString
QString ModulationString(void) const
Definition: dvbdescriptors.h:789
SatelliteDeliverySystemDescriptor::SymbolRateHz
uint SymbolRateHz(void) const
Definition: dvbdescriptors.h:910
ServiceDescriptorMapping::IsDigitalAudio
bool IsDigitalAudio(void) const
Definition: dvbdescriptors.h:2021
TeletextDescriptor::TeletextPageNum
uint TeletextPageNum(uint i) const
Definition: dvbdescriptors.h:2374
OpenTVChannelListDescriptor::ServiceID
uint ServiceID(uint i) const
Definition: dvbdescriptors.h:2852
DataBroadcastDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:1040
TerrestrialDeliverySystemDescriptor::FrequencyHz
uint64_t FrequencyHz(void) const
Definition: dvbdescriptors.h:949
DVBSimulcastChannelDescriptor::ChannelCount
uint ChannelCount(void) const
Definition: dvbdescriptors.h:2611
iconv_helper
static QString iconv_helper(int which, char *buf, size_t length)
Definition: dvbdescriptors.cpp:58
FreesatCallsignDescriptor::Language
QString Language(void) const
Definition: dvbdescriptors.h:2770
LinkageDescriptor::MobileHandOverTypeString
QString MobileHandOverTypeString(void) const
Definition: dvbdescriptors.cpp:311
TerrestrialDeliverySystemDescriptor::TransmissionModeString
QString TransmissionModeString(void) const
Definition: dvbdescriptors.h:1062
iso6937table
std::array< const uint16_t, 256 > iso6937table
Definition: iso6937tables.h:4
FreesatRegionDescriptor::RegionID
int RegionID(uint i) const
Definition: dvbdescriptors.h:2730
SatelliteDeliverySystemDescriptor::PolarizationString
QString PolarizationString() const
Definition: dvbdescriptors.h:860
freesat_huffman.h
SkyLCNDescriptor::ServiceCount
uint ServiceCount(void) const
Definition: dvbdescriptors.h:2816
SubtitlingDescriptor::SubtitleType
uint SubtitleType(uint i) const
Definition: dvbdescriptors.h:2299
SkyLCNDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:939
LocalTimeOffsetDescriptor::Count
uint Count(void) const
Definition: dvbdescriptors.h:1660
TerrestrialDeliverySystemDescriptor::CodeRateHPString
QString CodeRateHPString(void) const
Definition: dvbdescriptors.h:1024
CableDeliverySystemDescriptor::SymbolRateHz
uint SymbolRateHz(void) const
Definition: dvbdescriptors.h:802
DataBroadcastDescriptor::DataComponentTag
uint DataComponentTag(void) const
Definition: dvbdescriptors.h:700
ApplicationSignallingDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:1015
TargetRegionNameDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:853
OpenTVChannelListDescriptor::ChannelNumber
uint ChannelNumber(uint i) const
Definition: dvbdescriptors.h:2861
FrequencyListDescriptor::FrequencyHz
unsigned long long FrequencyHz(uint i) const
Definition: dvbdescriptors.h:1641
LinkageDescriptor::LinkageType
uint LinkageType(void) const
Definition: dvbdescriptors.h:151
ServiceDescriptorMapping::IsDTV
bool IsDTV(void) const
Definition: dvbdescriptors.h:2001
DataBroadcastDescriptor::Text
QString Text(void) const
Definition: dvbdescriptors.h:720
ServiceDescriptorMapping::toString
QString toString(void) const
Definition: dvbdescriptors.cpp:559
LinkageDescriptor::MobileHandOverType
uint MobileHandOverType(void) const
Definition: dvbdescriptors.h:163
NetworkChangeNotifyDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:806
TeletextDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:598
SkyLCNDescriptor::RegionID
uint RegionID(void) const
Definition: dvbdescriptors.h:2810
T2DeliverySystemDescriptor::TransposerFrequency
uint TransposerFrequency(uint i, uint j) const
Definition: dvbdescriptors.h:1238
FrequencyListDescriptor::FrequencyCount
uint FrequencyCount() const
Definition: dvbdescriptors.h:1628
FreesatLCNDescriptor::ChanID
uint ChanID(int i) const
Definition: dvbdescriptors.h:2670
dvb_decode_short_name
QString dvb_decode_short_name(const unsigned char *src, uint raw_length)
Definition: dvbdescriptors.cpp:219
T2DeliverySystemDescriptor::PlpID
uint PlpID(void) const
Definition: dvbdescriptors.h:1139
TeletextDescriptor::LanguageString
QString LanguageString(uint i) const
Definition: dvbdescriptors.h:2361
MessageDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:818
AC3Descriptor::BSID
uint BSID(void) const
Definition: dvbdescriptors.h:2523
SkyLCNDescriptor::RegionRaw
uint RegionRaw(void) const
Definition: dvbdescriptors.h:2813
SatelliteDeliverySystemDescriptor::FrequencykHz
uint64_t FrequencykHz(void) const
Definition: dvbdescriptors.h:840
TeletextDescriptor::TeletextType
uint TeletextType(uint i) const
Definition: dvbdescriptors.h:2368
PartialTransportStreamDescriptor::SmoothBuf
uint SmoothBuf(void) const
Definition: dvbdescriptors.h:2493
T2DeliverySystemDescriptor::Parse
void Parse(void) const
Definition: dvbdescriptors.cpp:705
ContentDescriptor::Nibble
uint Nibble(uint i) const
Definition: dvbdescriptors.h:628
DVBLogicalChannelDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:917
T2DeliverySystemDescriptor::T2SystemID
uint T2SystemID(void) const
Definition: dvbdescriptors.h:1145
FreesatLCNDescriptor::LogicalChannelNumber
uint LogicalChannelNumber(int i, int j) const
Definition: dvbdescriptors.h:2676
AC3Descriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:1099
SupplementaryAudioDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:784
SubtitlingDescriptor::CompositionPageID
uint CompositionPageID(uint i) const
Definition: dvbdescriptors.h:2302
ContentDescriptor::Init
static void Init(void)
Definition: dvbdescriptors.cpp:351
SatelliteDeliverySystemDescriptor::ModulationString
QString ModulationString(void) const
Definition: dvbdescriptors.h:899
SupplementaryAudioDescriptor::EditorialClassification
uint EditorialClassification(void) const
Definition: dvbdescriptors.h:1298
FreesatRegionDescriptor::RegionName
QString RegionName(uint i) const
Definition: dvbdescriptors.h:2736
AC3Descriptor::HasComponentType
bool HasComponentType(void) const
Definition: dvbdescriptors.h:2510
DVBSimulcastChannelDescriptor::ServiceID
uint ServiceID(uint i) const
Definition: dvbdescriptors.h:2613
FreesatLCNDescriptor::ServiceCount
uint ServiceCount(void) const
Definition: dvbdescriptors.h:2664
SatelliteDeliverySystemDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:633
TargetRegionDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:836
dvbdescriptors.h
S2SatelliteDeliverySystemDescriptor::ScramblingSequenceSelector
uint ScramblingSequenceSelector() const
Definition: dvbdescriptors.h:2965
ServiceRelocatedDescriptor::OldOriginalNetworkID
uint OldOriginalNetworkID(void) const
Definition: dvbdescriptors.h:1468