diff --git a/srt/SrtTransportImp.cpp b/srt/SrtTransportImp.cpp index 26024cab..abd7843b 100644 --- a/srt/SrtTransportImp.cpp +++ b/srt/SrtTransportImp.cpp @@ -149,6 +149,11 @@ std::shared_ptr SrtTransportImp::getOriginSock(mediakit::MediaSource & return static_pointer_cast(getSession()); } +toolkit::EventPoller::Ptr SrtTransportImp::getOwnerPoller(MediaSource &sender){ + auto session = getSession(); + return session ? session->getPoller() : nullptr; +} + void SrtTransportImp::emitOnPublish() { std::weak_ptr weak_self = static_pointer_cast(shared_from_this()); Broadcast::PublishAuthInvoker invoker = [weak_self](const std::string &err, const ProtocolOption &option) { diff --git a/srt/SrtTransportImp.hpp b/srt/SrtTransportImp.hpp index 73ee4a67..3a8f53a1 100644 --- a/srt/SrtTransportImp.hpp +++ b/srt/SrtTransportImp.hpp @@ -59,6 +59,8 @@ protected: std::string getOriginUrl(mediakit::MediaSource &sender) const override; // 获取媒体源客户端相关信息 std::shared_ptr getOriginSock(mediakit::MediaSource &sender) const override; + // get poller + toolkit::EventPoller::Ptr getOwnerPoller(MediaSource &sender) override; ///////MediaSinkInterface override/////// void resetTracks() override {};