mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-07-07 12:18:12 +08:00
优化解复用器/播放器逻辑,在Track准备就绪后回调播放结果
This commit is contained in:
@@ -117,33 +117,4 @@ void RtspDemuxer::makeVideoTrack(const SdpTrack::Ptr &video) {
|
||||
}
|
||||
}
|
||||
|
||||
vector<Track::Ptr> RtspDemuxer::getTracks() const {
|
||||
vector<Track::Ptr> ret;
|
||||
if(_videoTrack){
|
||||
ret.emplace_back(_videoTrack);
|
||||
}
|
||||
if(_audioTrack){
|
||||
ret.emplace_back(_audioTrack);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool RtspDemuxer::isInited() const {
|
||||
bool videoReady = true ,auidoReady = true;
|
||||
|
||||
if(_videoTrack){
|
||||
videoReady = _videoTrack->ready();
|
||||
}
|
||||
|
||||
if(_audioTrack){
|
||||
auidoReady = _audioTrack->ready();
|
||||
}
|
||||
|
||||
return videoReady && auidoReady;
|
||||
}
|
||||
|
||||
float RtspDemuxer::getDuration() const {
|
||||
return _fDuration;
|
||||
}
|
||||
|
||||
} /* namespace mediakit */
|
||||
|
||||
Reference in New Issue
Block a user