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-01-17 13:29:11 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a1f887f46f757601c3bd1bb520bfe97d3783189f
a1f887f4
1 parent
04aa6f82
refine code, move onMetaData to consts.
隐藏空白字符变更
内嵌
并排对比
正在显示
4 个修改的文件
包含
17 行增加
和
9 行删除
trunk/research/librtmp/srs_rtmp_dump.c
trunk/src/kernel/srs_kernel_consts.hpp
trunk/src/libs/srs_librtmp.cpp
trunk/src/rtmp/srs_protocol_stack.cpp
trunk/research/librtmp/srs_rtmp_dump.c
查看文件 @
a1f887f
...
...
@@ -290,7 +290,7 @@ int main(int argc, char** argv)
goto
rtmp_destroy
;
}
}
else
{
srs_human_trace
(
"drop message type=%
d
, size=%dB"
,
type
,
size
);
srs_human_trace
(
"drop message type=%
#x
, size=%dB"
,
type
,
size
);
}
}
...
...
trunk/src/kernel/srs_kernel_consts.hpp
查看文件 @
a1f887f
...
...
@@ -196,6 +196,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
// RTMP consts values
///////////////////////////////////////////////////////////
#define SRS_CONSTS_RTMP_SET_DATAFRAME "@setDataFrame"
#define SRS_CONSTS_RTMP_ON_METADATA "onMetaData"
///////////////////////////////////////////////////////////
// HTTP consts values
///////////////////////////////////////////////////////////
// linux path seprator
...
...
trunk/src/libs/srs_librtmp.cpp
查看文件 @
a1f887f
...
...
@@ -1082,11 +1082,15 @@ srs_bool srs_rtmp_is_onMetaData(char type, char* data, int size)
return
false
;
}
if
(
name
!=
"onMetaData"
)
{
return
false
;
if
(
name
==
SRS_CONSTS_RTMP_ON_METADATA
)
{
return
true
;
}
if
(
name
==
SRS_CONSTS_RTMP_SET_DATAFRAME
)
{
return
true
;
}
return
tru
e
;
return
fals
e
;
}
/**
...
...
trunk/src/rtmp/srs_protocol_stack.cpp
查看文件 @
a1f887f
...
...
@@ -189,8 +189,6 @@ messages.
#define RTMP_AMF0_COMMAND_UNPUBLISH "FCUnpublish"
#define RTMP_AMF0_COMMAND_PUBLISH "publish"
#define RTMP_AMF0_DATA_SAMPLE_ACCESS "|RtmpSampleAccess"
#define RTMP_AMF0_DATA_SET_DATAFRAME "@setDataFrame"
#define RTMP_AMF0_DATA_ON_METADATA "onMetaData"
/**
* band width check method name, which will be invoked by client.
...
...
@@ -1100,7 +1098,7 @@ int SrsProtocol::do_decode_message(SrsMessageHeader& header, SrsStream* stream,
srs_info
(
"decode the AMF0/AMF3 command(unpublish message)."
);
*
ppacket
=
packet
=
new
SrsFMLEStartPacket
();
return
packet
->
decode
(
stream
);
}
else
if
(
command
==
RTMP_AMF0_DATA_SET_DATAFRAME
||
command
==
RTMP_AMF0_DATA
_ON_METADATA
)
{
}
else
if
(
command
==
SRS_CONSTS_RTMP_SET_DATAFRAME
||
command
==
SRS_CONSTS_RTMP
_ON_METADATA
)
{
srs_info
(
"decode the AMF0/AMF3 data(onMetaData message)."
);
*
ppacket
=
packet
=
new
SrsOnMetaDataPacket
();
return
packet
->
decode
(
stream
);
...
...
@@ -3756,7 +3754,7 @@ int SrsSampleAccessPacket::encode_packet(SrsStream* stream)
SrsOnMetaDataPacket
::
SrsOnMetaDataPacket
()
{
name
=
RTMP_AMF0_DATA
_ON_METADATA
;
name
=
SRS_CONSTS_RTMP
_ON_METADATA
;
metadata
=
SrsAmf0Any
::
object
();
}
...
...
@@ -3775,7 +3773,7 @@ int SrsOnMetaDataPacket::decode(SrsStream* stream)
}
// ignore the @setDataFrame
if
(
name
==
RTMP_AMF0_DATA
_SET_DATAFRAME
)
{
if
(
name
==
SRS_CONSTS_RTMP
_SET_DATAFRAME
)
{
if
((
ret
=
srs_amf0_read_string
(
stream
,
name
))
!=
ERROR_SUCCESS
)
{
srs_error
(
"decode metadata name failed. ret=%d"
,
ret
);
return
ret
;
...
...
请
注册
或
登录
后发表评论