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), 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 }
SCTEComponentNameDescriptor::loc
uint loc(uint number) const
Definition: sctedescriptors.h:142
RevisionDetectionDescriptor::LastSectionNumber
uint LastSectionNumber(void) const
Definition: sctedescriptors.h:271
RevisionDetectionDescriptor::TableVersionNumber
uint TableVersionNumber(void) const
Definition: sctedescriptors.h:267
dvb_decode_text
QString dvb_decode_text(const unsigned char *src, uint raw_length, const enc_override &encoding_override)
Definition: dvbdescriptors.cpp:130
sctedescriptors.h
SCTEComponentNameDescriptor::NameString
QString NameString(uint i) const
SCTE Descriptors.
Definition: sctedescriptors.cpp:25
CueIdentifierDescriptor::kTieredSegmentation
@ kTieredSegmentation
outside scope of SCTE 35
Definition: sctedescriptors.h:171
RevisionDetectionDescriptor::SectionNumber
uint SectionNumber(void) const
Definition: sctedescriptors.h:269
CueIdentifierDescriptor::kLimited
@ kLimited
Only splice null, insert, and schedule.
Definition: sctedescriptors.h:167
MPEGDescriptor::m_data
const unsigned char * m_data
Definition: mpegdescriptors.h:370
SCTEComponentNameDescriptor::toString
QString toString(void) const override
Definition: sctedescriptors.cpp:30
RevisionDetectionDescriptor::toString
QString toString(void) const override
Definition: sctedescriptors.cpp:70
CueIdentifierDescriptor::kSegmentation
@ kSegmentation
Carries time signal w/ segmentation desc.
Definition: sctedescriptors.h:169
SCTEComponentNameDescriptor::StringLength
uint StringLength(uint i) const
Definition: sctedescriptors.h:133
CueIdentifierDescriptor::CueStreamType
uint CueStreamType(void) const
Definition: sctedescriptors.h:175
SCTEComponentNameDescriptor::StringCount
uint StringCount(void) const
Definition: sctedescriptors.h:119
CueIdentifierDescriptor::kAllCommands
@ kAllCommands
Carries all commands.
Definition: sctedescriptors.h:168
CueIdentifierDescriptor::kTieredSplicing
@ kTieredSplicing
outside scope of SCTE 35
Definition: sctedescriptors.h:170
CueIdentifierDescriptor::CueStreamTypeString
QString CueStreamTypeString(void) const
Definition: sctedescriptors.cpp:42
CueIdentifierDescriptor::toString
QString toString(void) const override
Definition: sctedescriptors.cpp:64
uint
unsigned int uint
Definition: freesurround.h:24
SCTEComponentNameDescriptor::LanguageString
QString LanguageString(uint i) const
Definition: sctedescriptors.h:126
dvbdescriptors.h