Coder Social home page Coder Social logo

[技术咨询] 咨询描述(必填) 国标28181语音对讲在win10上编译的最新版本ZL可以对讲,在linux系统上遇到两款设备不兼容,startsendRTPforPassive这个接口win10和linux上底层网络库有什么区别吗 about zlmediakit HOT 6 CLOSED

MengFanLu1 avatar MengFanLu1 commented on June 20, 2024
[技术咨询] 咨询描述(必填) 国标28181语音对讲在win10上编译的最新版本ZL可以对讲,在linux系统上遇到两款设备不兼容,startsendRTPforPassive这个接口win10和linux上底层网络库有什么区别吗

from zlmediakit.

Comments (6)

xiongguangjie avatar xiongguangjie commented on June 20, 2024

这个没区别,

from zlmediakit.

xia-chu avatar xia-chu commented on June 20, 2024

是不是对方无法处理粘包问题啊?你去掉了头2个字节的rtp长度字段?

from zlmediakit.

MengFanLu1 avatar MengFanLu1 commented on June 20, 2024

是不是对方无法处理粘包问题啊?你去掉了头2个字节的rtp长度字段?

是的

from zlmediakit.

xia-chu avatar xia-chu commented on June 20, 2024

这个不是zlm问题 这个本来就是对方用错误的设计干错误的事
TCP是流协议 本身就可能随机粘包或分包 只有小白工程师才会设计不带分隔符或者无长度字段的tcp协议。
这是海康的耻辱 竟然犯这种错误。

from zlmediakit.

xia-chu avatar xia-chu commented on June 20, 2024

不过海康也干过tcp发送缓冲区溢出覆盖的bug 海康搞国标的这群人 应该跟rtsp的不是同一批人 真的很多低级错误

from zlmediakit.

xia-chu avatar xia-chu commented on June 20, 2024

打上这个补丁可以:

Index: src/Rtp/RtpSender.cpp
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/Rtp/RtpSender.cpp b/src/Rtp/RtpSender.cpp
--- a/src/Rtp/RtpSender.cpp	(revision 5a137f8b8ed3aafce7f05dd0b0291554738a14ae)
+++ b/src/Rtp/RtpSender.cpp	(date 1711080268683)
@@ -203,7 +203,7 @@
 void RtpSender::onConnect(){
     _is_connect = true;
     //加大发送缓存,防止udp丢包之类的问题
-    SockUtil::setSendBuf(_socket_rtp->rawFD(), 4 * 1024 * 1024);
+    SockUtil::setSendBuf(_socket_rtp->rawFD(), 1500);
     if (!_args.is_udp) {
         //关闭tcp no_delay并开启MSG_MORE, 提高发送性能
         SockUtil::setNoDelay(_socket_rtp->rawFD(), false);

from zlmediakit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.