Commit Graph

2275 Commits

Author SHA1 Message Date
xiongziliang
77d2df1695 移除RtpSelector相关逻辑,优化代码结构 2024-06-09 10:52:10 +08:00
zwcarl
9a5fdd3dac
修复组播bug (#3602)
当多个客户端拉同一个组播源时,如果此时源被析构,会偶现使用该源的组播对象没有被析构的情况,在RtpMultiCaster的_rtp_reader->setDetachCB回调函数中,先移除该组播对象再通知上层session可以解决此问题

---------

Co-authored-by: zhengwang <carl.zheng@lednets.com>
2024-06-09 10:42:02 +08:00
xiongziliang
4cd735f61d 编码H264时支持时间戳透传,修复时间戳相关问题 2024-06-02 13:34:51 +08:00
xiongziliang
189b02e400 解析rtp时,兼容rtsp服务端发送缓冲区溢出覆盖的bug 2024-06-02 13:11:45 +08:00
KkemChen
373620cfc6
feat: add broadcast event for player count change (#3562) 2024-05-23 10:30:11 +08:00
admin
472d7d1e4f 兼容rtsp服务端发送缓冲区溢出覆盖的bug 2024-05-15 14:31:36 +08:00
xia-chu
bbdbd6a3e0 feat: Using kBeatIntervalMS option for rtsp heartbeat interval time and add kRtspBeatType for setting rtsp heartbeat type 2024-05-11 14:41:18 +08:00
xiongguangjie
1c89950ebe
Fix record info size to int64 (#3527) 2024-05-11 10:49:33 +08:00
yanggs
046aaa3498
修复拉取指定流时时长信息丢失的问题 (#3500) 2024-05-01 13:19:47 +08:00
xia-chu
664d0b67bc Add the listRtpSender http api 2024-04-21 11:31:43 +08:00
xia-chu
e4de454d5d Charset default to UTF-8 on Windows 2024-04-20 22:25:21 +08:00
xia-chu
ff70ef233c Fix bug where ts files are not written into m3u8 file during HLS playback. 2024-04-20 20:00:25 +08:00
xiongguangjie
d8cb75d387
Improve url encode and decode code add user pass encode decode methond (#3468)
去除url转义的冗余代码,添加用户名与密码的转义
2024-04-13 20:36:15 +08:00
xia-chu
af3ef996b0 Avoid build warnings in the main code 2024-03-30 14:59:28 +08:00
xia-chu
390c374086 Optimize the code
1. change param_strs to params
2. move params from MediaInfo to MediaTuple
3. passing MediaTuple as a parameter for some functions
2024-03-30 14:41:20 +08:00
xiongziliang
3e13e69724 BufFix: avoid may change data in splitter 2024-03-24 22:01:56 +08:00
Jacob Su
208f57e2cd
Fix macOS compile error by rename version.h -> ZLMVersion.h (#3411 #3410) 2024-03-24 17:18:18 +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
b05f515ccc Revert "Fix the issue of failing to push streams to FMS 3.0 server"
This reverts commit 3b7f16b755.
2024-03-22 20:50:07 +08:00
xia-chu
49ddde28c0 Refactor code 2024-03-22 20:50:07 +08:00
xia-chu
e972ec5a22 Remove deprecated code 2024-03-22 20:50:07 +08:00
xia-chu
5036aa5ec5 BugFix: crashes when exceptions are thrown during destruction #3402 2024-03-22 20:50:07 +08:00
百鸣
ff43fa5075
Fix the issue of abnormal timestamps during MP4 recording. (#3363)
Co-authored-by: xingqiao <xingqiao@uni-ubi.com>
2024-03-16 22:01:06 +08:00
haorui wang
3b7f16b755
Fix the issue of failing to push streams to FMS 3.0 server. (#3362)
[how]
1. AMF 为简单类型时填插 AMF Null (参考 OBS 以及实际测试)
2. createStream 前附加 releaseStream 和 FCPublish, 兼容旧 FMS3.0
3. 正确处理 RTMP Header fmt 为 1 和 2 的业务逻辑
2024-03-16 21:58:33 +08:00
xia-chu
50f65c4ba4 Random port pool ensures that both UDP and TCP modes are available simultaneously 2024-03-16 21:53:30 +08:00
xia-chu
1930d909f9 Fix the thread safety issue caused by poller thread switching when paced sender enabled 2024-03-16 21:53:30 +08:00
xiongguangjie
c9c2706843 avoid addstreamproxy rtsp user or pass contain + 2024-03-16 21:52:24 +08:00
xiongguangjie
af155ef87a no track throw error avoid addstreamproxy already exist 2024-03-16 21:52:24 +08:00
jamesZHANG500
03c93d0b23
Add config for save fmp4 record files (#3356) 2024-03-10 16:19:02 +08:00
xiongguangjie
fe61b572e0
Fix hls fmp4 clear cache bug (#3355)
Fix hls fmp4 clear cache delete init.mp4 result in play failed for #3348
2024-03-08 11:04:59 +08:00
waken
79b2aa6adc
openRtpServer接口增加单视频参数,加快单视频流注册速度 (#3342)
only_audio -> only_track
2024-03-05 17:06:31 +08:00
张传峰
ffdc13bfb9
RTP proxy通过UDP收流,调整udp recv socket buffer size成配置 (#3336)
国标推流有些情况需要UDP方式接收流,端口复用同一个UDP端口可能需要根据服务器性能
2024-03-05 10:42:22 +08:00
johzzy
f49aed7a32
srt optimization code for query poller (#3334)
- add querySrtTransport, improve code.
- update SrtTransportManager key
- fix some warning
2024-03-02 18:25:32 +08:00
夏楚
24ad9c9b9e
Support mpegts rtp payload in startSendRtp (#3335) 2024-03-02 16:53:53 +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
xiongguangjie
06abbd0eb7
rtp send rtp g711 audio can config duration (#3325)
optimization for this
[issue](https://github.com/ZLMediaKit/ZLMediaKit/issues/3316)
2024-03-02 16:40:13 +08:00
xiongziliang
81b08af0ce Ensure thread safety of player and pusher 2024-02-07 23:06:42 +08:00
sandro-qiang
ceae040a7a
Fix http url path and component's coding (#3237 #3181) 2024-01-28 19:18:36 +08:00
xiongziliang
cfe9a31ca6 Fix http cross domain issues 2024-01-27 21:29:10 +08:00
chdahuzi
56bdb14baf
解决流名被替换后,getRtpInfo等接口无法使用新流名的问题 (#3265) 2024-01-27 20:55:57 +08:00
PioLing
fdc5bfac26
Add win32 mmap (#3229) 2024-01-18 11:04:27 +08:00
chdahuzi
8d951f06a0
修复rtp udp推流时,调用close_stream延时3秒才注销的bug (#3226) 2024-01-17 18:11:56 +08:00
xiongziliang
6514be74f1 Prevent access to nullptr when cloning a track 2024-01-15 20:34:17 +08:00
Seto
27217cb1e6 Fix _media_src setIndexFile by mistake for include_delay. 2024-01-06 18:42:57 +08:00
xiongziliang
8048cd886b Fix typo error of VideoTrackImp 2024-01-06 18:17:51 +08:00
SetoKaiba
b6cbbb4339
Add hls_delay feature (#3158) 2024-01-03 09:05:15 +08:00
xiongziliang
519cce8c29 Add data alignment declaration 2023-12-31 22:15:51 +08:00
xiongziliang
f382f1fa95 Replacing switch case with codec map
Prevent the occurrence of multiple case with same value
2023-12-31 22:14:58 +08:00
xiongguangjie
9d68b668fc
Add http pipelining request support (#3154)
Support recv multi http request before reponse it.

Co-authored-by: 夏楚 <771730766@qq.com>
2023-12-23 21:27:28 +08:00
PioLing
c7f2f9e883
Change fillPicture (av_image_fill_arrays() ) align size from 1 to 32 (#3142) 2023-12-18 16:28:00 +08:00
xiongziliang
e593ef5fef Change av_image_fill_arrays align size from 1 to 32
To avoid crash in some cases
2023-12-17 18:22:58 +08:00
xiongziliang
189f787746 Disable enhanced-rtmp H265 default 2023-12-17 18:10:47 +08:00
648540858
a72d87cca7
BugFix: MediaSource unregister after 3 seconds after calling close_streams (#3132)
To avoid frequent creation and destruction of UdpSession,
RtpSession will be destructed 3 seconds after triggering onError.
2023-12-15 16:46:43 +08:00
xia-chu
c0bb7db476 BugFix: crash when FrameMerger::flush
In a lambda expression, temporary stack variables should not be captured; otherwise,
the variables may have become invalid when FrameMerger::flush is called.
2023-12-14 17:28:21 +08:00
PioLing
07f3c6dde4
支持创建不支持codec的frame (#3126) 2023-12-14 14:14:50 +08:00
waken
9933398614
修复一个关闭GB28181时引发的崩溃问题 (#3118)
fix #3116 #3115
2023-12-13 17:41:57 +08:00
xia-chu
25c99470ee feat: add support of codec plugin 2023-12-10 11:09:04 +08:00
夏楚
64f15202de
Support multi audio/video track 2023-12-09 22:34:22 +08:00
夏楚
bbe8f4a018
release 8.0 2023-12-09 16:23:51 +08:00
ljx0305
44c82752b3
修正回环时计算前后包距错误 (#3089) 2023-12-07 22:05:42 +08:00
Dw9
d21bdc35c9
修复addstreamproxy拉流瞬间超时的问题 (#3093) 2023-12-07 22:05:20 +08:00
xiongziliang
6ff5556b71 优化平滑发送逻辑,解决时间戳跳变导致发送不平滑问题 2023-12-04 23:22:38 +08:00
xiongziliang
527d9b9e64 优化http目录索引相关代码
优先使用ZLToolKit提供的api
2023-12-02 21:53:25 +08:00
xiongziliang
fd52470fc9 修复http文件服务器未设置charset的bug 2023-12-02 21:53:25 +08:00
xiongziliang
a3a563ed41 修复http虚拟目录相关bug 2023-12-02 21:53:25 +08:00
xiongziliang
3137b95406 修复hls快速重连时,延迟删除文件夹相关bug (#3039) 2023-12-02 21:53:24 +08:00
xiongziliang
c12a6f0aed 适配ZLToolKit 2023-12-02 19:49:28 +08:00
xiongziliang
d555f6038a http文件索引改用英文
防止中文乱码
2023-12-02 16:43:06 +08:00
夏楚
76aebd74c6
整理MediaSource协议类型 2023-12-02 16:31:40 +08:00
夏楚
10c2197e76
新增downloadFile接口,支持下载限定目录下任意文件 (#3073) 2023-12-02 15:58:40 +08:00
xiongziliang
23b785b263 修复编译警告问题 2023-12-02 10:22:45 +08:00
夏楚
21c03f772f
新增平滑发送逻辑 (#3072) 2023-12-02 10:20:06 +08:00
alexliyu7352
4648c156c8
优化hls播放器,使用持久化连接 (#3070)
hls播放时,如果对方reset断开了tcp连接,应该自动发起重连
2023-12-01 17:56:08 +08:00
alexliyu7352
50281513d9
hls播放器优化 (#3064)
1. 连续切片下载失败后关闭播放器, 这种适用于源端服务器出现故障导致m3u8索引正常,但切片文件不正常时,尽快的能关闭播放器并通过web
hook上报业务系统,而不是仍旧不停的拉取ts切片.
2. 优化m3u8拉取失败时的快速重拉, 增加一个0.3秒的延时. 因为有时候httpClient已经_complete=true了,
但是alive()仍旧是true,所以稍微增加一个延时, 避免出现大量的m3u8重试, 实际上这里能否直接判断_complete=true?
3. 继续修改到哪里就把代码注释添加英文版本
2023-12-01 14:43:35 +08:00
alexliyu7352
86029d08af
addStreamProxy支持透传参数并设置MediaPlayer (#3063)
通过addStreamProxy接口可以直接配置MediaPlayer相关设置参数,比如说http代理url等
2023-12-01 14:33:07 +08:00
yujitai
a8e2d602cb
RTC: 修复TWCC feedback rtcp解析status chunk错误的问题 (#3059)
在解析packet status chunk的时候使用了uint8_t类型的循环变量,如果反馈的包数量超过255,那么解析会陷入循环,出现异常
2023-12-01 10:45:24 +08:00
JiaHao
34695ab1b8
兼容旷世智能分析系统RTSP拉流客户端相关Bug (#3045)
旷世智能分析系统发送DESCRIBE命令时会夹带包括用户名密码完整的rtsp url,这不符个常规

Signed-off-by: Nashira <nashira@nashira.cn>
2023-11-30 17:53:47 +08:00
zjx94
1cbfcd96e2
新增hls快速注册相关配置,提高hls打开速度 (#3024)
新增配置项:hls.fastRegister,默认关闭。
开启后首个切片文件只保存一个gop,可提高hls注册速度,加快播放器打开速度。
但是第一个切片播放完毕,第二个切片需要更长时间生成,可能导致播放器等待加载。
2023-11-30 17:47:22 +08:00
xia-chu
e81ff307c7 防止发送时间戳都为0的sr rtcp包 2023-11-26 09:05:24 +08:00
xia-chu
0f4e0e1076 完善相对时间戳逻辑, 完善同步机制, 解决相对时间戳不同步的问题
默认禁止时间戳回退并设置最大跳跃幅度为300毫秒
rtsp恢复产生ntp时间戳
由于绝对时间戳可能跳跃回退,之前在求相对时间戳时会导致音视频不同步。
现在求相对时间戳逻辑经过修改,已经支持同步功能,所以恢复rtp ntp时间戳逻辑
2023-11-26 09:05:24 +08:00
夏楚
db0818c8d2
新增mp4点播接口loadMP4File (#3018 #2972) 2023-11-24 10:44:08 +08:00
alexliyu7352
d593267f61
增加http代理功能 (#2988)
支持通过http代理拉流, 避免内外网复杂网络环境时需要专门配置防火墙,现在只需要配置一台代理内网的服务器.

---------

Co-authored-by: xia-chu <771730766@qq.com>
2023-11-23 11:09:01 +08:00
Jovial Young
a13b8417e5
修复rtmps默认端口不对导致无法推/拉流问题 (#2996)
在使用rtmps推流或者拉流时,端口被默认设置成了1935,正确的端口应该是443.
2023-11-19 14:37:04 +08:00
taotaobujue
7865f2c360
修复udp单端口模式下rtp鉴权失败后无法关闭流的问题(#2985)
如果rtp推流鉴权失败,在udp模式下延时断开连接,等待超时自动关闭,防止频繁创建销毁RtpSession对象,
tcp模式则立即断开链接。
2023-11-15 11:02:12 +08:00
648540858
d2374cbd79 兼容opensuse系统编译 2023-11-13 11:58:10 +08:00
xiongziliang
4ea7565344 修复startSendRtp接口开启rtcp时触发断言异常的bug
此问题由pr(#2924)引入
2023-11-12 19:55:18 +08:00
lvchenyun
5c81640556
修复国标级联音频可能错乱的bug (#2967)
GB28181流音频解析出来的Frame类型是不可缓存类型,它的数据内存地址是复用的。
在级联时,会把Frame存入RingBuffer对象,这样在下次使用改Frame对象时,可能数据区已经被覆盖掉了。
2023-11-10 21:56:05 +08:00
xbpeng121
884f1d760b
提高对不规范国标TCP推流的兼容性 (#2966)
问题: 建立tcp链接后,并不是从rtp包头开始发数据,所以无法解析出正确的包。
解决方案:在tcp数据报文中搜索0x000001bb(关键帧的system header),找到后偏移固定字节恢复rtp包头。
2023-11-10 21:53:43 +08:00
waken
6888f20d74
新增openRtpServerMultiplex接口,支持创建多路复用RTP服务器端口 (#2954)
#2953
2023-11-09 11:26:13 +08:00
Dw9
f8285a3f6c
startSendRtp接口新增支持同ssrc向多个服务器推流 (#2951)
新增ssrc_multi_send参数,支持同ssrc向多个服务器推流,兼容当前startSendRtp/stopSendRtp接口
2023-11-07 23:38:58 +08:00
fruit Juice
1609fe67d7
Track新增update方法,支持更新宽高采样率等信息 (#2960)
当变分辨率时候,实时更新MP4封装层的参数信息,避免出现封装层与编码(SPS)层视频宽高不一样,造成解码参数错误花屏;同时也支持更新音频采样率等信息。


---------

Co-authored-by: xia-chu <771730766@qq.com>
2023-11-07 23:36:41 +08:00
xia-chu
aa5343effa 修复http客户端设置tcp连接超时时间单位错误的问题
须毫秒转换为秒
2023-11-07 23:15:16 +08:00
yujitai
433ecb1c5c
RTC: 修复gop没有sps/pps导致的秒开失败问题 (#2959)
rtc场景下,如果directProxy设置为1,sdp没有传递sps/pps,因此gop的开始需要是rtp sps/pps配置帧而不是idr关键帧,这样才能保证秒开。
2023-11-07 19:34:40 +08:00
xiongziliang
2628690673 国标udp多端口模式支持收到sr rtcp后回复rr rtcp
确保国标停止rtp推流后也可以仅靠rtcp保活
2023-11-05 13:26:42 +08:00
xiongziliang
2206b031a9 防止析构时抛异常导致的崩溃 2023-11-04 22:24:55 +08:00
xiongziliang
83b432b980 默认关闭only_audio模式,修复mk_media_start_send接口发送视频失败的bug 2023-11-02 12:51:08 +08:00
xia-chu
d8d7fe9144 通过getMediaList接口可返回Track时间戳增量信息 2023-10-31 11:10:02 +08:00
xiongguangjie
0f94b48823
修复url反转义失败时字符乱码相关bug (#2932 #2935) 2023-10-27 22:49:42 +08:00
夏楚
c876e53924
优化ffmpeg url解析规则,提高rtmp客户端兼容性 (#2936)
根据ffmpeg测试,类似rtmp://ip/a/b/c/d/e/f这样的url,app应该为a/b,stream_id应该为c/d/e/f,
tcl_url应该为rtmp://ip/a/b, teams的rtmps服务需要按这种方式才能推成功

---------

Co-authored-by: yangkun <yangkun@osee-dig.com>
2023-10-27 21:39:36 +08:00
leibnewton
0a19627d86
修复startSendRtp成功后udp套接字被关闭的问题 (#2468 #2924)
对端端口未打开,udp得到connection refused的错误而关闭。
2023-10-25 15:14:08 +08:00