Commit Graph

215 Commits

Author SHA1 Message Date
xiongziliang
1ef3642ed4 优化webrtc jitter buffer相关参数 2024-06-22 13:04:06 +08:00
gongluck
5df2b80757
Nack相关参数可配置化 (#3510 #3507) 2024-05-12 18:15:11 +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
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
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
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
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
xia-chu
af0ebf4633 优化Parser代码命名 2023-06-10 14:55:40 +08:00
Johnny
0232caf068 add MediaTuple 2023-05-30 11:01:27 +08:00
Johnny
f4ee607feb add RtspMediaSource::Clone 2023-05-30 11:01:27 +08:00
Johnny
bfec1b1e0e fix typo 2023-05-02 20:41:13 +08:00
xia-chu
8c049d4e28 实现whip/whep delete相关功能
通过whip/whep 回复http头中的Location url进行删除资源
新增delete token随机数实现删除鉴权
2023-04-28 22:36:58 +08:00
xia-chu
d2349f01bd 使用static_pointer_cast优化性能 2023-04-28 22:04:38 +08:00
xia-chu
cdf97e7605 更新zltoolkit,适配最新代码 2023-04-28 22:04:09 +08:00
xiongziliang
c8a20f85f6 直接打印SockException类 2023-04-23 00:10:18 +08:00
Johnny
82bc416546 add exchangeSdp 2023-04-21 20:40:37 +08:00
xia-chu
70ad9cb0b6 设置webrtc端口缺省配置为0(不开启) 2023-03-13 21:00:00 +08:00
xia-chu
4cc2982a2c 重写jitter buffer算法,修复seq回环时可能丢包的bug 2023-03-11 10:17:31 +08:00
mtdxc
4783ac0808
修复webrtc多候选地址无法来回切换的bug (#2266)
最后一个连通的候选地址会被赋值并锁定为_selected_session,如果之前的候选地址再发送数据,将通过_selected_session回复,导致无法切换为旧的候选地址。
2023-03-03 11:18:21 +08:00
xiongziliang
c2e1083493 复用rtp/rtcp判断逻辑过滤非rtp包: #2247 2023-02-28 22:23:30 +08:00
xiongguangjie
96f549ab32 avoid bug for #2159 2022-12-15 19:17:09 +08:00
monktan89
f6a36180b4 修复webrtc转发可能内存越界的bug: #2159 2022-12-14 15:08:59 +08:00
monktan89
a12b7c8021 修正代码拼写错误 2022-11-30 18:24:35 +08:00
mtdxc
754073918a
Header refactor (#2115)
* 优化MultiMediaSourceMuxer头文件包含

* 将MediaSinkDelegate和Demux移到MediaSink中

* MediaSource头文件重构, 独立出PacketCache.h
精简Frame和Track的头文件

* Rtmp头文件重构

* Rtsp头文件重构

* webrtc头文件重构

* 规范.h头文件包含,并将其移到.cpp中:
- 尽量不包含Common\config.h
- Util\File.h
- Rtsp/RtspPlayer.h
- Rtmp/RtmpPlayer.h

* 删除多余的Stamp.h和Base64包含
2022-11-29 11:07:13 +08:00
johzzy
bc4fa2bc53
fix(rtcp/bye): 收到rtcp bye时不断开webrtc连接 (#2123)
bye(203) 会在 sender audio track mute 时出现, 不能作为 shutdown 的依据
2022-11-28 17:52:37 +08:00
Dw9
fef9d31631
webrtc支持通过http参数指定是否优先tcp模式 (#2105)
* webrtc push/play支持通过http参数指定tcp

* force_tcp改成perferred_tcp

Co-authored-by: xiongziliang <771730766@qq.com>
2022-11-27 12:43:16 +08:00
ziyue
9fd5152aa1 确保webrtc关闭udp模式时可用 2022-11-19 09:52:10 +08:00
ziyue
d910c80a00 优化webrtc iceandidate端口相关代码 2022-11-19 09:46:04 +08:00
xiongguangjie
0d6fa1281a add rtc tcp port config and ignore candidate when port is 0 2022-11-19 01:51:53 +08:00
Dw9
47530ce830
新增支持webrtc over tcp模式 (#2092)
* webrtc server/session/cadidate 改为tcp

* 先屏蔽检查isCurrentThread

* 接受和发送的数据处理tcp 2字节头

* 处理rtc tcp 分片

* 完善webrtc over tcp

* 精简rtp服务器相关代码

* 适配webrtc AV1编码: #2091

* webrtc tcp模式支持Firefox

* webrtc tcp模式支持线程安全

* c sdk支持webrtc tcp

Co-authored-by: ziyue <1213642868@qq.com>
2022-11-18 22:52:57 +08:00
xiongziliang
a916760ac3 整理webrtc c接口 2022-10-06 12:35:14 +08:00
ziyue
0b355759de 整理webrtc相关代码命名空间 2022-09-18 21:03:05 +08:00
xiongguangjie
d04a6d4355 rtc receive sr reset alive ticker 2022-09-09 23:04:28 +08:00
xiongguangjie
7f86299c80 rtc stop push unregister mediasource 2022-09-07 19:10:06 +08:00
xiongziliang
20f1275c58 rtsp拉流、rtp单端口推流新增支持获取丢包率: #1877 2022-09-03 16:32:09 +08:00
Dw9
b7ef766701
支持单独的datachannel通道 (#1894)
* 支持单独的datachannel 通道

* 当仅有datachannel时 ,忽略rtp和rtcp超时

* 单独开启datachannel时,通过dtls包维持心跳

Co-authored-by: xiongziliang <771730766@qq.com>
2022-08-20 10:28:19 +08:00
Xiaofeng Wang
0fc38bbadb 避免对外传递 srtp 依赖 2022-07-26 00:04:03 +08:00
xiongguangjie
cffc0743d7 format code use clang-format 2022-07-14 22:49:31 +08:00
xiongguangjie
602b475a3c for rtc send can receive rtcp xr, player can calculate rtt , for metaRTC player send rtcp xr 2022-07-12 19:26:17 +08:00
Haibo Chen
576056c465
get ip from env, for externIP in file 'config.ini' (#1786) 2022-07-09 21:44:57 +08:00
xiongziliang
94839fd93c 添加bom头 2022-06-18 14:34:58 +08:00