Commit Graph

429 Commits

Author SHA1 Message Date
xia-chu
5165ac4f74 初步支持语音双向对讲webrtc插件 2025-11-25 22:59:58 +08:00
xia-chu
7b2bd221ea Revert "fix: handle BUNDLE filed compatibility (#4488)"
This reverts commit 0b57a573c6.
2025-11-25 10:41:39 +08:00
mtdxc
70a2140f27 修复WebRtcProxyPusher速率为0 bug (#4558) 2025-11-22 08:22:42 +08:00
mtdxc
d8a1c70e2d Revert "sr发送限频" (#4533 #4521)
This reverts commit 21d1ea9676.
之前代码改多了,会导致空指针错误,现进行还原
2025-11-04 18:39:52 +08:00
xia-chu
c9d3c5b516 转发rtp时,关闭srtp防重放攻击逻辑 2025-10-24 16:45:41 +08:00
baigao
0b57a573c6 fix: handle BUNDLE filed compatibility (#4488) 2025-10-09 11:38:05 +08:00
mtdxc
b9d513f9aa 采用定时器发送rr 2025-09-29 19:06:47 +08:00
mtdxc
21d1ea9676 sr发送限频 2025-09-29 19:06:47 +08:00
mtdxc
13f603328f rtc拉流代理支持显示sockInfo和码率 2025-09-29 19:06:47 +08:00
mtdxc
016f6e0e59 修复拼写错误,并精简WebRtcClient无用代码 2025-09-29 19:06:47 +08:00
Lidaofu
493714bc7d c sdk 新增webrtc相关函数 (#4473)
另外调整函数位置,whip、whep请求设置Content-Type为application/sdp
2025-09-24 17:40:43 +08:00
baigao-X
3fb43c5fef feat: 增加webrtc代理拉流 (#4389)
- 增加客户端模式,支持主动拉流、推流:
   - addStreamProxy接口新增支持whep主动拉流,拉流地址目前只兼容zlm的whep url。
   - addStreamPusherProxy接口新增支持whip主动推流,推流地址目前只兼容zlm的whip url。
   - 以上推流url格式为webrtc[s]://server_host:server_port/app/stream_id?key=value, 内部会自动转换为http[s]://server_host:server_port/index/api/[whip/whep]?app=app&stream=stream_id&key=value。

- 增加WebRtc p2p 模式:
  - 增加 ICE FULL模式。
  - 增加STUN/TURN 服务器。
  - 增加websocket 信令。
  - 增加P2P代理拉流。

---------

Co-authored-by: xia-chu <771730766@qq.com>
Co-authored-by: mtdxc <mtdxc@126.com>
Co-authored-by: cqm <cqm@97kid.com>
2025-09-20 16:23:30 +08:00
xia-chu
5686027fc2 修复MediaSource::close线程安全问题
主动或无人观看关闭流可能会由于线程安全问题导致崩溃
2025-09-09 22:02:20 +08:00
weishao
ceb78bd54c feat: add H.265 profile parameters support for WebRTC SDP negotiation 2025-08-22 20:38:17 +08:00
xia-chu
57fede9508 修复编译警告 2025-08-09 15:42:28 +08:00
xia-chu
c98137e505 优化线程安全问题 2025-06-29 17:56:10 +08:00
custompal
f0204ea3b3 播放器(reader)setGetInfoCB时统一使用Session对象 (#4195)
Co-authored-by: custompal <chenrengen@gosuncn.com>
2025-03-21 15:22:48 +08:00
Dw9
479a3fb9bb Remove B-frames when playing WebRTC streams (#4176)
1.  webrtc 播放移除了 h264 rtp中的b 帧
2. 增加了 rtc.bfilter 配置
ref: ISO_IEC_14496-10-AVC-2012
2025-03-03 14:37:57 +08:00
alex
4152dcd409 AI automatically translates all comments in the code into English (#3917) 2024-09-19 14:53:50 +08:00
xia-chu
a14e40f8d2 修复webrtc rtp重发列队可能由于rtp时间戳异常导致内存溢出的bug 2024-07-21 19:16:34 +08:00
xiongziliang
2ead272187 修复webrtc播放时生成config rtp线程安全的bug
rtsp直接代理时会从config frame生成rtp,在获取VideoTrack配置帧列表时存在线程安全风险;
同时简化getConfigFrames函数代码,去除缓存逻辑。
2024-06-22 13:04:06 +08:00
xiongziliang
1ef3642ed4 优化webrtc jitter buffer相关参数 2024-06-22 13:04:06 +08:00
Xiaofeng Wang
84dbe4b076 Send config frames once before sending DirectProxy RTP packets (#3611) 2024-06-16 09:37:33 +08:00
Luke
fbac3f9ba0 RC4密码套件漏洞 (#3590)
禁止使用RC4
2024-06-09 10:45:40 +08:00
gongluck
5df2b80757 Nack相关参数可配置化 (#3510 #3507) 2024-05-12 18:15:11 +08:00
xia-chu
2d66dd7cb3 Fixing the problem of WebRTC handshake failure caused by unsupported RTP extensions (#3486) 2024-04-20 22:49:27 +08:00
Dw9
edca662208 fix webrtc echo error (#3442)
遵循着pr #3360 的修改方式解决webrtc echo模式失败的问题
2024-04-05 22:11:50 +08:00
xiongziliang
7aaafa18e7 Format code 2024-03-23 23:08:10 +08:00
xiongziliang
d8893877b2 Delete invalid code 2024-03-23 22:56:12 +08:00
johzzy
029813402d feat: update negotiateSdp and WebRtcArgs (#3371)
- update negotiateSdp
- update HttpAllArgs and alias
- update onRtcConfigure
- define setWebRtcArgs, handle set_webrtc_cands and setLocalIp

---------

Co-authored-by: xiongziliang <771730766@qq.com>
Co-authored-by: KkemChen <kkemchen@qq.com>
2024-03-23 22:46:30 +08:00
xia-chu
db4c570d19 WebRTC audio preferred PCMA 2024-03-22 20:50:07 +08:00
小强先生
8e16a698b6 降低webrtc握手未结束,数据先到的日志等级 (#3368) 2024-03-13 10:57:43 +08:00
johzzy
1e39594335 fix for https://bugs.chromium.org/p/webrtc/issues/detail?id=15845 (#3360) 2024-03-10 21:34:03 +08:00
gongluck
5a6364bae2 Add datachannel c apis and callbacks(#3328)
增加datachannel数据收发的回调通知 #3326,和控制datachannel回显的开关

---------

Co-authored-by: xiongziliang <771730766@qq.com>
2024-03-02 16:52:51 +08:00
waken
fd1ebb1a51 Auto get icecand ip address from http request (#3251)
Get ip address from http `Host` header, and set it to icecand ip for webrtc
2024-01-26 10:26:30 +08:00
老衲不出家
62641f426b Fix a bug in WebRTC where the DTLS certificate is too large(big than MTU) (#3250) 2024-01-24 15:14:23 +08:00
sandro-qiang
aeda47ec8c 修正SctpAssociation.cpp的访问越界 (#3182)
ZLMediaKit/ZLMediaKit#3181
2024-01-05 15:33:51 +08:00
Dw9
7c42ac4d79 Set the default port for WebRTC (#3175)
Set the default port for WebRTC to 8000 to prevent the generated default configuration file from disabling WebRTC features.
2023-12-29 10:53:47 +08:00
夏楚
bbe8f4a018 release 8.0 2023-12-09 16:23:51 +08:00
夏楚
76aebd74c6 整理MediaSource协议类型 2023-12-02 16:31:40 +08:00
LeiZhi.Mai
586bb73912 兼容webrtc offer sdp中重复行的情况 (#3038) 2023-12-01 10:44:59 +08:00
yujitai
92e7d8837e RTC: 修复一组丢包分多次nack发送时blp-vector没有被重置的问题 (#3016)
如果一组丢包,通过多个nack发送,那么多次执行blp_vec.resize(16,
false)并不会重置元素值,这会导致blp_vec的丢包状态错乱,从而产生一些不必要的重传请求。
2023-11-23 21:35:23 +08:00
xiongguangjie
22f5f56130 rtc fix sdp ufag should not contain _ + = - by spec (#2993)
rtc 中的sdp ufrag 只能有数字与字母组成,不能包含其他符号(根据RFC 5245),包含 _ + = - , 在chromium
项目中有人提出过,详情见( https://crbug.com/1053756 )。chrome 也能正常处理_ + = -
等符号,但是在日志中会有警告如下 `[WARNING:transport_description.cc(32)] '-', '=', '#'
and '-' are not valid ice-char and thus not permitted in ufrag or pwd.
This is a protocol violation that is permitted to allow upgrading but
will be rejected in the future. See https://crbug.com/1053756`
因此修改
2023-11-19 14:36:03 +08:00
夏楚
ae662fa083 webrtc dtls默认采用https证书,如果https证书不存在则随机生成 (#2928)
之前默认随机创建dtls证书,导致每次启动证书都不一致,而Firefox要求同主机的dtls证书必须一致,所以导致每次服务重启,Firefox可能拒绝dtls握手。
并且在集群模式下,如果Firefox接入多个不同集群实例的webrtc服务,也可能导致webrtc dtls握手失败。
2023-10-25 17:50:29 +08:00
xia-chu
e3e7495c90 新增webrtc播放器datachannel消息广播机制和接口 2023-09-02 12:53:56 +08:00
xia-chu
39dd886ec1 优化获取播放器列表相关功能 2023-09-02 12:07:42 +08:00
xia-chu
d286ac1d73 NoticeCenter支持安全类型转换,解决监听者参数类型不一致导致的bug 2023-09-02 11:22:28 +08:00
Dw9
81966f2c48 修复未开启sctp时,webrtc datachannel sdp交换相关bug (#2791)
主要优化如下:
1、通过设置port为0 声明不支持datachannel(而不是inactive)。
2、设置正确的ice用户名和密码,防止ice建联失败。
3、group attribute移除datachannel的mid。
3、datachannel 相关sdp移除rtcp相关描述。
2023-08-29 11:22:30 +08:00
xia-chu
a7d95461ee 过滤掉不支持的webrtc rtp ext,提高webrtc转发兼容性
在测试obs simulcast推流时,发现chrome无法正常播放,
分析rtp ext扩展,发现是rtp mid ext未过滤导致,
zlmediakit在回复answer sdp时,已申明不支持mid扩展,
但是obs并未理会还是发送mid扩展。
根据answer sdp过滤rtp ext可兼容此问题。
2023-08-12 15:25:16 +08:00
夏楚
73c8a5faf4 统一设置单字节对齐方式 (#2716)
__attribute__((packed)) 替换为 #pragma pack(push, 1)
2023-07-29 13:07:22 +08:00