From 345fdc5f4624538f3cd17edfd3e1413c5e484de8 Mon Sep 17 00:00:00 2001 From: cxh Date: Wed, 17 Sep 2025 09:44:40 +0800 Subject: [PATCH] test --- src/rtsp_manager.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/rtsp_manager.cpp b/src/rtsp_manager.cpp index eeffdf5..3c3928c 100644 --- a/src/rtsp_manager.cpp +++ b/src/rtsp_manager.cpp @@ -33,7 +33,6 @@ GstRTSPMediaFactory *RTSPManager::create_media_factory(const Camera &cam) if (cam.width == 1280 && cam.height == 960) { out_height = 720; - // 使用 videocrop 元素从顶部裁剪 120 像素,总共裁剪 960->720 int crop_top = (960 - 720) / 2; videocrop_str = " ! videocrop top=" + std::to_string(crop_top) + " bottom=" + std::to_string(crop_top); } @@ -43,12 +42,11 @@ GstRTSPMediaFactory *RTSPManager::create_media_factory(const Camera &cam) " ! video/x-raw,format=NV12,width=" + std::to_string(cam.width) + ",height=" + std::to_string(cam.height) + ",framerate=" + std::to_string(cam.fps) + "/1" - " ! queue max-size-buffers=4 leaky=2" - " ! videoconvert" - " ! video/x-raw,format=NV12" + + " ! queue max-size-buffers=8 leaky=2" + videocrop_str + - " ! queue max-size-buffers=4 leaky=2" + " ! queue max-size-buffers=8 leaky=2" " ! mpph264enc" + " ! h264parse" " ! rtph264pay name=pay0 pt=96 )"; GstRTSPMediaFactory *factory = gst_rtsp_media_factory_new();