MythTV  master
mpegdescriptors.cpp
Go to the documentation of this file.
1 // -*- Mode: c++ -*-
2 // Copyright (c) 2005, Daniel Thor Kristjansson
3 
4 #include <climits>
5 
6 #include "sctedescriptors.h"
7 #include "atscdescriptors.h"
8 #include "dvbdescriptors.h"
9 #include "mythmiscutil.h" // for xml_indent
10 
13 QMap<QString,QString> RegistrationDescriptor::description_map;
14 
16  const unsigned char *data, uint len)
17 {
19  uint off = 0;
20  while (off < len)
21  {
22  tmp.push_back(data+off);
23  MPEGDescriptor desc(data+off, len-off);
24  if (!desc.IsValid())
25  {
26  tmp.pop_back();
27  break;
28  }
29  off += desc.size();
30  }
31  return tmp;
32 }
33 
35  const unsigned char *data, uint len, int excluded_descid)
36 {
38  uint off = 0;
39  while (off < len)
40  {
41  if ((data+off)[0] != excluded_descid)
42  tmp.push_back(data+off);
43  MPEGDescriptor desc(data+off, len-off);
44  if (!desc.IsValid())
45  {
46  if ((data+off)[0] != excluded_descid)
47  tmp.pop_back();
48  break;
49  }
50  off += desc.size();
51  }
52  return tmp;
53 }
54 
55 #include "mythlogging.h"
56 
58  const unsigned char *data, uint len, int excluded_descid)
59 {
61  uint off = 0;
62  while (off < len)
63  {
64  if ((data+off)[0] == excluded_descid)
65  tmp.push_back(data+off);
66  MPEGDescriptor desc(data+off, len-off);
67  if (!desc.IsValid())
68  {
69  if ((data+off)[0] == excluded_descid)
70  tmp.pop_back();
71  break;
72  }
73  off += desc.size();
74  }
75  return tmp;
76 }
77 
78 const unsigned char *MPEGDescriptor::Find(const desc_list_t &parsed,
79  uint desc_tag)
80 {
81  desc_list_t::const_iterator it = parsed.begin();
82  for (; it != parsed.end(); ++it)
83  {
84  if ((*it)[0] == desc_tag)
85  return *it;
86  }
87  return nullptr;
88 }
89 
91 {
93  desc_list_t::const_iterator it = parsed.begin();
94  for (; it != parsed.end(); ++it)
95  {
96  if ((*it)[0] == desc_tag)
97  tmp.push_back(*it);
98  }
99  return tmp;
100 }
101 
102 static uint maxPriority(const QMap<uint,uint> &langPrefs)
103 {
104  uint max_pri = 0;
105  QMap<uint,uint>::const_iterator it = langPrefs.begin();
106  for (; it != langPrefs.end(); ++it)
107  max_pri = max(max_pri, *it);
108  return max_pri;
109 }
110 
111 const unsigned char *MPEGDescriptor::FindBestMatch(
112  const desc_list_t &parsed, uint desc_tag, QMap<uint,uint> &langPrefs)
113 {
114  uint match_idx = 0;
115  uint match_pri = UINT_MAX;
116  int unmatched_idx = -1;
117 
118  uint i = (desc_tag == DescriptorID::short_event) ? 0 : parsed.size();
119  for (; i < parsed.size(); i++)
120  {
121  if (DescriptorID::short_event == parsed[i][0])
122  {
123  ShortEventDescriptor sed(parsed[i]);
124  QMap<uint,uint>::const_iterator it =
125  langPrefs.find(sed.CanonicalLanguageKey());
126 
127  if ((it != langPrefs.end()) && (*it < match_pri))
128  {
129  match_idx = i;
130  match_pri = *it;
131  }
132 
133  if (unmatched_idx < 0)
134  unmatched_idx = i;
135  }
136  }
137 
138  if (match_pri != UINT_MAX)
139  return parsed[match_idx];
140 
141  if ((desc_tag == DescriptorID::short_event) && (unmatched_idx >= 0))
142  {
143  ShortEventDescriptor sed(parsed[unmatched_idx]);
144  langPrefs[sed.CanonicalLanguageKey()] = maxPriority(langPrefs) + 1;
145  return parsed[unmatched_idx];
146  }
147 
148  return nullptr;
149 }
150 
152  const desc_list_t &parsed, uint desc_tag, QMap<uint,uint> &langPrefs)
153 {
154  uint match_pri = UINT_MAX;
155  int match_key = 0;
156  int unmatched_idx = -1;
157 
158  uint i = (desc_tag == DescriptorID::extended_event) ? 0 : parsed.size();
159  for (; i < parsed.size(); i++)
160  {
161  if (DescriptorID::extended_event == parsed[i][0])
162  {
163  ExtendedEventDescriptor eed(parsed[i]);
164  QMap<uint,uint>::const_iterator it =
165  langPrefs.find(eed.CanonicalLanguageKey());
166 
167  if ((it != langPrefs.end()) && (*it < match_pri))
168  {
169  match_key = eed.LanguageKey();
170  match_pri = *it;
171  }
172 
173  if (unmatched_idx < 0)
174  unmatched_idx = i;
175  }
176  }
177 
178  if ((desc_tag == DescriptorID::extended_event) &&
179  (match_key == 0) && (unmatched_idx >= 0))
180  {
181  ExtendedEventDescriptor eed(parsed[unmatched_idx]);
182  langPrefs[eed.CanonicalLanguageKey()] = maxPriority(langPrefs) + 1;
183  match_key = eed.LanguageKey();
184  }
185 
187  if (match_pri == UINT_MAX)
188  return tmp;
189 
190  for (uint j = 0; j < parsed.size(); j++)
191  {
192  if ((DescriptorID::extended_event == desc_tag) &&
193  (DescriptorID::extended_event == parsed[j][0]))
194  {
195  ExtendedEventDescriptor eed(parsed[j]);
196  if (eed.LanguageKey() == match_key)
197  tmp.push_back(parsed[j]);
198  }
199  }
200 
201  return tmp;
202 }
203 
204 #define EMPTY_STR_16 "","","","", "","","","", "","","","", "","","","",
205 
206 const char *descriptor_tag_strings[256] =
207 {
208  /* 0x00 */ "", /* 0x01 */ "",
209  /* 0x02 */ "Video", /* 0x03 */ "Audio",
210  /* 0x04 */ "Hierarchy", /* 0x05 */ "Registration",
211  /* 0x06 */ "Data Stream Alignment", /* 0x07 */ "Target Background Grid",
212  /* 0x08 */ "Video Window", /* 0x09 */ "Conditional Access",
213  /* 0x0A */ "ISO-639 Language", /* 0x0B */ "System Clock",
214  /* 0x0C */ "Multiplex Buffer Utilization", /* 0x0D */ "Copyright",
215  /* 0x0E */ "Maximum Bitrate", /* 0x0F */ "Private Data Indicator",
216 
217  /* 0x10 */ "Smooting Buffer", /* 0x11 */ "STD",
218  /* 0x12 */ "IBP", /* 0x13 */ "DSM-CC Carousel Identifier",
219  /* 0x14 */ "DSM-CC Association Tag",
220  /* 0x15 */ "DSM-CC Deferred Association Tag",
221  /* 0x16 */ "Reserved(0x16)", /* 0x17 */ "DSM-CC NPT Reference",
222  /* 0x18 */ "DSM-CC NPT Endpoint", /* 0x19 */ "DSM-CC Stream Mode",
223  /* 0x1A */ "DSM-CC Stream Event", /* 0x1B */ "MPEG-4 Video",
224  /* 0x1C */ "MPEG-4 Audio", /* 0x1D */ "IOD",
225  /* 0x1E */ "SL", /* 0x1F */ "FMC",
226 
227  /* 0x20 */ "External ES ID", /* 0x21 */ "Multimpex Code",
228  /* 0x22 */ "FMX buffer Size", /* 0x23 */ "Multiplex Buffer",
229  /* 0x24 */ "Content Labeling", /* 0x25 */ "Metadata Pointer",
230  /* 0x26 */ "Metadata", /* 0x27 */ "Metadata Std",
231  /* 0x28 */ "AVC Video", /* 0x29 */ "IPMP DRM",
232  /* 0x2A */ "AVC Timing & HRD", /* 0x2B */ "AAC Audio",
233  /* 0x2C */ "Flex Mux Timing", /* 0x2D */ "",
234  /* 0x2E */ "", /* 0x2F */ "",
235 
236  /* 0x30-0x3F */ EMPTY_STR_16
237 
238  /* 0x40 */ "Network Name", /* 0x41 */ "Service List",
239  /* 0x42 */ "DVB Stuffing", /* 0x43 */ "Satellite Delivery System",
240  /* 0x44 */ "Cable Delivery System", /* 0x45 */ "VBI Data",
241  /* 0x46 */ "VBI Teletext", /* 0x47 */ "Bouquet Name",
242  /* 0x48 */ "Service", /* 0x49 */ "Country Availability",
243  /* 0x4A */ "Linkage", /* 0x4B */ "NVOD Reference",
244  /* 0x4C */ "DVB Time-shifted Service",/* 0x4D */ "Short Event",
245  /* 0x4E */ "Extended Event", /* 0x4F */ "Time-shifted Event",
246 
247  /* 0x50 */ "Component", /* 0x51 */ "Mosaic",
248  /* 0x52 */ "Stream Identifier",
249  /* 0x53 */ "Conditional Access Identifier",
250  /* 0x54 */ "Content", /* 0x55 */ "Parental Rating",
251  /* 0x56 */ "Teletext", /* 0x57 */ "Telephone",
252  /* 0x58 */ "Local Time Offset", /* 0x59 */ "Subtitling",
253  /* 0x5A */ "Terrestrial Delivery System",
254  /* 0x5B */ "Multilingual Network Name",
255  /* 0x5C */ "Multilingual Bouquet Name",
256  /* 0x5D */ "Multilingual Service Name",
257  /* 0x5E */ "Multilingual Component",
258  /* 0x5F */ "Private Data Specifier",
259 
260  /* 0x60 */ "Service Move", /* 0x61 */ "Short Smoothing Buffer",
261  /* 0x62 */ "Frequency List", /* 0x63 */ "Partial Transport Stream",
262  /* 0x64 */ "Data Broadcast", /* 0x65 */ "Scrambling",
263  /* 0x66 */ "Data Broadcast ID", /* 0x67 */ "Transport Stream",
264  /* 0x68 */ "DSNG", /* 0x69 */ "PDC",
265  /* 0x6A */ "AC-3", /* 0x6B */ "Ancillary Data",
266  /* 0x6C */ "Cell List", /* 0x6D */ "Cell Frequency Link",
267  /* 0x6E */ "Announcement Support", /* 0x6F */ "Application Signalling",
268 
269  /* 0x70 */ "Adaptation Field Data", /* 0x71 */ "Service Identifier",
270  /* 0x72 */ "Service Availability", /* 0x73 */ "Default Authority",
271  /* 0x74 */ "Related Content", /* 0x75 */ "TVA ID",
272  /* 0x76 */ "DVB Content Identifier",/* 0x77 */ "Time Slice FEC Identifier",
273  /* 0x78 */ "ECM Repetition Rate", /* 0x79 */ "DVB-S2 Delivery Identifier",
274  /* 0x7A */ "E-AC-3", /* 0x7B */ "DTS",
275  /* 0x7C */ "AAC", /* 0x7D */ "",
276  /* 0x7E */ "", /* 0x7F */ "",
277 
278  /* 0x80 */ "ATSC Stuffing", /* 0x81 */ "AC-3 Audio",
279  /* 0x82 */ "SCTE Frame Rate", /* 0x83 */ "SCTE Extended Video",
280  /* 0x84 */ "SCTE Component Name", /* 0x85 */ "ATSC Program Identifier",
281  /* 0x86 */ "Caption Service", /* 0x87 */ "Content Advisory",
282  /* 0x88 */ "ATSC CA Descriptor", /* 0x89 */ "ATSC Descriptor Tag",
283  /* 0x8A */ "SCTE CUE Identifier", /* 0x8B */ "",
284  /* 0x8C */ "TimeStamp", /* 0x8D */ "",
285  /* 0x8E */ "", /* 0x8F */ "",
286 
287  /* 0x90 */ "SCTE Frequency Spec", /* 0x91 */ "SCTE Modulation Params",
288  /* 0x92 */ "SCTE TSID", /* 0x93 */ "SCTE Revision Detection",
289  /* 0x94 */ "SCTE Two part channel", /* 0x95 */ "SCTE Channel Properties",
290  /* 0x96 */ "SCTE Daylight Savings", /* 0x97 */ "SCTE AFD",
291  /* 0x98 */ "", /* 0x99 */ "",
292  /* 0x9A */ "", /* 0x9B */ "",
293  /* 0x9C */ "", /* 0x9D */ "",
294  /* 0x9E */ "", /* 0x9F */ "",
295 
296  /* 0xA0 */ "Extended Channel Name", /* 0xA1 */ "Service Location",
297  /* 0xA2 */ "ATSC Time-shifted Service",/*0xA3*/"Component Name",
298  /* 0xA4 */ "ATSC Data Service", /* 0xA5 */ "ATSC PID Count",
299  /* 0xA6 */ "ATSC Download",
300  /* 0xA7 */ "ATSC Multiprotocol Encapsulation",
301  /* 0xA8 */ "DCC Departing Request", /* 0xA9 */ "DCC Arriving Request",
302  /* 0xAA */ "ATSC Restrictions Control",/*0xAB*/"ATSC Genre",
303  /* 0xAC */ "SCTE MAC Address List", /* 0xAD */ "ATSC Private Information",
304  /* 0xAE */ "ATSC Compatibility Wrap",/* 0xAF */"ATSC Broadcaster Policy",
305 
306  /* 0xB0 */ "", /* 0xB1 */ "",
307  /* 0xB2 */ "", /* 0xB3 */ "",
308  /* 0xB4 */ "", /* 0xB5 */ "",
309  /* 0xB6 */ "ATSC Content ID", /* 0xB7 */ "",
310  /* 0xB8 */ "", /* 0xB9 */ "",
311  /* 0xBA */ "", /* 0xBB */ "",
312  /* 0xBC */ "", /* 0xBD */ "",
313  /* 0xBE */ "", /* 0xBF */ "",
314 
315  /* 0xC0-0xCF */ EMPTY_STR_16
316  /* 0xD0-0xDF */ EMPTY_STR_16
317  /* 0xE0-0xEF */ EMPTY_STR_16
318  /* 0xF0-0xFF */ EMPTY_STR_16
319 };
320 
321 static void comma_list_append(QString &str, QString extra)
322 {
323  if (str.isEmpty())
324  str = extra;
325  else
326  str = str + ", " + extra;
327 }
328 
330 {
331  QString str = descriptor_tag_strings[DescriptorTag()];
332 
333  switch (DescriptorTag())
334  {
336  comma_list_append(str, "Possibly DVB Logical Channel Descriptor");
337  break;
339  comma_list_append(str, "Possibly Dishnet Rights");
340  break;
342  comma_list_append(str, "Possibly Dishnet MPAA");
343  break;
345  comma_list_append(str, "Possibly Dishnet EIT Name");
346  break;
348  comma_list_append(str, "Possibly Dishnet EIT Description");
349  break;
351  comma_list_append(str, "Possibly Dishnet Properties");
352  break;
354  comma_list_append(str, "Possibly Dishnet V-Chip");
355  break;
356  case PrivateDescriptorID::dish_event_tags: /* 0x96 */
357  comma_list_append(str, "Possibly Dishnet Tag");
358  break;
360  comma_list_append(str, "Possibly Premiere DE Content Order");
361  break;
363  comma_list_append(str, "Possibly Premiere DE Parental Information");
364  break;
366  comma_list_append(str, "Possibly Premiere DE Content Transmission");
367  break;
368  }
369 
370  if (str.isEmpty())
371  str = QString("Unknown(%1)").arg(DescriptorTag());
372 
373  return str;
374 }
375 
376 #define SET_STRING(DESC_NAME) do { \
377  if (IsValid()) { DESC_NAME d(_data, DescriptorLength()+2); \
378  if (d.IsValid()) str = d.toString(); } } while (0)
379 
381 {
382  QString str;
383 
402  //else if (DescriptorID::linkage == DescriptorTag())
403  // SET_STRING(LinkageDescriptor);
406  //else if (DescriptorID::ancillary_data == DescriptorTag())
407  // SET_STRING(AncillaryDataDescriptor);
416  else if (DescriptorID::service == DescriptorTag())
440  else if (IsValid())
441  {
442  str = QString("%1 Descriptor (0x%2) length(%3). Dumping\n")
443  .arg(DescriptorTagString())
444  .arg(DescriptorTag(),2,16,QChar('0'))
445  .arg(DescriptorLength());
446  //for (uint i=0; i<DescriptorLength(); i++)
447  // str.append(QString(" 0x%1").arg(int(_data[i+2]), 0, 16));
448  str.append(hexdump());
449  }
450  else
451  {
452  str = "Invalid Descriptor";
453  }
454  return str;
455 }
456 
459 QString MPEGDescriptor::toStringXML(uint level) const
460 {
461  QString indent_0 = xml_indent(level);
462  QString indent_1 = xml_indent(level+1);
463  QString str;
464 
465  str += indent_0 + "<Descriptor>\n";
466  str += indent_1 + QString("<Tag>0x%1</Tag>\n")
467  .arg(DescriptorTag(),2,16,QChar('0'));
468  str += indent_1 + QString("<Description>%1</Description>\n")
469  .arg(DescriptorTagString(),0,16);
470 
471  str += indent_1 + "<Data>";
472  for (uint i = 0; i < DescriptorLength(); i++)
473  {
474  if (((i%8) == 0) && i)
475  str += "\n" + indent_1 + " ";
476  str += QString("0x%1 ").arg(_data[i+2],2,16,QChar('0'));
477  }
478 
479  str += "\n" + indent_1 + "</Data>\n";
480  str += indent_1 + "<Decoded>" + toString().toHtmlEscaped() + "</Decoded>\n";
481  str += indent_0 + "</Descriptor>";
482 
483  return str;
484 }
485 
486 // Dump the descriptor in the same format as hexdump -C
487 QString MPEGDescriptor::hexdump(void) const
488 {
489  uint i;
490  QString str, hex, prt;
491  for (i=0; i<DescriptorLength(); i++)
492  {
493  uint ch = _data[i+2];
494  hex.append(QString(" %1").arg(ch, 2, 16, QChar('0')));
495  prt.append(QString("%1").arg(isprint(ch) ? QChar(ch) : '.'));
496  if (((i+1) % 8) == 0)
497  hex.append(" ");
498  if (((i+1) % 16) == 0)
499  {
500  str.append(QString(" %1 %2 |%3|\n")
501  .arg(i - (i % 16),3,16,QChar('0'))
502  .arg(hex).arg(prt));
503  hex.clear();
504  prt.clear();
505  }
506  }
507  str.append(QString(" %1 %2 |%3|")
508  .arg(i - (i % 16),3,16,QChar('0'))
509  .arg(hex,-50,' ').arg(prt));
510  return str;
511 }
512 
514 {
515  QMutexLocker locker(&description_map_lock);
517  return;
518 
519  description_map["AC-3"] = "ATSC audio stream A/52";
520  description_map["AVSV"] = "China A/V Working Group";
521  description_map["BDC0"] = "Broadcast Data Corporation Software Data Service";
522  description_map["BSSD"] = "SMPTE 302M-1998 Audio data as specified in (AES3)";
523  description_map["CAPO"] = "SMPTE 315M-1999 Camera Positioning Information";
524  description_map["CUEI"] = "SCTE 35 2003, Cable Digital Program Insertion Cueing Message";
525  description_map["DDED"] = "LGEUS Digital Delivery with encryption and decryption";
526  description_map["DISH"] = "EchoStar MPEG streams";
527  description_map["DRA1"] = "Chinese EIS SJ/T11368-2006 DRA digital audio";
528  description_map["DTS1"] = "DTS Frame size of 512 bytes";
529  description_map["DTS2"] = "DTS Frame size of 1024 bytes";
530  description_map["DTS3"] = "DTS Frame size of 2048";
531  description_map["DVDF"] = "DVD compatible MPEG2-TS";
532  description_map["ETV1"] = "CableLabs ETV info is present";
533  description_map["GA94"] = "ATSC program ID A/53";
534  description_map["GWKS"] = "GuideWorks EPG info";
535  description_map["HDMV"] = "Blu-Ray A/V for read-only media (H.264 TS)";
536  description_map["HDMX"] = "Matsushita-TS";
537  description_map["KLVA"] = "SMPTE RP 217-2001 MXF KLV packets present";
538  description_map["LU-A"] = "SMPTE RDD-11 HDSDI HD serial/video data";
539  description_map["MTRM"] = "D-VHS compatible MPEG2-TS";
540  description_map["NMR1"] = "Nielsen content identifier";
541  description_map["PAUX"] = "Philips ES containing low-speed data";
542  description_map["PMSF"] = "MPEG-TS stream modified by STB";
543  description_map["PRMC"] = "Philips ES containing remote control data";
544  description_map["SCTE"] = "SCTE 54 2003 Digital Video Service Multiplex and TS for Cable";
545  description_map["SEN1"] = "ATSC Private Information identifies source of stream";
546  description_map["SESF"] = "Blu-Ray A/V for ReWritable media (H.264 TS)";
547  description_map["SPLC"] = "SMPTE Proposed 312M Splice Point compatible TS";
548  description_map["SVMD"] = "SMPTE Proposed Video Metatdata Dictionary for MPEG2-TS";
549  description_map["SZMI"] = "ATSC Private Info from Building B";
550  description_map["TRIV"] = "ATSC Private Info from Triveni Digital";
551  description_map["TSBV"] = "Toshiba self-encoded H.264 TS";
552  description_map["TSHV"] = "Sony self-encoded MPEG-TS and private data";
553  description_map["TSMV"] = "Sony self-encoded MPEG-TS and private data";
554  description_map["TVG1"] = "TV Guide EPG Data";
555  description_map["TVG2"] = "TV Guide EPG Data";
556  description_map["TVG3"] = "TV Guide EPG Data";
557  description_map["ULE1"] = "IETF RFC4326 compatible MPEG2-TS";
558  description_map["VC-1"] = "SMPTE Draft RP 227 VC-1 Bitstream Transport Encodings";
559 
560  for (uint i = 0; i <= 99; i++)
561  {
562  description_map[QString("US%1").arg(i, 2, QLatin1Char('0'))] =
563  "NIMA, Unspecified military application";
564  }
565 
567 }
568 
569 QString RegistrationDescriptor::GetDescription(const QString &fmt)
570 {
572 
573  QString ret;
574  {
575  QMutexLocker locker(&description_map_lock);
576  QMap<QString,QString>::const_iterator it = description_map.find(fmt);
577  if (it != description_map.end())
578  ret = *it;
579  }
580 
581  return ret;
582 }
583 
585 {
586  QString fmt = FormatIdentifierString();
587  QString msg = QString("Registration Descriptor: '%1' ").arg(fmt);
588 
589  QString msg2 = GetDescription(fmt);
590  if (msg2.isEmpty())
591  msg2 = "Unknown, see http://www.smpte-ra.org/mpegreg/mpegreg.html";
592 
593  return msg + msg2;
594 }
595 
597 {
598  return QString("Conditional Access: sid(0x%1) pid(0x%2) data_size(%3)")
599  .arg(SystemID(),0,16).arg(PID(),0,16).arg(DataSize());
600 }
601 
603 {
604  return QString("ISO-639 Language: code(%1) canonical(%2) eng(%3)")
607 }
608 
610 {
611  return QString("AVC Video: IDC prof(%1) IDC level(%2) sets(%3%4%5) "
612  "compat(%6) still(%7) 24hr(%8) FramePacking(%9)")
613  .arg(ProfileIDC()).arg(LevelIDC())
614  .arg(ConstaintSet0()).arg(ConstaintSet1()).arg(ConstaintSet2())
615  .arg(AVCCompatible()).arg(AVCStill()).arg(AVC24HourPicture())
617 }
618 
620 {
621  return QString("HEVC Video: ");
622 }
bool FramePackingSEINotPresentFlag(void) const
bool ConstaintSet0(void) const
static desc_list_t ParseOnlyInclude(const unsigned char *data, uint len, int descriptorid)
This descriptor is used to identify streams with SpliceInformationTable data in them.
QString toString() const override
int LanguageKey(void) const
QString CanonicalLanguageString(void) const
uint LevelIDC(void) const
int CanonicalLanguageKey(void) const
This is used to label streams so the can be treated differently, for instance each stream may get it'...
QString iso639_key_toName(int iso639_2)
Converts a canonical key to language name in English.
Definition: iso639.cpp:112
bool AVCStill(void) const
uint DescriptorTag(void) const
DVB Logical Channel Descriptor.
unsigned int uint
Definition: compat.h:140
virtual QString toString(void) const
static void InitializeDescriptionMap(void)
static const unsigned char * FindBestMatch(const desc_list_t &parsed, uint desc_tag, QMap< uint, uint > &langPref)
vector< const unsigned char * > desc_list_t
static bool description_map_initialized
static QString GetDescription(const QString &fmt)
QString DescriptorTagString(void) const
static guint32 * tmp
Definition: goom_core.c:35
static void comma_list_append(QString &str, QString extra)
uint size(void) const
static uint maxPriority(const QMap< uint, uint > &langPrefs)
uint AVCCompatible(void) const
static desc_list_t ParseAndExclude(const unsigned char *data, uint len, int descriptorid)
ISO 13818-1:2000/Amd.3:2004 page 11.
static QMutex description_map_lock
static QMap< QString, QString > description_map
static const unsigned char * Find(const desc_list_t &parsed, uint desc_tag)
uint DescriptorLength(void) const
int CanonicalLanguageKey(void) const
ISO 13818-1:2013/FDAM 3 (E) page 7.
QString FormatIdentifierString(void) const
bool AVC24HourPicture(void) const
QString toString() const override
const unsigned char * _data
Provides the long channel name for the virtual channel containing this descriptor.
bool ConstaintSet1(void) const
QString toString() const override
QString toString() const override
bool IsValid(void) const
bool ConstaintSet2(void) const
QString hexdump(void) const
static desc_list_t FindBestMatches(const desc_list_t &parsed, uint desc_tag, QMap< uint, uint > &langPref)
QString LanguageString(void) const
virtual QString toStringXML(uint indent_level) const
Returns XML representation of string the TS Reader XML format.
const char * descriptor_tag_strings[256]
#define EMPTY_STR_16
static desc_list_t FindAll(const desc_list_t &parsed, uint desc_tag)
int CanonicalLanguageKey(void) const
QString toString() const override
#define SET_STRING(DESC_NAME)
static desc_list_t Parse(const unsigned char *data, uint len)
uint ProfileIDC(void) const
QString xml_indent(uint level)