1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

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
This commit is contained in:
winlin 2022-12-31 17:15:07 +08:00
parent bc381a0242
commit 3f7c4a7ff4
32 changed files with 3882 additions and 9727 deletions

View file

@ -7,10 +7,20 @@ WebRTC benchmark on [pion/webrtc](https://github.com/pion/webrtc) for [SRS](http
编译和使用:
```bash
git clone https://github.com/ossrs/srs-bench.git && git checkout feature/rtc &&
make && ./objs/srs_bench -h
git clone -b feature/rtc https://github.com/ossrs/srs-bench.git &&
cd srs-bench && make && ./objs/srs_bench -h
```
编译和启动SRS:
```bash
git clone https://github.com/ossrs/srs.git &&
cd srs/trunk && ./configure && make &&
./objs/srs -c conf/console.conf
```
请按下面的操作启动测试。
## Player for Live
直播播放压测,一个流,很多个播放。
@ -102,11 +112,7 @@ ffmpeg -re -i doc/source.200kbps.768x320.flv -c copy -f flv -y rtmp://localhost/
回归测试需要先启动[SRS](https://github.com/ossrs/srs/issues/307)支持WebRTC推拉流
```bash
if [[ ! -z $(ifconfig en0 inet| grep 'inet '|awk '{print $2}') ]]; then
docker run -p 1935:1935 -p 8080:8080 -p 1985:1985 -p 8000:8000/udp \
--rm --env CANDIDATE=$(ifconfig en0 inet| grep 'inet '|awk '{print $2}')\
registry.cn-hangzhou.aliyuncs.com/ossrs/srs:4 objs/srs -c conf/rtc.conf
fi
./objs/srs -c conf/rtc.conf
```
然后运行回归测试用例,如果只跑一次,可以直接运行:
@ -235,6 +241,12 @@ make && ./objs/srs_bench -sfu gb28181 --help
go test ./gb28181 -mod=vendor -v -count=1
```
也可以用make编译出重复使用的二进制
```bash
make && ./objs/srs_gb28181_test -test.v
```
支持的参数如下:
* `-srs-sip`SIP服务器地址。默认值`tcp://127.0.0.1:5060`