本文整理汇总了C++中BaseRepresentation::getAdaptationSet方法的典型用法代码示例。如果您正苦于以下问题:C++ BaseRepresentation::getAdaptationSet方法的具体用法?C++ BaseRepresentation::getAdaptationSet怎么用?C++ BaseRepresentation::getAdaptationSet使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseRepresentation
的用法示例。
在下文中一共展示了BaseRepresentation::getAdaptationSet方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
//.........这里部分代码省略.........
format = rep->getStreamFormat();
}
else
{
format = rep->getStreamFormat();
notify(SegmentTrackerEvent(&format)); /* Notify new demux format */
return NULL; /* Force current demux to end */
}
}
if(format == StreamFormat(StreamFormat::UNSUPPORTED))
{
return NULL; /* Can't return chunk because no demux will be created */
}
if(!init_sent)
{
init_sent = true;
segment = rep->getSegment(BaseRepresentation::INFOTYPE_INIT);
if(segment) {
/* LVP added, TFE DEBUG */
std::cerr << "TFE DEBUG SegmentTracker getNextChunk no init sent but segment, " << mdate() << std::endl;
//msg_Info(NULL, "TFE DEBUG SegmentTracker getNextChunk no init sent but segment, %" PRId64, mdate());
//std::cerr << "TFE DEBUG SegmentTracker getNextChunk no init sent but segment, " << mdate() << std::endl;
return segment->toChunk(next, rep, connManager);
}
}
if(!index_sent)
{
index_sent = true;
segment = rep->getSegment(BaseRepresentation::INFOTYPE_INDEX);
if(segment) {
/* LVP added, TFE DEBUG */
// happens after no init sent
//msg_Info(NULL, "TFE DEBUG SegmentTracker getNextChunk no index sent but segment, %" PRId64, mdate());
//std::cerr << "TFE DEBUG SegmentTracker getNextChunk no index sent but segment, " << mdate() << std::endl;
return segment->toChunk(next, rep, connManager);
}
}
bool b_gap = false;
segment = rep->getNextSegment(BaseRepresentation::INFOTYPE_MEDIA, next, &next, &b_gap);
if(!segment)
{
reset();
/* LVP added, TFE DEBUG */
// once at the end
//msg_Info(NULL, "TFE DEBUG SegmentTracker getNextChunk no segment and reset, %" PRId64, mdate());
//std::cerr << "TFE DEBUG SegmentTracker getNextChunk no segment and reset, " << mdate() << std::endl;
return NULL;
}
if(initializing)
{
b_gap = false;
/* stop initializing after 1st chunk */
initializing = false;
}
SegmentChunk *chunk = segment->toChunk(next, rep, connManager);
/* Notify new segment length for stats / logic */
if(chunk)
{
const Timescale timescale = rep->inheritTimescale();
notify(SegmentTrackerEvent(rep->getAdaptationSet()->getID(),
timescale.ToTime(segment->duration.Get())));
}
/* We need to check segment/chunk format changes, as we can't rely on representation's (HLS)*/
if(chunk && format != chunk->getStreamFormat())
{
format = chunk->getStreamFormat();
notify(SegmentTrackerEvent(&format));
}
/* Handle both implicit and explicit discontinuities */
if( (b_gap && next) || (chunk && chunk->discontinuity) )
{
notify(SegmentTrackerEvent(chunk));
}
if(chunk)
{
curNumber = next;
next++;
}
/* LVP added, TFE */
//msg_Info(NULL, "TFE SegmentTracker getNextChunk done, %" PRId64 ", %" PRId64, mdate(), rep->getBandwidth());
//std::cerr << "TFE SegmentTracker getNextChunk done, " << mdate() << ", " << rep->getBandwidth() << std::endl;
return chunk;
}