本文整理汇总了C++中si::Descriptor::getData方法的典型用法代码示例。如果您正苦于以下问题:C++ Descriptor::getData方法的具体用法?C++ Descriptor::getData怎么用?C++ Descriptor::getData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类si::Descriptor
的用法示例。
在下文中一共展示了Descriptor::getData方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetStreamInfo
//.........这里部分代码省略.........
DEBUGLOG("PMT scanner: adding PID %d (%s) %s\n", stream.getPid(), psStreamTypes[stream.getStreamType()], "Teletext");
delete d;
return true;
case SI::SubtitlingDescriptorTag:
{
info.m_type = cStreamInfo::stDVBSUB;
info.m_subtitlingtype = 0;
info.m_compositionpageid = 0;
info.m_ancillarypageid = 0;
SI::SubtitlingDescriptor *sd = (SI::SubtitlingDescriptor *)d;
SI::SubtitlingDescriptor::Subtitling sub;
char *s = info.m_language;
int n = 0;
for (SI::Loop::Iterator it; sd->subtitlingLoop.getNext(sub, it); )
{
if (sub.languageCode[0])
{
info.m_subtitlingtype = sub.getSubtitlingType();
info.m_compositionpageid = sub.getCompositionPageId();
info.m_ancillarypageid = sub.getAncillaryPageId();
if (n > 0)
*s++ = '+';
strn0cpy(s, I18nNormalizeLanguageCode(sub.languageCode), MAXLANGCODE1);
s += strlen(s);
if (n++ > 1)
break;
}
info.m_parsed = true;
}
delete d;
DEBUGLOG("PMT scanner: adding PID %d (%s) %s\n", stream.getPid(), psStreamTypes[stream.getStreamType()], "DVBSUB");
return true;
}
default:
DEBUGLOG("PMT scanner: NOT adding PID %d (%s) %s (%i)\n", stream.getPid(), psStreamTypes[stream.getStreamType()], "UNKNOWN", d->getDescriptorTag());
break;
}
delete d;
}
break;
default:
#if VDRVERSNUM >= 10728
// ATSC A/53 AUDIO
if (stream.getStreamType() == 0x81 && Setup.StandardCompliance == STANDARD_ANSISCTE) {
info.m_type = cStreamInfo::stAC3;
GetLanguage(stream, info.m_language, info.m_audiotype);
DEBUGLOG("PMT scanner: adding PID %d %s (%s)\n", stream.getPid(), "AC3", info.m_language);
return true;
}
else
#endif
/* This following section handles all the cases where the audio track
* info is stored in PMT user info with stream id >= 0x81
* we check the registration format identifier to see if it
* holds "AC-3"
*/
if (stream.getStreamType() >= 0x81) {
bool found = false;
for (SI::Loop::Iterator it; (d = stream.streamDescriptors.getNext(it)); )
{
switch (d->getDescriptorTag())
{
case SI::RegistrationDescriptorTag:
/* unfortunately libsi does not implement RegistrationDescriptor */
if (d->getLength() >= 4)
{
found = true;
SI::CharArray rawdata = d->getData();
if (/*rawdata[0] == 5 && rawdata[1] >= 4 && */
rawdata[2] == 'A' && rawdata[3] == 'C' &&
rawdata[4] == '-' && rawdata[5] == '3')
{
DEBUGLOG("PMT scanner: Adding pid %d (type 0x%x) RegDesc len %d (%c%c%c%c)\n",
stream.getPid(), stream.getStreamType(), d->getLength(), rawdata[2], rawdata[3], rawdata[4], rawdata[5]);
info.m_type = cStreamInfo::stAC3;
delete d;
return true;
}
}
break;
default:
break;
}
delete d;
}
if (!found)
{
DEBUGLOG("NOT adding PID %d (type 0x%x) RegDesc not found -> UNKNOWN\n", stream.getPid(), stream.getStreamType());
}
}
DEBUGLOG("PMT scanner: NOT adding PID %d (%s) %s\n", stream.getPid(), psStreamTypes[stream.getStreamType()<0x1c?stream.getStreamType():0], "UNKNOWN");
break;
}
info.m_type = cStreamInfo::stNONE;
return false;
}