1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-15 04:42:04 +00:00
Commit graph

2631 commits

Author SHA1 Message Date
winlin
4bcfce7ff1 RTC: Refine is_alive code 2021-02-10 15:48:12 +08:00
winlin
aeca278de0 RTC: Refine log for twcc large timer 2021-02-10 15:47:54 +08:00
winlin
e776e0eca7 Refine server stat, extract to hybrid server stat 2021-02-10 13:07:26 +08:00
winlin
a357c013cd Timer: Apply timer(HourGlass) to server and sources 2021-02-09 17:15:25 +08:00
winlin
ee1d06c613 Main: Refine sever manager. 2021-02-09 12:44:56 +08:00
winlin
98c29a1494 Timer: Refine the hour glass, support stop 2021-02-09 11:54:08 +08:00
winlin
b189fc3fac RTC: Send NACK by timer, no by RTP packet 2021-02-08 18:28:32 +08:00
winlin
407ae1d7f6 RTC: Send NACK by timer, no by RTP packet 2021-02-08 17:19:20 +08:00
winlin
abc26d470b RTC: Refine NACK check, interval, time 2021-02-08 16:24:12 +08:00
winlin
d505bb6ea6 RTC: Update stat for received nack 2021-02-08 16:23:13 +08:00
winlin
43d4240a30 RTC: Never copy the packet for hijack. 2021-02-08 15:32:56 +08:00
winlin
d01a429c13 RTC: Update stat for nack 2021-02-08 14:14:27 +08:00
winlin
e31169d306 RTC: For RTP packet, never switch to context of session except error. 2021-02-08 13:17:22 +08:00
winlin
515529eba9 RTC: Update stat for twcc and rr 2021-02-08 13:16:07 +08:00
winlin
4539ffa086 RTC: Print stat for pli and timer every 5s. 4.0.70 2021-02-08 11:51:48 +08:00
winlin
18c27111e0 RTC: update stat for pli, timer and dispose 2021-02-08 11:45:34 +08:00
winlin
aefd7fccd0 RTC: Fix udp recvfrom bug 2021-02-08 08:25:35 +08:00
winlin
a43f339aa6 Update server stat for cid 2021-02-07 21:33:24 +08:00
winlin
33ab785ce9 RTC: Refine timer to 20ms, twcc to 40ms 2021-02-07 21:08:42 +08:00
winlin
83ab551396 Update server stat for fast-id search 2021-02-07 20:58:24 +08:00
winlin
cbfec753f0 Update server stat for fast-id search 2021-02-07 20:57:22 +08:00
winlin
af499094f8 Update server stat for fast-id search 2021-02-07 20:54:06 +08:00
winlin
ec0d68d6b0 SRS: Refine the UDP address parsing, no string 2021-02-07 20:27:40 +08:00
winlin
638a94ade2 RTC: Stat the UDP packets and addresses 2021-02-07 20:12:54 +08:00
winlin
d41a925694 RTC: Refine the UDP address parsing, no string 2021-02-07 20:05:36 +08:00
winlin
95193979f4 RTC: Use vector for fast search fast-id 2021-02-07 19:31:46 +08:00
winlin
ef279a8b1e RTC: Refine the SRTP protect api 2021-02-07 16:57:48 +08:00
winlin
9f91351f3c RTC: Refine SRTP unprotect rtp and rtcp, without copy 2021-02-07 16:21:25 +08:00
winlin
0c07459d19 RTC: Refine unprotect_rtp to reuse cipher 2021-02-07 16:04:19 +08:00
winlin
9a9efb8546 RTC: Parse TWCC SN fastly. 2021-02-07 15:48:46 +08:00
winlin
d184b5662c RTC: Parse PT fast and refine udp handler. 4.0.69 2021-02-07 12:44:00 +08:00
winlin
8cb5cab717 RTC: Refine UDP packet peer fast id. 4.0.68 2021-02-05 18:04:29 +08:00
winlin
7bb04998af RTC: Don't parse RTP header if no twcc 2021-02-05 17:15:19 +08:00
winlin
05441d6354 Refine code 2021-02-05 17:10:42 +08:00
winlin
fd605fc4ac RTC: Fix bug for header parsing 2021-02-05 17:05:46 +08:00
winlin
9c17721eb9 RTC: Refine static cast for RTC connection 2021-02-05 17:02:08 +08:00
winlin
d526e170a5 RTC: Support disable nack 2021-02-05 15:58:54 +08:00
winlin
d0c0f26160 RTC: Support disable nack 2021-02-05 15:52:44 +08:00
winlin
80985c7307 RTC: Fast parse ssrc and find the publisher 2021-02-05 14:13:48 +08:00
winlin
cd06f2da0c RTC: Refine publish stream by find publisher 2021-02-05 14:07:24 +08:00
winlin
2b85ad1f60 RTC: Reuse UDP socket to receive packet. 4.0.67 2021-02-04 17:27:32 +08:00
winlin
19a7c7682e RTC: Refine performance for UDP recv context id switch 2021-02-04 15:48:58 +08:00
winlin
ec01f94b17 RTC: Fix NACK remove loop bug 2021-02-03 19:08:33 +08:00
winlin
0c89e899bd RTC: Refine is_alive code 2021-02-03 18:58:07 +08:00
winlin
1db8a3c92e RTC: Refine log for twcc large timer 2021-02-02 18:05:23 +08:00
winlin
d92bbe7558 RTC: Support eip with port 2021-01-31 18:07:43 +08:00
winlin
b373400257 RTC: Extract NACK handler from stream to track. 2021-01-31 18:06:40 +08:00
winlin
40ea0b67f9 RTC: Refine RTP packet decoder to track and stream 2021-01-31 18:05:51 +08:00
winlin
1615c3df6c RTC: Refine code 2021-01-31 17:59:59 +08:00
winlin
ec2535b183 RTC: Refine code 2021-01-31 17:59:46 +08:00
winlin
e5391ff93d RTC: Support eip with port 2021-01-30 21:36:17 +08:00
winlin
e2bdacb337 RTC: Extract NACK handler from stream to track. 2021-01-19 17:05:40 +08:00
winlin
f2d45442c1 RTC: Refine RTP packet decoder to track and stream 2021-01-19 15:56:42 +08:00
winlin
09011eea3a RTC: Refine code 2021-01-17 20:30:10 +08:00
winlin
aaa3918a72 RTC: Refine code 2021-01-16 09:52:36 +08:00
winlin
4bb3ad5637 For #2142, Fix bug for fixing memory leak for bridger. 4.0.62 2021-01-15 16:58:23 +08:00
winlin
4e70bf5eaf For #2142, Fix memory leak for bridger of RTC source stream. 4.0.61 2021-01-15 14:16:32 +08:00
winlin
50bb9eb391 Revert "For #2142, RTC: Fix memory leak"
This reverts commit 2492b726af.
2021-01-15 13:31:58 +08:00
winlin
ed32965aa4 Revert "Fix #2142, Async release bridger when unpublish. 4.0.60"
This reverts commit 06adb9dc42.
2021-01-15 13:30:52 +08:00
winlin
06adb9dc42 Fix #2142, Async release bridger when unpublish. 4.0.60 2021-01-14 19:12:01 +08:00
winlin
bfa156247c Merge branch '4.0release' into develop 2021-01-07 17:47:54 +08:00
winlin
6c7ffdeedf Merge branch '3.0release' into 4.0release 2021-01-07 17:27:33 +08:00
winlin
d520679547 Refine code for changing id of stat to string 2021-01-07 17:27:30 +08:00
winlin
4f013404e3 Refine stat id 2021-01-07 17:09:33 +08:00
winlin
1c41f5d796 Merge SRS3, change id of stat to string 2021-01-07 17:04:11 +08:00
winlin
fb7c051833 Change id from int to string for the statistics. 3.0.157 2021-01-07 16:47:49 +08:00
winlin
2492b726af RTC: Fix memory leak 2021-01-07 11:45:03 +08:00
xbpeng121
47422b7819
GB28181: 无法对接平台问题及一些小bug (#2109)
* 1-新增srs_string_split2函数,该函数支持空串也能按照原有顺序进行切分并放入数组
2-SrsGb28181Device增加属性字段,并在收到catalog命令时能够更新该属性
3-修复sip包解包不严谨bug(body中有可能会有SRS_RTSP_CRLFCRLF那么导致header_body[1]就不一定是body了可能只是body的一部分)

* 1-修复停用rtp多路复用参数(invite_port_fixed)不起作用bug

* bugfix: 当srs发送invite时会指定一个ssrc作为流媒体序列号,但有些平台发流时并不使用这个作为ssrc,而是自己新生成一个。(修复该bug是在invite response时解析内容中的sdp,把对方生成的流媒体序列号ssrc读出来,并且更新srs的channel映射)

* Update push.gb28181.conf

恢复成原来的conf

* bugfix,在取得muxer时需要更新。之前写反了

* Merge branch 'develop' into 4.0release

* 解决冲突时,优先选择原有代码(还原选择develop的代码)

* 解决冲突时,优先选择原有代码(还原选择develop的代码)

* 解决冲突时,优先选择原有代码(还原选择develop的代码)

* 解决冲突时,优先选择原有代码(还原选择develop的代码)

* 修改sdp_map相同属性的连接符

* 解决冲突时,优先选择原有代码(还原选择develop的代码)

* 修改sdp_map相同属性的连接符

* 解决冲突时,优先选择原有代码(还原选择develop的代码)

* 解决冲突时,优先选择原有代码(还原选择develop的代码)

* 回退原来代码

* 删除parse_sdp存储至map相关代码

* 格式恢复

* 格式恢复

* 恢复格式

* srs_string_split() 函数的bugfix

Co-authored-by: xbpeng <xianbin.peng@sibat.cn>
2021-01-06 15:37:02 +08:00
winlin
6cf93557e1 RTC: Fix publish RTC ssrc bug 2021-01-06 12:15:04 +08:00
winlin
fbbdf5ba0e RTC: Fix audio track NULL bug 2021-01-05 18:38:11 +08:00
winlin
ebe38f7337 RTC: Fix RTX bug 2021-01-03 20:01:53 +08:00
winlin
78fcaaf7b1 RTC: Fix memory leak 2020-12-30 16:03:28 +08:00
winlin
03389f5e8c Merge branch '4.0release' into develop 2020-12-27 12:56:45 +08:00
winlin
1df2ea5ca8 Merge branch '3.0release' into 4.0release 2020-12-27 12:56:28 +08:00
winlin
831c78062b Remove vhost in query if not present it 2020-12-27 12:55:27 +08:00
winlin
8fa093c53c Merge branch '4.0release' into develop 2020-12-26 22:18:45 +08:00
winlin
2538b02a9b Merge branch '3.0release' into 4.0release 2020-12-26 22:15:37 +08:00
winlin
6e43ef6866 For RTMP edge/forward, pass vhost in tcUrl, not in stream. 3.0.156 2020-12-26 22:11:23 +08:00
jinxue.cgh
7f081b4178 RTC: Refine TWCC from 200ms to 50ms 2020-12-23 15:13:21 +08:00
winlin
ec212b7413 Merge branch '4.0release' into develop 2020-12-21 12:06:25 +08:00
winlin
764909c6cf Clear disposing then free resources to avoid reuse addresses 2020-12-21 12:05:56 +08:00
winlin
6afdf3addf Merge branch '4.0release' into develop 2020-12-21 12:00:03 +08:00
winlin
e8fa92e3d1 Refine logs for resource manager 2020-12-21 11:59:35 +08:00
winlin
5949eee4f4 Keep resources when dispoing to avoid reuse addresses. 2020-12-21 11:56:22 +08:00
winlin
9217fad73b Hotfix: Print resource address when manager dispose it 2020-12-21 11:28:58 +08:00
winlin
c7c6d8778a RTC: Fix warnings 2020-12-08 16:59:43 +08:00
jinxue.cgh
5309dbe18b RTC: Refine RTCP process 2020-12-07 21:40:51 +08:00
winlin
18ae8d8571 RTC: Fix SDP bug for firefox 2020-12-03 10:58:46 +08:00
winlin
aad7c448bf For #1998, Support Firefox. 2020-12-02 18:23:57 +08:00
winlin
0c113ff084 For #1998, support firefox 2020-12-02 17:29:05 +08:00
winlin
c5457e8241 RTC: Support unified-plan 2020-12-02 12:54:29 +08:00
winlin
c796c0d093 Fix #1689, fix typo 2020-12-01 17:05:47 +08:00
莫战
b38f30c3ee support query parsing and escape 2020-12-01 16:27:37 +08:00
jinxue.cgh
58b75c6f1b tfsfu: add play red pt negotiate 2020-12-01 13:37:42 +08:00
winlin
140f8b0fce For #1998, refine PT for firefox, support RED 2020-12-01 13:25:53 +08:00
PieerePi
3d5c18c25a
GB28181 code crashed in ffmpeg after commit "RTC: Use FFmpeg to transcode aac to opus" <d5a0ad3dd8>. (#2057)
Change the size from 64K to 256K.
2020-11-30 11:02:30 +08:00
Jesse Xi
8515f5a91e
incomplete_len 在大华摄像头下,因为大华包头对音频的不标准处理,可能为负值,而sizeof(SrsPsPacketStartCode) 返回的是unsigned 类型, 因些增加判断 (#2039)
Co-authored-by: jesse.xi <jj.xi@tianrang-inc.com>
2020-11-17 16:44:37 +08:00
winlin
c779d95246 GB28181: Remove chinese comments. 2020-11-16 00:06:03 +08:00
Pieere Pi
ffae1720ec gb28181模块可用性增强
主要改动,
1. 支持作为GB/T 28181上级平台
2. 新的目录接口sip_query_devicelist (/api/v1/gb28181?action=sip_query_devicelist)
3. 各种异常和问题修复
4. 其他一些小改动

以上改动基于feature/rtc分支,因为需要网页用WebRTC来拉GB28181的监控流,gb28181分支代码有点老了。

下面的序号n是指第n个差异块("@@ -"之间的内容)。

srs_gb28181.html
1. 原页面上多加了一个端口号
2-4. 给摄像头加上名称显示
5. 查询目录去掉chid
6. 删除通道参数分解为id和chid
7. API端口固定为1985

srs_app_gb28181.cpp
1-4. 四处因为错误而退出GB28181媒体处理循环,修改为不退出
5. payload为空异常
6. 修正判断startcode越界一个字符导致内存写越界的问题
ps流有可能末尾是全零填充,而且越界的那个字符正好是0x01,这样会多出一个nalu(末尾的三个0x00和一个越界的0x01),后面写video_data内存越界(if (first_pos != pre_pos){块,此处size - pre_pos - 4为-1,uint32_t naluLen得到的值为0,video_data[pre_pos+3] = p[0];写越界)破坏了其他数据,后续video_stream析构出错程序异常退出。
7. 此处srs后来已修复
8. 更新ssrc为被叫返回的值
原代码只支持标准中的《点播域内设备媒体流SSRC处理方式》(设备注册上来),不支持《点播外域设备媒体流SSRC处理方式》(即作为上级平台)。
这是因为如果srs作为上级平台,ssrc不是自己生成的,而是下级平台生成的。
9. 删除通道参数分解为id和chid
10. notify_sip_unregister后delete_stream_channel无效
11. notify_sip_query_catalog清空内存中的设备列表
12. 新函数query_device_list

srs_app_gb28181.hpp
1. update_rtmpmuxer_to_newssrc_by_id声明
2. 新函数get_gb28181_config_ptr和函数delete_stream_channel声明修改
3. 新函数query_device_list

srs_app_gb28181_sip.cpp
1-4. 在调试界面给摄像头加上名称显示;新函数clear_device_list和新函数dumpItemList
5-6. 两处因为错误而退出GB28181信令处理循环,修改为不退出
7. 设备注册上来,不检查服务器ID匹不匹配(支持作为上级平台)
8. 收到一个目录上报消息,更新内存中的数据
9. 更新ssrc为被叫返回的值
10. 新函数query_device_list

srs_app_gb28181_sip.hpp
1. 在调试界面给摄像头加上名称显示
2. 每个设备加上item_list,用于存储目录;新函数clear_device_list和新函数dumpItemList
3. 新函数clear_device_list

srs_app_http_api.cpp
1. 删除通道参数分解为id和chid
2. 新的接口sip_query_devicelist,用于查询所有设备的目录

srs_sip_stack.cpp
1. GB2312转UTF-8类
2. 被叫返回的ssrc初始化
3. parse_xml声明修改
4. 对XML内容进行字符集检测和转换
5-7. parse_xml定义修改
8. SIP BODY里面也有可能有\r\n
9-10. 防止恶意SIP消息 by vicious sip prober
11-12. 新的XML解析目录代码
13. 获取被叫返回的ssrc

srs_sip_stack.hpp
1. 依赖vector
2. 每个设备加上item_list,用于存储目录
3. 被叫返回的ssrc
4. parse_xml声明修改
2020-11-15 23:14:34 +08:00
yinjiaoyuan
fe65c7bf84 For 2034, GB28181: Support transport over TCP 2020-11-15 22:50:59 +08:00