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
8 years ago
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
39aee2b318fa7f1898032830c0bda219396bfc62
39aee2b3
2 parents
4583a637
954bb186
for #742, fix publish recv thread bug.
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
9 行增加
和
2 行删除
trunk/src/app/srs_app_rtmp_conn.cpp
trunk/src/app/srs_app_rtmp_conn.hpp
trunk/src/app/srs_app_rtmp_conn.cpp
查看文件 @
39aee2b
...
...
@@ -305,7 +305,8 @@ SrsRtmpConn::SrsRtmpConn(SrsServer* svr, st_netfd_t c, string cip)
realtime
=
SRS_PERF_MIN_LATENCY_ENABLED
;
send_min_interval
=
0
;
tcp_nodelay
=
false
;
client_type
=
SrsRtmpConnUnknown
;
_srs_config
->
subscribe
(
this
);
}
...
...
@@ -709,6 +710,7 @@ int SrsRtmpConn::stream_service_cycle()
source
->
source_id
(),
source
->
source_id
());
source
->
set_cache
(
enabled_cache
);
client_type
=
type
;
switch
(
type
)
{
case
SrsRtmpConnPlay
:
{
srs_verbose
(
"start to play stream %s."
,
req
->
stream
.
c_str
());
...
...
@@ -1037,7 +1039,9 @@ int SrsRtmpConn::publishing(SrsSource* source)
// use isolate thread to recv,
// @see: https://github.com/ossrs/srs/issues/237
SrsPublishRecvThread
trd
(
rtmp
,
req
,
st_netfd_fileno
(
stfd
),
0
,
this
,
source
,
true
,
vhost_is_edge
);
st_netfd_fileno
(
stfd
),
0
,
this
,
source
,
client_type
==
SrsRtmpConnFMLEPublish
,
vhost_is_edge
);
srs_info
(
"start to publish stream %s success"
,
req
->
stream
.
c_str
());
ret
=
do_publishing
(
source
,
&
trd
);
...
...
trunk/src/app/srs_app_rtmp_conn.hpp
查看文件 @
39aee2b
...
...
@@ -35,6 +35,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <srs_app_st.hpp>
#include <srs_app_conn.hpp>
#include <srs_app_reload.hpp>
#include <srs_rtmp_stack.hpp>
class
SrsServer
;
class
SrsRtmpServer
;
...
...
@@ -150,6 +151,8 @@ private:
int
publish_normal_timeout
;
// whether enable the tcp_nodelay.
bool
tcp_nodelay
;
// The type of client, play or publish.
SrsRtmpConnType
client_type
;
public
:
SrsRtmpConn
(
SrsServer
*
svr
,
st_netfd_t
c
,
std
::
string
cip
);
virtual
~
SrsRtmpConn
();
...
...
请
注册
或
登录
后发表评论