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-10-28 11:51:03 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ef00005ab4d0456925e5f65e51a02f7100b4bf7f
ef00005a
1 parent
50a7b9c1
for ExoPlayer, remove duration for live.
隐藏空白字符变更
内嵌
并排对比
正在显示
4 个修改的文件
包含
34 行增加
和
0 行删除
README.md
trunk/src/app/srs_app_source.cpp
trunk/src/protocol/srs_rtmp_amf0.cpp
trunk/src/protocol/srs_rtmp_amf0.hpp
README.md
查看文件 @
ef00005
...
...
@@ -336,6 +336,7 @@ Remark:
## History
*
v2.0, 2015-10-28, for
[
ExoPlayer #828
][
exo #828
]
, remove duration for live.
*
v2.0, 2015-10-28, for
[
ExoPlayer #828
][
exo #828
]
, add av tag in flv header. 2.0.197
*
v2.0, 2015-10-27, for
[
#512
][
bug #512
]
partical hotfix the hls pure audio. 2.0.196
*
<strong>
v2.0, 2015-10-08,
[
2.0 alpha2(2.0.195)
][
r2.0a2
]
released. 89358 lines.
</strong>
...
...
trunk/src/app/srs_app_source.cpp
查看文件 @
ef00005
...
...
@@ -1400,6 +1400,11 @@ int SrsSource::on_meta_data(SrsCommonMessage* msg, SrsOnMetaDataPacket* metadata
SrsAmf0Any
*
prop
=
NULL
;
// when exists the duration, remove it to make ExoPlayer happy.
if
(
metadata
->
metadata
->
get_property
(
"duration"
)
!=
NULL
)
{
metadata
->
metadata
->
remove
(
"duration"
);
}
// generate metadata info to print
std
::
stringstream
ss
;
if
((
prop
=
metadata
->
metadata
->
ensure_property_number
(
"width"
))
!=
NULL
)
{
...
...
trunk/src/protocol/srs_rtmp_amf0.cpp
查看文件 @
ef00005
...
...
@@ -513,6 +513,24 @@ SrsAmf0Any* SrsUnSortedHashtable::ensure_property_number(string name)
return
prop
;
}
void
SrsUnSortedHashtable
::
remove
(
string
name
)
{
std
::
vector
<
SrsAmf0ObjectPropertyType
>::
iterator
it
;
for
(
it
=
properties
.
begin
();
it
!=
properties
.
end
();)
{
std
::
string
key
=
it
->
first
;
SrsAmf0Any
*
any
=
it
->
second
;
if
(
key
==
name
)
{
srs_freep
(
any
);
it
=
properties
.
erase
(
it
);
}
else
{
++
it
;
}
}
}
void
SrsUnSortedHashtable
::
copy
(
SrsUnSortedHashtable
*
src
)
{
std
::
vector
<
SrsAmf0ObjectPropertyType
>::
iterator
it
;
...
...
@@ -787,6 +805,11 @@ SrsAmf0Any* SrsAmf0Object::ensure_property_number(string name)
return
properties
->
ensure_property_number
(
name
);
}
void
SrsAmf0Object
::
remove
(
string
name
)
{
properties
->
remove
(
name
);
}
SrsAmf0EcmaArray
::
SrsAmf0EcmaArray
()
{
_count
=
0
;
...
...
trunk/src/protocol/srs_rtmp_amf0.hpp
查看文件 @
ef00005
...
...
@@ -405,6 +405,10 @@ public:
* @remark user should never free the returned value, copy it if needed.
*/
virtual
SrsAmf0Any
*
ensure_property_number
(
std
::
string
name
);
/**
* remove the property specified by name.
*/
virtual
void
remove
(
std
::
string
name
);
};
/**
...
...
@@ -803,6 +807,7 @@ namespace _srs_internal
virtual
SrsAmf0Any
*
get_property
(
std
::
string
name
);
virtual
SrsAmf0Any
*
ensure_property_string
(
std
::
string
name
);
virtual
SrsAmf0Any
*
ensure_property_number
(
std
::
string
name
);
virtual
void
remove
(
std
::
string
name
);
public
:
virtual
void
copy
(
SrsUnSortedHashtable
*
src
);
};
...
...
请
注册
或
登录
后发表评论