00001 // -*- Mode: c++ -*- 00022 #include "sctedescriptors.h" 00023 #include "dvbdescriptors.h" // for dvb_decode_text() 00024 00025 QString SCTEComponentNameDescriptor::NameString(uint i) const 00026 { 00027 return dvb_decode_text(&_data[loc(i) + 4], StringLength(i)); 00028 } 00029 00030 QString SCTEComponentNameDescriptor::toString(void) const 00031 { 00032 QString ret = QString("ComponentNameDescriptor: StringCount(%1)") 00033 .arg(StringCount()); 00034 for (uint i = 0; i < StringCount(); ++i) 00035 { 00036 ret += QString(" Language(%1) Name(%2)") 00037 .arg(LanguageString(i)).arg(NameString(i)); 00038 } 00039 return ret; 00040 } 00041 00042 QString CueIdentifierDescriptor::CueStreamTypeString(void) const 00043 { 00044 switch (CueStreamType()) 00045 { 00046 case kLimited: 00047 return "Limited"; 00048 case kAllCommands: 00049 return "AllCommands"; 00050 case kSegmentation: 00051 return "Segmentation"; 00052 case kTieredSplicing: 00053 return "TieredSplicing"; 00054 case kTieredSegmentation: 00055 return "TieredSegmentation"; 00056 default: 00057 if (CueStreamType() <= 0x7f) 00058 return QString("Reserved(0x%1)").arg(CueStreamType(),0,16); 00059 else 00060 return QString("User(0x%1)").arg(CueStreamType(),0,16); 00061 } 00062 } 00063 00064 QString CueIdentifierDescriptor::toString(void) const 00065 { 00066 return QString("Cue Identifier Descriptor (0x8A): StreamType(%1)") 00067 .arg(CueStreamTypeString()); 00068 } 00069 00070 QString RevisionDetectionDescriptor::toString(void) const 00071 { 00072 return QString("Revision Detection Descriptor (0x93): " 00073 "Version(%1) Section(%2) LastSection(%3)") 00074 .arg(TableVersionNumber()) 00075 .arg(SectionNumber()) 00076 .arg(LastSectionNumber()); 00077 }
1.6.3