1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-12 19:31:53 +00:00
Commit graph

5 commits

Author SHA1 Message Date
john
56a4ca3f7e Disable asan by default. v5.0.192 (#3840)
---------

Co-authored-by: john <hondaxiao@tencent.com>
2023-10-17 23:07:35 +08:00
john
3da81e4b75 Refine docker detect mechenism. v5.0.190 (#3758)
When using Docker, logs are usually printed to console (stdout and
stderr). However, since Docker detection occurs late, after log
initialization, the default log output may be incorrect. In Docker, logs
may still be written to a file instead of the console as expected.

Additionally, the Dockerfile has been improved with a new environment
variable `SRS_IN_DOCKER=on` to clearly indicate a Docker environment. If
automatic Docker detection fails, the configuration will be read, and
this variable will correctly inform SRS that it's in a Docker
environment.

Lastly, the default configuration values have been improved for Docker
environments. By default, `SRS_LOG_TANK=console` and daemon mode is
disabled.

---------

Co-authored-by: john <hondaxiao@tencent.com>
2023-10-17 21:27:07 +08:00
john
75c9c5a849 Solve the problem of inaccurate HLS TS duration. v5.0.187 (#3824) 2023-10-09 20:29:27 +08:00
Winlin
0df81c3b34 Support HTTP-API for fetching reload result. v5.0.176 (#3779)
During a Reload, several stages will be passed through:
1. Parsing new configurations: Parse.
2. Transforming configurations: Transform.
3. Applying configurations: Apply.

Previously, any error at any stage would result in a direct exit, making
the system completely dependent on configuration checks:

```bash
./objs/srs -c conf/srs.conf -t
echo $?
```

Optimized to: If an error occurs before applying the configuration, it
can be ignored. If an error occurs during the application of the
configuration, some of the configuration may have already taken effect,
leading to unpredictable behavior, so SRS will exit directly.

Added a new HTTP API to query the result of the reload.

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

```bash
curl http://localhost:1985/api/v1/raw?rpc=reload-fetch
```

```json
{
  "code": 0,
  "data": {
    "err": 0,
    "msg": "Success",
    "state": 0,
    "rid": "0s6y0n9"
  }
}

{
  "code": 0,
  "data": {
    "err": 1023,
    "msg": "code=1023(ConfigInvalid) : parse file : parse buffer containers/conf/srs.release-local.conf : root parse : parse dir : parse include buffer containers/data/config/srs.vhost.conf : read token, line=0, state=0 : line 3: unexpected end of file, expecting ; or \"}\"",
    "state": 1,
    "rid": "0g4z471"
  }
}
```

This way, you can know if the last reload of the system was successful.

---------

Co-authored-by: Haibo Chen <495810242@qq.com>
2023-08-30 19:36:11 +08:00
chundonglinlin
29271a46d3 Compile: Fix typo for 3rdparty. v5.0.166, v6.0.59 (#3615)
---------

Co-authored-by: john <hondaxiao@tencent.com>
2023-07-10 08:22:34 +08:00
Renamed from trunk/Dockerfile (Browse further)