mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-07-07 12:18:12 +08:00
优化获取播放器列表相关功能
This commit is contained in:
@@ -33,6 +33,12 @@ void HlsCookieData::addReaderCount() {
|
||||
// HlsMediaSource已经销毁
|
||||
*added = false;
|
||||
});
|
||||
auto info = _sock_info;
|
||||
_ring_reader->setGetInfoCB([info]() {
|
||||
Any ret;
|
||||
ret.set(info);
|
||||
return ret;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,6 +58,11 @@ public:
|
||||
|
||||
void onSegmentSize(size_t bytes) { _speed[TrackVideo] += bytes; }
|
||||
|
||||
void getPlayerList(const std::function<void(const std::list<toolkit::Any> &info_list)> &cb,
|
||||
const std::function<toolkit::Any(toolkit::Any &&info)> &on_change) override {
|
||||
_ring->getInfoList(cb, on_change);
|
||||
}
|
||||
|
||||
private:
|
||||
RingType::Ptr _ring;
|
||||
std::string _index_file;
|
||||
|
||||
Reference in New Issue
Block a user