Skip to content

Commit

Permalink
Squash: Move GB28181 to feature/gb28181. 5.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Jun 16, 2021
1 parent 4982608 commit efdbf37
Show file tree
Hide file tree
Showing 39 changed files with 50 additions and 9,885 deletions.
11 changes: 1 addition & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@ jobs:
- run: |
echo "Build SRS without NASM or SRTP-NASM" &&
cd trunk && ./configure --nasm=off --srtp-nasm=off && make
build-c7-gb28181:
docker:
- image: ossrs/srs:dev
steps:
- checkout
- run: |
echo "Build SRS with GB28181" &&
cd trunk && ./configure --gb28181=on && make
build-c7-srt:
docker:
- image: ossrs/srs:dev
Expand Down Expand Up @@ -111,7 +103,7 @@ jobs:
- checkout
- run: |
echo "Build and run utest for SRS" &&
cd trunk && ./configure --gb28181=on --utest=on --gcov=on && make &&
cd trunk && ./configure --utest=on --gcov=on && make &&
./objs/srs_utest && bash auto/codecov.sh
run-regression-test:
docker:
Expand Down Expand Up @@ -140,7 +132,6 @@ workflows:
- run-regression-test
- build-c7-nortc
- build-c7-noasm
- build-c7-gb28181
- build-c7-srt
- build-c8-baseline
- build-c8-srt
Expand Down
10 changes: 2 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ The changelog for SRS.

## SRS 5.0 Changelog

