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-07-06 10:32:47 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
9c716d4791ca75aaba796b8f3c2c67ab5cb2e949
9c716d47
2 parents
c8fef99c
3b8daafc
Merge branch '2.0release' into develop
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
15 行增加
和
24 行删除
trunk/configure
trunk/src/app/srs_app_rtmp_conn.cpp
trunk/configure
查看文件 @
9c716d4
...
...
@@ -167,7 +167,7 @@ PROTOCOL_OBJS="${MODULE_OBJS[@]}"
if
[
$SRS_EXPORT_LIBRTMP_PROJECT
=
NO
]
;
then
MODULE_ID
=
"APP"
MODULE_DEPENDS
=(
"CORE"
"KERNEL"
"PROTOCOL"
)
ModuleLibIncs
=(
${
LibSTRoot
}
${
LibHttpParserRoot
}
${
SRS_OBJS_DIR
}
)
ModuleLibIncs
=(
${
LibSTRoot
}
${
LibHttpParserRoot
}
${
LibSSLRoot
}
${
SRS_OBJS_DIR
}
)
MODULE_FILES
=(
"srs_app_server"
"srs_app_conn"
"srs_app_rtmp_conn"
"srs_app_source"
"srs_app_refer"
"srs_app_hls"
"srs_app_forward"
"srs_app_encoder"
"srs_app_http_stream"
"srs_app_thread"
"srs_app_bandwidth"
"srs_app_st"
"srs_app_log"
"srs_app_config"
...
...
@@ -200,7 +200,7 @@ LIBS_OBJS="${MODULE_OBJS[@]}"
if
[
$SRS_EXPORT_LIBRTMP_PROJECT
=
NO
]
;
then
MODULE_ID
=
"MAIN"
MODULE_DEPENDS
=(
"CORE"
"KERNEL"
"PROTOCOL"
"APP"
)
ModuleLibIncs
=(
${
LibSTRoot
}
${
SRS_OBJS_DIR
}
${
LibGperfRoot
}
${
LibHttpParserRoot
}
)
ModuleLibIncs
=(
${
LibSTRoot
}
${
SRS_OBJS_DIR
}
${
LibGperfRoot
}
${
LibHttpParserRoot
}
${
LibSSLRoot
}
)
MODULE_FILES
=(
"srs_main_server"
"srs_main_ingest_hls"
)
# add each modules for main
for
SRS_MODULE
in
${
SRS_MODULES
[*]
}
;
do
...
...
trunk/src/app/srs_app_rtmp_conn.cpp
100644 → 100755
查看文件 @
9c716d4
...
...
@@ -455,14 +455,6 @@ int SrsRtmpConn::stream_service_cycle()
case
SrsRtmpConnPlay
:
{
srs_verbose
(
"start to play stream %s."
,
req
->
stream
.
c_str
());
if
(
vhost_is_edge
)
{
// notice edge to start for the first client.
if
((
ret
=
source
->
on_edge_start_play
())
!=
ERROR_SUCCESS
)
{
srs_error
(
"notice edge start play stream failed. ret=%d"
,
ret
);
return
ret
;
}
}
// response connection start play
if
((
ret
=
rtmp
->
start_play
(
res
->
stream_id
))
!=
ERROR_SUCCESS
)
{
srs_error
(
"start to play stream failed. ret=%d"
,
ret
);
...
...
@@ -482,13 +474,6 @@ int SrsRtmpConn::stream_service_cycle()
case
SrsRtmpConnFMLEPublish
:
{
srs_verbose
(
"FMLE start to publish stream %s."
,
req
->
stream
.
c_str
());
if
(
vhost_is_edge
)
{
if
((
ret
=
source
->
on_edge_start_publish
())
!=
ERROR_SUCCESS
)
{
srs_error
(
"notice edge start publish stream failed. ret=%d"
,
ret
);
return
ret
;
}
}
if
((
ret
=
rtmp
->
start_fmle_publish
(
res
->
stream_id
))
!=
ERROR_SUCCESS
)
{
srs_error
(
"start to publish stream failed. ret=%d"
,
ret
);
return
ret
;
...
...
@@ -511,13 +496,6 @@ int SrsRtmpConn::stream_service_cycle()
case
SrsRtmpConnFlashPublish
:
{
srs_verbose
(
"flash start to publish stream %s."
,
req
->
stream
.
c_str
());
if
(
vhost_is_edge
)
{
if
((
ret
=
source
->
on_edge_start_publish
())
!=
ERROR_SUCCESS
)
{
srs_error
(
"notice edge start publish stream failed. ret=%d"
,
ret
);
return
ret
;
}
}
if
((
ret
=
rtmp
->
start_flash_publish
(
res
->
stream_id
))
!=
ERROR_SUCCESS
)
{
srs_error
(
"flash start to publish stream failed. ret=%d"
,
ret
);
return
ret
;
...
...
@@ -596,6 +574,14 @@ int SrsRtmpConn::playing(SrsSource* source)
}
SrsAutoFree
(
SrsConsumer
,
consumer
);
srs_verbose
(
"consumer created success."
);
if
(
_srs_config
->
get_vhost_is_edge
(
req
->
vhost
))
{
// notice edge to start for the first client.
if
((
ret
=
source
->
on_edge_start_play
())
!=
ERROR_SUCCESS
)
{
srs_error
(
"notice edge start play stream failed. ret=%d"
,
ret
);
return
ret
;
}
}
// use isolate thread to recv,
// @see: https://github.com/simple-rtmp-server/srs/issues/217
...
...
@@ -874,6 +860,11 @@ int SrsRtmpConn::do_publishing(SrsSource* source, SrsPublishRecvThread* trd)
return
ret
;
}
srs_verbose
(
"hls on_publish success."
);
}
else
{
if
((
ret
=
source
->
on_edge_start_publish
())
!=
ERROR_SUCCESS
)
{
srs_error
(
"notice edge start publish stream failed. ret=%d"
,
ret
);
return
ret
;
}
}
// start isolate recv thread.
...
...
请
注册
或
登录
后发表评论