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-16 17:31:31 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
c2ef77952322e56fc275761cf101e6f56f7d7ba2
c2ef7795
2 parents
366d3a3f
a5a9f7c8
Merge branch '2.0release' of github.com:simple-rtmp-server/srs into 2.0release
显示空白字符变更
内嵌
并排对比
正在显示
4 个修改的文件
包含
9 行增加
和
25 行删除
trunk/src/app/srs_app_http_stream.cpp
trunk/src/app/srs_app_rtmp_conn.cpp
trunk/src/app/srs_app_source.cpp
trunk/src/app/srs_app_source.hpp
trunk/src/app/srs_app_http_stream.cpp
查看文件 @
c2ef779
...
...
@@ -1210,15 +1210,6 @@ int SrsHttpStreamServer::hijack(ISrsHttpMessage* request, ISrsHttpHandler** ph)
srs_trace
(
"hstrs: source url=%s, is_edge=%d, source_id=%d[%d]"
,
r
->
get_stream_url
().
c_str
(),
vhost_is_edge
,
s
->
source_id
(),
s
->
source_id
());
// TODO: FIXME: disconnect when all connection closed.
if
(
vhost_is_edge
)
{
// notice edge to start for the first client.
if
((
ret
=
s
->
on_edge_start_play
())
!=
ERROR_SUCCESS
)
{
srs_error
(
"notice edge start play stream failed. ret=%d"
,
ret
);
return
ret
;
}
}
return
ret
;
}
...
...
trunk/src/app/srs_app_rtmp_conn.cpp
查看文件 @
c2ef779
...
...
@@ -537,14 +537,6 @@ 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
SrsQueueRecvThread
trd
(
consumer
,
rtmp
,
SRS_PERF_MW_SLEEP
);
...
...
@@ -841,7 +833,6 @@ int SrsRtmpConn::acquire_publish(SrsSource* source, bool is_edge)
if
((
ret
=
source
->
on_edge_start_publish
())
!=
ERROR_SUCCESS
)
{
srs_error
(
"notice edge start publish stream failed. ret=%d"
,
ret
);
}
return
ret
;
}
else
{
if
((
ret
=
source
->
on_publish
())
!=
ERROR_SUCCESS
)
{
srs_error
(
"notify publish failed. ret=%d"
,
ret
);
...
...
trunk/src/app/srs_app_source.cpp
查看文件 @
c2ef779
...
...
@@ -2136,6 +2136,15 @@ int SrsSource::create_consumer(SrsConsumer*& consumer, bool ds, bool dm, bool dg
srs_trace
(
"create consumer, ignore gop cache, jitter=%d"
,
jitter_algorithm
);
}
// for edge, when play edge stream, check the state
if
(
_srs_config
->
get_vhost_is_edge
(
_req
->
vhost
))
{
// notice edge to start for the first client.
if
((
ret
=
play_edge
->
on_client_play
())
!=
ERROR_SUCCESS
)
{
srs_error
(
"notice edge start play stream failed. ret=%d"
,
ret
);
return
ret
;
}
}
return
ret
;
}
...
...
@@ -2163,11 +2172,6 @@ SrsRtmpJitterAlgorithm SrsSource::jitter()
return
jitter_algorithm
;
}
int
SrsSource
::
on_edge_start_play
()
{
return
play_edge
->
on_client_play
();
}
int
SrsSource
::
on_edge_start_publish
()
{
return
publish_edge
->
on_client_publish
();
...
...
trunk/src/app/srs_app_source.hpp
查看文件 @
c2ef779
...
...
@@ -574,8 +574,6 @@ public:
virtual
SrsRtmpJitterAlgorithm
jitter
();
// internal
public:
// for edge, when play edge stream, check the state
virtual
int
on_edge_start_play
();
// for edge, when publish edge stream, check the state
virtual
int
on_edge_start_publish
();
// for edge, proxy the publish
...
...
请
注册
或
登录
后发表评论