Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2015-08-18 17:43:01 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2cf526ffc752bbb6e0a4c15016ed6f37e9b3a041
2cf526ff
1 parent
ccc4c05d
close #454, support obs restart publish. 2.0.184
隐藏空白字符变更
内嵌
并排对比
正在显示
7 个修改的文件
包含
32 行增加
和
18 行删除
README.md
trunk/configure
trunk/src/app/srs_app_recv_thread.cpp
trunk/src/app/srs_app_rtmp_conn.cpp
trunk/src/app/srs_app_thread.cpp
trunk/src/core/srs_core.hpp
trunk/src/protocol/srs_rtmp_stack.cpp
README.md
查看文件 @
2cf526f
...
...
@@ -342,6 +342,7 @@ Remark:
## History
*
v2.0, 2015-08-18, close
[
#454
](
https://github.com/simple-rtmp-server/srs/issues/454
)
, support obs restart publish. 2.0.184
*
v2.0, 2015-08-14, use reduce_sequence_header for stream control.
*
v2.0, 2015-08-14, use send_min_interval for stream control. 2.0.183
*
v2.0, 2015-08-12, enable the SRS_PERF_TCP_NODELAY and add config tcp_nodelay. 2.0.182
...
...
trunk/configure
查看文件 @
2cf526f
...
...
@@ -508,10 +508,15 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
else
echo
-e
"
${
YELLOW
}
warning: without HLS support
${
BLACK
}
"
fi
if
[
$SRS_STREAM_CASTER
=
YES
]
;
then
echo
-e
"
${
YELLOW
}
Experiment: StreamCaster is enabled
${
BLACK
}
"
else
echo
-e
"
${
GREEN
}
note: without StreamCaster support
${
BLACK
}
"
fi
if
[
$SRS_HDS
=
YES
]
;
then
echo
-e
"
${
GREEN
}
HDS is enabled
${
BLACK
}
"
echo
-e
"
${
YELLOW
}
Experiment:
HDS is enabled
${
BLACK
}
"
else
echo
-e
"
${
YELLOW
}
warning: without HDS support
${
BLACK
}
"
echo
-e
"
${
GREEN
}
warning: without HDS support
${
BLACK
}
"
fi
if
[
$SRS_NGINX
=
YES
]
;
then
echo
-e
"
${
GREEN
}
Nginx http server is enabled
${
BLACK
}
"
...
...
trunk/src/app/srs_app_recv_thread.cpp
查看文件 @
2cf526f
...
...
@@ -96,7 +96,7 @@ int SrsRecvThread::cycle()
}
if
(
ret
!=
ERROR_SUCCESS
)
{
if
(
!
srs_is_client_gracefully_close
(
ret
))
{
if
(
!
srs_is_client_gracefully_close
(
ret
)
&&
!
srs_is_system_control_error
(
ret
)
)
{
srs_error
(
"thread process message failed. ret=%d"
,
ret
);
}
...
...
trunk/src/app/srs_app_rtmp_conn.cpp
查看文件 @
2cf526f
...
...
@@ -337,6 +337,16 @@ int SrsRtmpConn::service_cycle()
}
}
// set chunk size to larger.
// set the chunk size before any larger response greater than 128,
// to make OBS happy, @see https://github.com/simple-rtmp-server/srs/issues/454
int
chunk_size
=
_srs_config
->
get_chunk_size
(
req
->
vhost
);
if
((
ret
=
rtmp
->
set_chunk_size
(
chunk_size
))
!=
ERROR_SUCCESS
)
{
srs_error
(
"set chunk_size=%d failed. ret=%d"
,
chunk_size
,
ret
);
return
ret
;
}
srs_info
(
"set chunk_size=%d success"
,
chunk_size
);
// response the client connect ok.
if
((
ret
=
rtmp
->
response_connect_app
(
req
,
local_ip
.
c_str
()))
!=
ERROR_SUCCESS
)
{
srs_error
(
"response connect app failed. ret=%d"
,
ret
);
...
...
@@ -424,14 +434,6 @@ int SrsRtmpConn::stream_service_cycle()
rtmp
->
set_recv_timeout
(
SRS_CONSTS_RTMP_RECV_TIMEOUT_US
);
rtmp
->
set_send_timeout
(
SRS_CONSTS_RTMP_SEND_TIMEOUT_US
);
// set chunk size to larger.
int
chunk_size
=
_srs_config
->
get_chunk_size
(
req
->
vhost
);
if
((
ret
=
rtmp
->
set_chunk_size
(
chunk_size
))
!=
ERROR_SUCCESS
)
{
srs_error
(
"set chunk_size=%d failed. ret=%d"
,
chunk_size
,
ret
);
return
ret
;
}
srs_info
(
"set chunk_size=%d success"
,
chunk_size
);
// find a source to serve.
SrsSource
*
source
=
SrsSource
::
fetch
(
req
);
if
(
!
source
)
{
...
...
@@ -637,7 +639,7 @@ int SrsRtmpConn::do_playing(SrsSource* source, SrsConsumer* consumer, SrsQueueRe
// quit when recv thread error.
if
((
ret
=
trd
->
error_code
())
!=
ERROR_SUCCESS
)
{
if
(
!
srs_is_client_gracefully_close
(
ret
))
{
if
(
!
srs_is_client_gracefully_close
(
ret
)
&&
!
srs_is_system_control_error
(
ret
)
)
{
srs_error
(
"recv thread failed. ret=%d"
,
ret
);
}
return
ret
;
...
...
@@ -824,7 +826,7 @@ int SrsRtmpConn::do_publishing(SrsSource* source, SrsPublishRecvThread* trd)
// check the thread error code.
if
((
ret
=
trd
->
error_code
())
!=
ERROR_SUCCESS
)
{
if
(
!
srs_is_client_gracefully_close
(
ret
))
{
if
(
!
srs_is_
system_control_error
(
ret
)
&&
!
srs_is_
client_gracefully_close
(
ret
))
{
srs_error
(
"recv thread failed. ret=%d"
,
ret
);
}
return
ret
;
...
...
trunk/src/app/srs_app_thread.cpp
查看文件 @
2cf526f
...
...
@@ -187,7 +187,7 @@ namespace internal {
srs_info
(
"thread %s on before cycle success"
);
if
((
ret
=
handler
->
cycle
())
!=
ERROR_SUCCESS
)
{
if
(
!
srs_is_client_gracefully_close
(
ret
))
{
if
(
!
srs_is_client_gracefully_close
(
ret
)
&&
!
srs_is_system_control_error
(
ret
)
)
{
srs_warn
(
"thread %s cycle failed, ignored and retry, ret=%d"
,
_name
,
ret
);
}
goto
failed
;
...
...
trunk/src/core/srs_core.hpp
查看文件 @
2cf526f
...
...
@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version
#define VERSION_MAJOR 2
#define VERSION_MINOR 0
#define VERSION_REVISION 18
3
#define VERSION_REVISION 18
4
// server info.
#define RTMP_SIG_SRS_KEY "SRS"
...
...
trunk/src/protocol/srs_rtmp_stack.cpp
查看文件 @
2cf526f
...
...
@@ -2924,7 +2924,9 @@ int SrsRtmpServer::fmle_unpublish(int stream_id, double unpublish_tid)
pkt
->
data
->
set
(
StatusDescription
,
SrsAmf0Any
::
str
(
"Stop publishing stream."
));
if
((
ret
=
protocol
->
send_and_free_packet
(
pkt
,
stream_id
))
!=
ERROR_SUCCESS
)
{
srs_error
(
"send onFCUnpublish(NetStream.unpublish.Success) message failed. ret=%d"
,
ret
);
if
(
!
srs_is_system_control_error
(
ret
)
&&
!
srs_is_client_gracefully_close
(
ret
))
{
srs_error
(
"send onFCUnpublish(NetStream.unpublish.Success) message failed. ret=%d"
,
ret
);
}
return
ret
;
}
srs_info
(
"send onFCUnpublish(NetStream.unpublish.Success) message success."
);
...
...
@@ -2933,7 +2935,9 @@ int SrsRtmpServer::fmle_unpublish(int stream_id, double unpublish_tid)
if
(
true
)
{
SrsFMLEStartResPacket
*
pkt
=
new
SrsFMLEStartResPacket
(
unpublish_tid
);
if
((
ret
=
protocol
->
send_and_free_packet
(
pkt
,
stream_id
))
!=
ERROR_SUCCESS
)
{
srs_error
(
"send FCUnpublish response message failed. ret=%d"
,
ret
);
if
(
!
srs_is_system_control_error
(
ret
)
&&
!
srs_is_client_gracefully_close
(
ret
))
{
srs_error
(
"send FCUnpublish response message failed. ret=%d"
,
ret
);
}
return
ret
;
}
srs_info
(
"send FCUnpublish response message success."
);
...
...
@@ -2948,7 +2952,9 @@ int SrsRtmpServer::fmle_unpublish(int stream_id, double unpublish_tid)
pkt
->
data
->
set
(
StatusClientId
,
SrsAmf0Any
::
str
(
RTMP_SIG_CLIENT_ID
));
if
((
ret
=
protocol
->
send_and_free_packet
(
pkt
,
stream_id
))
!=
ERROR_SUCCESS
)
{
srs_error
(
"send onStatus(NetStream.Unpublish.Success) message failed. ret=%d"
,
ret
);
if
(
!
srs_is_system_control_error
(
ret
)
&&
!
srs_is_client_gracefully_close
(
ret
))
{
srs_error
(
"send onStatus(NetStream.Unpublish.Success) message failed. ret=%d"
,
ret
);
}
return
ret
;
}
srs_info
(
"send onStatus(NetStream.Unpublish.Success) message success."
);
...
...
请
注册
或
登录
后发表评论