mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
publish 1.0r1 release(1.0.20)
This commit is contained in:
parent
fbc35c46aa
commit
9bbce05778
9 changed files with 68 additions and 62 deletions
61
README.md
61
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) <br/>
|
||||
捐款(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)<br/>
|
||||
[捐献墙(Donations)](https://github.com/winlinvip/simple-rtmp-server/blob/develop/DONATIONS.txt)<br/>
|
||||
|
||||
## About
|
||||
|
||||
|
@ -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
|
||||
|
||||
<strong>Step 1:</strong> get SRS
|
||||
|
@ -306,13 +316,13 @@ Donation:<br/>
|
|||
[http://www.ossrs.net/srs.release/donation/index.html](http://www.ossrs.net/srs.release/donation/index.html)
|
||||
|
||||
Donations:<br/>
|
||||
[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:
|
||||
* All Linux , both 32 and 64 bits
|
||||
* All hardware.
|
||||
* All hardware with x86/x86_64/arm/mips cpu.
|
||||
|
||||
## Summary
|
||||
1. 简洁稳定:Simple, also stable enough.
|
||||
|
@ -373,6 +383,14 @@ Supported operating systems and hardware:
|
|||
* 2013-10-17, Created.<br/>
|
||||
|
||||
## History
|
||||
* <strong>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.</strong>
|
||||
* 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
|
||||
* 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-26, use master as main stable branch with hotfixes. 1.0.13
|
||||
* 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
|
||||
|
@ -723,41 +741,6 @@ Schema#2: SRS RTMP Edge server pull stream from origin (or upstream SRS
|
|||
RTMP Edge server), then delivery to Client.
|
||||
</pre>
|
||||
|
||||
### (plan) SRS Multiple processes Architecture(design by wenjie)
|
||||
|
||||
<pre>
|
||||
+---------------+ +--------+
|
||||
| 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.
|
||||
</pre>
|
||||
|
||||
### Bandwidth Test Workflow
|
||||
|
||||
<pre>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
cat <<END >>/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
|
||||
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -368,11 +368,16 @@ private:
|
|||
}
|
||||
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;
|
||||
|
@ -1271,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));
|
||||
|
@ -1486,6 +1495,12 @@ int SrsHls::on_video(SrsSharedPtrMessage* video)
|
|||
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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -31,7 +31,8 @@ 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 21
|
||||
|
||||
// server info.
|
||||
#define RTMP_SIG_SRS_KEY "SRS"
|
||||
#define RTMP_SIG_SRS_ROLE "origin/edge server"
|
||||
|
|
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue