From 8d281527d47a03d75a3b581de2192b3fcff48eaa Mon Sep 17 00:00:00 2001 From: cxh Date: Wed, 26 Nov 2025 09:48:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96cpu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/rtmp_manager.cpp | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/rtmp_manager.cpp b/src/rtmp_manager.cpp index cbfb499..c6630eb 100644 --- a/src/rtmp_manager.cpp +++ b/src/rtmp_manager.cpp @@ -114,24 +114,19 @@ GstElement* RTMPManager::create_pipeline(const Camera& cam) " ! mpph264enc bps=" + std::to_string(bitrate) + " gop=" + std::to_string(fps) + " rc-mode=cbr " - " ! h264parse ! tee name=t " + " ! h264parse " + " ! flvmux streamable=true name=mux " + " ! tee name=t " - // ------ 分支1:live ------ - "t. ! queue max-size-buffers=5 leaky=downstream " - " ! flvmux streamable=true name=mux_live " - " ! rtmpsink location=\"" + + "t. ! queue leaky=downstream ! rtmpsink location=\"" + live_rtmp + "\" sync=false async=false " - // ------ 分支2:record ------ - "t. ! queue max-size-buffers=5 leaky=downstream " - " ! flvmux streamable=true name=mux_record " - " ! rtmpsink location=\"" + + "t. ! queue leaky=downstream ! rtmpsink location=\"" + record_rtmp + "\" sync=false async=false " - // ------ 分支3:AI ------ - "t. ! queue ! fakesink sync=false"; + "t. ! queue ! fakesink"; GError* error = nullptr; GstElement* pipeline = gst_parse_launch(pipeline_str.c_str(), &error);