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-28 22:32:50 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3515af9dff4e3aad45974cd3030caac762dff726
3515af9d
1 parent
de95bf74
add tools
显示空白字符变更
内嵌
并排对比
正在显示
4 个修改的文件
包含
31 行增加
和
1 行删除
trunk/3rdparty/tools/build_ccache.sh
trunk/3rdparty/tools/ccache-3.1.9.zip
trunk/src/core/srs_core_source.cpp
trunk/src/core/srs_core_source.hpp
trunk/3rdparty/tools/build_ccache.sh
0 → 100644
查看文件 @
3515af9
#!/bin/bash
# check exists.
if
[[
-f /usr/local/bin/ccache
]]
;
then
echo
"ccache is ok"
;
exit
0;
fi
# check sudoer.
sudo
echo
"ok"
> /dev/null 2>&1;
ret
=
$?
;
if
[[
0 -ne
${
ret
}
]]
;
then
echo
"you must be sudoer"
;
exit
1;
fi
unzip ccache-3.1.9.zip
&&
cd
ccache-3.1.9
&&
./configure
&&
make
ret
=
$?
;
if
[[
$ret
-ne 0
]]
;
then
echo
"build ccache failed."
;
exit
$ret
;
fi
sudo cp ccache /usr/local/bin
&&
sudo ln -s ccache /usr/local/bin/gcc
&&
sudo ln -s ccache /usr/local/bin/g++
&&
sudo ln -s ccache /usr/local/bin/cc
&&
sudo ln -s ccache /usr/local/bin/c++
ret
=
$?
;
if
[[
$ret
-ne 0
]]
;
then
echo
"install ccache failed."
;
exit
$ret
;
fi
...
...
trunk/3rdparty/tools/ccache-3.1.9.zip
0 → 100644
查看文件 @
3515af9
不能预览此文件类型
trunk/src/core/srs_core_source.cpp
查看文件 @
3515af9
...
...
@@ -364,12 +364,23 @@ SrsSource::SrsSource(std::string _stream_url)
SrsSource
::~
SrsSource
()
{
if
(
true
)
{
std
::
vector
<
SrsConsumer
*>::
iterator
it
;
for
(
it
=
consumers
.
begin
();
it
!=
consumers
.
end
();
++
it
)
{
SrsConsumer
*
consumer
=
*
it
;
srs_freep
(
consumer
);
}
consumers
.
clear
();
}
if
(
true
)
{
std
::
vector
<
SrsForwarder
*>::
iterator
it
;
for
(
it
=
forwarders
.
begin
();
it
!=
forwarders
.
end
();
++
it
)
{
SrsForwarder
*
forwarder
=
*
it
;
srs_freep
(
forwarder
);
}
forwarders
.
clear
();
}
srs_freep
(
cache_metadata
);
srs_freep
(
cache_sh_video
);
...
...
trunk/src/core/srs_core_source.hpp
查看文件 @
3515af9
...
...
@@ -166,14 +166,16 @@ public:
static
SrsSource
*
find
(
std
::
string
stream_url
);
private
:
std
::
string
stream_url
;
// to delivery stream to clients.
std
::
vector
<
SrsConsumer
*>
consumers
;
private
:
// hls handler.
#ifdef SRS_HLS
SrsHls
*
hls
;
#endif
// gop cache for client fast startup.
SrsGopCache
*
gop_cache
;
// to forward stream to other servers
std
::
vector
<
SrsForwarder
*>
forwarders
;
private
:
/**
* the sample rate of audio in metadata.
...
...
请
注册
或
登录
后发表评论