From 49daee34b4684a9f9aef26653112197489bb5f2e Mon Sep 17 00:00:00 2001 From: winlin Date: Fri, 26 Dec 2014 21:39:53 +0800 Subject: [PATCH 01/19] hotfix 1.0release, remove the multiple process arch, for 2.0 supports huge connections, and 3.0 will use other arch without st. --- README.md | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/README.md b/README.md index 32a11c87b0..84fdbe7422 100755 --- a/README.md +++ b/README.md @@ -722,41 +722,6 @@ Schema#2: SRS RTMP Edge server pull stream from origin (or upstream SRS RTMP Edge server), then delivery to Client. -### (plan) SRS Multiple processes Architecture(design by wenjie) - -
-                 +---------------+              +--------+
-                 | upnode server |              + client +
-                 +-------+-------+              +---+----+
-            -------------+------------network-------+---------
-                         |                          |
- +--------+         +----+-----------+         +----+----------+
- | master +--fork->-+ back source(1) +-->-pull-+ stream 1-N(2) +
- +---+----+         +----------------+         +-------+-------+
-     |                                                 |
-     +-------------------------------------fork--->-----+
-     |                           +-------------+
-     +-------------------fork-->-+ http/vod(3) |
-                                 +-------------+
-Remark:
-(1) back source process: create by master process, get stream from 
-    upnode server if edge, create stream if origin, serve the stream 
-    process.
-(2) stream process: create by master process, get stream from back
-    source process, serve the client.
-(3) the embeded mininum http server, also provides vod service. for
-    http server, it provides http api, hls(live/vod) delivery. for
-    vod server, it slice the file to hls(m3u8/ts).
-Remark:
-(a) This multiple processes architecture is design by wenjie, it's a
-    very simple and powerful multiple process architecture, for the
-    master no need to pass between stream process.
-(b) The CLI architecture is similar to this, instead, cli process
-    will collect informations from all stream process, master process
-    only send signals to child processes.
-(c) Maybe multiple thread is ok? By winlin.
-
- ### Bandwidth Test Workflow

From 02ec7710300392260a55cbf712bd4c236d249c69 Mon Sep 17 00:00:00 2001
From: winlin 
Date: Fri, 26 Dec 2014 21:41:08 +0800
Subject: [PATCH 02/19] hotfix 1.0release, update the system requirements.

