diff --git a/src/Common/MultiMediaSourceMuxer.h b/src/Common/MultiMediaSourceMuxer.h index 1c443739..31bc28d1 100644 --- a/src/Common/MultiMediaSourceMuxer.h +++ b/src/Common/MultiMediaSourceMuxer.h @@ -59,6 +59,15 @@ public: _rtmp->inputFrame(frame); _rtsp->inputFrame(frame); } + + /** + * 设置事件监听器 + * @param listener + */ + void setListener(const std::weak_ptr &listener){ + _rtmp->setListener(listener); + _rtsp->setListener(listener); + } private: RtmpMediaSourceMuxer::Ptr _rtmp; RtspMediaSourceMuxer::Ptr _rtsp;