From c790254f46ed7d73551ac9e3f971d199a7355520 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Thu, 6 Oct 2022 13:06:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=85=B3=E9=97=ADmp4?= =?UTF-8?q?=E5=BD=95=E5=88=B6=E4=B8=8D=E8=83=BD=E8=A7=A6=E5=8F=91=E6=97=A0?= =?UTF-8?q?=E4=BA=BA=E8=A7=82=E7=9C=8B=E4=BA=8B=E4=BB=B6=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=9A#2010?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Common/MultiMediaSourceMuxer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Common/MultiMediaSourceMuxer.cpp b/src/Common/MultiMediaSourceMuxer.cpp index 235c6ea4..565bd266 100644 --- a/src/Common/MultiMediaSourceMuxer.cpp +++ b/src/Common/MultiMediaSourceMuxer.cpp @@ -200,6 +200,12 @@ int MultiMediaSourceMuxer::totalReaderCount(MediaSource &sender) { //此函数可能跨线程调用 bool MultiMediaSourceMuxer::setupRecord(MediaSource &sender, Recorder::type type, bool start, const string &custom_path, size_t max_second) { + onceToken token(nullptr, [&]() { + if (_option.mp4_as_player && type == Recorder::type_mp4) { + //开启关闭mp4录制,触发观看人数变化相关事件 + onReaderChanged(sender, totalReaderCount()); + } + }); switch (type) { case Recorder::type_hls : { if (start && !_hls) {