增加获取媒体流播放器列表功能

This commit is contained in:
custompal
2022-08-30 21:05:19 +08:00
parent 679c79802f
commit 04aa3ef41f
12 changed files with 70 additions and 47 deletions

View File

@@ -308,6 +308,7 @@ void RtmpSession::sendPlayResponse(const string &err, const RtmpMediaSource::Ptr
src->pause(false);
_ring_reader = src->getRing()->attach(getPoller());
weak_ptr<RtmpSession> weakSelf = dynamic_pointer_cast<RtmpSession>(shared_from_this());
_ring_reader->setGetInfoCB([weakSelf]() { return weakSelf.lock(); });
_ring_reader->setReadCB([weakSelf](const RtmpMediaSource::RingDataType &pkt) {
auto strongSelf = weakSelf.lock();
if (!strongSelf) {