本文整理汇总了C++中BaseRepresentation::getStreamFormat方法的典型用法代码示例。如果您正苦于以下问题:C++ BaseRepresentation::getStreamFormat方法的具体用法?C++ BaseRepresentation::getStreamFormat怎么用?C++ BaseRepresentation::getStreamFormat使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseRepresentation
的用法示例。
在下文中一共展示了BaseRepresentation::getStreamFormat方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initialFormat
StreamFormat SegmentTracker::initialFormat() const
{
BaseRepresentation *rep = curRepresentation;
if(!rep)
rep = logic->getNextRepresentation(adaptationSet, NULL);
if(rep)
return rep->getStreamFormat();
return StreamFormat();
}
示例2: getCurrentFormat
StreamFormat SegmentTracker::getCurrentFormat() const
{
BaseRepresentation *rep = curRepresentation;
if(!rep)
rep = logic->getNextRepresentation(adaptationSet, NULL);
if(rep)
{
/* Ensure ephemere content is updated/loaded */
if(rep->needsUpdate())
(void) rep->runLocalUpdates(0, curNumber, false);
return rep->getStreamFormat();
}
return StreamFormat();
}
示例3: if
SegmentChunk * SegmentTracker::getNextChunk(bool switch_allowed,
AbstractConnectionManager *connManager)
{
/* LVP added, TFE DEBUG */
//msg_Info(NULL, "TFE DEBUG SegmentTracker getNextChunk, %" PRId64, mdate());
//std::cerr << "TFE DEBUG SegmentTracker getNextChunk, " << mdate() << std::endl;
BaseRepresentation *rep = NULL, *prevRep = NULL;
ISegment *segment;
if(!adaptationSet) {
/* LVP added, TFE DEBUG */
//msg_Info(NULL, "TFE DEBUG SegmentTracker getNextChunk no adaptation set, %" PRId64, mdate());
//std::cerr << "TFE DEBUG SegmentTracker getNextChunk no adaptation set, " << mdate() << std::endl;
return NULL;
}
/* Ensure we don't keep chaining init/index without data */
if( initializing )
{
if( curRepresentation )
switch_allowed = false;
else
switch_allowed = true;
}
if( !switch_allowed ||
(curRepresentation && curRepresentation->getSwitchPolicy() == SegmentInformation::SWITCH_UNAVAILABLE) )
rep = curRepresentation;
else
rep = logic->getNextRepresentation(adaptationSet, curRepresentation);
if ( rep == NULL ) {
/* LVP added, TFE DEBUG */
//msg_Info(NULL, "TFE DEBUG SegmentTracker no rep 1, %" PRId64, mdate());
//std::cerr << "TFE DEBUG SegmentTracker no rep 1, " << mdate() << std::endl;
return NULL;
}
if(rep != curRepresentation)
{
notify(SegmentTrackerEvent(curRepresentation, rep));
prevRep = curRepresentation;
curRepresentation = rep;
init_sent = false;
index_sent = false;
initializing = true;
}
bool b_updated = false;
/* Ensure ephemere content is updated/loaded */
if(rep->needsUpdate())
b_updated = rep->runLocalUpdates(getPlaybackTime(), curNumber, false);
if(prevRep && !rep->consistentSegmentNumber())
{
/* Convert our segment number */
next = rep->translateSegmentNumber(next, prevRep);
}
else if(first && rep->getPlaylist()->isLive())
{
next = rep->getLiveStartSegmentNumber(next);
first = false;
}
if(b_updated)
{
if(!rep->consistentSegmentNumber())
curRepresentation->pruneBySegmentNumber(curNumber);
curRepresentation->scheduleNextUpdate(next);
}
if(rep->getStreamFormat() != format)
{
/* Initial format ? */
if(format == StreamFormat(StreamFormat::UNSUPPORTED))
{
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)
{
//.........这里部分代码省略.........