Skip to content

Commit

Permalink
Merge branch 'ossrs:develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
laurfb authored Oct 24, 2024
2 parents cdf1a4d + 101382a commit 7977332
Show file tree
Hide file tree
Showing 871 changed files with 21,312 additions and 7,317 deletions.
4 changes: 2 additions & 2 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
github: [winlinvip] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with patreon id.
open_collective: srs-server
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
Expand Down
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ assignees: ''

---

!!! Before submitting a new bug report, please ensure you have searched for any existing bugs. Duplicate issues or
questions that are overly simple or already addressed in the documentation will be removed without any
response.

**Describe the bug**
A clear and concise description of what the bug is.

Expand Down
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ assignees: ''

---

!!! Before submitting a new feature request, please ensure you have searched for any existing features and utilized
the `Ask AI` feature at https://ossrs.io or https://ossrs.net (for users in China). Duplicate issues or
questions that are overly simple or already addressed in the documentation will be removed without any
response.

**What is the business background? Please provide a description.**
Who are the users? How do they utilize this feature? What problem does this feature address?

Expand Down
35 changes: 19 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: "Release"
on:
push:
tags:
- v6*
- v7*

# For draft, need write permission.
permissions:
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
- name: Run SRS regression-test
run: |
docker run --rm srs:test bash -c 'make && \
./objs/srs -c conf/regression-test.conf && \
./objs/srs -c conf/regression-test.conf && sleep 10 && \
cd 3rdparty/srs-bench && make && ./objs/srs_test -test.v'
runs-on: ubuntu-20.04

Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
# See https://github.com/cygwin/cygwin-install-action#parameters
# Note that https://github.com/egor-tensin/setup-cygwin fails to install packages.
- name: Setup Cygwin
uses: cygwin/cygwin-install-action@db475590d56881c6cef7b3f96f6f3dd9532ea1f4 # master
uses: cygwin/cygwin-install-action@006ad0b0946ca6d0a3ea2d4437677fa767392401 # master
with:
platform: x86_64
packages: bash make gcc-g++ cmake automake patch pkg-config tcl unzip
Expand Down Expand Up @@ -250,7 +250,7 @@ jobs:
echo "SRS_TAG=${{ needs.envs.outputs.SRS_TAG }}" >> $GITHUB_ENV
echo "SRS_VERSION=${{ needs.envs.outputs.SRS_VERSION }}" >> $GITHUB_ENV
echo "SRS_MAJOR=${{ needs.envs.outputs.SRS_MAJOR }}" >> $GITHUB_ENV
echo "SRS_MAJOR=${{ needs.envs.outputs.SRS_XYZ }}" >> $GITHUB_ENV
echo "SRS_XYZ=${{ needs.envs.outputs.SRS_XYZ }}" >> $GITHUB_ENV
##################################################################################################################
# Git checkout
- name: Checkout repository
Expand All @@ -276,7 +276,9 @@ jobs:
echo "Release ossrs/srs:$SRS_TAG"
docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 \
--output "type=image,push=true" \
-t ossrs/srs:$SRS_TAG --build-arg SRS_AUTO_PACKAGER=$PACKAGER -f Dockerfile .
-t ossrs/srs:$SRS_TAG --build-arg SRS_AUTO_PACKAGER=$PACKAGER \
--build-arg CONFARGS='--sanitizer=off --gb28181=on' \
-f Dockerfile .
# Docker alias images
# TODO: FIXME: If stable, please set the latest from 5.0 to 6.0
- name: Docker alias images for ossrs/srs
Expand Down Expand Up @@ -304,7 +306,7 @@ jobs:
echo "SRS_TAG=${{ needs.envs.outputs.SRS_TAG }}" >> $GITHUB_ENV
echo "SRS_VERSION=${{ needs.envs.outputs.SRS_VERSION }}" >> $GITHUB_ENV
echo "SRS_MAJOR=${{ needs.envs.outputs.SRS_MAJOR }}" >> $GITHUB_ENV
echo "SRS_MAJOR=${{ needs.envs.outputs.SRS_XYZ }}" >> $GITHUB_ENV
echo "SRS_XYZ=${{ needs.envs.outputs.SRS_XYZ }}" >> $GITHUB_ENV
# Aliyun ACR
# TODO: FIXME: If stable, please set the latest from 5.0 to 6.0
- name: Login aliyun hub
Expand Down Expand Up @@ -406,6 +408,7 @@ jobs:
echo "SRS_TAG=${{ needs.envs.outputs.SRS_TAG }}" >> $GITHUB_ENV
echo "SRS_VERSION=${{ needs.envs.outputs.SRS_VERSION }}" >> $GITHUB_ENV
echo "SRS_MAJOR=${{ needs.envs.outputs.SRS_MAJOR }}" >> $GITHUB_ENV
echo "SRS_XYZ=${{ needs.envs.outputs.SRS_XYZ }}" >> $GITHUB_ENV
echo "SRS_RELEASE_ID=${{ needs.draft.outputs.SRS_RELEASE_ID }}" >> $GITHUB_ENV
echo "SRS_PACKAGE_ZIP=${{ needs.linux.outputs.SRS_PACKAGE_ZIP }}" >> $GITHUB_ENV
echo "SRS_PACKAGE_MD5=${{ needs.linux.outputs.SRS_PACKAGE_MD5 }}" >> $GITHUB_ENV
Expand Down Expand Up @@ -446,23 +449,23 @@ jobs:
* Binary: ${{ env.SRS_CYGWIN_MD5 }} [${{ env.SRS_CYGWIN_TAR }}](https://gitee.com/ossrs/srs/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_CYGWIN_TAR }})
## Docker
* [docker pull ossrs/srs:${{ env.SRS_MAJOR }}](https://ossrs.io/lts/en-us/docs/v5/doc/getting-started)
* [docker pull ossrs/srs:${{ env.SRS_TAG }}](https://ossrs.io/lts/en-us/docs/v5/doc/getting-started)
* [docker pull ossrs/srs:${{ env.SRS_XYZ }}](https://ossrs.io/lts/en-us/docs/v5/doc/getting-started)
* [docker pull ossrs/srs:${{ env.SRS_MAJOR }}](https://ossrs.io/lts/en-us/docs/v7/doc/getting-started)
* [docker pull ossrs/srs:${{ env.SRS_TAG }}](https://ossrs.io/lts/en-us/docs/v7/doc/getting-started)
* [docker pull ossrs/srs:${{ env.SRS_XYZ }}](https://ossrs.io/lts/en-us/docs/v7/doc/getting-started)
## Docker Mirror: aliyun.com
* [docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_MAJOR }}](https://ossrs.net/lts/zh-cn/docs/v5/doc/getting-started)
* [docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_TAG }}](https://ossrs.net/lts/zh-cn/docs/v5/doc/getting-started)
* [docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_XYZ }}](https://ossrs.net/lts/zh-cn/docs/v5/doc/getting-started)
* [docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_MAJOR }}](https://ossrs.net/lts/zh-cn/docs/v7/doc/getting-started)
* [docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_TAG }}](https://ossrs.net/lts/zh-cn/docs/v7/doc/getting-started)
* [docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_XYZ }}](https://ossrs.net/lts/zh-cn/docs/v7/doc/getting-started)
## Doc: ossrs.io
* [Getting Started](https://ossrs.io/lts/en-us/docs/v5/doc/getting-started)
* [Wiki home](https://ossrs.io/lts/en-us/docs/v5/doc/introduction)
* [Getting Started](https://ossrs.io/lts/en-us/docs/v7/doc/getting-started)
* [Wiki home](https://ossrs.io/lts/en-us/docs/v7/doc/introduction)
* [FAQ](https://ossrs.io/lts/en-us/faq), [Features](https://github.com/ossrs/srs/blob/${{ github.sha }}/trunk/doc/Features.md#features) or [ChangeLogs](https://github.com/ossrs/srs/blob/${{ github.sha }}/trunk/doc/CHANGELOG.md#changelog)
## Doc: ossrs.net
* [快速入门](https://ossrs.net/lts/zh-cn/docs/v5/doc/getting-started)
* [中文Wiki首页](https://ossrs.net/lts/zh-cn/docs/v5/doc/introduction)
* [快速入门](https://ossrs.net/lts/zh-cn/docs/v7/doc/getting-started)
* [中文Wiki首页](https://ossrs.net/lts/zh-cn/docs/v7/doc/introduction)
* [中文FAQ](https://ossrs.net/lts/zh-cn/faq), [功能列表](https://github.com/ossrs/srs/blob/${{ github.sha }}/trunk/doc/Features.md#features) 或 [修订历史](https://github.com/ossrs/srs/blob/${{ github.sha }}/trunk/doc/CHANGELOG.md#changelog)
draft: false
prerelease: true
Expand Down
73 changes: 0 additions & 73 deletions .github/workflows/scorecard.yml

This file was deleted.

9 changes: 5 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
# See https://github.com/cygwin/cygwin-install-action#parameters
# Note that https://github.com/egor-tensin/setup-cygwin fails to install packages.
- name: Setup Cygwin
uses: cygwin/cygwin-install-action@db475590d56881c6cef7b3f96f6f3dd9532ea1f4 # master
uses: cygwin/cygwin-install-action@006ad0b0946ca6d0a3ea2d4437677fa767392401 # master
with:
platform: x86_64
packages: bash make gcc-g++ cmake automake patch pkg-config tcl unzip
Expand Down Expand Up @@ -190,15 +190,16 @@ jobs:
docker run --rm -w /srs/trunk/3rdparty/srs-bench srs:test \
./objs/srs_blackbox_test -test.v -test.run '^TestFast' -test.parallel 64
docker run --rm -w /srs/trunk/3rdparty/srs-bench srs:test \
./objs/srs_blackbox_test -test.v -test.run '^TestSlow' -test.parallel 4
./objs/srs_blackbox_test -test.v -test.run '^TestSlow' -test.parallel 1
# For utest
- name: Run SRS utest
run: docker run --rm srs:test ./objs/srs_utest
# For regression-test
- name: Run SRS regression-test
run: |
docker run --rm srs:test bash -c './objs/srs -c conf/regression-test.conf && \
cd 3rdparty/srs-bench && ./objs/srs_test -test.v && ./objs/srs_gb28181_test -test.v'
docker run --rm srs:test bash -c './objs/srs -c conf/regression-test.conf && sleep 10 && \
cd 3rdparty/srs-bench && (./objs/srs_test -test.v || (cat ../../objs/srs.log && exit 1)) && \
./objs/srs_gb28181_test -test.v'
runs-on: ubuntu-20.04

coverage:
Expand Down
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
*.pyc
*.swp
.DS_Store
.vscode
.vscode/*
/trunk/Makefile
/trunk/objs
/trunk/src/build-qt-Desktop-Debug
Expand All @@ -42,4 +40,6 @@ cmake-build-debug
/trunk/ide/srs_clion/Makefile
/trunk/ide/srs_clion/cmake_install.cmake
/trunk/ide/srs_clion/srs
/trunk/ide/srs_clion/Testing/
/trunk/ide/srs_clion/Testing/
/trunk/ide/vscode-build

1 change: 0 additions & 1 deletion .run/private.run.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="private" type="CMakeRunConfiguration" factoryName="Application" PROGRAM_PARAMS="-c console.conf" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" WORKING_DIR="file://$CMakeCurrentBuildDir$/../../../" PASS_PARENT_ENVS_2="true" PROJECT_NAME="srs" TARGET_NAME="srs" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="srs" RUN_TARGET_NAME="srs">
<envs>
<env name="SRS_RTC_SERVER_ENABLED" value="on" />
<env name="MallocNanoZone" value="0" />
</envs>
<method v="2">
Expand Down
38 changes: 38 additions & 0 deletions .vscode/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Debug with VSCode

Support run and debug with VSCode.

## SRS

Install the following extensions:

- CMake Tools
- CodeLLDB
- C/C++ Extension Pack

Open the folder like `~/git/srs` in VSCode.
Run commmand `> CMake: Configure` to configure the project.

> Note: You can press `Ctrl+R`, then type `CMake: Configure` then select `Clang` as the toolchain.
> Note: The `settings.json` is used to configure the cmake. It will use `${workspaceFolder}/trunk/ide/srs_clion/CMakeLists.txt`
> and `${workspaceFolder}/trunk/ide/vscode-build` as the source file and build directory.
Click the `Run > Run Without Debugging` button to start the server.

> Note: The `launch.json` is used for running and debugging. The build will output the binary to
> `${workspaceFolder}/trunk/ide/vscode-build/srs`.
## Proxy

Install the following extensions:

- Go

Open the folder like `~/git/srs` in VSCode.

Select the `View > Run` and select `Launch srs-proxy` to start the proxy server.

Click the `Run > Run Without Debugging` button to start the server.

> Note: The `launch.json` is used for running and debugging.
36 changes: 36 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch SRS",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/trunk/ide/vscode-build/srs",
"args": ["-c", "conf/console.conf"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/trunk",
"environment": [],
"externalConsole": false,
"MIMode": "lldb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "build",
"logging": {
"engineLogging": true
}
},
{
"name": "Launch srs-proxy",
"type": "go",
"request": "launch",
"mode": "auto",
"cwd": "${workspaceFolder}/proxy",
"program": "${workspaceFolder}/proxy"
}
]
}
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"cmake.sourceDirectory": "${workspaceFolder}/trunk/ide/srs_clion",
"cmake.buildDirectory": "${workspaceFolder}/trunk/ide/vscode-build",
"cmake.configureOnOpen": false
}
17 changes: 17 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "shell",
"command": "cmake --build ${workspaceFolder}/trunk/ide/vscode-build",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": ["$gcc"],
"detail": "Build SRS by cmake."
}
]
}

4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ARG SRS_AUTO_PACKAGER
RUN echo "BUILDPLATFORM: $BUILDPLATFORM, TARGETPLATFORM: $TARGETPLATFORM, PACKAGER: ${#SRS_AUTO_PACKAGER}, CONFARGS: ${CONFARGS}, MAKEARGS: ${MAKEARGS}, INSTALLDEPENDS: ${INSTALLDEPENDS}"

# https://serverfault.com/questions/949991/how-to-install-tzdata-on-a-ubuntu-docker-image
ENV DEBIAN_FRONTEND noninteractive
ENV DEBIAN_FRONTEND=noninteractive

# To use if in RUN, see https://github.com/moby/moby/issues/7281#issuecomment-389440503
# Note that only exists issue like "/bin/sh: 1: [[: not found" for Ubuntu20, no such problem in CentOS7.
Expand All @@ -29,7 +29,7 @@ WORKDIR /srs/trunk
# Build and install SRS.
# Note that SRT is enabled by default, so we configure without --srt=on.
# Note that we have copied all files by make install.
RUN ./configure --sanitizer=off --gb28181=on --h265=on ${CONFARGS} && make ${MAKEARGS} && make install
RUN ./configure ${CONFARGS} && make ${MAKEARGS} && make install

############################################################
# dist
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2013-2023 The SRS Authors
Copyright (c) 2013-2024 The SRS Authors

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
Loading

0 comments on commit 7977332

Please sign in to comment.