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
2014-12-21 11:41:15 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
81e70e7bdb0a5d66522ab2926097eb3a54d0c8f9
81e70e7b
1 parent
eef80346
for bug
https://github.com/winlinvip/st-load/pull/3
, add ecma array to object.
显示空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
18 行增加
和
0 行删除
trunk/src/libs/srs_librtmp.cpp
trunk/src/libs/srs_librtmp.hpp
trunk/src/libs/srs_librtmp.cpp
查看文件 @
81e70e7
...
...
@@ -1740,6 +1740,22 @@ srs_amf0_t srs_amf0_create_object()
return
SrsAmf0Any
::
object
();
}
srs_amf0_t
srs_amf0_ecma_array_to_object
(
srs_amf0_t
ecma_arr
)
{
srs_assert
(
srs_amf0_is_ecma_array
(
ecma_arr
));
SrsAmf0EcmaArray
*
arr
=
(
SrsAmf0EcmaArray
*
)
ecma_arr
;
SrsAmf0Object
*
obj
=
SrsAmf0Any
::
object
();
for
(
int
i
=
0
;
i
<
arr
->
count
();
i
++
)
{
std
::
string
key
=
arr
->
key_at
(
i
);
SrsAmf0Any
*
value
=
arr
->
value_at
(
i
);
obj
->
set
(
key
,
value
->
copy
());
}
return
obj
;
}
void
srs_amf0_free
(
srs_amf0_t
amf0
)
{
SrsAmf0Any
*
any
=
(
SrsAmf0Any
*
)
amf0
;
...
...
trunk/src/libs/srs_librtmp.hpp
查看文件 @
81e70e7
...
...
@@ -552,12 +552,14 @@ typedef double srs_amf0_number;
* parse amf0 from data.
* @param nparsed, the parsed size, NULL to ignore.
* @return the parsed amf0 object. NULL for error.
* @remark user must free the parsed or created object by srs_amf0_free.
*/
extern
srs_amf0_t
srs_amf0_parse
(
char
*
data
,
int
size
,
int
*
nparsed
);
extern
srs_amf0_t
srs_amf0_create_number
(
srs_amf0_number
value
);
extern
srs_amf0_t
srs_amf0_create_ecma_array
();
extern
srs_amf0_t
srs_amf0_create_strict_array
();
extern
srs_amf0_t
srs_amf0_create_object
();
extern
srs_amf0_t
srs_amf0_ecma_array_to_object
(
srs_amf0_t
ecma_arr
);
extern
void
srs_amf0_free
(
srs_amf0_t
amf0
);
/* size and to bytes */
extern
int
srs_amf0_size
(
srs_amf0_t
amf0
);
...
...
请
注册
或
登录
后发表评论