mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-14 20:15:58 +08:00
优化获取播放器列表相关功能
This commit is contained in:
@@ -338,7 +338,11 @@ bool HttpSession::checkLiveStreamFMP4(const function<void()> &cb) {
|
||||
weak_ptr<HttpSession> weak_self = static_pointer_cast<HttpSession>(shared_from_this());
|
||||
fmp4_src->pause(false);
|
||||
_fmp4_reader = fmp4_src->getRing()->attach(getPoller());
|
||||
_fmp4_reader->setGetInfoCB([weak_self]() { return weak_self.lock(); });
|
||||
_fmp4_reader->setGetInfoCB([weak_self]() {
|
||||
Any ret;
|
||||
ret.set(static_pointer_cast<SockInfo>(weak_self.lock()));
|
||||
return ret;
|
||||
});
|
||||
_fmp4_reader->setDetachCB([weak_self]() {
|
||||
auto strong_self = weak_self.lock();
|
||||
if (!strong_self) {
|
||||
@@ -378,7 +382,11 @@ bool HttpSession::checkLiveStreamTS(const function<void()> &cb) {
|
||||
weak_ptr<HttpSession> weak_self = static_pointer_cast<HttpSession>(shared_from_this());
|
||||
ts_src->pause(false);
|
||||
_ts_reader = ts_src->getRing()->attach(getPoller());
|
||||
_ts_reader->setGetInfoCB([weak_self]() { return weak_self.lock(); });
|
||||
_ts_reader->setGetInfoCB([weak_self]() {
|
||||
Any ret;
|
||||
ret.set(static_pointer_cast<SockInfo>(weak_self.lock()));
|
||||
return ret;
|
||||
});
|
||||
_ts_reader->setDetachCB([weak_self]() {
|
||||
auto strong_self = weak_self.lock();
|
||||
if (!strong_self) {
|
||||
|
||||
Reference in New Issue
Block a user