This commit is contained in:
xiongziliang
2020-04-18 16:05:49 +08:00
23 changed files with 896 additions and 65 deletions

View File

@@ -35,6 +35,23 @@ void MediaSink::addTrack(const Track::Ptr &track_in) {
if (_allTrackReady) {
onTrackFrame(frame);
}
else
{
if (frame->getTrackType() == TrackVideo)
{
checkTrackIfReady(nullptr);
if (_allTrackReady) {
onTrackFrame(frame);
}
else
{
ErrorL << " 还有track未准备好丢帧 codecName: " << frame->getCodecName();
}
}else
ErrorL << " 还有track未准备好丢帧 codecName: " << frame->getCodecName();
}
}));
}
@@ -116,6 +133,7 @@ void MediaSink::emitAllTrackReady() {
return;
}
DebugL << "all track ready use " << _ticker.elapsedTime() << "ms";
if (!_trackReadyCallback.empty()) {
//这是超时强制忽略未准备好的Track
_trackReadyCallback.clear();