Commit Graph

2075 Commits (5.0release)

Author SHA1 Message Date
winlin d9cc57a3f3 Release v5.0-r2, 5.0 release2, v5.0.210, 163515 lines.
winlin f32c8c31c0 Release v5.0-r1, 5.0 release1, v5.0.208, 163441 lines.
winlin 55026a4fc7 Release v5.0-r0, 5.0 release0, v5.0.205, 163363 lines.
winlin f1b419df4c Release v5.0-b7, 5.0 beta7, v5.0.200, 163305 lines.
winlin fb7a000f47 Release v5.0-b6, 5.0 beta6, v5.0.195, 163303 lines.
john 56a4ca3f7e Disable asan by default. v5.0.192 ()
---------

Co-authored-by: john <hondaxiao@tencent.com>
肖志宏 8b80566f78 Use new cache image name. v5.0.186
winlin ed0be6c7dc Release v5.0-b5, 5.0 beta5, v5.0.185, 163254 lines.
winlin ea1f96e6c5 Release v5.0-b4, 5.0 beta4, v5.0.176, 162919 lines.
Winlin 8d6b882034 HLS: Fix on_hls and hls_dispose critical zone issue. v5.0.174 ()
on_hls and hls_dispose are two coroutines, with potential race
conditions. That is, during on_hls, if the API Server being accessed is
slower, it will switch to the hls_dispose coroutine to start cleaning
up. However, when the API Server is processing the slice, a situation
may occur where the slice does not exist, resulting in the following
log:

```
[2023-08-22 12:03:20.309][WARN][40][x5l48q7b][11] ignore task failed code=4005(HttpStatus)(Invalid HTTP status code) : callback on_hls http://localhost:2024/terraform/v1/hooks/srs/hls : http: post http://localhost:2024/terraform/v1/hooks/srs/hls with {"server_id":"vid-5d7dxn8","service_id":"cu153o7g","action":"on_hls","client_id":"x5l48q7b","ip":"172.17.0.1","vhost":"__defaultVhost__","app":"live","tcUrl":"srt://172.17.0.2/live","stream":"stream-44572-2739617660809856576","param":"secret=1ed8e0ffbc53439c8fc8da30ab8c19f0","duration":4.57,"cwd":"/usr/local/srs-stack/platform","file":"./objs/nginx/html/live/stream-44572-2739617660809856576-1.ts","url":"live/stream-44572-2739617660809856576-1.ts","m3u8":"./objs/nginx/html/live/stream-44572-2739617660809856576.m3u8","m3u8_url":"live/stream-44572-2739617660809856576.m3u8","seq_no":1,"stream_url":"/live/stream-44572-2739617660809856576","stream_id":"vid-0n9zoz3"}, status=500, res=invalid ts file ./objs/nginx/html/live/stream-44572-2739617660809856576-1.ts: stat ./objs/nginx/html/live/stream-44572-2739617660809856576-1.ts: no such file or directory
thread [40][x5l48q7b]: call() [./src/app/srs_app_hls.cpp:122][errno=11]
thread [40][x5l48q7b]: on_hls() [./src/app/srs_app_http_hooks.cpp:401][errno=11]
thread [40][x5l48q7b]: do_post() [./src/app/srs_app_http_hooks.cpp:638][errno=11]

[error] 2023/08/22 12:03:20.076984 [52][1001] Serve /terraform/v1/hooks/srs/hls failed, err is stat ./objs/nginx/html/live/stream-44572-2739617660809856576-1.ts: no such file or directory
invalid ts file ./objs/nginx/html/live/stream-44572-2739617660809856576-1.ts
main.handleOnHls.func1.1
	/g/platform/srs-hooks.go:684
main.handleOnHls.func1
	/g/platform/srs-hooks.go:720
net/http.HandlerFunc.ServeHTTP
	/usr/local/go/src/net/http/server.go:2084
net/http.(*ServeMux).ServeHTTP
	/usr/local/go/src/net/http/server.go:2462
net/http.serverHandler.ServeHTTP
	/usr/local/go/src/net/http/server.go:2916
net/http.(*conn).serve
	/usr/local/go/src/net/http/server.go:1966
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:1571
```

Similarly, when stopping the stream, on_hls will also be called to
handle the last slice. If the API Server is slower at this time, it will
enter hls_dispose and call unpublish repeatedly. Since the previous
unpublish is still blocked in on_hls, the following interference log
will appear:

```
[2023-08-22 12:03:18.748][INFO][40][6498088c] hls cycle to dispose hls /live/stream-44572-2739617660809856576, timeout=10000000ms
[2023-08-22 12:03:18.752][WARN][40][6498088c][115] flush audio ignored, for segment is not open.
[2023-08-22 12:03:18.752][WARN][40][6498088c][115] ignore the segment close, for segment is not open.
```

