diff --git a/.github/ISSUE_TEMPLATE b/.github/ISSUE_TEMPLATE index fa6f266ec..96836bbd7 100644 --- a/.github/ISSUE_TEMPLATE +++ b/.github/ISSUE_TEMPLATE @@ -7,6 +7,10 @@ assignees: '' --- +> 注意:不提供以下信息的Issue会被直接删除(Please follow issue template, or we will delete it) + +> 注意:咨询和讨论请提交到SRS星球(Please ask question at) http://bbs.ossrs.net + **描述(Description)** > 描述你遇到了什么问题(Please description your issue here) diff --git a/README.md b/README.md index 829a61197..01fd64992 100755 --- a/README.md +++ b/README.md @@ -74,14 +74,15 @@ Other important wiki: The [TOC(Technical Oversight Committee)](trunk/AUTHORS.md#toc) and [contributors](trunk/AUTHORS.md#contributors): -* [Winlin](https://github.com/winlinvip): All areas of streaming server and documents. -* [Wenjie](https://github.com/wenjiegit): The focus of his work is on the [HDS](https://github.com/simple-rtmp-server/srs/wiki/v4_CN_DeliveryHDS) module. -* [Runner365](https://github.com/runner365): The focus of his work is on the [SRT](https://github.com/simple-rtmp-server/srs/wiki/v4_CN_SRTWiki) module. -* [John](https://github.com/xiaozhihong): Focus on [WebRTC](https://github.com/simple-rtmp-server/srs/wiki/v4_CN_WebRTC) module. -* [B.P.Y(Bepartofyou)](https://github.com/Bepartofyou): Focus on [WebRTC](https://github.com/simple-rtmp-server/srs/wiki/v4_CN_WebRTC) module. -* [Lixin](https://github.com/xialixin): Focus on [GB28181](https://github.com/ossrs/srs/issues/1500) module. -* [Mozhan](https://github.com/lipeng19811218): Focus on [WebRTC](https://github.com/simple-rtmp-server/srs/wiki/v4_CN_WebRTC) module. -* [Jinxue](https://github.com/chen-guanghua): Focus on [WebRTC](https://github.com/simple-rtmp-server/srs/wiki/v4_CN_WebRTC) module. +* [Winlin](https://github.com/winlinvip): Focus on [issues/PR](https://github.com/ossrs/srs/issues) and tests now. +* [ZhaoWenjie](https://github.com/wenjiegit): Focus on [HDS](https://github.com/simple-rtmp-server/srs/wiki/v4_CN_DeliveryHDS) module. +* [ShiWei](https://github.com/runner365): Focus on [SRT](https://github.com/simple-rtmp-server/srs/wiki/v4_CN_SRTWiki) module. +* [XiaoZhihong](https://github.com/xiaozhihong): Focus on [WebRTC](https://github.com/simple-rtmp-server/srs/wiki/v4_CN_WebRTC) module. +* [WuPengqiang](https://github.com/Bepartofyou): Focus on [WebRTC](https://github.com/simple-rtmp-server/srs/wiki/v4_CN_WebRTC) module. +* [XiaLixin](https://github.com/xialixin): Focus on [GB28181](https://github.com/ossrs/srs/issues/1500) module. +* [LiPeng](https://github.com/lipeng19811218): Focus on [WebRTC](https://github.com/simple-rtmp-server/srs/wiki/v4_CN_WebRTC) module. +* [ChenGuanghua](https://github.com/chen-guanghua): Focus on [WebRTC](https://github.com/simple-rtmp-server/srs/wiki/v4_CN_WebRTC) module. +* [ChenHaibo](https://github.com/duiniuluantanqin): Focus on [GB28181](https://github.com/ossrs/srs/issues/1500) and [API](https://github.com/ossrs/srs/issues/1657) module. A big `THANK YOU` also goes to: diff --git a/trunk/AUTHORS.md b/trunk/AUTHORS.md index c07346704..8a0b32e6e 100644 --- a/trunk/AUTHORS.md +++ b/trunk/AUTHORS.md @@ -2,25 +2,26 @@ The TOC(Technical Oversight Committee): -- `winlinvip` -- `wenjiegit` -- `xialixin` -- `runner365` -- `xiaozhihong` -- `Bepartofyou` -- `chen-guanghua` -- `lipeng19811218` +- `Winlin` +- `ZhaoWenjie` +- `ShiWei` +- `XiaoZhihong` +- `WuPengqiang` +- `XiaLixin` +- `LiPeng` +- `ChenGuanghua` +- `ChenHaibo` ## CONTRIBUTORS CONTRIBUTORS ordered by first contribution. -* `winlinvip` -* `winlinvip` -* `winlinvip` -* `wenjiegit` -* `wenjiegit<740936897@qq.com>` -* `wenjiegit` +* `Winlin` +* `Winlin` +* `Winlin` +* `ZhaoWenjie` +* `ZhaoWenjie<740936897@qq.com>` +* `ZhaoWenjie` * `xiangcheng.liu` * `naijia.liu` * `alcoholyi` @@ -69,33 +70,34 @@ CONTRIBUTORS ordered by first contribution. * `qiang.li` * `HungMingWu` * `Himer` -* `xialixin` -* `xialixin<68469352@qq.com>` -* `xialixin` -* `xialixin` +* `XiaLixin` +* `XiaLixin<68469352@qq.com>` +* `XiaLixin` +* `XiaLixin` * `alphonsetai` * `Michael.Ma` * `lam2003` -* `runner365` -* `runner365` +* `ShiWei` +* `ShiWei` * `XiaofengWang` -* `xiaozhihong` -* `xiaozhihong` -* `xiaozhihong` +* `XiaoZhihong` +* `XiaoZhihong` +* `XiaoZhihong` * `yanghuiwen` -* `Bepartofyou<309554135@qq.com>` -* `Bepartofyou` +* `WuPengqiang<309554135@qq.com>` +* `WuPengqiang` * `l<22312935+lam2003@users.noreply.github.com>` * `xfalcon` -* `chen-guanghua` -* `chen-guanghua` -* `lipeng19811218` -* `lipeng19811218` +* `ChenGuanghua` +* `ChenGuanghua` +* `LiPeng` +* `LiPeng` * `yajun18` * `liulichuan` * `yapingcat` * `chenchengbin` -* `duiniuluantanqin` +* `ChenHaibo<495810242@qq.com>` +* `ChenHaibo` * `jasongwq` * `yinjiaoyuan` * `PieerePi` @@ -107,4 +109,6 @@ CONTRIBUTORS ordered by first contribution. * `stone` * `cfw11<34058899+cfw11@users.noreply.github.com>` * `Hung-YiChen` -* `long` \ No newline at end of file +* `long` +* `matthew1838<77285055+matthew1838@users.noreply.github.com>` +* `rise` \ No newline at end of file diff --git a/trunk/scripts/new_authors.sh b/trunk/scripts/new_authors.sh index 3a4bc0b83..cd12846a5 100755 --- a/trunk/scripts/new_authors.sh +++ b/trunk/scripts/new_authors.sh @@ -12,5 +12,5 @@ for author in $authors; do username=$(echo $author |awk -F '@' '{print $1}') grep $username $AFILE 1>/dev/null 2>/dev/null && continue; - git log -1 --author="$author" --format='%an<%ae>'| sed 's/ //g' + echo "* $(git log -1 --author="$author" --format='`%an<%ae>`'| sed 's/ //g')" done diff --git a/trunk/src/app/srs_app_config.cpp b/trunk/src/app/srs_app_config.cpp index 147dd1ed8..7469ac569 100644 --- a/trunk/src/app/srs_app_config.cpp +++ b/trunk/src/app/srs_app_config.cpp @@ -3526,7 +3526,7 @@ srs_error_t SrsConfig::parse_argv(int& i, char** argv) void SrsConfig::print_help(char** argv) { printf( - "%s, %s, %s, created by %s\n\n" + "%s, %s, %s, created by %sand %s\n\n" "Usage: %s <-h?vVgG>|<[-t] -c filename>\n" "Options:\n" " -?, -h : Show this help and exit 0.\n" @@ -3539,7 +3539,7 @@ void SrsConfig::print_help(char** argv) " %s -t -c %s\n" " %s -c %s\n", RTMP_SIG_SRS_SERVER, RTMP_SIG_SRS_URL, RTMP_SIG_SRS_LICENSE, - RTMP_SIG_SRS_AUTHORS, + RTMP_SIG_SRS_AUTHORS, SRS_CONSTRIBUTORS, argv[0], argv[0], argv[0], SRS_CONF_DEFAULT_COFNIG_FILE, argv[0], SRS_CONF_DEFAULT_COFNIG_FILE); } diff --git a/trunk/src/app/srs_app_process.cpp b/trunk/src/app/srs_app_process.cpp index cea83ff41..cfc2f8138 100644 --- a/trunk/src/app/srs_app_process.cpp +++ b/trunk/src/app/srs_app_process.cpp @@ -153,6 +153,30 @@ srs_error_t srs_redirect_output(string from_file, int to_fd) return err; } +srs_error_t SrsProcess::redirect_io() +{ + srs_error_t err = srs_success; + + // for the stdout, ignore when not specified. + // redirect stdout to file if possible. + if ((err = srs_redirect_output(stdout_file, STDOUT_FILENO)) != srs_success) { + return srs_error_wrap(err, "redirect stdout"); + } + + // for the stderr, ignore when not specified. + // redirect stderr to file if possible. + if ((err = srs_redirect_output(stderr_file, STDERR_FILENO)) != srs_success) { + return srs_error_wrap(err, "redirect stderr"); + } + + // No stdin for process, @bug https://github.com/ossrs/srs/issues/1592 + if ((err = srs_redirect_output("/dev/null", STDIN_FILENO)) != srs_success) { + return srs_error_wrap(err, "redirect /dev/null"); + } + + return err; +} + srs_error_t SrsProcess::start() { srs_error_t err = srs_success; @@ -182,24 +206,13 @@ srs_error_t SrsProcess::start() // ignore the SIGINT and SIGTERM signal(SIGINT, SIG_IGN); signal(SIGTERM, SIG_IGN); - - // for the stdout, ignore when not specified. - // redirect stdout to file if possible. - if ((err = srs_redirect_output(stdout_file, STDOUT_FILENO)) != srs_success) { - return srs_error_wrap(err, "redirect output"); + + // redirect standard I/O, if it failed, output error to stdout, and exit child process. + if ((err = redirect_io()) != srs_success) { + fprintf(stdout, "child process error, %s\n", srs_error_desc(err).c_str()); + exit(-1); } - // for the stderr, ignore when not specified. - // redirect stderr to file if possible. - if ((err = srs_redirect_output(stderr_file, STDERR_FILENO)) != srs_success) { - return srs_error_wrap(err, "redirect output"); - } - - // No stdin for process, @bug https://github.com/ossrs/srs/issues/1592 - if ((err = srs_redirect_output("/dev/null", STDIN_FILENO)) != srs_success) { - return srs_error_wrap(err, "redirect input"); - } - // should never close the fd 3+, for it myabe used. // for fd should close at exec, use fnctl to set it. diff --git a/trunk/src/app/srs_app_process.hpp b/trunk/src/app/srs_app_process.hpp index 55b574bdd..dceda3cd9 100644 --- a/trunk/src/app/srs_app_process.hpp +++ b/trunk/src/app/srs_app_process.hpp @@ -53,6 +53,9 @@ public: // @param argv the argv for binary path, the argv[0] generally is the binary. // @remark the argv[0] must be the binary. virtual srs_error_t initialize(std::string binary, std::vector argv); +private: + // Redirect standard I/O. + virtual srs_error_t redirect_io(); public: // Start the process, ignore when already started. virtual srs_error_t start(); diff --git a/trunk/src/main/srs_main_server.cpp b/trunk/src/main/srs_main_server.cpp index 99ffb0251..b918c3b47 100644 --- a/trunk/src/main/srs_main_server.cpp +++ b/trunk/src/main/srs_main_server.cpp @@ -119,8 +119,7 @@ srs_error_t do_main(int argc, char** argv) // config already applied to log. srs_trace2(TAG_MAIN, "%s, %s", RTMP_SIG_SRS_SERVER, RTMP_SIG_SRS_LICENSE); - srs_trace("authors: %s", RTMP_SIG_SRS_AUTHORS); - srs_trace("contributors: %s", SRS_CONSTRIBUTORS); + srs_trace("authors: %sand %s", RTMP_SIG_SRS_AUTHORS, SRS_CONSTRIBUTORS); srs_trace("cwd=%s, work_dir=%s, build: %s, configure: %s, uname: %s, osx: %d", _srs_config->cwd().c_str(), cwd.c_str(), SRS_BUILD_DATE, SRS_USER_CONFIGURE, SRS_UNAME, SRS_OSX_BOOL); srs_trace("configure detail: " SRS_CONFIGURE);