MP4、hls适配新代码

This commit is contained in:
xiongziliang
2018-10-28 00:15:27 +08:00
parent 83a0ee8595
commit 6364b14762
11 changed files with 200 additions and 105 deletions

View File

@@ -83,5 +83,15 @@ bool MediaSink::isAllTrackReady() const {
return _allTrackReady;
}
Track::Ptr MediaSink::getTrack(TrackType type) const {
lock_guard<mutex> lck(_mtx);
for (auto &pr : _track_map){
if(pr.second->getTrackType() == type){
return pr.second;
}
}
return nullptr;
}
}//namespace mediakit