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"
14 #include "mythlogging.h"
15 #include "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/Policical/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 // 0x7F 0x00
671 {
672  QString str = QString("ImageIconDescriptor ");
673  str += QString("tag(0x%1) ").arg(DescriptorTag(),2,16,QChar('0'));
674  str += QString("length(%1) ").arg(DescriptorLength());
675  str += QString("extension(0x%1) ").arg(DescriptorTagExtension(),2,16,QChar('0'));
676  str += QString("number %1/%2").arg(DescriptorNumber()).arg(LastDescriptorNumber());
677  //
678  // TBD
679  //
680  str.append(" Dumping\n");
681  str.append(hexdump());
682  return str;
683 }
684 
685 // 0x7F 0x04
687 {
688  m_cellPtrs.clear();
689  m_subCellPtrs.clear();
690 
691  const unsigned char *cp = m_data + 8;
692  for (uint i=0; (cp - m_data + 4) < DescriptorLength(); i++)
693  {
694  m_cellPtrs.push_back(cp);
695  cp += TFSFlag() ? (2 + 1 + FrequencyLoopLength(i)) : (2 + 4);
696  m_subCellPtrs.push_back(cp);
697  cp += 1 + SubcellInfoLoopLength(i);
698  }
699 }
700 
702 {
703  QString str = QString("T2DeliverySystemDescriptor ");
704  str += QString("tag(0x%1) ").arg(DescriptorTag(),2,16,QChar('0'));
705  str += QString("length(%1) ").arg(DescriptorLength());
706  str += QString("extension(0x%1) ").arg(DescriptorTagExtension(),2,16,QChar('0'));
707  str += QString("plp_id(%1) ").arg(PlpID());
708  str += QString("T2_system_id(%1)").arg(T2SystemID());
709  if (DescriptorLength() > 4)
710  {
711  str += QString("\n %1 ").arg(SisoMisoString());
712  str += QString("BW=%1MHz ").arg(BandwidthString());
713  str += QString("GI=%1 ").arg(GuardIntervalString());
714  str += QString("TransMode=%1 ").arg(TransmissionModeString());
715  str += QString("OF=%1 ").arg(OtherFrequencyFlag());
716  str += QString("TFS=%1 ").arg(TFSFlag());
717  }
718  if (DescriptorLength() > 6)
719  {
720  for (uint i=0; i < NumCells(); i++)
721  {
722  str += QString("\n ");
723  str += QString("cell_id:%1 ").arg(CellID(i));
724  str += QString("centre_frequency:");
725  if (TFSFlag())
726  {
727  for (uint j=0; j<FrequencyLoopLength(i)/4; j++)
728  {
729  str += QString(" %1").arg(CentreFrequency(i,j));
730  }
731  }
732  else
733  {
734  str += QString(" %1").arg(CentreFrequency(i));
735  }
736  for (uint j=0; j<SubcellInfoLoopLength(i)/5; j++)
737  {
738  str += QString("\n ");
739  str += QString("cell_id_extension:%1 ").arg(CellIDExtension(i,j));
740  str += QString("transposer_frequency:%1").arg(TransposerFrequency(i,j));
741  }
742  }
743  }
744  str.append(" Dumping\n");
745  str.append(hexdump());
746  return str;
747 }
748 
749 // 0x7F 0x05
751 {
752  QString str = QString("SHDeliverySystemDescriptor ");
753  str += QString("tag(0x%1 ").arg(DescriptorTag(),2,16,QChar('0'));
754  str += QString("length(%1) ").arg(DescriptorLength());
755  str += QString("0x%1) ").arg(DescriptorTagExtension(),2,16,QChar('0'));
756  //
757  // TBD
758  //
759  str.append(" Dumping\n");
760  str.append(hexdump());
761  return str;
762 }
763 
764 // 0x7F 0x06
766 {
767  QString str = QString("SupplementaryAudioDescriptor ");
768  str += QString("(0x%1 ").arg(DescriptorTag(),2,16,QChar('0'));
769  str += QString("0x%1) ").arg(DescriptorTagExtension(),2,16,QChar('0'));
770  str += QString("length(%1)").arg(DescriptorLength());
771  str += QString("\n ");
772  str += QString("mix_type(%1) ").arg(MixType());
773  str += QString("editorial_classification(%1)").arg(EditorialClassification());
774  str += QString("\n ");
775  str += QString("language_code_present(%1)").arg(LanguageCodePresent());
776  if (LanguageCodePresent() && DescriptorLength() >= 4)
777  {
778  str += QString(" language_code(%1)").arg(LanguageString());
779  }
780  //
781  str.append(" Dumping\n");
782  str.append(hexdump());
783  return str;
784 }
785 
786 // 0x7F 0x07
788 {
789  QString str = QString("NetworkChangeNotiyDescriptor ");
790  str += QString("(0x%1 ").arg(DescriptorTag(),2,16,QChar('0'));
791  str += QString("0x%1) ").arg(DescriptorTagExtension(),2,16,QChar('0'));
792  //
793  str.append(" Dumping\n");
794  str.append(hexdump());
795  return str;
796 }
797 
798 // 0x7F 0x08
800 {
801  QString str = QString("MessageDescriptor ");
802  str += QString("(0x%1 ").arg(DescriptorTag(),2,16,QChar('0'));
803  str += QString("0x%1) ").arg(DescriptorTagExtension(),2,16,QChar('0'));
804  str += QString("length(%1)").arg(DescriptorLength());
805  str += QString("\n ");
806  str += QString("message_id(%1) ").arg(MessageID());
807  str += QString("language_code(%1)").arg(LanguageString());
808  str += QString("\n ");
809  str += QString("text_char(\"%1\")").arg(Message());
810  //
811  str.append(" Dumping\n");
812  str.append(hexdump());
813  return str;
814 }
815 
816 // 0x7F 0x09
818 {
819  QString str = QString("TargetRegionDescriptor ");
820  str += QString("(0x%1 ").arg(DescriptorTag(),2,16,QChar('0'));
821  str += QString("0x%1) ").arg(DescriptorTagExtension(),2,16,QChar('0'));
822  str += QString("length(%1)").arg(DescriptorLength());
823  str += QString("\n ");
824  str += QString("country_code(%1) ").arg(CountryCodeString());
825  //
826  // TBD
827  //
828  str.append(" Dumping\n");
829  str.append(hexdump());
830  return str;
831 }
832 
833 // 0x7F 0x0A
835 {
836  QString str = QString("TargetRegionNameDescriptor ");
837  str += QString("(0x%1 ").arg(DescriptorTag(),2,16,QChar('0'));
838  str += QString("0x%1) ").arg(DescriptorTagExtension(),2,16,QChar('0'));
839  str += QString("length(%1)").arg(DescriptorLength());
840  str += QString("\n ");
841  str += QString("country_code(%1) ").arg(CountryCodeString());
842  str += QString("language_code(%1)").arg(LanguageString());
843  //
844  // TBD
845  //
846  str.append(" Dumping\n");
847  str.append(hexdump());
848  return str;
849 }
850 
851 // 0x7F 0x0B
853 {
854  QString str = QString("ServiceRelocatedDescriptor ");
855  str += QString("(0x%1 ").arg(DescriptorTag(),2,16,QChar('0'));
856  str += QString("0x%1) ").arg(DescriptorTagExtension(),2,16,QChar('0'));
857  str += QString("length(%1)").arg(DescriptorLength());
858  str += QString("\n ");
859  str += QString("old_original_network_id(%1) ").arg(OldOriginalNetworkID());
860  str += QString("old_transport_id(%1) ").arg(OldTransportID());
861  str += QString("old_service_id(%1) ").arg(OldServiceID());
862  //
863  str.append(" Dumping\n");
864  str.append(hexdump());
865  return str;
866 }
867 
868 // 0x7F 0x0D
870 {
871  QString str = QString("C2DeliverySystemDescriptor ");
872  str += QString("(0x%1 ").arg(DescriptorTag(),2,16,QChar('0'));
873  str += QString("0x%1) ").arg(DescriptorTagExtension(),2,16,QChar('0'));
874  str += QString("length(%1)").arg(DescriptorLength());
875  //
876  // TBD
877  //
878  str.append(" Dumping\n");
879  str.append(hexdump());
880  return str;
881 }
882 
883 // 0x7F 0x17
885 {
886  QString str = QString("S2XSatelliteDeliverySystemDescriptor ");
887  str += QString("(0x%1 ").arg(DescriptorTag(),2,16,QChar('0'));
888  str += QString("0x%1) ").arg(DescriptorTagExtension(),2,16,QChar('0'));
889  str += QString("length(%1)").arg(DescriptorLength());
890  //
891  // TBD
892  //
893  str.append(" Dumping\n");
894  str.append(hexdump());
895  return str;
896 }
897 
899 {
900  QString ret = "UKChannelListDescriptor sid->chan_num: ";
901  for (uint i = 0; i < ChannelCount(); i++)
902  {
903  ret += QString("%1->%2").arg(ServiceID(i)).arg(ChannelNumber(i));
904  ret += (i+1 < ChannelCount()) ? ((i+4)%10) ? ", " : ",\n " : "";
905  }
906  return ret;
907 }
908 
910 {
911  QString ret = "DVBSimulcastChannelDescriptor sid->chan_num: ";
912  for (uint i = 0; i < ChannelCount(); i++)
913  {
914  ret += QString("%1->%2").arg(ServiceID(i)).arg(ChannelNumber(i));
915  ret += (i+1 < ChannelCount()) ? ((i+3)%10) ? ", " : ",\n " : "";
916  }
917  return ret;
918 }
919 
921 {
922  QString ret = "Sky Logical Channel Number Descriptor ";
923  ret += QString("(0x%1) ").arg(DescriptorTag(),2,16,QChar('0'));
924  ret += QString("length(%1)").arg(DescriptorLength());
925 
926  ret += QString("\n RegionID (%1) (0x%2) Raw (0x%3)")
927  .arg(RegionID()).arg(RegionID(),4,16,QChar('0')).arg(RegionRaw(),4,16,QChar('0'));
928 
929  for (uint i=0; i<ServiceCount(); i++)
930  {
931  ret += QString("\n ServiceID (%1) (0x%2) ").arg(ServiceID(i)).arg(ServiceID(i),4,16,QChar('0'));
932  ret += QString("ServiceType (0x%1) ").arg(ServiceType(i),2,16,QChar('0'));
933  ret += QString("LCN (%1) ").arg(LogicalChannelNumber(i));
934  ret += QString("ChannelID(0x%1) ").arg(ChannelID(i),4,16,QChar('0'));
935  ret += QString("Flags(0x%1) ").arg(Flags(i),4,16,QChar('0'));
936  }
937 
938  return ret;
939 }
940 
942 {
943  QString ret = "Freesat Logical Channel Number Descriptor ";
944  ret += QString("(0x%1)").arg(DescriptorTag(),2,16,QChar('0'));
945  ret += QString(" length(%1)").arg(DescriptorLength());
946 
947  for (uint i=0; i<ServiceCount(); i++)
948  {
949  ret += QString("\n ServiceID (%1) (0x%2) ").arg(ServiceID(i)).arg(ServiceID(i),4,16,QChar('0'));
950  ret += QString("ChanID (0x%1)").arg(ChanID(i), 4, 16, QChar('0'));
951  for (uint j=0; j<LCNCount(i); j++)
952  {
953  ret += QString("\n LCN: %1 Region: %2").arg(LogicalChannelNumber(i,j),3).arg(RegionID(i,j));
954  }
955  }
956  return ret;
957 }
958 
960 {
961  QString ret = "Freesat Region Descriptor ";
962  ret += QString("(0x%1)").arg(DescriptorTag(),2,16,QChar('0'));
963  ret += QString(" length(%1)").arg(DescriptorLength());
964 
965  for (uint i=0; i<RegionCount(); ++i)
966  {
967  uint region_id = RegionID(i);
968  QString language = Language(i);
969  QString region_name = RegionName(i);
970  ret += QString("\n Region (%1) (%2) '%3'")
971  .arg(region_id,2).arg(language, region_name);
972  }
973  return ret;
974 }
975 
977 {
978  QString ret = QString("Freesat Callsign Descriptor ");
979  ret += QString("tag(0x%1) ").arg(DescriptorTag(),2,16,QChar('0'));
980  ret += QString("length(%1)").arg(DescriptorLength());
981  ret += QString(" (%1) '%2'").arg(Language(), Callsign());
982  return ret;
983 }
984 
986 {
987  QString ret = QString("OpenTV ChannelList Descriptor region: %1 sid->chan_num(id): ").arg(RegionID());
988  for (uint i = 0; i < ChannelCount(); i++)
989  {
990  ret += QString("%1->%2(%3)").arg(ServiceID(i)).arg(ChannelNumber(i)).arg(ChannelID(i));
991  ret += (i+1<ChannelCount()) ? ", " : "";
992  }
993  return ret;
994 }
995 
997 {
998  QString ret = QString("ApplicationSignallingDescriptor ");
999  ret += QString("tag(0x%1) ").arg(DescriptorTag(),2,16,QChar('0'));
1000  ret += QString("length(%1)").arg(DescriptorLength());
1001  for (uint i = 0; i < Count(); ++i)
1002  {
1003  ret += "\n ";
1004  ret += QString("application_type(%1) ").arg(ApplicationType(i));
1005  ret += QString("AIT_version_number(%1)").arg(AITVersionNumber(i));
1006  }
1007  return ret;
1008 }
1009 
1011 {
1012  QString ret = QString("CAIdentifierDescriptor ");
1013  for (uint i = 0; i < CASystemCount(); ++i)
1014  {
1015  ret += QString("ca_system_id(0x%1) ")
1016  .arg(CASystemId(i), 0, 16);
1017  }
1018  return ret;
1019 }
1020 
1022 {
1023  QString ret = QString("DataBroadcastDescriptor: "
1024  "data_broadcast_id(%1) "
1025  "component_tag(%1) ")
1026  .arg(DataBroadcastId(), 0, 10)
1027  .arg(DataComponentTag(), 0, 10);
1028 
1029  ret += QString("selector(0x ");
1030  for (uint i = 0; i < SelectorLength(); i++)
1031  ret += QString("%1 ").arg(Selector()[i], 0, 16);
1032  ret += ") ";
1033 
1034  ret += QString("ISO_639_language_code(%1) ")
1035  .arg(LanguageString());
1036 
1037  ret += QString("text(%1) ") + Text();
1038 
1039  return ret;
1040 }
1041 
1043 {
1044  QString ret = QString("LocalTimeOffsetDescriptor ");
1045  uint count = Count();
1046  for (uint i = 0; i < count; ++i)
1047  {
1048  ret += QString("country_code(%1) country_region_id(0x%2) "
1049  "local_time_offset_with_polarity(%3) "
1050  "time_of_change(TODO)")
1051  .arg(CountryCodeString(i))
1052  .arg(CountryRegionId(i), 0, 16)
1053  .arg(LocalTimeOffsetWithPolarity(i));
1054  // TODO add time of change
1055  }
1056  return ret;
1057 }
1058 
1060 {
1061  QString ret = QString("NVODReferenceDescriptor ");
1062  for (uint i = 0; i < Count(); ++i)
1063  {
1064  ret += QString("transport_stream_id(0x%1) original_network_id(0x%2) "
1065  "service_id(0x%3) ")
1066  .arg(TransportStreamId(i), 0, 16)
1067  .arg(OriginalNetworkId(i), 0, 16)
1068  .arg(ServiceId(i), 0, 16);
1069  }
1070  return ret;
1071 }
1072 
1074 {
1075  return QString("PartialTransportStreamDescriptor peak_rate(%1) "
1076  "min_overall_smooth_rate(%2) max_overall_smooth_buf(3)")
1077  .arg(PeakRate()).arg(SmoothRate()).arg(SmoothBuf());
1078 }
1079 
1080 QString AC3Descriptor::toString(void) const
1081 {
1082  QString ret = QString("AC-3 Descriptor ");
1083  ret += QString("tag(%1) length(%2) ").arg(DescriptorTag(), DescriptorLength());
1084  if (HasComponentType())
1085  ret += QString("type(0x%1) ").arg(ComponentType(), 2, 16, QChar('0'));
1086  if (HasBSID())
1087  ret += QString("bsid(0x%1) ").arg(BSID(), 2, 16, QChar('0'));
1088  if (HasMainID())
1089  ret += QString("mainid(0x%1) ").arg(MainID(), 2, 16, QChar('0'));
1090  if (HasASVC())
1091  ret += QString("asvc(0x%1) ").arg(ASVC(), 2, 16, QChar('0'));
1092  return ret;
1093 }
1094 
1095 QMultiMap<QString,QString> ExtendedEventDescriptor::Items(void) const
1096 {
1097  QMultiMap<QString, QString> ret;
1098 
1099  uint index = 0;
1100 
1101  /* handle all items
1102  * minimum item size is for 8bit length + 8bit length
1103  */
1104  while (LengthOfItems() - index >= 2)
1105  {
1106  QString item_description = dvb_decode_text (&m_data[8 + index], m_data[7 + index]);
1107  index += 1 + m_data[7 + index];
1108  QString item = dvb_decode_text (&m_data[8 + index], m_data[7 + index]);
1109  index += 1 + m_data[7 + index];
1110  ret.insert (item_description, item);
1111  }
1112 
1113  return ret;
1114 }
TeletextDescriptor::TeletextMagazineNum
uint TeletextMagazineNum(uint i) const
Definition: dvbdescriptors.h:2363
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:841
OpenTVChannelListDescriptor::ChannelID
uint ChannelID(uint i) const
Definition: dvbdescriptors.h:2850
T2DeliverySystemDescriptor::TransmissionModeString
QString TransmissionModeString(void) const
Definition: dvbdescriptors.h:1205
TargetRegionNameDescriptor::CountryCodeString
QString CountryCodeString(void) const
Definition: dvbdescriptors.h:1420
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:1187
T2DeliverySystemDescriptor::CellIDExtension
uint CellIDExtension(uint i, uint j) const
Definition: dvbdescriptors.h:1229
MPEGDescriptor::DescriptorTag
uint DescriptorTag(void) const
Definition: mpegdescriptors.h:345
TerrestrialDeliverySystemDescriptor::GuardIntervalString
QString GuardIntervalString(void) const
Definition: dvbdescriptors.h:1043
MPEGDescriptor::DescriptorLength
uint DescriptorLength(void) const
Definition: mpegdescriptors.h:346
copy
long long copy(QFile &dst, QFile &src, uint block_size)
Copies src file to dst file.
Definition: mythmiscutil.cpp:311
T2DeliverySystemDescriptor::OtherFrequencyFlag
uint OtherFrequencyFlag(void) const
Definition: dvbdescriptors.h:1211
SkyLCNDescriptor::Flags
uint Flags(int i) const
Definition: dvbdescriptors.h:2823
ContentDescriptor::Nibble1
uint Nibble1(uint i) const
Definition: dvbdescriptors.h:618
ContentDescriptor::GetDescription
QString GetDescription(uint i) const
Definition: dvbdescriptors.cpp:322
FreesatLCNDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:941
ImageIconDescriptor::DescriptorNumber
uint DescriptorNumber(void) const
Definition: dvbdescriptors.h:1087
AC3Descriptor::ASVC
uint ASVC(void) const
Definition: dvbdescriptors.h:2528
LocalTimeOffsetDescriptor::LocalTimeOffsetWithPolarity
int LocalTimeOffsetWithPolarity(uint i) const
Definition: dvbdescriptors.h:1678
MPEGDescriptor::hexdump
QString hexdump(void) const
Definition: mpegdescriptors.cpp:732
ApplicationSignallingDescriptor::ApplicationType
uint ApplicationType(uint i) const
Definition: dvbdescriptors.h:221
MessageDescriptor::LanguageString
QString LanguageString(void) const
Definition: dvbdescriptors.h:1352
NVODReferenceDescriptor::Count
uint Count(void) const
Definition: dvbdescriptors.h:1809
MessageDescriptor::MessageID
uint MessageID(void) const
Definition: dvbdescriptors.h:1347
MessageDescriptor::Message
QString Message(void) const
Definition: dvbdescriptors.h:1356
SubtitlingDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:579
FreesatCallsignDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:976
DVBSimulcastChannelDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:909
T2DeliverySystemDescriptor::NumCells
uint NumCells(void) const
Definition: dvbdescriptors.h:1215
CableDeliverySystemDescriptor::FECOuterString
QString FECOuterString(void) const
Definition: dvbdescriptors.h:768
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:23
LinkageDescriptor::kHandOverIdentical
@ kHandOverIdentical
Definition: dvbdescriptors.h:153
SHDeliverySystemDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:750
PartialTransportStreamDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:1073
OpenTVChannelListDescriptor::RegionID
uint RegionID() const
Definition: dvbdescriptors.h:2841
ServiceDescriptorMapping::IsUHDTV
bool IsUHDTV(void) const
Definition: dvbdescriptors.h:2026
CableDeliverySystemDescriptor::FrequencyHz
unsigned long long FrequencyHz(void) const
Definition: dvbdescriptors.h:754
NVODReferenceDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:1059
T2DeliverySystemDescriptor::SubcellInfoLoopLength
uint SubcellInfoLoopLength(uint i) const
Definition: dvbdescriptors.h:1228
enc_override
std::vector< uint8_t > enc_override
Definition: dvbdescriptors.h:40
LocalTimeOffsetDescriptor::CountryRegionId
uint CountryRegionId(uint i) const
Definition: dvbdescriptors.h:1669
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:813
DataBroadcastDescriptor::LanguageString
QString LanguageString(void) const
Definition: dvbdescriptors.h:705
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:323
T2DeliverySystemDescriptor::TFSFlag
uint TFSFlag(void) const
Definition: dvbdescriptors.h:1212
DataBroadcastDescriptor::DataBroadcastId
uint DataBroadcastId(void) const
Definition: dvbdescriptors.h:692
DVBSimulcastChannelDescriptor::ChannelNumber
uint ChannelNumber(uint i) const
Definition: dvbdescriptors.h:2608
FrequencyListDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:546
FreesatLCNDescriptor::LCNCount
uint LCNCount(int i) const
Definition: dvbdescriptors.h:2665
ContentDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:343
tmp
static guint32 * tmp
Definition: goom_core.cpp:31
T2DeliverySystemDescriptor::BandwidthString
QString BandwidthString(void) const
Definition: dvbdescriptors.h:1168
ProgramInfo::kCategoryMovie
@ kCategoryMovie
Definition: programinfo.h:75
T2DeliverySystemDescriptor::CentreFrequency
uint CentreFrequency(uint i) const
Definition: dvbdescriptors.h:1219
x4
static int x4
Definition: mythsocket.cpp:60
OpenTVChannelListDescriptor::ChannelCount
uint ChannelCount(void) const
Definition: dvbdescriptors.h:2839
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:2297
FreesatRegionDescriptor::RegionCount
uint RegionCount(void) const
Definition: dvbdescriptors.h:2719
ServiceDescriptorMapping::ServiceType
uint ServiceType(void) const
Definition: dvbdescriptors.h:1992
NVODReferenceDescriptor::ServiceId
uint ServiceId(uint i) const
Definition: dvbdescriptors.h:1820
ContentDescriptor::Count
uint Count(void) const
Definition: dvbdescriptors.h:614
iso6937tables.h
programinfo.h
ProgramInfo::kCategoryTVShow
@ kCategoryTVShow
Definition: programinfo.h:76
TerrestrialDeliverySystemDescriptor::BandwidthString
QString BandwidthString(void) const
Definition: dvbdescriptors.h:955
mythlogging.h
ContentDescriptor::s_categoryDesc
static QMap< uint, QString > s_categoryDesc
Definition: dvbdescriptors.h:640
PartialTransportStreamDescriptor::SmoothRate
uint SmoothRate(void) const
Definition: dvbdescriptors.h:2481
AC3Descriptor::HasASVC
bool HasASVC(void) const
Definition: dvbdescriptors.h:2508
C2DeliverySystemDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:869
DVBLogicalChannelDescriptor::ChannelCount
uint ChannelCount(void) const
Definition: dvbdescriptors.h:2575
ServiceDescriptorMapping::IsTeletext
bool IsTeletext(void) const
Definition: dvbdescriptors.h:2032
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:1217
ImageIconDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:670
ProgramInfo::kCategorySports
@ kCategorySports
Definition: programinfo.h:76
ExtendedEventDescriptor::Items
QMultiMap< QString, QString > Items(void) const
Definition: dvbdescriptors.cpp:1095
AC3Descriptor::HasMainID
bool HasMainID(void) const
Definition: dvbdescriptors.h:2506
SubtitlingDescriptor::StreamCount
uint StreamCount(void) const
Definition: dvbdescriptors.h:2277
TeletextDescriptor::StreamCount
uint StreamCount(void) const
Definition: dvbdescriptors.h:2346
CAIdentifierDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:1010
ServiceRelocatedDescriptor::OldServiceID
uint OldServiceID(void) const
Definition: dvbdescriptors.h:1462
x1
static int x1
Definition: mythsocket.cpp:57
MPEGDescriptor::m_data
const unsigned char * m_data
Definition: mpegdescriptors.h:370
DVBLogicalChannelDescriptor::ChannelNumber
uint ChannelNumber(uint i) const
Definition: dvbdescriptors.h:2580
TerrestrialDeliverySystemDescriptor::ConstellationString
QString ConstellationString(void) const
Definition: dvbdescriptors.h:976
LinkageDescriptor::kHandOverAssociatedService
@ kHandOverAssociatedService
Definition: dvbdescriptors.h:155
SatelliteDeliverySystemDescriptor::FECInnerString
QString FECInnerString(void) const
Definition: dvbdescriptors.h:921
NVODReferenceDescriptor::OriginalNetworkId
uint OriginalNetworkId(uint i) const
Definition: dvbdescriptors.h:1817
SubtitlingDescriptor::LanguageString
QString LanguageString(uint i) const
Definition: dvbdescriptors.h:2283
FreesatLCNDescriptor::ServiceID
uint ServiceID(int i) const
Definition: dvbdescriptors.h:2659
T2DeliverySystemDescriptor::m_subCellPtrs
std::vector< const unsigned char * > m_subCellPtrs
Definition: dvbdescriptors.h:1240
LinkageDescriptor::kHandOverLocalVariation
@ kHandOverLocalVariation
Definition: dvbdescriptors.h:154
MPEGDescriptor::DescriptorTagExtension
uint DescriptorTagExtension(void) const
Definition: mpegdescriptors.h:347
ApplicationSignallingDescriptor::AITVersionNumber
uint AITVersionNumber(uint i) const
Definition: dvbdescriptors.h:223
uint
unsigned int uint
Definition: compat.h:140
SkyLCNDescriptor::ServiceType
uint ServiceType(int i) const
Definition: dvbdescriptors.h:2814
SupplementaryAudioDescriptor::LanguageCodePresent
uint LanguageCodePresent(void) const
Definition: dvbdescriptors.h:1296
PartialTransportStreamDescriptor::PeakRate
uint PeakRate(void) const
Definition: dvbdescriptors.h:2477
SkyLCNDescriptor::ChannelID
uint ChannelID(int i) const
Definition: dvbdescriptors.h:2817
ProgramInfo::CategoryType
CategoryType
Definition: programinfo.h:75
ContentDescriptor::s_categoryDescExists
static volatile bool s_categoryDescExists
Definition: dvbdescriptors.h:641
iso6937table_base
const iso6937table iso6937table_base
Definition: iso6937tables.cpp:7
S2XSatelliteDeliverySystemDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:884
ServiceRelocatedDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:852
T2DeliverySystemDescriptor::SisoMisoString
QString SisoMisoString(void) const
Definition: dvbdescriptors.h:1144
SatelliteDeliverySystemDescriptor::FrequencykHz
unsigned long long FrequencykHz(void) const
Definition: dvbdescriptors.h:834
TargetRegionNameDescriptor::LanguageString
QString LanguageString(void) const
Definition: dvbdescriptors.h:1430
ContentDescriptor::s_categoryLock
static QMutex s_categoryLock
Definition: dvbdescriptors.h:639
myth_category_type_to_string
QString myth_category_type_to_string(ProgramInfo::CategoryType category_type)
Definition: programinfo.cpp:131
SkyLCNDescriptor::ServiceID
uint ServiceID(int i) const
Definition: dvbdescriptors.h:2811
NVODReferenceDescriptor::TransportStreamId
uint TransportStreamId(uint i) const
Definition: dvbdescriptors.h:1814
DataBroadcastDescriptor::Selector
const unsigned char * Selector(void) const
Definition: dvbdescriptors.h:700
AC3Descriptor::HasBSID
bool HasBSID(void) const
Definition: dvbdescriptors.h:2504
AC3Descriptor::ComponentType
uint ComponentType(void) const
Definition: dvbdescriptors.h:2512
FreesatLCNDescriptor::RegionID
uint RegionID(int i, int j) const
Definition: dvbdescriptors.h:2671
FreesatRegionDescriptor::Language
QString Language(uint i) const
Definition: dvbdescriptors.h:2725
ExtendedEventDescriptor::LengthOfItems
uint LengthOfItems(void) const
Definition: dvbdescriptors.h:1572
ApplicationSignallingDescriptor::Count
uint Count() const
Definition: dvbdescriptors.h:220
SupplementaryAudioDescriptor::LanguageString
QString LanguageString(void) const
Definition: dvbdescriptors.h:1301
T2DeliverySystemDescriptor::CellID
uint CellID(uint i) const
Definition: dvbdescriptors.h:1216
TerrestrialDeliverySystemDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:651
TerrestrialDeliverySystemDescriptor::CodeRateLPString
QString CodeRateLPString(void) const
Definition: dvbdescriptors.h:1027
iso6937table_secondary
const std::array< const iso6937table *, 256 > iso6937table_secondary
Definition: iso6937tables.cpp:1027
T2DeliverySystemDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:701
T2DeliverySystemDescriptor::m_cellPtrs
std::vector< const unsigned char * > m_cellPtrs
Definition: dvbdescriptors.h:1239
TargetRegionDescriptor::CountryCodeString
QString CountryCodeString(void) const
Definition: dvbdescriptors.h:1385
SkyLCNDescriptor::LogicalChannelNumber
uint LogicalChannelNumber(int i) const
Definition: dvbdescriptors.h:2820
FreesatCallsignDescriptor::Callsign
QString Callsign(void) const
Definition: dvbdescriptors.h:2765
LocalTimeOffsetDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:1042
OpenTVChannelListDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:985
CAIdentifierDescriptor::CASystemId
int CASystemId(uint i) const
Definition: dvbdescriptors.h:326
DataBroadcastDescriptor::SelectorLength
uint SelectorLength(void) const
Definition: dvbdescriptors.h:696
FreesatRegionDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:959
ImageIconDescriptor::LastDescriptorNumber
uint LastDescriptorNumber(void) const
Definition: dvbdescriptors.h:1093
ServiceDescriptorMapping::IsHDTV
bool IsHDTV(void) const
Definition: dvbdescriptors.h:2019
AC3Descriptor::MainID
uint MainID(void) const
Definition: dvbdescriptors.h:2519
LocalTimeOffsetDescriptor::CountryCodeString
QString CountryCodeString(uint i) const
Definition: dvbdescriptors.h:1661
DVBLogicalChannelDescriptor::ServiceID
uint ServiceID(uint i) const
Definition: dvbdescriptors.h:2577
ServiceRelocatedDescriptor::OldTransportID
uint OldTransportID(void) const
Definition: dvbdescriptors.h:1461
SupplementaryAudioDescriptor::MixType
uint MixType(void) const
Definition: dvbdescriptors.h:1287
SatelliteDeliverySystemDescriptor::ModulationSystemString
QString ModulationSystemString(void) const
Definition: dvbdescriptors.h:879
LinkageDescriptor::LinkageTypeString
QString LinkageTypeString(void) const
Definition: dvbdescriptors.cpp:302
CableDeliverySystemDescriptor::ModulationString
QString ModulationString(void) const
Definition: dvbdescriptors.h:783
SatelliteDeliverySystemDescriptor::SymbolRateHz
uint SymbolRateHz(void) const
Definition: dvbdescriptors.h:904
ServiceDescriptorMapping::IsDigitalAudio
bool IsDigitalAudio(void) const
Definition: dvbdescriptors.h:2013
TeletextDescriptor::TeletextPageNum
uint TeletextPageNum(uint i) const
Definition: dvbdescriptors.h:2366
OpenTVChannelListDescriptor::ServiceID
uint ServiceID(uint i) const
Definition: dvbdescriptors.h:2844
DataBroadcastDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:1021
TerrestrialDeliverySystemDescriptor::FrequencyHz
uint64_t FrequencyHz(void) const
Definition: dvbdescriptors.h:943
DVBSimulcastChannelDescriptor::ChannelCount
uint ChannelCount(void) const
Definition: dvbdescriptors.h:2603
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:2762
LinkageDescriptor::MobileHandOverTypeString
QString MobileHandOverTypeString(void) const
Definition: dvbdescriptors.cpp:311
TerrestrialDeliverySystemDescriptor::TransmissionModeString
QString TransmissionModeString(void) const
Definition: dvbdescriptors.h:1056
iso6937table
std::array< const uint16_t, 256 > iso6937table
Definition: iso6937tables.h:4
FreesatRegionDescriptor::RegionID
int RegionID(uint i) const
Definition: dvbdescriptors.h:2722
SatelliteDeliverySystemDescriptor::PolarizationString
QString PolarizationString() const
Definition: dvbdescriptors.h:854
freesat_huffman.h
SkyLCNDescriptor::ServiceCount
uint ServiceCount(void) const
Definition: dvbdescriptors.h:2808
SubtitlingDescriptor::SubtitleType
uint SubtitleType(uint i) const
Definition: dvbdescriptors.h:2291
SkyLCNDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:920
LocalTimeOffsetDescriptor::Count
uint Count(void) const
Definition: dvbdescriptors.h:1652
TerrestrialDeliverySystemDescriptor::CodeRateHPString
QString CodeRateHPString(void) const
Definition: dvbdescriptors.h:1018
CableDeliverySystemDescriptor::SymbolRateHz
uint SymbolRateHz(void) const
Definition: dvbdescriptors.h:796
DataBroadcastDescriptor::DataComponentTag
uint DataComponentTag(void) const
Definition: dvbdescriptors.h:694
ApplicationSignallingDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:996
TargetRegionNameDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:834
OpenTVChannelListDescriptor::ChannelNumber
uint ChannelNumber(uint i) const
Definition: dvbdescriptors.h:2853
FrequencyListDescriptor::FrequencyHz
unsigned long long FrequencyHz(uint i) const
Definition: dvbdescriptors.h:1633
LinkageDescriptor::LinkageType
uint LinkageType(void) const
Definition: dvbdescriptors.h:145
ServiceDescriptorMapping::IsDTV
bool IsDTV(void) const
Definition: dvbdescriptors.h:1993
DataBroadcastDescriptor::Text
QString Text(void) const
Definition: dvbdescriptors.h:714
ServiceDescriptorMapping::toString
QString toString(void) const
Definition: dvbdescriptors.cpp:559
LinkageDescriptor::MobileHandOverType
uint MobileHandOverType(void) const
Definition: dvbdescriptors.h:157
NetworkChangeNotifyDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:787
TeletextDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:598
SkyLCNDescriptor::RegionID
uint RegionID(void) const
Definition: dvbdescriptors.h:2802
T2DeliverySystemDescriptor::TransposerFrequency
uint TransposerFrequency(uint i, uint j) const
Definition: dvbdescriptors.h:1230
FrequencyListDescriptor::FrequencyCount
uint FrequencyCount() const
Definition: dvbdescriptors.h:1620
FreesatLCNDescriptor::ChanID
uint ChanID(int i) const
Definition: dvbdescriptors.h:2662
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:1131
TeletextDescriptor::LanguageString
QString LanguageString(uint i) const
Definition: dvbdescriptors.h:2353
MessageDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:799
AC3Descriptor::BSID
uint BSID(void) const
Definition: dvbdescriptors.h:2515
SkyLCNDescriptor::RegionRaw
uint RegionRaw(void) const
Definition: dvbdescriptors.h:2805
TeletextDescriptor::TeletextType
uint TeletextType(uint i) const
Definition: dvbdescriptors.h:2360
PartialTransportStreamDescriptor::SmoothBuf
uint SmoothBuf(void) const
Definition: dvbdescriptors.h:2485
T2DeliverySystemDescriptor::Parse
void Parse(void) const
Definition: dvbdescriptors.cpp:686
ContentDescriptor::Nibble
uint Nibble(uint i) const
Definition: dvbdescriptors.h:622
DVBLogicalChannelDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:898
T2DeliverySystemDescriptor::T2SystemID
uint T2SystemID(void) const
Definition: dvbdescriptors.h:1137
FreesatLCNDescriptor::LogicalChannelNumber
uint LogicalChannelNumber(int i, int j) const
Definition: dvbdescriptors.h:2668
AC3Descriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:1080
SupplementaryAudioDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:765
SubtitlingDescriptor::CompositionPageID
uint CompositionPageID(uint i) const
Definition: dvbdescriptors.h:2294
ContentDescriptor::Init
static void Init(void)
Definition: dvbdescriptors.cpp:351
SatelliteDeliverySystemDescriptor::ModulationString
QString ModulationString(void) const
Definition: dvbdescriptors.h:893
SupplementaryAudioDescriptor::EditorialClassification
uint EditorialClassification(void) const
Definition: dvbdescriptors.h:1290
FreesatRegionDescriptor::RegionName
QString RegionName(uint i) const
Definition: dvbdescriptors.h:2728
AC3Descriptor::HasComponentType
bool HasComponentType(void) const
Definition: dvbdescriptors.h:2502
DVBSimulcastChannelDescriptor::ServiceID
uint ServiceID(uint i) const
Definition: dvbdescriptors.h:2605
FreesatLCNDescriptor::ServiceCount
uint ServiceCount(void) const
Definition: dvbdescriptors.h:2656
SatelliteDeliverySystemDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:633
TargetRegionDescriptor::toString
QString toString(void) const override
Definition: dvbdescriptors.cpp:817
dvbdescriptors.h
ServiceRelocatedDescriptor::OldOriginalNetworkID
uint OldOriginalNetworkID(void) const
Definition: dvbdescriptors.h:1460