Commit 1d0eca51 by 夏楚

!6 优化rtsp推流单个Track其他协议的注册速度,不需要等待3s

Merge pull request !6 from xiongguangjie/dev
parents e58b9f7f 5145c7e6
...@@ -89,6 +89,8 @@ public: ...@@ -89,6 +89,8 @@ public:
_muxer->addTrack(track); _muxer->addTrack(track);
track->addDelegate(_muxer); track->addDelegate(_muxer);
} }
if(this->_all_demuxer_track_ready)
this->addTrackCompleted();
} }
/** /**
...@@ -108,6 +110,7 @@ public: ...@@ -108,6 +110,7 @@ public:
if (_muxer) { if (_muxer) {
_muxer->addTrackCompleted(); _muxer->addTrackCompleted();
} }
this->_all_demuxer_track_ready = true;
} }
void resetTracks() override { void resetTracks() override {
...@@ -141,6 +144,7 @@ private: ...@@ -141,6 +144,7 @@ private:
RtspDemuxer::Ptr _demuxer; RtspDemuxer::Ptr _demuxer;
MultiMediaSourceMuxer::Ptr _muxer; MultiMediaSourceMuxer::Ptr _muxer;
bool _all_track_ready = false; bool _all_track_ready = false;
bool _all_demuxer_track_ready = false;
}; };
} /* namespace mediakit */ } /* namespace mediakit */
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论