MythTV  master
sctedescriptors.cpp
Go to the documentation of this file.
1 // -*- Mode: c++ -*-
22 #include "sctedescriptors.h"
23 #include "dvbdescriptors.h" // for dvb_decode_text()
24 
26 {
27  return dvb_decode_text(&m_data[loc(i) + 4], StringLength(i));
28 }
29 
31 {
32  QString ret = QString("ComponentNameDescriptor: StringCount(%1)")
33  .arg(StringCount());
34  for (uint i = 0; i < StringCount(); ++i)
35  {
36  ret += QString(" Language(%1) Name(%2)")
37  .arg(LanguageString(i)).arg(NameString(i));
38  }
39  return ret;
40 }
41 
43 {
44  switch (CueStreamType())
45  {
46  case kLimited:
47  return "Limited";
48  case kAllCommands:
49  return "AllCommands";
50  case kSegmentation:
51  return "Segmentation";
52  case kTieredSplicing:
53  return "TieredSplicing";
55  return "TieredSegmentation";
56  default:
57  if (CueStreamType() <= 0x7f)
58  return QString("Reserved(0x%1)").arg(CueStreamType(),0,16);
59  else
60  return QString("User(0x%1)").arg(CueStreamType(),0,16);
61  }
62 }
63 
65 {
66  return QString("Cue Identifier Descriptor (0x8A): StreamType(%1)")
67  .arg(CueStreamTypeString());
68 }
69 
71 {
72  return QString("Revision Detection Descriptor (0x93): "
73  "Version(%1) Section(%2) LastSection(%3)")
74  .arg(TableVersionNumber())
75  .arg(SectionNumber())
76  .arg(LastSectionNumber());
77 }
Only splice null, insert, and schedule.
uint CueStreamType(void) const
Carries time signal w/ segmentation desc.
QString LanguageString(uint i) const
QString dvb_decode_text(const unsigned char *src, uint raw_length, const unsigned char *encoding_override, uint encoding_override_length)
QString toString(void) const override
const unsigned char * m_data
QString toString(void) const override
unsigned int uint
Definition: compat.h:140
uint StringLength(uint i) const
QString NameString(uint i) const
SCTE Descriptors.
QString CueStreamTypeString(void) const
uint loc(uint number) const
uint SectionNumber(void) const
uint LastSectionNumber(void) const
QString toString(void) const override
uint TableVersionNumber(void) const