diff --git a/.circleci/config.yml b/.circleci/config.yml index 59be9a326..518e1bb57 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 @@ -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: @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index 590c207bd..924315100 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,16 +15,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 @@ -72,7 +70,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 @@ -90,10 +87,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 @@ -102,10 +97,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. diff --git a/README.md b/README.md index a25606da5..b3d4dea6c 100755 --- a/README.md +++ b/README.md @@ -5,9 +5,9 @@ [](https://codecov.io/gh/ossrs/srs/branch/develop) [](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]. @@ -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]) @@ -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: @@ -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]. @@ -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 | diff --git a/trunk/auto/auto_headers.sh b/trunk/auto/auto_headers.sh index fa6a55e58..589861869 100755 --- a/trunk/auto/auto_headers.sh +++ b/trunk/auto/auto_headers.sh @@ -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 diff --git a/trunk/auto/depends.sh b/trunk/auto/depends.sh index 559b5fc88..b773488e3 100755 --- a/trunk/auto/depends.sh +++ b/trunk/auto/depends.sh @@ -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 diff --git a/trunk/auto/options.sh b/trunk/auto/options.sh index d0e96229a..972fc9ce7 100755 --- a/trunk/auto/options.sh +++ b/trunk/auto/options.sh @@ -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 @@ -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) @@ -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) ;; @@ -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; + else if [[ $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; @@ -473,7 +471,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)" diff --git a/trunk/conf/full.conf b/trunk/conf/full.conf index ba07d9a25..cb580a0a0 100644 --- a/trunk/conf/full.conf +++ b/trunk/conf/full.conf @@ -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 ############################################################################################# diff --git a/trunk/conf/push.gb28181.conf b/trunk/conf/push.gb28181.conf deleted file mode 100644 index 0890dd94f..000000000 --- a/trunk/conf/push.gb28181.conf +++ /dev/null @@ -1,143 +0,0 @@ -# push gb28181 stream to SRS. - -listen 1935; -max_connections 1000; -daemon off; -srs_log_tank console; - -http_api { - enabled on; - listen 1985; -} - -http_server { - enabled on; - listen 8080; -} - -stats { - network 0; -} - -stream_caster { - enabled on; - caster gb28181; - - # 转发流到rtmp服务器地址与端口 - # TODO: https://github.com/ossrs/srs/pull/1679/files#r400875104 - # [stream] is VideoChannelCodecID(视频通道编码ID) for sip - # 自动创建的道通[stream] 是‘chid[ssrc]’ [ssrc]是rtp的ssrc - # [ssrc] rtp中的ssrc - output rtmp://127.0.0.1:1935/live/[stream]; - - # 接收设备端rtp流的多路复用端口 - listen 9000; - # 多路复用端口类型,on为tcp,off为udp - # 默认:on - tcp_enable on; - - # rtp接收监听端口范围,最小值 - rtp_port_min 58200; - # rtp接收监听端口范围,最大值 - rtp_port_max 58300; - - # 是否等待关键帧之后,再转发, - # off:不需等待,直接转发 - # on:等第一个关键帧后,再转发 - wait_keyframe on; - - # rtp包空闲等待时间,如果指定时间没有收到任何包 - # rtp监听连接自动停止,发送BYE命令 - rtp_idle_timeout 30; - - # 是否转发音频流 - # 目前只支持aac格式,所以需要设备支持aac格式 - # on:转发音频 - # off:不转发音频,只有视频 - # *注意*!!!:flv 只支持11025 22050 44100 三种 - # 如果设备端没有三种中任何一个,转发时为自动选择一种格式 - # 同时也会将adts的头封装在flv aac raw数据中 - # 这样的话播放器为自动通过adts头自动选择采样频率 - # 像ffplay, vlc都可以,但是flash是没有声音, - # 因为flash,只支持11025 22050 44100 - audio_enable off; - - # 是否开启rtp缓冲 - # 开启之后能有效解决rtp乱序等问题 - # tcp模式建议关闭 - jitterbuffer_enable off; - - # 服务器主机号,可以域名或ip地址 - # 也就是设备端将媒体发送的地址,如果是服务器是内外网 - # 需要写外网地址, - # 调用api创建stream session时返回ip地址也是host - # $CANDIDATE 是系统环境变量,从环境变量获取地址,如果没有配置,用* - # *代表指定stats network 的网卡号地址,如果没有配置network,默认则是第0号网卡地址 - # TODO: https://github.com/ossrs/srs/pull/1679/files#r400917594 - host $CANDIDATE; - - #根据收到ps rtp包自带创建rtmp媒体通道,不需要api接口创建 - #rtmp地址参数[stream] 就是通道id 格式chid[ssrc] - auto_create_channel off; - - sip { - # 是否启用srs内部sip信令 - # 为on信令走srs, off 只转发ps流 - enabled on; - - # sip监听udp端口 - listen 5060; - - # SIP server ID(SIP服务器ID). - # 设备端配置编号需要与该值一致,否则无法注册 - serial 34020000002000000001; - - # SIP server domain(SIP服务器域) - realm 3402000000; - - # 服务端发送ack后,接收回应的超时时间,单位为秒 - # 如果指定时间没有回应,认为失败 - ack_timeout 30; - - # 设备心跳维持时间,如果指定时间内(秒)没有接收一个心跳 - # 认为设备离线 - keepalive_timeout 120; - - # 注册之后是否自动给设备端发送invite - # on: 是 off 不是,需要通过api控制 - auto_play on; - # 设备将流发送的端口,是否固定 - # on 发送流到多路复用端口 如9000 - # off 自动从rtp_mix_port - rtp_max_port 之间的值中 - # 选一个可以用的端口 - invite_port_fixed on; - - # 向设备或下级域查询设备列表的间隔,单位(秒) - # 默认60秒 - query_catalog_interval 60; - } -} - -rtc_server { - enabled on; - # Listen at udp://8000 - listen 8000; - # - # The $CANDIDATE means fetch from env, if not configed, use * as default. - # - # The * means retrieving server IP automatically, from all network interfaces, - # @see https://github.com/ossrs/srs/issues/307#issuecomment-599028124 - candidate $CANDIDATE; -} - -vhost __defaultVhost__ { - rtc { - enabled on; - bframe discard; - } - - http_remux { - enabled on; - mount [vhost]/[app]/[stream].flv; - } -} diff --git a/trunk/conf/push.gb28181.tcp.conf b/trunk/conf/push.gb28181.tcp.conf deleted file mode 100644 index 257195afd..000000000 --- a/trunk/conf/push.gb28181.tcp.conf +++ /dev/null @@ -1,143 +0,0 @@ -# push gb28181 stream to SRS. - -listen 1935; -max_connections 1000; -daemon off; -srs_log_tank console; - -http_api { - enabled on; - listen 1985; -} - -http_server { - enabled on; - listen 8080; -} - -stats { - network 0; -} - -stream_caster { - enabled on; - caster gb28181; - - # 转发流到rtmp服务器地址与端口 - # TODO: https://github.com/ossrs/srs/pull/1679/files#r400875104 - # [stream] is VideoChannelCodecID(视频通道编码ID) for sip - # 自动创建的道通[stream] 是‘chid[ssrc]’ [ssrc]是rtp的ssrc - # [ssrc] rtp中的ssrc - output rtmp://127.0.0.1:1935/live/[stream]; - - # 接收设备端rtp流的多路复用端口 - listen 9000; - # 多路复用端口类型,on为tcp,off为udp - # 默认:off - tcp_enable on; - - # rtp接收监听端口范围,最小值 - rtp_port_min 58200; - # rtp接收监听端口范围,最大值 - rtp_port_max 58300; - - # 是否等待关键帧之后,再转发, - # off:不需等待,直接转发 - # on:等第一个关键帧后,再转发 - wait_keyframe on; - - # rtp包空闲等待时间,如果指定时间没有收到任何包 - # rtp监听连接自动停止,发送BYE命令 - rtp_idle_timeout 30; - - # 是否转发音频流 - # 目前只支持aac格式,所以需要设备支持aac格式 - # on:转发音频 - # off:不转发音频,只有视频 - # *注意*!!!:flv 只支持11025 22050 44100 三种 - # 如果设备端没有三种中任何一个,转发时为自动选择一种格式 - # 同时也会将adts的头封装在flv aac raw数据中 - # 这样的话播放器为自动通过adts头自动选择采样频率 - # 像ffplay, vlc都可以,但是flash是没有声音, - # 因为flash,只支持11025 22050 44100 - audio_enable off; - - # 是否开启rtp缓冲 - # 开启之后能有效解决rtp乱序等问题 - # tcp模式建议关闭 - jitterbuffer_enable off; - - # 服务器主机号,可以域名或ip地址 - # 也就是设备端将媒体发送的地址,如果是服务器是内外网 - # 需要写外网地址, - # 调用api创建stream session时返回ip地址也是host - # $CANDIDATE 是系统环境变量,从环境变量获取地址,如果没有配置,用* - # *代表指定stats network 的网卡号地址,如果没有配置network,默认则是第0号网卡地址 - # TODO: https://github.com/ossrs/srs/pull/1679/files#r400917594 - host $CANDIDATE; - - #根据收到ps rtp包自带创建rtmp媒体通道,不需要api接口创建 - #rtmp地址参数[stream] 就是通道id 格式chid[ssrc] - auto_create_channel off; - - sip { - # 是否启用srs内部sip信令 - # 为on信令走srs, off 只转发ps流 - enabled on; - - # sip监听udp端口 - listen 5060; - - # SIP server ID(SIP服务器ID). - # 设备端配置编号需要与该值一致,否则无法注册 - serial 34020000002000000001; - - # SIP server domain(SIP服务器域) - realm 3402000000; - - # 服务端发送ack后,接收回应的超时时间,单位为秒 - # 如果指定时间没有回应,认为失败 - ack_timeout 30; - - # 设备心跳维持时间,如果指定时间内(秒)没有接收一个心跳 - # 认为设备离线 - keepalive_timeout 120; - - # 注册之后是否自动给设备端发送invite - # on: 是 off 不是,需要通过api控制 - auto_play on; - # 设备将流发送的端口,是否固定 - # on 发送流到多路复用端口 如9000 - # off 自动从rtp_mix_port - rtp_max_port 之间的值中 - # 选一个可以用的端口 - invite_port_fixed on; - - # 向设备或下级域查询设备列表的间隔,单位(秒) - # 默认60秒 - query_catalog_interval 60; - } -} - -rtc_server { - enabled on; - # Listen at udp://8000 - listen 8000; - # - # The $CANDIDATE means fetch from env, if not configed, use * as default. - # - # The * means retrieving server IP automatically, from all network interfaces, - # @see https://github.com/ossrs/srs/issues/307#issuecomment-599028124 - candidate $CANDIDATE; -} - -vhost __defaultVhost__ { - rtc { - enabled on; - bframe discard; - } - - http_remux { - enabled on; - mount [vhost]/[app]/[stream].flv; - } -} diff --git a/trunk/configure b/trunk/configure index c5f16d253..5c67641c8 100755 --- a/trunk/configure +++ b/trunk/configure @@ -168,11 +168,6 @@ if [[ $SRS_SRT == YES ]]; then if [[ $SRS_SHARED_SRT == YES ]]; then LibSRTfile="-L${SRS_OBJS_DIR}/srt/lib -lsrt"; fi fi -# For iconv on macOS only, CentOS seems ok. -if [[ $SRS_GB28181 == YES && $SRS_OSX == YES ]]; then - LibIconvRoot="/usr/local/opt/libiconv/include"; LibIconvfile="/usr/local/opt/libiconv/lib/libiconv.a" -fi - # the link options, always use static link SrsLinkOptions="-ldl -lpthread"; if [[ $SRS_SSL == YES && $SRS_USE_SYS_SSL == YES ]]; then @@ -284,13 +279,6 @@ fi if [[ $SRS_FFMPEG_FIT == YES ]]; then MODULE_FILES+=("srs_app_rtc_codec") fi -if [[ $SRS_GB28181 == YES ]]; then - MODULE_FILES+=("srs_app_gb28181" "srs_app_gb28181_sip" "srs_app_gb28181_jitter") -fi -if [[ $SRS_GB28181 == YES ]]; then - MODULE_FILES+=("srs_app_gb28181_stack") - ModuleLibIncs+=(${LibIconvRoot}) -fi DEFINES="" # add each modules for app @@ -370,9 +358,6 @@ fi if [[ $SRS_SRT == YES ]]; then ModuleLibFiles+=("${LibSRTfile[*]}") fi -if [[ $SRS_GB28181 == YES ]]; then - ModuleLibFiles+=("${LibIconvfile[*]}") -fi # all depends objects MODULE_OBJS="${CORE_OBJS[@]} ${KERNEL_OBJS[@]} ${PROTOCOL_OBJS[@]} ${APP_OBJS[@]} ${SERVER_OBJS[@]}" ModuleLibIncs=(${SRS_OBJS_DIR} ${LibSTRoot} ${LibGperfRoot} ${LibSSLRoot}) diff --git a/trunk/research/players/rtc_player.html b/trunk/research/players/rtc_player.html index c1e574e23..ab0ad3ea4 100644 --- a/trunk/research/players/rtc_player.html +++ b/trunk/research/players/rtc_player.html @@ -31,7 +31,7 @@ -