---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 84fdbe7422..3e1e071cfb 100755
--- a/README.md
+++ b/README.md
@@ -312,7 +312,7 @@ Donations:
## System Requirements Supported operating systems and hardware: * All Linux , both 32 and 64 bits -* All hardware. +* All hardware with x86/x86_64/arm/mips cpu. ## Summary 1. 简洁稳定:Simple, also stable enough. From 9a66d22f3b812115f305869649a3b5f1d296a18e Mon Sep 17 00:00:00 2001 From: winlin Date: Fri, 26 Dec 2014 21:43:00 +0800 Subject: [PATCH 03/19] hotfix 1.0release, 1.0.13 --- trunk/src/core/srs_core.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trunk/src/core/srs_core.hpp b/trunk/src/core/srs_core.hpp index 253a15daf4..0c29a7282e 100644 --- a/trunk/src/core/srs_core.hpp +++ b/trunk/src/core/srs_core.hpp @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // current release version #define VERSION_MAJOR 1 #define VERSION_MINOR 0 -#define VERSION_REVISION 12 +#define VERSION_REVISION 13 // server info. #define RTMP_SIG_SRS_KEY "SRS" #define RTMP_SIG_SRS_ROLE "origin/edge server" From dfd4eeca459f7d30ac192a32c7f6289c5a281291 Mon Sep 17 00:00:00 2001 From: winlin Date: Fri, 26 Dec 2014 21:49:04 +0800 Subject: [PATCH 04/19] hotfix 1.0release, git checkout develop when commit --- trunk/scripts/git.commit.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trunk/scripts/git.commit.sh b/trunk/scripts/git.commit.sh index 38932fdfff..6645acdf2a 100755 --- a/trunk/scripts/git.commit.sh +++ b/trunk/scripts/git.commit.sh @@ -2,7 +2,7 @@ cat <>/dev/null touch git-ensure-commit && -echo "cd `pwd` && git checkout master &&" >git-ensure-commit && +echo "cd `pwd` && git checkout develop &&" >git-ensure-commit && echo "bash `pwd`/git.commit.sh" >>git-ensure-commit && chmod +x git-ensure-commit && sudo rm -f /bin/git-ensure-commit && @@ -23,7 +23,7 @@ work_dir=`(cd ${work_dir}/.. && pwd)` product_dir=$work_dir # allow start script from any dir -cd $work_dir && git checkout master +cd $work_dir && git checkout develop . ${product_dir}/scripts/_log.sh ret=$?; if [[ $ret -ne 0 ]]; then exit $ret; fi From dec4f6b989ab47c3f3d5d7a220baaf0bf3c11cd0 Mon Sep 17 00:00:00 2001 From: winlin Date: Fri, 26 Dec 2014 22:45:09 +0800 Subject: [PATCH 05/19] hotfix 1.0release, add remote gitlab --- trunk/scripts/git.commit.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/trunk/scripts/git.commit.sh b/trunk/scripts/git.commit.sh index 6645acdf2a..7426b9237b 100755 --- a/trunk/scripts/git.commit.sh +++ b/trunk/scripts/git.commit.sh @@ -44,6 +44,7 @@ function remote_check() remote_check origin git@github.com:winlinvip/simple-rtmp-server.git remote_check srs.csdn git@code.csdn.net:winlinvip/srs-csdn.git remote_check srs.oschina git@git.oschina.net:winlinvip/srs.oschina.git +remote_check srs.gitlab git@gitlab.com:winlinvip/srs-gitlab.git ok_msg "remote check ok" function sync_push() @@ -64,10 +65,12 @@ function sync_push() sync_push --all origin sync_push --all srs.csdn sync_push --all srs.oschina +sync_push --all srs.gitlab ok_msg "push refs ok" sync_push --tags srs.csdn sync_push --tags srs.oschina +sync_push --tags srs.gitlab ok_msg "push tags ok" exit 0 From e77e4cfb8b8e867fca64eec7431f416b1b728e3b Mon Sep 17 00:00:00 2001 From: winlin Date: Fri, 26 Dec 2014 23:06:02 +0800 Subject: [PATCH 06/19] hotfix 1.0release, add gitlab remote mirror --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 3e1e071cfb..df760d1a3f 100755 --- a/README.md +++ b/README.md @@ -216,6 +216,16 @@ the GIT usage( git clone https://git.oschina.net/winlinvip/srs.oschina.git ``` +Gitlab: [https://gitlab.com/winlinvip/srs-gitlab](https://gitlab.com/winlinvip/srs-gitlab) , +the GIT usage( +[CN](https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_Git), +[EN](https://github.com/winlinvip/simple-rtmp-server/wiki/v1_EN_Git) +) + +```bash +git clone https://gitlab.com/winlinvip/srs-gitlab.git +``` + ## Usage Step 1: get SRS From 513c1ec6d5f9832b9d039ee4337e8e8d8417c007 Mon Sep 17 00:00:00 2001 From: winlin Date: Mon, 29 Dec 2014 08:38:29 +0800 Subject: [PATCH 07/19] fix #268, the hls pcr is negative when startup. 1.0.14 --- README.md | 1 + trunk/src/app/srs_app_hls.cpp | 15 ++++++++++----- trunk/src/core/srs_core.hpp | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index df760d1a3f..da61f04313 100755 --- a/README.md +++ b/README.md @@ -383,6 +383,7 @@ Supported operating systems and hardware: * 2013-10-17, Created.
## History +* v1.0, 2014-12-29, hotfix [#268](https://github.com/winlinvip/simple-rtmp-server/issues/268), the hls pcr is negative when startup. 1.0.14 * v1.0, 2014-12-22, hotfix [#264](https://github.com/winlinvip/simple-rtmp-server/issues/264), ignore NALU when sequence header to make HLS happy. 1.0.12 * v1.0, 2014-12-20, hotfix [#264](https://github.com/winlinvip/simple-rtmp-server/issues/264), support disconnect publish connect when hls error. 1.0.11 * v1.0, 2014-12-05, [1.0 release(1.0.10)](https://github.com/winlinvip/simple-rtmp-server/releases/tag/1.0) released. 59391 lines. diff --git a/trunk/src/app/srs_app_hls.cpp b/trunk/src/app/srs_app_hls.cpp index 34d9eb446c..a5cf80d0e0 100644 --- a/trunk/src/app/srs_app_hls.cpp +++ b/trunk/src/app/srs_app_hls.cpp @@ -368,11 +368,16 @@ class SrsMpegtsWriter } static char* write_pcr(char* p, int64_t pcr) { - *p++ = (char) (pcr >> 25); - *p++ = (char) (pcr >> 17); - *p++ = (char) (pcr >> 9); - *p++ = (char) (pcr >> 1); - *p++ = (char) (pcr << 7 | 0x7e); + // the pcr=dts-delay + // and the pcr maybe negative + // @see https://github.com/winlinvip/simple-rtmp-server/issues/268 + int64_t v = srs_max(0, pcr); + + *p++ = (char) (v >> 25); + *p++ = (char) (v >> 17); + *p++ = (char) (v >> 9); + *p++ = (char) (v >> 1); + *p++ = (char) (v << 7 | 0x7e); *p++ = 0; return p; diff --git a/trunk/src/core/srs_core.hpp b/trunk/src/core/srs_core.hpp index 0c29a7282e..b6b808d965 100644 --- a/trunk/src/core/srs_core.hpp +++ b/trunk/src/core/srs_core.hpp @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // current release version #define VERSION_MAJOR 1 #define VERSION_MINOR 0 -#define VERSION_REVISION 13 +#define VERSION_REVISION 14 // server info. #define RTMP_SIG_SRS_KEY "SRS" #define RTMP_SIG_SRS_ROLE "origin/edge server" From d9aca8ab8216593ab1baf90569efaa8cfc0a9dbb Mon Sep 17 00:00:00 2001 From: winlin Date: Mon, 29 Dec 2014 09:05:56 +0800 Subject: [PATCH 08/19] hotfix #267, the forward dest ep should use server. 1.0.15 --- README.md | 1 + trunk/src/app/srs_app_forward.cpp | 2 +- trunk/src/core/srs_core.hpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index da61f04313..dc98ff5010 100755 --- a/README.md +++ b/README.md @@ -383,6 +383,7 @@ Supported operating systems and hardware: * 2013-10-17, Created.
## History +* v1.0, 2014-12-29, hotfix [#267](https://github.com/winlinvip/simple-rtmp-server/issues/267), the forward dest ep should use server. 1.0.15 * v1.0, 2014-12-29, hotfix [#268](https://github.com/winlinvip/simple-rtmp-server/issues/268), the hls pcr is negative when startup. 1.0.14 * v1.0, 2014-12-22, hotfix [#264](https://github.com/winlinvip/simple-rtmp-server/issues/264), ignore NALU when sequence header to make HLS happy. 1.0.12 * v1.0, 2014-12-20, hotfix [#264](https://github.com/winlinvip/simple-rtmp-server/issues/264), support disconnect publish connect when hls error. 1.0.11 diff --git a/trunk/src/app/srs_app_forward.cpp b/trunk/src/app/srs_app_forward.cpp index 39066fa7a0..5f45051505 100644 --- a/trunk/src/app/srs_app_forward.cpp +++ b/trunk/src/app/srs_app_forward.cpp @@ -119,7 +119,7 @@ int SrsForwarder::on_publish() if (_ep_forward == SRS_CONSTS_LOCALHOST) { dest_ep += req->host; } else { - dest_ep += _ep_forward; + dest_ep += server; } dest_ep += ":"; dest_ep += port; diff --git a/trunk/src/core/srs_core.hpp b/trunk/src/core/srs_core.hpp index b6b808d965..907e944ffe 100644 --- a/trunk/src/core/srs_core.hpp +++ b/trunk/src/core/srs_core.hpp @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // current release version #define VERSION_MAJOR 1 #define VERSION_MINOR 0 -#define VERSION_REVISION 14 +#define VERSION_REVISION 15 // server info. #define RTMP_SIG_SRS_KEY "SRS" #define RTMP_SIG_SRS_ROLE "origin/edge server" From bb6dfe40c1863faf544a2485e2e091e4b90ffef4 Mon Sep 17 00:00:00 2001 From: winlin Date: Thu, 1 Jan 2015 11:44:28 +0800 Subject: [PATCH 09/19] fix #270, memory leak for http client post. 1.0.16 --- README.md | 1 + trunk/src/app/srs_app_http_client.cpp | 2 ++ trunk/src/core/srs_core.hpp | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index dc98ff5010..f95909d6f6 100755 --- a/README.md +++ b/README.md @@ -383,6 +383,7 @@ Supported operating systems and hardware: * 2013-10-17, Created.
## History +* v1.0, 2015-01-01, hotfix [#270](https://github.com/winlinvip/simple-rtmp-server/issues/270), memory leak for http client post. 1.0.16 * v1.0, 2014-12-29, hotfix [#267](https://github.com/winlinvip/simple-rtmp-server/issues/267), the forward dest ep should use server. 1.0.15 * v1.0, 2014-12-29, hotfix [#268](https://github.com/winlinvip/simple-rtmp-server/issues/268), the hls pcr is negative when startup. 1.0.14 * v1.0, 2014-12-22, hotfix [#264](https://github.com/winlinvip/simple-rtmp-server/issues/264), ignore NALU when sequence header to make HLS happy. 1.0.12 diff --git a/trunk/src/app/srs_app_http_client.cpp b/trunk/src/app/srs_app_http_client.cpp index 0fb7afa22e..a1ad903cf5 100644 --- a/trunk/src/app/srs_app_http_client.cpp +++ b/trunk/src/app/srs_app_http_client.cpp @@ -111,6 +111,8 @@ int SrsHttpClient::post(SrsHttpUri* uri, string req, string& res) } srs_info("parse http post response success."); + srs_freep(msg); + return ret; } diff --git a/trunk/src/core/srs_core.hpp b/trunk/src/core/srs_core.hpp index 907e944ffe..37d5e06ade 100644 --- a/trunk/src/core/srs_core.hpp +++ b/trunk/src/core/srs_core.hpp @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // current release version #define VERSION_MAJOR 1 #define VERSION_MINOR 0 -#define VERSION_REVISION 15 +#define VERSION_REVISION 16 // server info. #define RTMP_SIG_SRS_KEY "SRS" #define RTMP_SIG_SRS_ROLE "origin/edge server" From ca977ef739d5cd2a172860a15b1b0729995364cf Mon Sep 17 00:00:00 2001 From: winlin Date: Fri, 2 Jan 2015 09:20:45 +0800 Subject: [PATCH 10/19] hotfix #216, http-callback post in application/json content-type. 1.0.17 --- README.md | 1 + trunk/src/app/srs_app_http_client.cpp | 2 +- trunk/src/core/srs_core.hpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f95909d6f6..aff39123a7 100755 --- a/README.md +++ b/README.md @@ -383,6 +383,7 @@ Supported operating systems and hardware: * 2013-10-17, Created.
## History +* v1.0, 2015-01-02, hotfix [#216](https://github.com/winlinvip/simple-rtmp-server/issues/216), http-callback post in application/json content-type. 1.0.17 * v1.0, 2015-01-01, hotfix [#270](https://github.com/winlinvip/simple-rtmp-server/issues/270), memory leak for http client post. 1.0.16 * v1.0, 2014-12-29, hotfix [#267](https://github.com/winlinvip/simple-rtmp-server/issues/267), the forward dest ep should use server. 1.0.15 * v1.0, 2014-12-29, hotfix [#268](https://github.com/winlinvip/simple-rtmp-server/issues/268), the hls pcr is negative when startup. 1.0.14 diff --git a/trunk/src/app/srs_app_http_client.cpp b/trunk/src/app/srs_app_http_client.cpp index a1ad903cf5..978777599c 100644 --- a/trunk/src/app/srs_app_http_client.cpp +++ b/trunk/src/app/srs_app_http_client.cpp @@ -81,7 +81,7 @@ int SrsHttpClient::post(SrsHttpUri* uri, string req, string& res) << "Connection: Keep-Alive" << __SRS_CRLF << "Content-Length: " << std::dec << req.length() << __SRS_CRLF << "User-Agent: " << RTMP_SIG_SRS_NAME << RTMP_SIG_SRS_VERSION << __SRS_CRLF - << "Content-Type: text/html" << __SRS_CRLF + << "Content-Type: application/json" << __SRS_CRLF << __SRS_CRLF << req; diff --git a/trunk/src/core/srs_core.hpp b/trunk/src/core/srs_core.hpp index 37d5e06ade..7fadd5f19d 100644 --- a/trunk/src/core/srs_core.hpp +++ b/trunk/src/core/srs_core.hpp @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // current release version #define VERSION_MAJOR 1 #define VERSION_MINOR 0 -#define VERSION_REVISION 16 +#define VERSION_REVISION 17 // server info. #define RTMP_SIG_SRS_KEY "SRS" #define RTMP_SIG_SRS_ROLE "origin/edge server" From e590537dca10864d3265466154e2beca05e9b2d7 Mon Sep 17 00:00:00 2001 From: winlin Date: Fri, 2 Jan 2015 12:56:15 +0800 Subject: [PATCH 11/19] fix #207, trim the last 0 of log. 1.0.18 --- README.md | 1 + trunk/src/app/srs_app_log.cpp | 7 +++---- trunk/src/core/srs_core.hpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index aff39123a7..ebef16c45b 100755 --- a/README.md +++ b/README.md @@ -383,6 +383,7 @@ Supported operating systems and hardware: * 2013-10-17, Created.
## History +* v1.0, 2015-01-02, hotfix [#207](https://github.com/winlinvip/simple-rtmp-server/issues/207), trim the last 0 of log. 1.0.18 * v1.0, 2015-01-02, hotfix [#216](https://github.com/winlinvip/simple-rtmp-server/issues/216), http-callback post in application/json content-type. 1.0.17 * v1.0, 2015-01-01, hotfix [#270](https://github.com/winlinvip/simple-rtmp-server/issues/270), memory leak for http client post. 1.0.16 * v1.0, 2014-12-29, hotfix [#267](https://github.com/winlinvip/simple-rtmp-server/issues/267), the forward dest ep should use server. 1.0.15 diff --git a/trunk/src/app/srs_app_log.cpp b/trunk/src/app/srs_app_log.cpp index d2c920dc3e..6dbff78291 100644 --- a/trunk/src/app/srs_app_log.cpp +++ b/trunk/src/app/srs_app_log.cpp @@ -326,7 +326,6 @@ void SrsFastLog::write_log(int& fd, char *str_log, int size, int level) // add some to the end of char. str_log[size++] = LOG_TAIL; - str_log[size++] = 0; // if not to file, to console and return. if (!log_to_file_tank) { @@ -336,11 +335,11 @@ void SrsFastLog::write_log(int& fd, char *str_log, int size, int level) // \033[33m : yellow text code in shell // \033[0m : normal text code if (level <= SrsLogLevel::Trace) { - printf("%s", str_log); + printf("%.*s", size, str_log); } else if (level == SrsLogLevel::Warn) { - printf("\033[33m%s\033[0m", str_log); + printf("\033[33m%.*s\033[0m", size, str_log); } else{ - printf("\033[31m%s\033[0m", str_log); + printf("\033[31m%.*s\033[0m", size, str_log); } return; diff --git a/trunk/src/core/srs_core.hpp b/trunk/src/core/srs_core.hpp index 7fadd5f19d..7e35420e70 100644 --- a/trunk/src/core/srs_core.hpp +++ b/trunk/src/core/srs_core.hpp @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // current release version #define VERSION_MAJOR 1 #define VERSION_MINOR 0 -#define VERSION_REVISION 17 +#define VERSION_REVISION 18 // server info. #define RTMP_SIG_SRS_KEY "SRS" #define RTMP_SIG_SRS_ROLE "origin/edge server" From f9a33fbeee51ac8e77a4f1f39d61ae0d3e1d0230 Mon Sep 17 00:00:00 2001 From: winlin Date: Sat, 3 Jan 2015 13:29:52 +0800 Subject: [PATCH 12/19] fix the compile failed for utest at 32bits cpus --- trunk/src/utest/srs_utest_kernel.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/trunk/src/utest/srs_utest_kernel.cpp b/trunk/src/utest/srs_utest_kernel.cpp index 166981cc84..c0a9d333e9 100644 --- a/trunk/src/utest/srs_utest_kernel.cpp +++ b/trunk/src/utest/srs_utest_kernel.cpp @@ -1207,12 +1207,12 @@ VOID TEST(KernelStreamTest, StreamRead8Bytes) data[18] = 0x13; data[19] = 0x14; - EXPECT_EQ(0x0102030405060708, s.read_8bytes()); - EXPECT_EQ(0x090a0b0c0d0e0f10, s.read_8bytes()); + EXPECT_EQ(0x0102030405060708LL, s.read_8bytes()); + EXPECT_EQ(0x090a0b0c0d0e0f10LL, s.read_8bytes()); s.skip(-1 * s.pos()); s.skip(5); - EXPECT_EQ(0x060708090a0b0c0d, s.read_8bytes()); + EXPECT_EQ(0x060708090a0b0c0dLL, s.read_8bytes()); } /** @@ -1365,8 +1365,8 @@ VOID TEST(KernelStreamTest, StreamWrite8Bytes) EXPECT_TRUE(ERROR_SUCCESS == s.initialize(data, 1024)); - s.write_8bytes(0x1011121314151617); - s.write_8bytes(0x1819202122232425); + s.write_8bytes(0x1011121314151617LL); + s.write_8bytes(0x1819202122232425LL); s.skip(-1 * s.pos()); EXPECT_EQ(0x10, s.read_1bytes()); From 247b772449ad7cf60adfdd44bd7b85aa70bb0c29 Mon Sep 17 00:00:00 2001 From: winlin Date: Sat, 3 Jan 2015 15:07:12 +0800 Subject: [PATCH 13/19] hotfix to remove the pageUrl for http callback. 1.0.19 --- README.md | 1 + trunk/src/app/srs_app_http_hooks.cpp | 7 +------ trunk/src/core/srs_core.hpp | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index ebef16c45b..511d495cc6 100755 --- a/README.md +++ b/README.md @@ -383,6 +383,7 @@ Supported operating systems and hardware: * 2013-10-17, Created.
## History +* v1.0, 2015-01-03, hotfix to remove the pageUrl for http callback. 1.0.19 * v1.0, 2015-01-02, hotfix [#207](https://github.com/winlinvip/simple-rtmp-server/issues/207), trim the last 0 of log. 1.0.18 * v1.0, 2015-01-02, hotfix [#216](https://github.com/winlinvip/simple-rtmp-server/issues/216), http-callback post in application/json content-type. 1.0.17 * v1.0, 2015-01-01, hotfix [#270](https://github.com/winlinvip/simple-rtmp-server/issues/270), memory leak for http client post. 1.0.16 diff --git a/trunk/src/app/srs_app_http_hooks.cpp b/trunk/src/app/srs_app_http_hooks.cpp index 4c4c835af1..3d96c501ab 100644 --- a/trunk/src/app/srs_app_http_hooks.cpp +++ b/trunk/src/app/srs_app_http_hooks.cpp @@ -112,8 +112,7 @@ void SrsHttpHooks::on_close(string url, int client_id, string ip, SrsRequest* re << __SRS_JFIELD_ORG("client_id", client_id) << __SRS_JFIELD_CONT << __SRS_JFIELD_STR("ip", ip) << __SRS_JFIELD_CONT << __SRS_JFIELD_STR("vhost", req->vhost) << __SRS_JFIELD_CONT - << __SRS_JFIELD_STR("app", req->app) << __SRS_JFIELD_CONT - << __SRS_JFIELD_STR("pageUrl", req->pageUrl) + << __SRS_JFIELD_STR("app", req->app) << __SRS_JOBJECT_END; std::string data = ss.str(); std::string res; @@ -158,7 +157,6 @@ int SrsHttpHooks::on_publish(string url, int client_id, string ip, SrsRequest* r << __SRS_JFIELD_STR("ip", ip) << __SRS_JFIELD_CONT << __SRS_JFIELD_STR("vhost", req->vhost) << __SRS_JFIELD_CONT << __SRS_JFIELD_STR("app", req->app) << __SRS_JFIELD_CONT - << __SRS_JFIELD_STR("pageUrl", req->pageUrl) << __SRS_JFIELD_CONT << __SRS_JFIELD_STR("stream", req->stream) << __SRS_JOBJECT_END; std::string data = ss.str(); @@ -204,7 +202,6 @@ void SrsHttpHooks::on_unpublish(string url, int client_id, string ip, SrsRequest << __SRS_JFIELD_STR("ip", ip) << __SRS_JFIELD_CONT << __SRS_JFIELD_STR("vhost", req->vhost) << __SRS_JFIELD_CONT << __SRS_JFIELD_STR("app", req->app) << __SRS_JFIELD_CONT - << __SRS_JFIELD_STR("pageUrl", req->pageUrl) << __SRS_JFIELD_CONT << __SRS_JFIELD_STR("stream", req->stream) << __SRS_JOBJECT_END; std::string data = ss.str(); @@ -250,7 +247,6 @@ int SrsHttpHooks::on_play(string url, int client_id, string ip, SrsRequest* req) << __SRS_JFIELD_STR("ip", ip) << __SRS_JFIELD_CONT << __SRS_JFIELD_STR("vhost", req->vhost) << __SRS_JFIELD_CONT << __SRS_JFIELD_STR("app", req->app) << __SRS_JFIELD_CONT - << __SRS_JFIELD_STR("pageUrl", req->pageUrl) << __SRS_JFIELD_CONT << __SRS_JFIELD_STR("stream", req->stream) << __SRS_JOBJECT_END; std::string data = ss.str(); @@ -296,7 +292,6 @@ void SrsHttpHooks::on_stop(string url, int client_id, string ip, SrsRequest* req << __SRS_JFIELD_STR("ip", ip) << __SRS_JFIELD_CONT << __SRS_JFIELD_STR("vhost", req->vhost) << __SRS_JFIELD_CONT << __SRS_JFIELD_STR("app", req->app) << __SRS_JFIELD_CONT - << __SRS_JFIELD_STR("pageUrl", req->pageUrl) << __SRS_JFIELD_CONT << __SRS_JFIELD_STR("stream", req->stream) << __SRS_JOBJECT_END; std::string data = ss.str(); diff --git a/trunk/src/core/srs_core.hpp b/trunk/src/core/srs_core.hpp index 7e35420e70..3ebb62add7 100644 --- a/trunk/src/core/srs_core.hpp +++ b/trunk/src/core/srs_core.hpp @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // current release version #define VERSION_MAJOR 1 #define VERSION_MINOR 0 -#define VERSION_REVISION 18 +#define VERSION_REVISION 19 // server info. #define RTMP_SIG_SRS_KEY "SRS" #define RTMP_SIG_SRS_ROLE "origin/edge server" From 27e0521ace00032bde080f43890af9c4f8f3138c Mon Sep 17 00:00:00 2001 From: winlin Date: Thu, 8 Jan 2015 17:37:28 +0800 Subject: [PATCH 14/19] fix #281, fix hls bug ignore type-9 send aud. 1.0.20 --- README.md | 1 + trunk/src/app/srs_app_hls.cpp | 12 ++++++++++-- trunk/src/core/srs_core.hpp | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 511d495cc6..0101874f15 100755 --- a/README.md +++ b/README.md @@ -383,6 +383,7 @@ Supported operating systems and hardware: * 2013-10-17, Created.
## History +* v1.0, 2015-01-08, hotfix [#281](https://github.com/winlinvip/simple-rtmp-server/issues/281), fix hls bug ignore type-9 send aud. 1.0.20 * v1.0, 2015-01-03, hotfix to remove the pageUrl for http callback. 1.0.19 * v1.0, 2015-01-02, hotfix [#207](https://github.com/winlinvip/simple-rtmp-server/issues/207), trim the last 0 of log. 1.0.18 * v1.0, 2015-01-02, hotfix [#216](https://github.com/winlinvip/simple-rtmp-server/issues/216), http-callback post in application/json content-type. 1.0.17 diff --git a/trunk/src/app/srs_app_hls.cpp b/trunk/src/app/srs_app_hls.cpp index a5cf80d0e0..1e959543ed 100644 --- a/trunk/src/app/srs_app_hls.cpp +++ b/trunk/src/app/srs_app_hls.cpp @@ -1276,9 +1276,13 @@ int SrsHlsCache::cache_video(SrsAvcAacCodec* codec, SrsCodecSample* sample) // 6: Supplemental enhancement information (SEI) sei_rbsp( ), page 61 // @see: ngx_rtmp_hls_append_aud if (!aud_sent) { - if (nal_unit_type == 9) { + // @remark, when got type 9, we donot send aud_nal, but it will make + // ios unhappy, so we remove it. + // @see https://github.com/winlinvip/simple-rtmp-server/issues/281 + /*if (nal_unit_type == 9) { aud_sent = true; - } + }*/ + if (nal_unit_type == 1 || nal_unit_type == 5 || nal_unit_type == 6) { // for type 6, append a aud with type 9. vb->append((const char*)aud_nal, sizeof(aud_nal)); @@ -1487,6 +1491,10 @@ int SrsHls::on_video(SrsSharedPtrMessage* video) sample->clear(); if ((ret = codec->video_avc_demux(video->payload, video->size, sample)) != ERROR_SUCCESS) { + if (sample->frame_type == SrsCodecVideoAVCFrameVideoInfoFrame) { + srs_warn("hls igone the info frame, ret=%d", ret); + return ERROR_SUCCESS; + } srs_error("hls codec demux video failed. ret=%d", ret); return ret; } diff --git a/trunk/src/core/srs_core.hpp b/trunk/src/core/srs_core.hpp index 3ebb62add7..7e8d88fda9 100644 --- a/trunk/src/core/srs_core.hpp +++ b/trunk/src/core/srs_core.hpp @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // current release version #define VERSION_MAJOR 1 #define VERSION_MINOR 0 -#define VERSION_REVISION 19 +#define VERSION_REVISION 20 // server info. #define RTMP_SIG_SRS_KEY "SRS" #define RTMP_SIG_SRS_ROLE "origin/edge server" From c80477d58e90192e294ebbbce3d4a22ba0c8e882 Mon Sep 17 00:00:00 2001 From: winlin Date: Thu, 8 Jan 2015 19:03:41 +0800 Subject: [PATCH 15/19] update readme. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0101874f15..0a695d6003 100755 --- a/README.md +++ b/README.md @@ -383,6 +383,7 @@ Supported operating systems and hardware: * 2013-10-17, Created.
## History + * v1.0, 2015-01-08, hotfix [#281](https://github.com/winlinvip/simple-rtmp-server/issues/281), fix hls bug ignore type-9 send aud. 1.0.20 * v1.0, 2015-01-03, hotfix to remove the pageUrl for http callback. 1.0.19 * v1.0, 2015-01-02, hotfix [#207](https://github.com/winlinvip/simple-rtmp-server/issues/207), trim the last 0 of log. 1.0.18 From b705ed0b90daf9f142921923788a541e317bbf16 Mon Sep 17 00:00:00 2001 From: winlin Date: Wed, 14 Jan 2015 11:32:19 +0800 Subject: [PATCH 16/19] for bug #288, refine the codec decode info frame failed. 1.0.21 --- trunk/src/app/srs_app_avc_aac.cpp | 7 +++++++ trunk/src/app/srs_app_hls.cpp | 10 ++++++---- trunk/src/core/srs_core.hpp | 2 +- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/trunk/src/app/srs_app_avc_aac.cpp b/trunk/src/app/srs_app_avc_aac.cpp index 9682a0f7b3..1611b58195 100644 --- a/trunk/src/app/srs_app_avc_aac.cpp +++ b/trunk/src/app/srs_app_avc_aac.cpp @@ -337,6 +337,13 @@ int SrsAvcAacCodec::video_avc_demux(char* data, int size, SrsCodecSample* sample sample->frame_type = (SrsCodecVideoAVCFrame)frame_type; + // ignore info frame without error, + // @see https://github.com/winlinvip/simple-rtmp-server/issues/288#issuecomment-69863909 + if (sample->frame_type == SrsCodecVideoAVCFrameVideoInfoFrame) { + srs_warn("hls igone the info frame, ret=%d", ret); + return ret; + } + // only support h.264/avc if (codec_id != SrsCodecVideoAVC) { ret = ERROR_HLS_DECODE_ERROR; diff --git a/trunk/src/app/srs_app_hls.cpp b/trunk/src/app/srs_app_hls.cpp index 1e959543ed..af294ddb2b 100644 --- a/trunk/src/app/srs_app_hls.cpp +++ b/trunk/src/app/srs_app_hls.cpp @@ -1491,14 +1491,16 @@ int SrsHls::on_video(SrsSharedPtrMessage* video) sample->clear(); if ((ret = codec->video_avc_demux(video->payload, video->size, sample)) != ERROR_SUCCESS) { - if (sample->frame_type == SrsCodecVideoAVCFrameVideoInfoFrame) { - srs_warn("hls igone the info frame, ret=%d", ret); - return ERROR_SUCCESS; - } srs_error("hls codec demux video failed. ret=%d", ret); return ret; } + // ignore info frame, + // @see https://github.com/winlinvip/simple-rtmp-server/issues/288#issuecomment-69863909 + if (sample->frame_type == SrsCodecVideoAVCFrameVideoInfoFrame) { + return ret; + } + if (codec->video_codec_id != SrsCodecVideoAVC) { return ret; } diff --git a/trunk/src/core/srs_core.hpp b/trunk/src/core/srs_core.hpp index 7e8d88fda9..3b9d7b755f 100644 --- a/trunk/src/core/srs_core.hpp +++ b/trunk/src/core/srs_core.hpp @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // current release version #define VERSION_MAJOR 1 #define VERSION_MINOR 0 -#define VERSION_REVISION 20 +#define VERSION_REVISION 21 // server info. #define RTMP_SIG_SRS_KEY "SRS" #define RTMP_SIG_SRS_ROLE "origin/edge server" From 1316dab83c6fa0411d984bedcca7f86df888c683 Mon Sep 17 00:00:00 2001 From: winlin Date: Thu, 15 Jan 2015 09:17:35 +0800 Subject: [PATCH 17/19] update donation link to develop --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0a695d6003..6a4f23771f 100755 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ git clone https://git.oschina.net/winlinvip/srs.oschina.git 公用机器(LiveShow): [https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_LiveShow](https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_LiveShow)
捐款(Donation): [GitHub](http://winlinvip.github.io/srs.release/donation/index.html) 或 [阿里云镜像](http://www.ossrs.net/srs.release/donation/index.html) ,查看 -[捐献墙(Donations)](https://github.com/winlinvip/simple-rtmp-server/blob/master/DONATIONS.txt)
+[捐献墙(Donations)](https://github.com/winlinvip/simple-rtmp-server/blob/develop/DONATIONS.txt)
## About @@ -316,8 +316,8 @@ Donation:
[http://www.ossrs.net/srs.release/donation/index.html](http://www.ossrs.net/srs.release/donation/index.html) Donations:
-[https://github.com/winlinvip/simple-rtmp-server/blob/master/DONATIONS.txt] -(https://github.com/winlinvip/simple-rtmp-server/blob/master/DONATIONS.txt) +[https://github.com/winlinvip/simple-rtmp-server/blob/develop/DONATIONS.txt] +(https://github.com/winlinvip/simple-rtmp-server/blob/develop/DONATIONS.txt) ## System Requirements Supported operating systems and hardware: From bb74c8dfc56b989f36a0d2e0a0aa5f9de5ee84e4 Mon Sep 17 00:00:00 2001 From: winlin Date: Thu, 15 Jan 2015 11:24:00 +0800 Subject: [PATCH 18/19] update readme for 1.0r1 --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 6a4f23771f..82b6ede1fa 100755 --- a/README.md +++ b/README.md @@ -384,6 +384,7 @@ Supported operating systems and hardware: ## History +* v1.0, 2015-01-15, [1.0r1 release(1.0.20)](https://github.com/winlinvip/simple-rtmp-server/releases/tag/1.0r1) released. 59472 lines. * v1.0, 2015-01-08, hotfix [#281](https://github.com/winlinvip/simple-rtmp-server/issues/281), fix hls bug ignore type-9 send aud. 1.0.20 * v1.0, 2015-01-03, hotfix to remove the pageUrl for http callback. 1.0.19 * v1.0, 2015-01-02, hotfix [#207](https://github.com/winlinvip/simple-rtmp-server/issues/207), trim the last 0 of log. 1.0.18 From 98fb50464afc489962f5e185f98326e992ebe3d7 Mon Sep 17 00:00:00 2001 From: winlin Date: Thu, 15 Jan 2015 11:31:07 +0800 Subject: [PATCH 19/19] update readme for 1.0r1, 1.0.21 --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 82b6ede1fa..d07427bf30 100755 --- a/README.md +++ b/README.md @@ -362,6 +362,7 @@ Supported operating systems and hardware: [2.0dev branch](https://github.com/winlinvip/simple-rtmp-server/tree/master). ## Releases +* 2015-01-15, [Release v1.0r1](https://github.com/winlinvip/simple-rtmp-server/releases/tag/1.0r1), bug fixed, 1.0.21, 59472 lines.
* 2014-12-05, [Release v1.0](https://github.com/winlinvip/simple-rtmp-server/releases/tag/1.0), all bug fixed, 1.0.10, 59391 lines.
* 2014-10-09, [Release v1.0-beta](https://github.com/winlinvip/simple-rtmp-server/releases/tag/1.0.beta), all bug fixed, 1.0.0, 59316 lines.
* 2014-08-03, [Release v1.0-mainline7](https://github.com/winlinvip/simple-rtmp-server/releases/tag/1.0.mainline7), config utest, all bug fixed. 57432 lines.
@@ -384,7 +385,7 @@ Supported operating systems and hardware: ## History -* v1.0, 2015-01-15, [1.0r1 release(1.0.20)](https://github.com/winlinvip/simple-rtmp-server/releases/tag/1.0r1) released. 59472 lines. +* v1.0, 2015-01-15, [1.0r1 release(1.0.21)](https://github.com/winlinvip/simple-rtmp-server/releases/tag/1.0r1) released. 59472 lines. * v1.0, 2015-01-08, hotfix [#281](https://github.com/winlinvip/simple-rtmp-server/issues/281), fix hls bug ignore type-9 send aud. 1.0.20 * v1.0, 2015-01-03, hotfix to remove the pageUrl for http callback. 1.0.19 * v1.0, 2015-01-02, hotfix [#207](https://github.com/winlinvip/simple-rtmp-server/issues/207), trim the last 0 of log. 1.0.18