* v5.0, 2021-06-16, Change [GB28181](https://github.com/ossrs/srs/issues/1500) to [feature/gb28181](https://github.com/ossrs/srs/tree/feature/gb28181). 5.0.4
* v5.0, 2021-05-31, Use [SPDX-License-Identifier: MIT](https://spdx.dev/ids/). 5.0.3
* v5.0, 2021-05-19, ST: Simplify it, only Linux/Darwin, epoll/kqueue, single process. 5.0.2
* v5.0, 2021-03-17, Live: Refine edge to follow client and HTTP/302. 5.0.1
Expand All @@ -15,16 +16,14 @@ The changelog for SRS.

## SRS 4.0 Changelog

* v4.0, 2021-06-16, Change [GB28181](https://github.com/ossrs/srs/issues/1500) to [feature/gb28181](https://github.com/ossrs/srs/tree/feature/gb28181). 4.0.127
* v4.0, 2021-06-01, Support --shared-ffmpeg to link with *.so for LGPL license. 4.0.126
* v4.0, 2021-06-01, Support --shared-srt to link with *.so for MPL license. 4.0.125
* v4.0, 2021-05-31, Use [SPDX-License-Identifier: MIT](https://spdx.dev/ids/). 4.0.124
* v4.0, 2021-05-28, Fix bugs for GB28181 and RTC. 4.0.123
* v4.0, 2021-05-21, Fix [#2370][bug #2370] bug for Firefox play stream(published by Chrome). 4.0.121
* v4.0, 2021-05-21, RTC: Refine sdk, migrate from onaddstream to ontrack. 4.0.120
* v4.0, 2021-05-21, Tools: Refine configure options. 4.0.119
* v4.0, 2021-05-20, Fix build fail when disable RTC by --rtc=off. 4.0.118
* v4.0, 2021-05-19, Fix [#2362][bug #2362]: Allow WebRTC to play before publishing, for GB28181 as such. 4.0.117
* v4.0, 2021-05-18, Fix [#2355][bug #2355]: GB28181: Fix play by RTC bug. 4.0.116
* v4.0, 2021-05-15, SRT: Build SRT from source by SRS. 4.0.115
* v4.0, 2021-05-15, Rename SrsConsumer* to SrsLiveConsumer*. 4.0.114
* v4.0, 2021-05-15, Rename SrsRtcStream* to SrsRtcSource*. 4.0.113
Expand Down Expand Up @@ -72,7 +71,6 @@ The changelog for SRS.
* v4.0, 2021-01-08, HTML5 video tag resolution adaptive. 4.0.59
* v4.0, 2021-01-08, Fix memory leak and bugs for RTC. 4.0.58
* v4.0, 2021-01-06, Merge #2109, Refine srs_string_split.
* v4.0, 2021-01-06, Merge #2109, Fix bugs for GB28181.
* v4.0, 2020-12-24, Support disable CherryPy. 4.0.57
* v4.0, 2020-11-12, For [#1998][bug #1998], Support Firefox, use PT in offer. 4.0.55
* v4.0, 2020-11-11, For [#1508][bug #1508], Transform http header name to upper camel case. 4.0.54
Expand All @@ -90,10 +88,8 @@ The changelog for SRS.
* v4.0, 2020-07-25, RTC: Support multiple address for client. 4.0.36
* v4.0, 2020-07-11, Refine log context with random string. 4.0.35
* v4.0, 2020-07-04, Fix some bugs for RTC. 4.0.34
* v4.0, 2020-07-03, Merge [#1830][bug #1830] to fix bugs in GB28181. 4.0.33
* v4.0, 2020-06-24, Support static link c++ libraries. 4.0.32
* v4.0, 2020-06-23, Change log cid from int to string. 4.0.31
* v4.0, 2020-06-13, GB28181 with JitterBuffer support. 4.0.30
* v4.0, 2020-06-03, Support enable C++11. 4.0.29
* v4.0, 2020-05-31, Remove [srs-librtmp](https://github.com/ossrs/srs/issues/1535#issuecomment-633907655). 4.0.28
* v4.0, 2020-05-21, For [#307][bug #307], disable GSO and sendmmsg. 4.0.27
Expand All @@ -102,10 +98,8 @@ The changelog for SRS.
* v4.0, 2020-04-30, For [#307][bug #307], support publish RTC with passing opus. 4.0.24
* v4.0, 2020-04-14, For [#307][bug #307], support sendmmsg, GSO and reuseport. 4.0.23
* v4.0, 2020-04-05, For [#307][bug #307], SRTP ASM only works with openssl-1.0, auto detect it. 4.0.22
* v4.0, 2020-04-04, Merge RTC and GB28181, with bugs fixed. 4.0.21
* v4.0, 2020-04-04, For [#307][bug #307], refine RTC latency from 600ms to 200ms. 4.0.20
* v4.0, 2020-04-03, For [#307][bug #307], build SRTP with openssl to improve performance. 4.0.19
* v4.0, 2020-03-31, For [#1500][bug #1500], support push stream by GB28181. 4.0.18
* v4.0, 2020-03-31, Play stream by WebRTC on iOS/Android/PC browser. 4.0.17
* v4.0, 2020-03-28, Support multiple OS/Platform build cache. 4.0.16
* v4.0, 2020-03-28, For [#1250][bug #1250], support macOS, OSX, MacbookPro, Apple Darwin.
Expand Down
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
[![](https://codecov.io/gh/ossrs/srs/branch/develop/graph/badge.svg)](https://codecov.io/gh/ossrs/srs/branch/develop)
[![](https://cloud.githubusercontent.com/assets/2777660/22814959/c51cbe72-ef92-11e6-81cc-32b657b285d5.png)](https://github.com/ossrs/srs/wiki/v1_CN_Contact#wechat)

SRS/4.0,[Leo][release4],是一个简单高效的实时视频服务器,支持RTMP/WebRTC/HLS/HTTP-FLV/SRT/GB28181
SRS/4.0,[Leo][release4],是一个简单高效的实时视频服务器,支持RTMP/WebRTC/HLS/HTTP-FLV/SRT。

SRS is a simple, high efficiency and realtime video server, supports RTMP/WebRTC/HLS/HTTP-FLV/SRT/GB28181.
SRS is a simple, high efficiency and realtime video server, supports RTMP/WebRTC/HLS/HTTP-FLV/SRT.

SRS is licenced under [MIT][LICENSE], but some depended libraries are distributed using their [own licenses][LicenseMixing].

Expand Down Expand Up @@ -69,7 +69,6 @@ Fast index for Wikis:

Other important wiki:

* Usage: How to publish GB28181 to SRS? [#1500](https://github.com/ossrs/srs/issues/1500#issuecomment-606695679)
* Usage: How to delivery DASH(Experimental)?([CN][v4_CN_SampleDASH], [EN][v4_EN_SampleDASH])
* Usage: How to transode RTMP stream by FFMPEG?([CN][v4_CN_SampleFFMPEG], [EN][v4_EN_SampleFFMPEG])
* Usage: How to delivery HTTP FLV Live Streaming Cluster?([CN][v4_CN_SampleHttpFlvCluster], [EN][v4_EN_SampleHttpFlvCluster])
Expand Down Expand Up @@ -121,9 +120,6 @@ For optional stream caster services, to push streams to SRS:
* udp://8935, Stream Caster: [Push MPEGTS over UDP](https://github.com/ossrs/srs/wiki/v4_CN_Streamer#push-mpeg-ts-over-udp) server.
* tcp://554, Stream Caster: [Push RTSP](https://github.com/ossrs/srs/wiki/v4_CN_Streamer#push-rtsp-to-srs) server.
* tcp://8936, Stream Caster: [Push HTTP-FLV](https://github.com/ossrs/srs/wiki/v4_CN_Streamer#push-http-flv-to-srs) server.
* tcp://5060, Stream Caster: [Push GB28181 SIP](https://github.com/ossrs/srs/issues/1500#issuecomment-606695679) server.
* udp://9000, Stream Caster: [Push GB28181 Media(bundle)](https://github.com/ossrs/srs/issues/1500#issuecomment-606695679) server.
* udp://58200-58300, Stream Caster: [Push GB28181 Media(no-bundle)](https://github.com/ossrs/srs/issues/1500#issuecomment-606695679) server.
* udp://10080, Stream Caster: [Push SRT Media](https://github.com/ossrs/srs/issues/1147#issuecomment-577469119) server.

For external services to work with SRS:
Expand Down Expand Up @@ -176,7 +172,7 @@ For external services to work with SRS:
- [x] [Experimental] Support transcode RTMP/AAC to WebRTC/Opus, [#307][bug #307].
- [x] [Experimental] Support AV1 codec for WebRTC, [#2324][bug #2324].
- [x] [Experimental] Enhance HTTP Stream Server for HTTP-FLV, HTTPS, HLS etc. [#1657][bug #1657].
- [x] [Experimental] Support push stream by GB28181, [#1500][bug #1500].
- [ ] Support push stream by GB28181, [#1500][bug #1500].
- [x] [Experimental] Support DVR in MP4 format, read [#738][bug #738].
- [x] [Experimental] Support MPEG-DASH, the future live streaming protocol, read [#299][bug #299].
- [x] [Experimental] Support pushing MPEG-TS over UDP, please read [bug #250][bug #250].
Expand Down Expand Up @@ -307,7 +303,7 @@ The stream architecture of SRS.
| MediaSource(2) | | |
| (MPEGTSoverUDP | | |
| HTTP-FLV, --push-+->- StreamCaster(4) -(rtmp)-+-> SRS |
| GB28181,SRT, | | |
| SRT, | | |
| ......) | | |
+----------------------+ | |
| FFMPEG --push(srt)--+->- SRTModule(5) ---(rtmp)-+-> SRS |
Expand Down
6 changes: 0 additions & 6 deletions trunk/auto/auto_headers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,6 @@ else
srs_undefine_macro "SRS_SIMULATOR" $SRS_AUTO_HEADERS_H
fi

if [ $SRS_GB28181 = YES ]; then
srs_define_macro "SRS_GB28181" $SRS_AUTO_HEADERS_H
else
srs_undefine_macro "SRS_GB28181" $SRS_AUTO_HEADERS_H
fi

if [ $SRS_HTTPS = YES ]; then
srs_define_macro "SRS_HTTPS" $SRS_AUTO_HEADERS_H
else
Expand Down
9 changes: 0 additions & 9 deletions trunk/auto/depends.sh
Original file line number Diff line number Diff line change
Expand Up @@ -299,15 +299,6 @@ function OSX_prepare()
echo "Please install pkg-config"; exit -1;
fi

if [[ $SRS_GB28181 == YES ]]; then
if [[ ! -f /usr/local/opt/libiconv/lib/libiconv.a ]]; then
echo "install libiconv"
echo "brew install libiconv"
brew install libiconv; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
echo "install libiconv success"
fi
fi

if [[ $SRS_SRT == YES ]]; then
echo "SRT enable, install depend tools"
tclsh <<< "exit" >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
Expand Down
51 changes: 28 additions & 23 deletions trunk/auto/options.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ help=no
SRS_HDS=NO
SRS_SRT=NO
SRS_RTC=RESERVED
SRS_GB28181=NO
SRS_CXX11=YES
SRS_CXX14=NO
SRS_NGINX=NO
Expand Down Expand Up @@ -115,7 +114,6 @@ Features:
--utest=on|off Whether build the utest. Default: $(value2switch $SRS_UTEST)
--srt=on|off Whether build the SRT. Default: $(value2switch $SRS_SRT)
--rtc=on|off Whether build the WebRTC. Default: $(value2switch $SRS_RTC)
--gb28181=on|off Whether build the GB28181. Default: $(value2switch $SRS_GB28181)
--cxx11=on|off Whether enable the C++11. Default: $(value2switch $SRS_CXX11)
--cxx14=on|off Whether enable the C++14. Default: $(value2switch $SRS_CXX14)
--ffmpeg-fit=on|off Whether enable the FFmpeg fit(source code). Default: $(value2switch $SRS_FFMPEG_FIT)
Expand Down Expand Up @@ -265,10 +263,6 @@ function parse_user_option() {
--simulator) SRS_SIMULATOR=$(switch2value $value) ;;
--ffmpeg-fit) SRS_FFMPEG_FIT=$(switch2value $value) ;;

--with-gb28181) SRS_GB28181=YES ;;
--without-gb28181) SRS_GB28181=NO ;;
--gb28181) SRS_GB28181=$(switch2value $value) ;;

--cxx11) SRS_CXX11=$(switch2value $value) ;;
--cxx14) SRS_CXX14=$(switch2value $value) ;;

Expand Down Expand Up @@ -356,14 +350,18 @@ function parse_user_option_to_value_and_option() {
esac
}

# For variable values, might be three values: YES, RESERVED, NO(by default).
function value2switch() {
if [[ $1 == YES ]]; then
echo on;
elif [[ $1 == RESERVED ]]; then
echo reserved;
else
echo off;
fi
}

# For user options, only off or on(by default).
function switch2value() {
if [[ $1 == off ]]; then
echo NO;
Expand All @@ -384,12 +382,7 @@ do
parse_user_option
done

if [ $help = yes ]; then
show_help
exit 0
fi

function apply_detail_options() {
function apply_auto_options() {
# set default preset if not specifies
if [[ $SRS_X86_X64 == NO && $SRS_OSX == NO && $SRS_CROSS_BUILD == NO ]]; then
SRS_X86_X64=YES; opt="--x86-x64 $opt";
Expand All @@ -416,6 +409,28 @@ function apply_detail_options() {
if [ $SRS_TRANSCODE = YES ]; then SRS_FFMPEG_STUB=YES; fi
if [ $SRS_INGEST = YES ]; then SRS_FFMPEG_STUB=YES; fi

if [[ $SRS_SRTP_ASM == YES && $SRS_RTC == NO ]]; then
echo "Disable SRTP-ASM, because RTC is disabled."
SRS_SRTP_ASM=NO
fi

if [[ $SRS_SRTP_ASM == YES && $SRS_NASM == NO ]]; then
echo "Disable SRTP-ASM, because NASM is disabled."
SRS_SRTP_ASM=NO
fi
}

if [ $help = yes ]; then
apply_auto_options
show_help
exit 0
fi

#####################################################################################
# apply options
#####################################################################################

function apply_detail_options() {
# Always enable HTTP utilies.
if [ $SRS_HTTP_CORE = NO ]; then SRS_HTTP_CORE=YES; echo -e "${YELLOW}[WARN] Always enable HTTP utilies.${BLACK}"; fi
if [ $SRS_STREAM_CASTER = NO ]; then SRS_STREAM_CASTER=YES; echo -e "${YELLOW}[WARN] Always enable StreamCaster.${BLACK}"; fi
Expand All @@ -435,17 +450,8 @@ function apply_detail_options() {
else
export SRS_JOBS="--jobs=${SRS_JOBS}"
fi

if [[ $SRS_SRTP_ASM == YES && $SRS_RTC == NO ]]; then
echo "Disable SRTP-ASM, because RTC is disabled."
SRS_SRTP_ASM=NO
fi

if [[ $SRS_SRTP_ASM == YES && $SRS_NASM == NO ]]; then
echo "Disable SRTP-ASM, because NASM is disabled."
SRS_SRTP_ASM=NO
fi
}
apply_auto_options
apply_detail_options

function regenerate_options() {
Expand Down Expand Up @@ -473,7 +479,6 @@ function regenerate_options() {
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --srt=$(value2switch $SRS_SRT)"
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --rtc=$(value2switch $SRS_RTC)"
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --simulator=$(value2switch $SRS_SIMULATOR)"
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --gb28181=$(value2switch $SRS_GB28181)"
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --cxx11=$(value2switch $SRS_CXX11)"
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --cxx14=$(value2switch $SRS_CXX14)"
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --ffmpeg-fit=$(value2switch $SRS_FFMPEG_FIT)"
Expand Down
83 changes: 0 additions & 83 deletions trunk/conf/full.conf
Original file line number Diff line number Diff line change
Expand Up @@ -366,89 +366,6 @@ stream_caster {
listen 8936;
}

# GB28181
stream_caster {
# whether stream caster is enabled.
# default: off
enabled on;
# the caster type of stream, the casters:
# gb28181, Push GB28181 to SRS.
caster gb28181;
# the output rtmp url.
# for gb28181 caster, the typically output url:
# rtmp://127.0.0.1/live/[stream]
# where the [stream] is the VideoChannelCodecID.
output rtmp://127.0.0.1/live/[stream];
# the listen port for stream caster.
# for gb28181 caster, listen at udp port. for example, 9000.
# @remark We can bundle all gb28181 to this port, to reuse this port.
# User can choose to bundle port in API port_mode or SIP invite_port_fixed.
listen 9000;
# Listen as TCP if on; otherwise, listen as UDP.
# default: off
tcp_enable off;
# If not bundle ports, use specified ports for each stream.
rtp_port_min 58200;
rtp_port_max 58300;
# Whether wait for keyframe then forward to RTMP.
# default: on
wait_keyframe on;
# Max timeout in seconds for RTP stream, if timeout, RTCP bye and close stream.
# default: 30
rtp_idle_timeout 30;
# Whether has audio.
# @remark Flash/RTMP only supports 11025 22050 44100 sample rate, if not the audio may corrupt.
# default: off
audio_enable off;
# The exposed IP to receive media stream.
# * Retrieve server IP automatically, from all network interfaces.
# eth0 Retrieve server IP by specified network interface name. # TODO: Implements it.
# $CANDIDATE Read the IP from ENV variable $EIP, use * if not set, see https://github.com/ossrs/srs/issues/307#issuecomment-599028124
# x.x.x.x A specified IP address or DNS name, which can be access by client such as Chrome.
# You can specific more than one interface name:
# eth0 eth1 Use network interface eth0 and eth1. # TODO: Implements it.
# Also by IP or DNS names:
# 192.168.1.3 10.1.2.3 rtc.me # TODO: Implements it.
# And by multiple ENV variables:
# $CANDIDATE $EIP # TODO: Implements it.
# default: *
host *;
#The media channel is automatically created according to the received RTP packet,
# and the channel ID is generated according to the RTP SSRC
# channelid format: 'chid[ssrc]' [ssrc] is rtp's ssrc
auto_create_channel off;

sip {
# Whether enable embeded SIP server.
# default: on
enabled on;
# The SIP listen port.
# default: 5060
listen 5060;
# The SIP server ID.
# default: 34020000002000000001
serial 34020000002000000001;
# The SIP server domain.
# default: 3402000000
realm 3402000000;
# The SIP ACK response timeout in seconds.
# default: 30
ack_timeout 30;
# The keepalive timeout in seconds.
# default: 120
keepalive_timeout 120;
# Whether play immediately after registered.
# default: on
auto_play on;
# Whether bundle media stream port.
# default: on
invite_port_fixed on;
# interval to query equipment list from equipment or subordinate domain, unit(s)
# default: 60
query_catalog_interval 60;
}
}

#############################################################################################
# SRT server section
#############################################################################################
Expand Down
Loading

0 comments on commit efdbf37

Please sign in to comment.