Usage:
++ 请点击下面的图标,启用Flash +
++ 若没有见到这个图标,Chrome浏览器请打开 + chrome://settings/content/flash 并修改为"Ask first"。 +
+diff --git a/.github/ISSUE_TEMPLATE b/.github/ISSUE_TEMPLATE index 9d51ecea1..0b981c593 100644 --- a/.github/ISSUE_TEMPLATE +++ b/.github/ISSUE_TEMPLATE @@ -1,37 +1,44 @@ --- -name: 提Bug -about: 描述一个Bug帮助改进系统 +name: File bug +about: File bug to improve SRS title: '' labels: '' assignees: '' --- -**描述** +**描述(Description)** + 描述你遇到了什么问题。 +(Please description your issue here.) -**环境** -1. 操作系统:```...``` -1. 编码器(工具和版本):```...``` -1. 播放器(工具和版本):```...``` -1. SRS版本: ```...``` -1. SRS的日志如下: +**环境(Environment)** +1. SRS版本(Version): `xxxxxx` +1. 操作系统(OS):`xxxxxx` +1. 编码器(工具和版本)(Encoder):`xxxxxx` +1. 播放器(工具和版本)(Player):`xxxxxx` +1. SRS的日志如下(Log): ``` -...... +xxxxxxxxxxxx ``` -**重现** +**重现(Replay)** + 重现Bug的步骤如下: -1. 启动SRS,运行 ```...``` -1. 推流,运行 ```...``` -1. 播放,运行 ```...``` -1. 操作 ```...``` -1. 重现了Bug,关键信息如下: +(How to replay bug?) + +1. 启动SRS,运行(Start SRS by) `xxxxxx` +1. 推流,运行(Publish by) `xxxxxx` +1. 播放,运行(Play by) `xxxxxx` +1. 操作(Other steps) `xxxxxx` +1. 重现了Bug,关键信息如下(Bug replayed, logs): ``` -... +xxxxxx ``` -**期望行为** +**期望行为(Expect)** + 描述你期望发生的事情。 +(Please describe your expectation.) diff --git a/README.md b/README.md index 555029320..3ddee5355 100755 --- a/README.md +++ b/README.md @@ -147,6 +147,13 @@ For previous versions, please read: ## V3 changes +* v3.0, 2019-12-19, [3.0 alpha5(3.0.75)][r3.0a5] released. 115362 lines. +* v3.0, 2019-12-19, Refine the RTMP iovs cache increasing to much faster. +* v3.0, 2019-12-19, Fix [#1524][bug #1524], memory leak for amf0 strict array. 3.0.75 +* v3.0, 2019-12-19, Fix random build failed bug for modules. +* v3.0, 2019-12-19, Fix [#1520][bug #1520] and [#1223][bug #1223], bug for origin cluster 3+ servers. 3.0.74 +* v3.0, 2019-12-18, For [#1042][bug #1042], add test for RAW AVC protocol. +* v3.0, 2019-12-18, Detect whether flash enabled for srs-player. 3.0.73 * v3.0, 2019-12-17, Fix HTTP CORS bug when sending response for OPTIONS. 3.0.72 * v3.0, 2019-12-17, Enhance HTTP response write for final_request. * v3.0, 2019-12-17, Refactor HTTP stream to disconnect client when unpublish. @@ -671,6 +678,7 @@ For previous versions, please read: ## Releases +* 2019-12-19, [Release v3.0-a5][r3.0a5], 3.0 alpha5, 3.0.75, 115362 lines. * 2019-12-13, [Release v3.0-a4][r3.0a4], 3.0 alpha4, 3.0.71, 112928 lines. * 2019-11-30, [Release v3.0-a3][r3.0a3], 3.0 alpha3, 3.0.67, 110864 lines. * 2019-11-30, [Release v3.0-a2][r3.0a2], 3.0 alpha2, 3.0.66, 110831 lines. @@ -1508,6 +1516,7 @@ Winlin [bug #1339]: https://github.com/ossrs/srs/pull/1339 [bug #1312]: https://github.com/ossrs/srs/pull/1312 [bug #1304]: https://github.com/ossrs/srs/pull/1304 +[bug #1524]: https://github.com/ossrs/srs/issues/1524 [bug #xxxxxxxxxx]: https://github.com/ossrs/srs/issues/xxxxxxxxxx [bug #735]: https://github.com/ossrs/srs/issues/735 @@ -1532,6 +1541,8 @@ Winlin [bug #1042]: https://github.com/ossrs/srs/issues/1042 [bug #1445]: https://github.com/ossrs/srs/issues/1445 [bug #1506]: https://github.com/ossrs/srs/issues/1506 +[bug #1520]: https://github.com/ossrs/srs/issues/1520 +[bug #1223]: https://github.com/ossrs/srs/issues/1223 [bug #xxxxxxxxxxxxx]: https://github.com/ossrs/srs/issues/xxxxxxxxxxxxx [bug #1111]: https://github.com/ossrs/srs/issues/1111 @@ -1540,6 +1551,7 @@ Winlin [exo #828]: https://github.com/google/ExoPlayer/pull/828 +[r3.0a5]: https://github.com/ossrs/srs/releases/tag/v3.0-a5 [r3.0a4]: https://github.com/ossrs/srs/releases/tag/v3.0-a4 [r3.0a3]: https://github.com/ossrs/srs/releases/tag/v3.0-a3 [r3.0a2]: https://github.com/ossrs/srs/releases/tag/v3.0-a2 diff --git a/trunk/auto/options.sh b/trunk/auto/options.sh index d938fb52c..8921ecadf 100755 --- a/trunk/auto/options.sh +++ b/trunk/auto/options.sh @@ -19,7 +19,7 @@ SRS_HDS=NO SRS_NGINX=NO SRS_FFMPEG_TOOL=NO SRS_LIBRTMP=NO -SRS_RESEARCH=YES +SRS_RESEARCH=NO SRS_UTEST=YES SRS_GPERF=NO # Performance test: tcmalloc SRS_GPERF_MC=NO # Performance test: gperf memory check diff --git a/trunk/conf/full.conf b/trunk/conf/full.conf index c8d041144..e706aed5c 100644 --- a/trunk/conf/full.conf +++ b/trunk/conf/full.conf @@ -665,7 +665,7 @@ vhost refer.anti_suck.com { } } -# vhost for bandwidth check +# vhost for bwt(bandwidth check) # generally, the bandcheck vhost must be: bandcheck.srs.com, # or need to modify the vhost of client. vhost bandcheck.srs.com { diff --git a/trunk/conf/origin.cluster.serverA.conf b/trunk/conf/origin.cluster.serverA.conf index 0e0d5701e..7bc73c63a 100644 --- a/trunk/conf/origin.cluster.serverA.conf +++ b/trunk/conf/origin.cluster.serverA.conf @@ -15,6 +15,6 @@ vhost __defaultVhost__ { cluster { mode local; origin_cluster on; - coworkers 127.0.0.1:9091; + coworkers 127.0.0.1:9090 127.0.0.1:9091 127.0.0.1:9092; } } diff --git a/trunk/conf/origin.cluster.serverB.conf b/trunk/conf/origin.cluster.serverB.conf index 333d1e566..b06417cd8 100644 --- a/trunk/conf/origin.cluster.serverB.conf +++ b/trunk/conf/origin.cluster.serverB.conf @@ -15,6 +15,6 @@ vhost __defaultVhost__ { cluster { mode local; origin_cluster on; - coworkers 127.0.0.1:9090; + coworkers 127.0.0.1:9090 127.0.0.1:9091 127.0.0.1:9092; } } diff --git a/trunk/conf/origin.cluster.serverC.conf b/trunk/conf/origin.cluster.serverC.conf new file mode 100644 index 000000000..efb991cc7 --- /dev/null +++ b/trunk/conf/origin.cluster.serverC.conf @@ -0,0 +1,20 @@ +# the config for srs origin-origin cluster +# @see https://github.com/ossrs/srs/wiki/v3_EN_OriginCluster +# @see full.conf for detail config. + +listen 19352; +max_connections 1000; +daemon off; +srs_log_tank console; +pid ./objs/origin.cluster.serverC.pid; +http_api { + enabled on; + listen 9092; +} +vhost __defaultVhost__ { + cluster { + mode local; + origin_cluster on; + coworkers 127.0.0.1:9090 127.0.0.1:9091 127.0.0.1:9092; + } +} diff --git a/trunk/configure b/trunk/configure index 000f60975..23119b755 100755 --- a/trunk/configure +++ b/trunk/configure @@ -83,6 +83,13 @@ for SRS_MODULE in ${SRS_MODULES[*]}; do fi done +# generate extra phony for each modules. +cat << END > ${SRS_OBJS}/${SRS_MAKEFILE} + +.PHONY: $__mphonys + +END + ##################################################################################### # build tools or compiler args. # enable gdb debug @@ -112,7 +119,7 @@ if [[ $SRS_GCOV == YES ]]; then CXXFLAGS="${CXXFLAGS} ${SrsGcov}"; fi # Start to generate the Makefile. -cat << END > ${SRS_OBJS}/${SRS_MAKEFILE} +cat << END >> ${SRS_OBJS}/${SRS_MAKEFILE} GCC = gcc CXX = g++ AR = ar @@ -315,7 +322,8 @@ fi # utest, the unit-test cases of srs, base on gtest1.6 if [ $SRS_UTEST = YES ]; then MODULE_FILES=("srs_utest" "srs_utest_amf0" "srs_utest_protocol" "srs_utest_kernel" "srs_utest_core" - "srs_utest_config" "srs_utest_rtmp" "srs_utest_http" "srs_utest_reload" "srs_utest_service" "srs_utest_app") + "srs_utest_config" "srs_utest_rtmp" "srs_utest_http" "srs_utest_avc" "srs_utest_reload" + "srs_utest_service" "srs_utest_app") ModuleLibIncs=(${SRS_OBJS_DIR} ${LibSTRoot} ${LibSSLRoot}) ModuleLibFiles=(${LibSTfile} ${LibSSLfile}) MODULE_DEPENDS=("CORE" "KERNEL" "PROTOCOL" "SERVICE" "APP") diff --git a/trunk/research/players/js/srs.page.js b/trunk/research/players/js/srs.page.js index 6a3132741..0fd37b2ad 100755 --- a/trunk/research/players/js/srs.page.js +++ b/trunk/research/players/js/srs.page.js @@ -3,7 +3,7 @@ ////////////////////////////////////////////////////////////////////////////////// // to query the swf anti cache. -function srs_get_version_code() { return "1.31"; } +function srs_get_version_code() { return "1.33"; } /** * player specified size. @@ -18,13 +18,6 @@ function srs_get_player_vhost() { return "players"; } function srs_get_api_server_port() { return 8085; } // the srs http server port function srs_get_srs_http_server_port() { return 8080; } -// get the stream published to vhost, -// generally we need to transcode the stream to support HLS and filters. -// for example, src_vhost is "players", we transcode stream to vhost "players_pub". -// if not equals to the player vhost, return the orignal vhost. -function srs_get_player_publish_vhost(src_vhost) { return (src_vhost != srs_get_player_vhost())? src_vhost:(src_vhost + "_pub"); } -// for chat, use rtmp only vhost, low latecy, without gop cache. -function srs_get_player_chat_vhost(src_vhost) { return (src_vhost != srs_get_player_vhost())? src_vhost:(src_vhost + "_chat"); } ////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////// @@ -59,7 +52,10 @@ function user_extra_params(query, params) { ) { continue; } - queries.push(key + '=' + query[key]); + + if (query[key]) { + queries.push(key + '=' + query[key]); + } } return queries; @@ -75,12 +71,12 @@ function user_extra_params(query, params) { function build_default_rtmp_url() { var query = parse_query_string(); - var schema = (query.schema == undefined)? "rtmp":query.schema; - var server = (query.server == undefined)? window.location.hostname:query.server; - var port = (query.port == undefined)? schema=="http"?80:1935:query.port; - var vhost = (query.vhost == undefined)? window.location.hostname:query.vhost; - var app = (query.app == undefined)? "live":query.app; - var stream = (query.stream == undefined)? "demo":query.stream; + var schema = (!query.schema)? "rtmp":query.schema; + var server = (!query.server)? window.location.hostname:query.server; + var port = (!query.port)? schema=="http"?80:1935:query.port; + var vhost = (!query.vhost)? window.location.hostname:query.vhost; + var app = (!query.app)? "live":query.app; + var stream = (!query.stream)? "livestream":query.stream; var queries = []; if (server != vhost && vhost != "__defaultVhost__") { @@ -99,16 +95,16 @@ function build_default_rtmp_url() { function build_default_publish_rtmp_url() { var query = parse_query_string(); - var schema = (query.schema == undefined)? "rtmp":query.schema; - var server = (query.server == undefined)? window.location.hostname:query.server; - var port = (query.port == undefined)? schema=="http"?80:1935:query.port; - var vhost = (query.vhost == undefined)? window.location.hostname:query.vhost; - var app = (query.app == undefined)? "live":query.app; - var stream = (query.stream == undefined)? "demo":query.stream; + var schema = (!query.schema)? "rtmp":query.schema; + var server = (!query.server)? window.location.hostname:query.server; + var port = (!query.port)? schema=="http"?80:1935:query.port; + var vhost = (!query.vhost)? window.location.hostname:query.vhost; + var app = (!query.app)? "live":query.app; + var stream = (!query.stream)? "demo":query.stream; var queries = []; if (server != vhost && vhost != "__defaultVhost__") { - queries.push("vhost=" + srs_get_player_chat_vhost(vhost)); + queries.push("vhost=" + vhost); } if (query.shp_identify) { queries.push("shp_identify=" + query.shp_identify); @@ -125,11 +121,11 @@ function build_default_publish_rtmp_url() { function build_default_bandwidth_rtmp_url() { var query = parse_query_string(); - var server = (query.server == undefined)? window.location.hostname:query.server; - var port = (query.port == undefined)? 1935:query.port; + var server = (!query.server)? window.location.hostname:query.server; + var port = (!query.port)? 1935:query.port; var vhost = "bandcheck.srs.com"; - var app = (query.app == undefined)? "app":query.app; - var key = (query.key == undefined)? "35c9b402c12a7246868752e2878f7e0e":query.key; + var app = (!query.app)? "app":query.app; + var key = (!query.key)? "35c9b402c12a7246868752e2878f7e0e":query.key; return "rtmp://" + server + ":" + port + "/" + app + "?key=" + key + "&vhost=" + vhost; } @@ -153,11 +149,11 @@ function build_default_hls_url() { server = query.hls_vhost; } - var port = (query.hls_port == undefined)? window.location.port:query.hls_port; - var app = (query.app == undefined)? "live":query.app; - var stream = (query.stream == undefined)? "demo":query.stream; + var port = (!query.hls_port)? window.location.port:query.hls_port; + var app = (!query.app)? "live":query.app; + var stream = (!query.stream)? "demo":query.stream; - if (port == "" || port == null || port == undefined) { + if (!port) { port = 8080; } diff --git a/trunk/research/players/js/srs.player.js b/trunk/research/players/js/srs.player.js index 356b61abd..eba57f06e 100755 --- a/trunk/research/players/js/srs.player.js +++ b/trunk/research/players/js/srs.player.js @@ -118,6 +118,9 @@ SrsPlayer.prototype.start = function(url) { flashvars, params, attributes, function(callbackObj){ self.callbackObj = callbackObj; + if (!callbackObj.success) { + console.error('Initialize player failed:'); console.error(callbackObj); + } } ); diff --git a/trunk/research/players/srs_bwt.html b/trunk/research/players/srs_bwt.html index c91116986..739e5c83f 100644 --- a/trunk/research/players/srs_bwt.html +++ b/trunk/research/players/srs_bwt.html @@ -35,39 +35,58 @@