182 Commits

Author SHA1 Message Date
winlin
758906353c Enable default configure test. 2025-10-28 10:04:53 -04:00
OSSRS-AI
315ae2cd3a AI: Add utest to cover encoder module. 2025-10-14 22:31:16 -04:00
Winlin
d9fe2c458c AI: GB28181: Remove embedded SIP server and enforce external SIP usage. v7.0.75 (#4466)
This PR removes the embedded GB28181 SIP server implementation from SRS
and enforces the use of external SIP servers for production deployments.

The embedded SIP server depended on the deprecated `http-parser`
library. With the planned migration to `llhttp` (which doesn't support
SIP parsing), maintaining the embedded SIP server would require
significant additional work. Since external SIP servers are already the
recommended approach for production, removing the embedded
implementation simplifies the codebase and eliminates this dependency.

Eliminated `srs_gb28181_test` from CI workflow.

Removed SIP configuration validation tests.

---------

Co-authored-by: OSSRS-AI <winlinam@gmail.com>
Co-authored-by: haibo.chen <495810242@qq.com>
2025-09-02 09:59:40 -04:00
winlin
6f039eb605 Retry if blackbox test fail. 2025-08-28 09:23:17 -04:00
Winlin
6ec97067de AI: Remove cygwin64, always enable WebRTC, and enforce C++98 compatibility. v7.0.60 (#4447)
This PR makes WebRTC a core feature of SRS and enforces C++98
compatibility by:

1. Always Enable WebRTC Support
- Remove `--rtc=on|off` configuration option - WebRTC is now always
enabled
- Eliminate all `#ifdef SRS_RTC` conditional compilation blocks
- Include WebRTC-related modules (RTC, SRTP, DTLS) in all builds
- Update build scripts to always link WebRTC dependencies

2. Enforce C++98 Compatibility  
- Remove `--cxx11=on|off` and `--cxx14=on|off` configuration options
- Force `SRS_CXX11=NO` and `SRS_CXX14=NO` in build system
- Move these options to deprecated section with warnings
- Ensure codebase maintains C++98 standard compatibility

3. Remove Windows/Cygwin Support
- Remove all Windows and Cygwin64 conditional compilation blocks (#ifdef
_WIN32, #ifdef CYGWIN64)
- Delete Cygwin64 build configurations from build scripts (
auto/options.sh, auto/depends.sh, configure)
- Remove Cygwin64 assembly files and State Threads platform support (
md_cygwin64.S)
- Eliminate Windows-specific GitHub Actions workflows and CI/CD jobs
- Remove NSIS packaging files and Windows installer generation
- Delete Windows documentation and update feature lists to mark support
as removed in v7.0
- Simplify OS detection to only support Unix-like systems (Linux, macOS)

4. Code Cleanup
- Remove conditional WebRTC code blocks throughout the codebase
- Simplify build configuration by removing WebRTC-related conditionals
- Update constructor delegation patterns to be C++98 compatible
- Fix vector initialization to use C++98 syntax
- Eliminate Windows-specific implementations for file operations, time
handling, and networking
- Unified platform handling with consistent POSIX API usage

---------

Co-authored-by: OSSRS-AI <winlinam@gmail.com>
2025-08-21 10:03:38 -06:00
Winlin
1d91da1989 Update bug_report.md 2025-07-10 08:00:26 -04:00
Haibo Chen(陈海博)
33b0a0fe7d Fix error about TestRtcPublish_HttpFlvPlay. v7.0.36 (#4363)
In the scenario of converting WebRTC to RTMP, this conversion will not
proceed until an SenderReport is received; for reference, see:
https://github.com/ossrs/srs/pull/2470.
Thus, if HTTP-FLV streaming is attempted before the SR is received, the
FLV Header will contain only audio, devoid of video content.
This error can be resolved by disabling `guess_has_av` in the
configuration file, since we can guarantee that both audio and video are
present in the test cases.

However, in the original regression tests, the
`TestRtcPublish_HttpFlvPlay` test case contains a bug:

5a404c089b/trunk/3rdparty/srs-bench/srs/rtc_test.go (L2421-L2424)

The test would pass when `hasAudio` is true and `hasVideo` is false,
which is actually incorrect. Therefore, it has been revised so that the
test now only passes if both values are true.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: winlin <winlinvip@gmail.com>
2025-05-29 14:07:56 -04:00
winlin
308bb6ec54 Upgrade actions worlflow image to Ubuntu 22.04
See https://github.com/actions/runner-images/issues/11101 for details.
2025-04-26 00:14:19 -04:00
Winlin or William
5881155095 Update feature_request.md 2025-04-16 19:08:54 -04:00
Haibo Chen(陈海博)
feb2abbd73 update geekyeggo/delete-artifact to 5.0.0. v5.0.221 v6.0.163 v7.0.25 (#4302)
>
https://github.com/marketplace/actions/delete-artifact?version=v5.0.0#-compatibility

The current version of `actions/upload-artifact` is `v4`, and the
corresponding version for `delete-artifact` should be `v5`.



---------

`TRANS_BY_GPT4`

---------

Co-authored-by: chundonglinlin <chundonglinlin@163.com>
Co-authored-by: winlin <winlinvip@gmail.com>

---------

Co-authored-by: john <hondaxiao@tencent.com>
2025-03-18 08:25:48 +08:00
Winlin or William
02f04456b0 Update FUNDING.yml
Please contribute to OpenCollective only, thanks!
2025-03-14 11:33:14 -04:00
Haibo Chen
6a612784d0 fix ci error. v5.0.219 v6.0.160 v7.0.22 (#4291)
Starting January 30th, 2025, GitHub Actions customers will no longer be
able to use v3 of
[actions/upload-artifact](https://github.com/actions/upload-artifact) or
[actions/download-artifact](https://github.com/actions/download-artifact).
Customers should update workflows to begin using [v4 of the artifact
actions](https://github.blog/2024-02-12-get-started-with-v4-of-github-actions-artifacts/).
Learn more:
https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/

---------

Co-authored-by: john <hondaxiao@tencent.com>
Co-authored-by: winlin <winlinvip@gmail.com>

---------

Co-authored-by: john <hondaxiao@tencent.com>
2025-02-20 12:26:24 +08:00
Winlin
0de887d374 Update bug_report.md 2024-10-09 11:29:35 +08:00
Winlin
2068aa4659 Update FUNDING.yml 2024-09-28 10:41:35 +08:00
winlin
d70e7357cf Release v6.0-a1, 6.0 alpha1, v6.0.155, 169636 lines. 2024-09-01 17:04:13 +08:00
winlin
47f8fe4395 Fix utest fail. 2024-08-22 18:56:21 +08:00
Winlin
9dba99a1cc SmartPtr: Support shared ptr for RTC source. v6.0.128 (#4085)
---------

Co-authored-by: Haibo Chen <495810242@qq.com>
2024-06-14 08:07:26 +08:00
Jacob Su
08971e5905 Build: Refine workflow for cygwin and remove scorecard. v6.0.120 (#3995)
#3983 already fixed the `test` workflow, but I think the `release` will
have same issue.

---------

Co-authored-by: winlin <winlinvip@gmail.com>
2024-03-26 16:37:33 +08:00
Winlin
b891c8b587 Disable patreon in FUNDING.yml 2024-03-19 20:00:01 +08:00
Jacob Su
954b1b7ef2 Typo: Fix some typos for #3973 #3976 #3982. v6.0.114 (#3973) 2024-03-18 10:17:00 +08:00
Winlin
22c2469414 Upgrade hls.js and set in low latency mode. v6.0.112 (#3924)
HLS typically has a delay of around 30 seconds, roughly comprising three
segments, each lasting 10 seconds. We can reduce the delay to about 5
seconds by lowering the segment duration to 2 seconds and starting
playback from the last segment, achieving a stable delay.

Of course, this requires setting the OBS's GOP to 1 second, and the
profile to baseline, preset to fast, and tune to zerolatency.
Additionally, updating a few configurations in the hls.js player is
necessary, such as setting it to start playback from the last segment,
setting the maximum buffer, and initiating accelerated playback to
reduce latency.

---------

Co-authored-by: chundonglinlin <chundonglinlin@163.com>
Co-authored-by: john <hondaxiao@tencent.com>
2024-02-05 21:37:29 +08:00
winlin
d7248bbb0e Update the template for issues. 2024-02-02 19:29:05 +08:00
john
3e463a8e56 Fix opus delay options, use ffmpeg-opus in docker test. v6.0.102 (#3883)
The `ffmpeg-opus` tool allows you to control the delay using the
`opus_delay` option. The minimum delay can be set to 2.5ms. However, in
practice, you cannot set it this low. You need to set at least 10 frames
to allow the audio encoder to lookahead. Otherwise, the sound will be
distorted.

---------

Co-authored-by: chundonglinlin <chundonglinlin@163.com>
2023-11-22 14:58:30 +08:00
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>
2023-11-16 18:17:04 +08:00
chundonglinlin
e7b629cd39 RTC: Refine FFmpeg opus audio noisy issue. v5.0.197 v6.0.97 (#3852)
### Description

When converting between AAC and Opus formats (aac2opus or opus2aac), the
`av_frame_get_buffer` API is frequently called.

### Objective

The goal is to optimize the code logic and reduce the frequent
allocation and deallocation of memory.

In the case of aac2opus, av_frame_get_buffer is still frequently called.
In the case of opus2aac, the goal is to avoid calling
av_frame_get_buffer and reduce memory allocations.

### Additional Note

Before calling the `av_audio_fifo_read` API, use
`av_frame_make_writable` to check if the frame is writable. If it is not
writable, create a new frame.

---------

Co-authored-by: john <hondaxiao@tencent.com>
2023-11-04 16:21:44 +08:00
Winlin
d10e16e335 Use new cache image name. v6.0.86 (#3815)
---------

Co-authored-by: john <hondaxiao@tencent.com>
2023-10-08 07:43:14 -05:00
winlin
42bd4a9fb8 Update the ISSUE TEMPALTE. 2023-09-26 09:34:29 +08:00
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>
2023-08-02 22:49:49 +08:00
Winlin
e19efe0bcd Support helm to optimize the deployment procedure of a SRS cluster. v6.0.64 (#3611)
1. Introduce a novel Docker tag in the x.y.z format, akin to the HELM
format, such as ossrs/srs:5.0.155.
2. Incorporate the SRS_PLATFORM flag for containers initiated through
HELM.

---------

`TRANS_BY_GPT3`

---------

Co-authored-by: chundonglinlin <chundonglinlin@163.com>
2023-07-27 09:07:31 +08:00
Winlin
8c061fcf5d Docker: Refine the main dockerfile. v6.0.54 (#3594)
------

Co-authored-by: Haibo Chen <495810242@qq.com>
2023-06-20 18:05:54 +08:00
john
113a3dd85e Fix crash when process rtcp feedback message. v5.0.159, v6.0.52 (#3591)
---------

Co-authored-by: johzzy <hellojinqiang@gmail.com>
2023-06-20 13:20:00 +08:00
Winlin
dcd02fe69c Support composited bridges for 1:N protocols converting. v6.0.41 (#3392)
Co-authored-by: john <hondaxiao@tencent.com>
Co-authored-by: chundonglinlin <chundonglinlin@163.com>
2023-04-01 21:34:59 +08:00
winlin
2ac9eb84bc Fix release bug. Release v6.0.36 2023-03-23 14:02:41 +08:00
winlin
35fd9be863 Scorecard: Pin some github actions. 2023-01-17 13:16:05 +08:00
winlin
8ea7d8b33f Scorecard: Add OpenSSF Best Practics badge. 2023-01-11 11:55:42 +08:00
winlin
1ead71891c Scorecard: Only update for 5.0release. 2023-01-11 11:39:05 +08:00
winlin
edb4866889 Actions: Rename workflow name. 2023-01-11 11:24:41 +08:00
Winlin
498ce72af8 SRS5: Config: Support better env name for prefixed with srs (#3370)
* Actions: Fix github action warnings.

* Forward: Bind the context id of source or stream.

* Config: Support better env names.

PICK a4e7427433

Co-authored-by: pengfei.ma <pengfei.ma@ctechm.com>
Co-authored-by: Haibo Chen <495810242@qq.com>
2023-01-11 10:57:24 +08:00
winlin
badf33c544 Scorecard: Delcare default permissions as read only except CodeQL. 2023-01-10 22:08:35 +08:00
Winlin
d34085615b Create scorecard.yml (#3374) 2023-01-10 21:17:13 +08:00
Winlin
f06a2d61f7 SRS5: DVR: Support blackbox test based on hooks. v5.0.132 (#3365)
PICK e655948e96
2023-01-07 21:34:09 +08:00
winlin
7a56208f2f Test: Use long duration for HLS balckbox test. 2023-01-04 19:33:48 +08:00
winlin
b104826a96 SRS5: Test: Run fast and slow blackbox tests seperately.
PICK 95b534ff10
2023-01-03 23:10:58 +08:00
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
2023-01-02 15:34:19 +08:00
winlin
7bd8682d40 SRS5: Script: Refine depends tools. v5.0.124
1. Never auto install tools now, user should do it.
2. Support --help and --version for SRS.
3. Install tools for cygwin64.

PICK e690c93bcf
2023-01-01 14:13:22 +08:00
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
2022-12-31 19:47:54 +08:00
winlin
39c9487a73 Support first SRS6 version. v6.0.10 2022-12-30 19:27:43 +08:00
Winlin
4bc716179b Use english template for issue. 2022-12-30 11:43:36 +08:00
winlin
2ed9516a35 SRS5: Actions: Fix github actions bug.
PICK fe3502e6ad
2022-12-26 18:06:38 +08:00
winlin
2e1d99002f SRS5: Actions: Fix GitHub actions warnings.
PICK 23b7939574
2022-12-26 18:04:14 +08:00