Although this log will not cause problems, it can interfere with
judgment.

The solution is to add an 'unpublishing' status. If it is in the
'unpublishing' status, then do not clean up the slices.

---------

Co-authored-by: Haibo Chen <495810242@qq.com>
Winlin fdcff383ae Support include empty config file. v5.0.173 ()
SRS supports including another configuration in the include package.
When generating configurations, we can only generate the changed
configurations, while the unchanged configurations are in the fixed
files, for example:

```nginx
listen 1935;
include server.conf;
```

In `server.conf`, we can manage the changing configurations with the
program:

```nginx
http_api { enabled on; }
```

However, during system initialization, we often create an empty
`server.conf`, and the content is generated only after the program
starts, so `server.conf` might be an empty file. This also makes it
convenient to use a script to confirm the existence of this file:

```bash
touch server.conf
```

Currently, SRS does not support empty configurations and will report an
error. This PR is to solve this problem, making it more convenient to
use include.

`TRANS_BY_GPT4`

---------

Co-authored-by: Haibo Chen <495810242@qq.com>
winlin c3d265c07c Release v5.0-b3, 5.0 beta3, v5.0.170, 162704 lines.
winlin 4811dd76f8 Release v5.0-b2, 5.0 beta2, v5.0.166, 162520 lines.
Winlin 883ef7513b Switch to 5.0 document, because it's beta now. ()
------

Co-authored-by: john <hondaxiao@tencent.com>
winlin 1713a542ed Release v5.0-b1, 5.0 beta1, v5.0.157, 162494 lines.
chundonglinlin 79fd66d8e6 SSL: Fix SSL_get_error get the error of other coroutine. v5.0.156, v6.0.46 ()
---------

Co-authored-by: john <hondaxiao@tencent.com>
Co-authored-by: winlin <winlin@vip.126.com>
winlin 6e77653cdc Release v5.0-b0, 5.0 beta0, v5.0.155, 162600 lines.
winlin 55fbee3304 Release v5.0-a5, 5.0 alpha5, v5.0.148, 162066 lines.
winlin af7f5b3c55 Release v5.0-a4, 5.0 alpha4, v5.0.141, 161897 lines.
winlin b602e47e1c Update the dev code for SRS
winlin a47b3a7842 Release v5.0-a3, 5.0 alpha3, v5.0.128, 161327 lines.
winlin e6f40bd0c7 Release v5.0-a2, 5.0 alpha2, v5.0.112, 161233 lines.
winlin 56be854f36 Update README.
winlin 8adb1693cc Release v5.0-a1, 5.0 alpha1, v5.0.100, 160817 lines.
winlin aa5496aa69 Release v5.0-a0, 5.0 alpha0, v5.0.98, 159813 lines.
winlin 237d60a55d Coverage: Refine the codecov link.
winlin daa7fd2247 Create 5.0release branch, features freezed.
winlin cdbebb3729 Merge branch '4.0release' into develop
winlin 2573a25101 Release v4.0-r4, 4.0 release4, v4.0.268, 145482 lines.
winlin 8dcbcd1656 GB28181: Update README for GB28181.
winlin f02656f946 Merge branch '4.0release' into develop
winlin 64c2ac8176 Release v4.0-r3, 4.0 release3, v4.0.265, 145328 lines.
winlin 18d25eacfb Merge 4.0release
winlin fe2002794f Release v4.0-r2, 4.0 release2, v4.0.257, 144890 lines.
winlin f911e3861b Refine README badges.
winlin 4126c42118 Speedup test by refine the task dependencies.
winlin 50be42a8ed Fix README link issue.
winlin f7280399d4 Merge 4.0release, migrate to new website.
winlin 7b23a42139 Migrate license to new website.
winlin cd85a96255 Update SRS image for r.ossrs.net
winlin 57be5188c3 Merge branch '4.0release' into develop
winlin a2cfec2dcc Update SRS image for r.ossrs.net
winlin d525d27e64 Merge from 4.0release
winlin 1f0ea3fdf5 Docker: Support x86_64, armv7 and aarch64 docker image (). v4.0.252
winlin 2633f03954 SRS: YouTube channel online.
winlin e14c3a946d Update README.
winlin 1e2f8dc299 Update README for single node architecture.
winlin 2d50fb0882 Update LICENSE.
winlin 3bc17488bc Update SRS 4.0 single node arch.
winlin d38b8fcf1d Update SRS 4.0 single node arch.