From 5d9ced2cf342089c57405e96276955b46967a1de Mon Sep 17 00:00:00 2001 From: xia-chu <771730766@qq.com> Date: Sat, 2 Aug 2025 21:14:42 +0800 Subject: [PATCH] =?UTF-8?q?startSendRtp=E7=9B=B8=E5=85=B3=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=96=B0=E5=A2=9Eenable=5Forigin=5Frecv=5Flimit?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E6=8E=A7=E5=88=B6=E6=98=AF=E5=90=A6=E5=BC=80?= =?UTF-8?q?=E5=90=AF=E6=BA=90=E7=AB=AF=E9=99=90=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 多倍速rtp转发时,在tcp模式下,如果转发速度跟不上接收速度将导致转发失败,通过开启该参数,可以确保历史视频多倍速下载成功 --- postman/ZLMediaKit.postman_collection.json | 18 ++++++++++++++++++ server/WebApi.cpp | 2 ++ 2 files changed, 20 insertions(+) diff --git a/postman/ZLMediaKit.postman_collection.json b/postman/ZLMediaKit.postman_collection.json index 91cb79ae..729b6290 100644 --- a/postman/ZLMediaKit.postman_collection.json +++ b/postman/ZLMediaKit.postman_collection.json @@ -2195,6 +2195,12 @@ "value": "", "description": "发送rtp同时接收,一般用于双向语言对讲, 如果不为空,说明开启接收,值为接收流的id", "disabled": true + }, + { + "key": "enable_origin_recv_limit", + "value": "1", + "description": "转发rtp(tcp模式)时,如果发送不出去,是否限制源端收流速度,此参数在多倍速rtp转发时作用较大", + "disabled": true } ] } @@ -2289,6 +2295,12 @@ "value": "5000", "description": "等待tcp连接超时时间,单位毫秒,默认5000毫秒", "disabled": true + }, + { + "key": "enable_origin_recv_limit", + "value": "1", + "description": "转发rtp(tcp模式)时,如果发送不出去,是否限制源端收流速度,此参数在多倍速rtp转发时作用较大", + "disabled": true } ] } @@ -2364,6 +2376,12 @@ "value": "1", "description": "rtp es方式打包时,是否只打包音频;该参数非必选参数", "disabled": true + }, + { + "key": "enable_origin_recv_limit", + "value": "1", + "description": "转发rtp(tcp模式)时,如果发送不出去,是否限制源端收流速度,此参数在多倍速rtp转发时作用较大", + "disabled": true } ] } diff --git a/server/WebApi.cpp b/server/WebApi.cpp index 05884c51..e4423e54 100755 --- a/server/WebApi.cpp +++ b/server/WebApi.cpp @@ -1603,6 +1603,7 @@ void installWebApi() { // Record the app and vhost of the sending stream args.recv_stream_app = allArgs["app"]; args.recv_stream_vhost = allArgs["vhost"]; + args.enable_origin_recv_limit = allArgs["enable_origin_recv_limit"]; src->getOwnerPoller()->async([=]() mutable { try { src->startSendRtp(args, [val, headerOut, invoker](uint16_t local_port, const SockException &ex) mutable { @@ -1649,6 +1650,7 @@ void installWebApi() { args.recv_stream_id = allArgs["recv_stream_id"]; args.recv_stream_app = allArgs["app"]; args.recv_stream_vhost = allArgs["vhost"]; + args.enable_origin_recv_limit = allArgs["enable_origin_recv_limit"]; src->getOwnerPoller()->async([=]() mutable { try {