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
胡斌
2017-02-10 05:36:30 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
66748fdef3280472470685047a7d71a707e3415e
66748fde
1 parent
31a3d800
replace srs_info with srs_trace in do_decode_message
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
15 行增加
和
14 行删除
trunk/src/protocol/srs_rtmp_stack.cpp
trunk/src/protocol/srs_rtmp_stack.cpp
查看文件 @
66748fd
...
...
@@ -753,17 +753,17 @@ int SrsProtocol::do_decode_message(SrsMessageHeader& header, SrsStream* stream,
srs_verbose
(
"AMF0/AMF3 request parsed. request_name=%s"
,
request_name
.
c_str
());
if
(
request_name
==
RTMP_AMF0_COMMAND_CONNECT
)
{
srs_
info
(
"decode the AMF0/AMF3 response command(%s message)."
,
request_name
.
c_str
());
srs_
trace
(
"decode the AMF0/AMF3 response command(%s message)."
,
request_name
.
c_str
());
*
ppacket
=
packet
=
new
SrsConnectAppResPacket
();
return
packet
->
decode
(
stream
);
}
else
if
(
request_name
==
RTMP_AMF0_COMMAND_CREATE_STREAM
)
{
srs_
info
(
"decode the AMF0/AMF3 response command(%s message)."
,
request_name
.
c_str
());
srs_
trace
(
"decode the AMF0/AMF3 response command(%s message)."
,
request_name
.
c_str
());
*
ppacket
=
packet
=
new
SrsCreateStreamResPacket
(
0
,
0
);
return
packet
->
decode
(
stream
);
}
else
if
(
request_name
==
RTMP_AMF0_COMMAND_RELEASE_STREAM
||
request_name
==
RTMP_AMF0_COMMAND_FC_PUBLISH
||
request_name
==
RTMP_AMF0_COMMAND_UNPUBLISH
)
{
srs_
info
(
"decode the AMF0/AMF3 response command(%s message)."
,
request_name
.
c_str
());
srs_
trace
(
"decode the AMF0/AMF3 response command(%s message)."
,
request_name
.
c_str
());
*
ppacket
=
packet
=
new
SrsFMLEStartResPacket
(
0
);
return
packet
->
decode
(
stream
);
}
else
{
...
...
@@ -783,39 +783,39 @@ int SrsProtocol::do_decode_message(SrsMessageHeader& header, SrsStream* stream,
// decode command object.
if
(
command
==
RTMP_AMF0_COMMAND_CONNECT
)
{
srs_
info
(
"decode the AMF0/AMF3 command(connect vhost/app message)."
);
srs_
trace
(
"decode the AMF0/AMF3 command(connect vhost/app message)."
);
*
ppacket
=
packet
=
new
SrsConnectAppPacket
();
return
packet
->
decode
(
stream
);
}
else
if
(
command
==
RTMP_AMF0_COMMAND_CREATE_STREAM
)
{
srs_
info
(
"decode the AMF0/AMF3 command(createStream message)."
);
srs_
trace
(
"decode the AMF0/AMF3 command(createStream message)."
);
*
ppacket
=
packet
=
new
SrsCreateStreamPacket
();
return
packet
->
decode
(
stream
);
}
else
if
(
command
==
RTMP_AMF0_COMMAND_PLAY
)
{
srs_
info
(
"decode the AMF0/AMF3 command(paly message)."
);
srs_
trace
(
"decode the AMF0/AMF3 command(paly message)."
);
*
ppacket
=
packet
=
new
SrsPlayPacket
();
return
packet
->
decode
(
stream
);
}
else
if
(
command
==
RTMP_AMF0_COMMAND_PAUSE
)
{
srs_
info
(
"decode the AMF0/AMF3 command(pause message)."
);
srs_
trace
(
"decode the AMF0/AMF3 command(pause message)."
);
*
ppacket
=
packet
=
new
SrsPausePacket
();
return
packet
->
decode
(
stream
);
}
else
if
(
command
==
RTMP_AMF0_COMMAND_RELEASE_STREAM
)
{
srs_
info
(
"decode the AMF0/AMF3 command(FMLE releaseStream message)."
);
srs_
trace
(
"decode the AMF0/AMF3 command(FMLE releaseStream message)."
);
*
ppacket
=
packet
=
new
SrsFMLEStartPacket
();
return
packet
->
decode
(
stream
);
}
else
if
(
command
==
RTMP_AMF0_COMMAND_FC_PUBLISH
)
{
srs_
info
(
"decode the AMF0/AMF3 command(FMLE FCPublish message)."
);
srs_
trace
(
"decode the AMF0/AMF3 command(FMLE FCPublish message)."
);
*
ppacket
=
packet
=
new
SrsFMLEStartPacket
();
return
packet
->
decode
(
stream
);
}
else
if
(
command
==
RTMP_AMF0_COMMAND_PUBLISH
)
{
srs_
info
(
"decode the AMF0/AMF3 command(publish message)."
);
srs_
trace
(
"decode the AMF0/AMF3 command(publish message)."
);
*
ppacket
=
packet
=
new
SrsPublishPacket
();
return
packet
->
decode
(
stream
);
}
else
if
(
command
==
RTMP_AMF0_COMMAND_UNPUBLISH
)
{
srs_
info
(
"decode the AMF0/AMF3 command(unpublish message)."
);
srs_
trace
(
"decode the AMF0/AMF3 command(unpublish message)."
);
*
ppacket
=
packet
=
new
SrsFMLEStartPacket
();
return
packet
->
decode
(
stream
);
}
else
if
(
command
==
SRS_CONSTS_RTMP_SET_DATAFRAME
||
command
==
SRS_CONSTS_RTMP_ON_METADATA
)
{
srs_
info
(
"decode the AMF0/AMF3 data(onMetaData message)."
);
srs_
trace
(
"decode the AMF0/AMF3 data(onMetaData message)."
);
*
ppacket
=
packet
=
new
SrsOnMetaDataPacket
();
return
packet
->
decode
(
stream
);
}
else
if
(
command
==
SRS_BW_CHECK_FINISHED
...
...
@@ -831,15 +831,16 @@ int SrsProtocol::do_decode_message(SrsMessageHeader& header, SrsStream* stream,
||
command
==
SRS_BW_CHECK_STOPPED_PUBLISH
||
command
==
SRS_BW_CHECK_FINAL
)
{
srs_
info
(
"decode the AMF0/AMF3 band width check message."
);
srs_
trace
(
"decode the AMF0/AMF3 band width check message."
);
*
ppacket
=
packet
=
new
SrsBandwidthPacket
();
return
packet
->
decode
(
stream
);
}
else
if
(
command
==
RTMP_AMF0_COMMAND_CLOSE_STREAM
)
{
srs_
info
(
"decode the AMF0/AMF3 closeStream message."
);
srs_
trace
(
"decode the AMF0/AMF3 closeStream message."
);
*
ppacket
=
packet
=
new
SrsCloseStreamPacket
();
return
packet
->
decode
(
stream
);
}
else
if
(
command
==
RTMP_AMF0_COMMAND_CHECKBANDWIDTH
||
command
==
RTMP_AMF0_COMMAND_CHECKBW
)
{
//todo: process check bandwidth command,now drop it
srs_trace
(
"decode the AMF0/AMF3 call message:%s,ignore it"
,
command
.
c_str
());
return
ret
;
}
else
if
(
header
.
is_amf0_command
()
||
header
.
is_amf3_command
())
{
...
...
请
注册
或
登录
后发表评论