mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-29 22:32:23 +08:00
优化获取播放器列表相关功能
This commit is contained in:
@@ -48,7 +48,11 @@ void WebRtcPlayer::onStartWebRTC() {
|
||||
_reader = playSrc->getRing()->attach(getPoller(), true);
|
||||
weak_ptr<WebRtcPlayer> weak_self = static_pointer_cast<WebRtcPlayer>(shared_from_this());
|
||||
weak_ptr<Session> weak_session = static_pointer_cast<Session>(getSession());
|
||||
_reader->setGetInfoCB([weak_session]() { return weak_session.lock(); });
|
||||
_reader->setGetInfoCB([weak_session]() {
|
||||
Any ret;
|
||||
ret.set(static_pointer_cast<SockInfo>(weak_session.lock()));
|
||||
return ret;
|
||||
});
|
||||
_reader->setReadCB([weak_self](const RtspMediaSource::RingDataType &pkt) {
|
||||
auto strong_self = weak_self.lock();
|
||||
if (!strong_self) {
|
||||
|
||||
Reference in New Issue
Block a user