Commit Graph

46 Commits (develop)

Author SHA1 Message Date
ChenGH 13597d1b7f
update copyright to 2025. v5.0.218 v6.0.159 v7.0.21 (#4271)
update copyright to 2025

---------

Co-authored-by: john <hondaxiao@tencent.com>
Co-authored-by: winlin <winlinvip@gmail.com>
3 weeks ago
Winlin 20c8e6423b
SmartPtr: Fix SRT source memory leaking. v6.0.134 (#4106)
---------

Co-authored-by: john <hondaxiao@tencent.com>
7 months ago
Winlin 1f9309ae25
SmartPtr: Support load test for source by srs-bench. v6.0.130 (#4097)
1. Add live benchmark support in srs-bench, which only connects and
disconnects without any media transport, to test source creation and
disposal and verify source memory leaks.
2. SmartPtr: Support cleanup of HTTP-FLV stream. Unregister the HTTP-FLV
handler for the pattern and clean up the objects and resources.
3. Support benchmarking RTMP/SRT with srs-bench by integrating the gosrt
and oryx RTMP libraries.
4. Refine SRT and RTC sources by using a timer to clean up the sources,
following the same strategy as the Live source.

---------

Co-authored-by: Haibo Chen <495810242@qq.com>
Co-authored-by: Jacob Su <suzp1984@gmail.com>
8 months ago
Jacob Su 908c2f2a30
Fix hevc test failures (#4087)
Try to fix two blackbox test:
1. TestSlow_SrtPublish_HttpTsPlay_HEVC_Basic: fixed by enlarge the wait
time from 3 seconds to 4 before run ffprobe task, which will record the
stream by ffmpeg first.
2 TestSlow_SrtPublish_HlsPlay_HEVC_Basic: fixed by wait 16 seconds
before run ffprobe task.
About the 2 case: it seems ridiculous to add 16 seconds delay before run
ffprobe task.

> So, I start #4088 to check the github action workflow process, I start
this branch from a very earlier version `6.0.113
(srs/core/srs_core_version6.hpp)`, what I found it that, inside `SRS
blackbox-test`, the srs version `6.0.128`, the latest version, was
printed. That's really wired.

I confirmed this is not the SRS source code's problem, check
https://github.com/suzp1984/srs/actions/runs/9511600525/job/26218025559
the srs code 6.0.113 was checkout and running actions based on them,
still met same problem.

---------

Co-authored-by: winlin <winlinvip@gmail.com>
8 months ago
Winlin 9dba99a1cc
SmartPtr: Support shared ptr for RTC source. v6.0.128 (#4085)
---------

Co-authored-by: Haibo Chen <495810242@qq.com>
8 months ago
Winlin ce2ce1542f
Add a TCP proxy for debugging. v6.0.117 (#3958)
When debugging the RTMP protocol, we can capture packets using tcpdump
and then replay the pcap file. For example:

```bash
cd ~/git/srs/trunk/3rdparty/srs-bench/pcap
tcpdump -i any -w t.pcap tcp port 1935
go run . -f ./t.pcap -s 127.0.0.1:1935
```

However, sometimes due to poor network conditions between the server and
the client, there may be many retransmitted packets. In such cases,
setting up a transparent TCP proxy that listens on port 1935 and
forwards to port 19350 can be a solution:

```bash
./objs/srs -c conf/origin.conf 
cd 3rdparty/srs-bench/tcpproxy/ && go run main.go
tcpdump -i any -w t.pcap tcp port 19350
```

This approach allows for the implementation of packet dumping,
multipoint replication, or the provision of detailed timestamps and byte
information at the proxy. It enables the collection of debugging
information without the need to modify the server.



---------

`TRANS_BY_GPT4`

---------

Co-authored-by: john <hondaxiao@tencent.com>
11 months ago
john 24235d8b6a
Fix the test fail when enable ffmpeg-opus. v6.0.100 (#3868)
1. After enabling FFmpeg opus, the transcoding time for each opus packet
is around 4ms.
2. To speed up case execution, our test publisher sends 400 opus packets
at intervals of 1ms.
3. After the publisher starts, wait for 30ms, then the player starts.
4. Due to the lengthy processing time for each opus packet, SRS
continuously receives packets from the publisher, so it doesn't switch
coroutines and can't accept the player's connection.
5. Only after all opus packets are processed will it accept the player
connection. Therefore, the player doesn't receive any data, leading to
the failure of the case.

---------

Co-authored-by: winlin <winlinvip@gmail.com>
1 year ago
Winlin 6f42ca67cb
Support SRS Stack token for authentication. v6.0.74 (#3794)
When accessing the SRS Stack, you should log in and use a token for each
request, or utilize the HTTP API with a secret Bearer token included in
every request. The SRS Stack HTTP API proxies both /api/v1 and /rtc/v1
to the SRS HTTP API while ensuring secure authentication. Additionally,
there is a console in the SRS Stack that requires the same token to
request the SRS Stack HTTP API, which is then proxied to the SRS HTTP
API.

The SRS Stack runs SRS with the HTTP API listening at 127.0.0.1:1985 on
the local loopback interface, allowing only the SRS Stack to access it
without authentication. All other users must login and access the SRS
Stack through its interface, rather than directly accessing the SRS HTTP
API within the SRS Stack.

---------

Co-authored-by: panda <542638787@qq.com>
1 year ago
Loken fe38804e61
Incorrect use of two "int i" instances. (#3759) 2 years ago
Winlin 73dd8af4c9
HLS: Ignore empty NALU to avoid error. v6.0.65 (#3750)
For the DJI M30, there is a bug where empty NALU packets with a size of
zero are causing issues with HLS streaming. This bug leads to random
unpublish events due to the SRS disconnecting the connection for the HLS
module when it fails to handle empty NALU packets.

To address this bug, we have patched the system to ignore any empty NALU
packets with a size of zero. Additionally, we have created a tool in the
srs-bench to replay pcapng files captured by tcpdump or Wireshark. We
have also added utest using mprotect and asan to detect any memory
corruption.

It is important to note that this bug has been fixed in versions 4.0.271
6477f31004 and 5.0.170
939f6b484b. This patch specifically
addresses the issue in SRS 6.0.

Please be aware that there is another commit related to this bug that
partially fixes the issue but still leaves a small problem for asan to
detect memory corruption. This commit,
577cd299e1, only ignores empty NALU
packets but still reads beyond the memory.

---------

Co-authored-by: chundonglinlin <chundonglinlin@163.com>
2 years ago
Winlin df854339ea
TEST: Upgrade pion to v3.2.9. (#3567)
------

Co-authored-by: chundonglinlin <chundonglinlin@163.com>
2 years ago
Haibo Chen 771ae0a1a6
API: Support HTTP basic authentication for API. v6.0.4, v5.0.152 (#3458)
Co-authored-by: winlin <winlin@vip.126.com>
Co-authored-by: john <hondaxiao@tencent.com>
2 years ago
Haibo Chen 67867242fc
GB: Support HEVC for regression test and load tool for GB. (#3416)
Co-authored-by: Winlin <winlin@vip.126.com>
Co-authored-by: chundonglinlin <chundonglinlin@163.com>
2 years ago
chundonglinlin ef90da352e
H265: Support HEVC over SRT.(#465) v6.0.20 (#3366)
* H265: Refine demux vps/sps/pps interface for SRT and GB.
* H265: Support HEVC over SRT.(#465)
* UTest: add hevc vps/sps/pps utest.
* SRT: fix mpegts.js play hevc http-flv error.
* UTest: add HTTP-TS and HTTP-FLV blackbox test.
* Update release v6.0.20

Co-authored-by: Winlin <winlin@vip.126.com>
Co-authored-by: Haibo Chen <495810242@qq.com>
Co-authored-by: john <hondaxiao@tencent.com>
2 years ago
mapengfei53 edba2c25f1
HEVC: Support DVR HEVC stream to MP4. v6.0.14 (#3360)
* DVR: Support mp4 blackbox test based on hooks.
* HEVC: Support DASH HEVC stream
* Refine blackbox test. v6.0.14

Co-authored-by: pengfei.ma <pengfei.ma@ctechm.com>
Co-authored-by: winlin <winlin@vip.126.com>
2 years ago
Winlin f06a2d61f7 SRS5: DVR: Support blackbox test based on hooks. v5.0.132 (#3365)
PICK e655948e96
2 years ago
winlin 232de03c56 SRS5: Test: Add blackbox test for SRT.
PICK 62963b206f
2 years ago
winlin 7a56208f2f Test: Use long duration for HLS balckbox test. 2 years ago
winlin b104826a96 SRS5: Test: Run fast and slow blackbox tests seperately.
PICK 95b534ff10
2 years ago
winlin 57d205d5a0 Test: Use the fatest preset for HEVC blackbox test. 2 years ago
winlin 81969b3dbf SRS5: Test: Add chunksize and atc blackbox test for RTMP.
PICK c31a8076bb
2 years ago
winlin 99f61cb225 Test: Add RTMP/FLV/TS blackbox test for HEVC. (#465) 2 years ago
Winlin 3e5362fbff SRS5: Test: Add blackbox for MP3 audio codec. v5.0.129 (#296) (#465)
PICK e3a4ff9fa1
PICK 3b59972a90
2 years ago
Winlin c68db59eeb
Test: Add blackbox for HEVC over HLS. (#3356) 2 years ago
winlin 2cab98aa68 SRS5: Test: Add blackbox for HLS.
PICK 30779f3b5a
2 years ago
Winlin 4c2db0073a SRS5: Test: Support blackbox test by FFmpeg. v5.0.128 (#3355)
1. Enable blackbox test for each PR and push.
2. Refine Makefile and README for srs-bench.
3. Add blackbox using FFmpeg and ffprobe.
4. Add blackbox basic test for RTMP stream.
5. Add blackbox basic test for HTTP-FLV stream.
6. Fix utest rand seed issue.

PICK 2141d220b4
2 years ago
winlin 3f7c4a7ff4 GB28181: Enable regression test for gb28181. v5.0.122
1. Build regression test tool for gb28181.
2. Run regression test for gb28181.
3. Format go code and eliminate logs.
4. Change base docker to ubuntu20.

PICK 7750bdae10
2 years ago
Winlin a36cb57949
FLV: Support set default has_av and disable guessing. v5.0.110 (#3311)
* FLV: Support set default has_av and disable guessing. v5.0.110

1. Support config default has_audio and has_video.
2. Support disable guessing has_audio or has_video.

* FLV: Reset to false if start to guess has_av.

* FLV: Add regression test for FLV header av metadata.
2 years ago
Winlin 4551200e95
FLV: Drop packet if header flag is not matched. v5.0.109 (#3306)
1. Ignore audo or video packets if FLV header disable it.
2. Run: Add regression test config and run for IDEA.
3. Test: Refine regression test to allow no audio/video for FLV
4. Config: Whether drop packet if not match header.
2 years ago
winlin c12deded98 GB28181: Fix bug for parsing GB to RTC. 2 years ago
Winlin 5a420ece3b
GB28181: Support GB28181-2016 protocol. v5.0.74 (#3201)
01. Support GB config as StreamCaster.
02. Support disable GB by --gb28181=off.
03. Add utests for SIP examples.
04. Wireshark plugin to decode TCP/9000 as rtp.rfc4571
05. Support MPEGPS program stream codec.
06. Add utest for PS stream codec.
07. Decode MPEGPS packet stream.
08. Carry RTP and PS packet as helper in PS message.
09. Support recover from error mode.
10. Support process by a pack of PS/TS messages.
11. Add statistic for recovered and msgs dropped.
12. Recover from err position fastly.
13. Define state machine for GB session.
14. Bind context to GB session.
15. Re-invite when media disconnected.
16. Update GitHub actions with GB28181.
17. Support parse CANDIDATE by env or pip.
18. Support mux GB28181 to RTMP.
19. Support regression test by srs-bench.
2 years ago
winlin cd7e5a131e Squash: SRS 4.0, Stat the oc(origin cluster). 3 years ago
winlin b874d9c9ba Squash: Merge SRS 4.0, regression test for RTMP. 3 years ago
winlin a81aa2edc5 Squash: Merge SRS 4.0 3 years ago
winlin 85620a34f5 Squash: Fix rtc to rtmp sync timestamp using sender report. #2470 4 years ago
winlin 3d58e98d1c Squash: Support github actions for CI 4 years ago
winlin 9bf5005bdd Squash: Merge SRS4 4 years ago
winlin 301a8ceadb Squash: Merge SRS 4.0 4 years ago
winlin becbe45bcd SquashSRS4: Add demo for RTC 4 years ago
winlin 543377ebf1 Test: Update srs-bench 4 years ago
winlin b7b474deba SquashSRS4: Update srs-bench. 4 years ago
winlin ccbc11c2d6 Test: Fix bug for srs-bench. 4 years ago
winlin c07b7db3c5 Test: Update srs-bench. 4 years ago
winlin e74810230a SquashSRS4: Regine DTLS and add regression tests. 4.0.84 4 years ago
winlin bb3bd1705e Refine the regression test tool, add missing files 4 years ago
winlin 876210f6c9 For regression test, add srs-bench to 3rdparty 4 years ago