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
2013-11-23 20:33:10 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b87318dec0b5a8d1113133b7cb4de8d07ec3fe9c
b87318de
1 parent
195a857f
extract method to process publish message
显示空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
18 行增加
和
4 行删除
trunk/src/core/srs_core_client.cpp
trunk/src/core/srs_core_client.hpp
trunk/src/core/srs_core_client.cpp
查看文件 @
b87318d
...
...
@@ -352,6 +352,19 @@ int SrsClient::publish(SrsSource* source, bool is_fmle)
(
int
)(
srs_get_system_time_ms
()
/
1000
),
pithy_print
.
get_age
(),
rtmp
->
get_send_bytes
(),
rtmp
->
get_recv_bytes
(),
rtmp
->
get_send_kbps
(),
rtmp
->
get_recv_kbps
());
}
if
((
ret
=
process_publish_message
(
source
,
hls
,
msg
,
is_fmle
))
!=
ERROR_SUCCESS
)
{
srs_error
(
"process publish message failed. ret=%d"
,
ret
);
return
ret
;
}
}
return
ret
;
}
int
SrsClient
::
process_publish_message
(
SrsSource
*
source
,
SrsHLS
*
hls
,
SrsCommonMessage
*
msg
,
bool
is_fmle
)
{
int
ret
=
ERROR_SUCCESS
;
// process audio packet
if
(
msg
->
header
.
is_audio
()
&&
((
ret
=
source
->
on_audio
(
msg
))
!=
ERROR_SUCCESS
))
{
srs_error
(
"process audio message failed. ret=%d"
,
ret
);
...
...
@@ -378,11 +391,11 @@ int SrsClient::publish(SrsSource* source, bool is_fmle)
return
ret
;
}
srs_trace
(
"process onMetaData message success."
);
continue
;
return
ret
;
}
srs_trace
(
"ignore AMF0/AMF3 data message."
);
continue
;
return
ret
;
}
// process UnPublish event.
...
...
@@ -405,8 +418,7 @@ int SrsClient::publish(SrsSource* source, bool is_fmle)
}
srs_trace
(
"ignore AMF0/AMF3 command message."
);
continue
;
}
return
ret
;
}
return
ret
;
...
...
trunk/src/core/srs_core_client.hpp
查看文件 @
b87318d
...
...
@@ -39,6 +39,7 @@ class SrsSource;
class
SrsRefer
;
class
SrsConsumer
;
class
SrsCommonMessage
;
class
SrsHLS
;
/**
* the client provides the main logic control for RTMP clients.
...
...
@@ -60,6 +61,7 @@ private:
virtual
int
check_vhost
();
virtual
int
playing
(
SrsSource
*
source
);
virtual
int
publish
(
SrsSource
*
source
,
bool
is_fmle
);
virtual
int
process_publish_message
(
SrsSource
*
source
,
SrsHLS
*
hls
,
SrsCommonMessage
*
msg
,
bool
is_fmle
);
virtual
int
get_peer_ip
();
virtual
int
process_play_control_msg
(
SrsConsumer
*
consumer
,
SrsCommonMessage
*
msg
);
};
...
...
请
注册
或
登录
后发表评论