1
0
Fork 0
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:
winlin 2015-01-15 11:30:03 +08:00
parent fbc35c46aa
commit 9bbce05778
9 changed files with 68 additions and 62 deletions

View file

@ -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

View file

@ -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;

View file

@ -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;

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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();

View file

@ -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"

View file

@ -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());