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-03-26 18:13:33 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4c8d6d2eb1026267f7c824c69b26a921e2124181
4c8d6d2e
1 parent
ea3561de
fix bug of hls and rename demo player stream to live/demo. change to 0.9.36
隐藏空白字符变更
内嵌
并排对比
正在显示
8 个修改的文件
包含
25 行增加
和
13 行删除
trunk/conf/demo.19350.conf
trunk/conf/demo.conf
trunk/research/players/js/srs.page.js
trunk/scripts/_ffmpeg.players.sh
trunk/scripts/_step.start.srs.19350.sh
trunk/scripts/_step.start.srs.sh
trunk/src/app/srs_app_hls.cpp
trunk/src/core/srs_core.hpp
trunk/conf/demo.19350.conf
查看文件 @
4c8d6d2
...
...
@@ -3,6 +3,11 @@
# @see full.conf for detail config.
listen
19350
;
daemon
on
;
srs_log_tank
file
;
srs_log_file
./
objs
/
demo
.
19350
.
log
;
pid
./
objs
/
srs
.
demo
.
19350
.
pid
;
vhost
__
defaultVhost__
{
enabled
on
;
gop_cache
on
;
...
...
trunk/conf/demo.conf
查看文件 @
4c8d6d2
...
...
@@ -3,6 +3,11 @@
# @see full.conf for detail config.
listen
1935
;
daemon
on
;
srs_log_tank
file
;
srs_log_file
./
objs
/
demo
.
log
;
pid
./
objs
/
srs
.
demo
.
pid
;
chunk_size
60000
;
max_connections
2000
;
...
...
trunk/research/players/js/srs.page.js
查看文件 @
4c8d6d2
...
...
@@ -55,7 +55,7 @@ function build_default_rtmp_url() {
var
port
=
(
query
.
port
==
undefined
)?
1935
:
query
.
port
;
var
vhost
=
(
query
.
vhost
==
undefined
)?
window
.
location
.
hostname
:
query
.
vhost
;
var
app
=
(
query
.
app
==
undefined
)?
"live"
:
query
.
app
;
var
stream
=
(
query
.
stream
==
undefined
)?
"
livestream
"
:
query
.
stream
;
var
stream
=
(
query
.
stream
==
undefined
)?
"
demo
"
:
query
.
stream
;
if
(
server
==
vhost
||
vhost
==
""
)
{
return
"rtmp://"
+
server
+
":"
+
port
+
"/"
+
app
+
"/"
+
stream
;
...
...
@@ -71,7 +71,7 @@ function build_default_publish_rtmp_url() {
var
port
=
(
query
.
port
==
undefined
)?
1935
:
query
.
port
;
var
vhost
=
(
query
.
vhost
==
undefined
)?
window
.
location
.
hostname
:
query
.
vhost
;
var
app
=
(
query
.
app
==
undefined
)?
"live"
:
query
.
app
;
var
stream
=
(
query
.
stream
==
undefined
)?
"
livestream
"
:
query
.
stream
;
var
stream
=
(
query
.
stream
==
undefined
)?
"
demo
"
:
query
.
stream
;
if
(
server
==
vhost
||
vhost
==
""
)
{
return
"rtmp://"
+
server
+
":"
+
port
+
"/"
+
app
+
"/"
+
stream
;
...
...
@@ -114,7 +114,7 @@ function build_default_hls_url() {
var
port
=
(
query
.
hls_port
==
undefined
)?
window
.
location
.
port
:
query
.
hls_port
;
var
app
=
(
query
.
app
==
undefined
)?
"live"
:
query
.
app
;
var
stream
=
(
query
.
stream
==
undefined
)?
"
livestream
"
:
query
.
stream
;
var
stream
=
(
query
.
stream
==
undefined
)?
"
demo
"
:
query
.
stream
;
if
(
port
==
""
||
port
==
null
||
port
==
undefined
)
{
port
=
80
;
...
...
trunk/scripts/_ffmpeg.players.sh
查看文件 @
4c8d6d2
...
...
@@ -2,6 +2,6 @@
for
((
;;
))
;
do
\
./objs/ffmpeg/bin/ffmpeg -re -i ./doc/source.200kbps.768x320.flv
\
-vcodec copy -acodec copy
\
-f flv -y rtmp://127.0.0.1/live?vhost
=
players/
livestream
;
\
-f flv -y rtmp://127.0.0.1/live?vhost
=
players/
demo
;
\
sleep 1;
\
done
...
...
trunk/scripts/_step.start.srs.19350.sh
查看文件 @
4c8d6d2
...
...
@@ -2,10 +2,10 @@
src_dir
=
'src'
if
[[
! -d
$src_dir
]]
;
then
echo
"错误:必须在src同目录执行脚本"
;
exit
1;
fi
cmd
=
"
nohup ./objs/srs -c conf/demo.19350.conf > ./objs/demo.19350.log 2>&1 &
"
cmd
=
"
./objs/srs -c conf/demo.19350.conf
"
echo
"启动SRS转发服务器:
$cmd
"
pids
=
`
ps aux|grep srs|grep
"./objs"
|grep
"demo.19350.conf"
|awk
'{print $2}'
`
;
for
pid
in
$pids
;
do
echo
"结束现有进程:
$pid
"
;
kill
-s SIGKILL
$pid
;
done
nohup ./objs/srs -c conf/demo.19350.conf > ./objs/demo.19350.log 2>&1 &
./objs/srs -c conf/demo.19350.conf
ret
=
$?
;
if
[[
0 -ne
$ret
]]
;
then
echo
"错误:启动SRS转发服务器失败"
;
exit
$ret
;
fi
echo
"启动SRS转发服务器成功"
...
...
trunk/scripts/_step.start.srs.sh
查看文件 @
4c8d6d2
...
...
@@ -2,10 +2,10 @@
src_dir
=
'src'
if
[[
! -d
$src_dir
]]
;
then
echo
"错误:必须在src同目录执行脚本"
;
exit
1;
fi
cmd
=
"
nohup ./objs/srs -c conf/demo.conf >./objs/demo.log 2>&1 &
"
cmd
=
"
./objs/srs -c conf/demo.conf
"
echo
"启动SRS服务器:
$cmd
"
pids
=
`
ps aux|grep srs|grep
"./objs"
|grep
"demo.conf"
|awk
'{print $2}'
`
;
for
pid
in
$pids
;
do
echo
"结束现有进程:
$pid
"
;
kill
-s SIGKILL
$pid
;
done
nohup ./objs/srs -c conf/demo.conf >./objs/demo.log 2>&1 &
./objs/srs -c conf/demo.conf
ret
=
$?
;
if
[[
0 -ne
$ret
]]
;
then
echo
"错误:启动SRS失败"
;
exit
$ret
;
fi
echo
"启动SRS服务器成功"
...
...
trunk/src/app/srs_app_hls.cpp
查看文件 @
4c8d6d2
...
...
@@ -693,15 +693,17 @@ int SrsHlsMuxer::segment_close(string log_desc)
// close the muxer of finished segment.
srs_freep
(
current
->
muxer
);
std
::
string
full_path
=
current
->
full_path
;
current
=
NULL
;
// rename from tmp to real path
std
::
string
tmp_file
=
current
->
full_path
+
".tmp"
;
if
(
rename
(
tmp_file
.
c_str
(),
current
->
full_path
.
c_str
())
<
0
)
{
std
::
string
tmp_file
=
full_path
+
".tmp"
;
if
(
rename
(
tmp_file
.
c_str
(),
full_path
.
c_str
())
<
0
)
{
ret
=
ERROR_HLS_WRITE_FAILED
;
srs_error
(
"rename ts file failed, %s => %s. ret=%d"
,
tmp_file
.
c_str
(),
current
->
full_path
.
c_str
(),
ret
);
tmp_file
.
c_str
(),
full_path
.
c_str
(),
ret
);
return
ret
;
}
current
=
NULL
;
}
else
{
// reuse current segment index.
file_index
--
;
...
...
trunk/src/core/srs_core.hpp
查看文件 @
4c8d6d2
...
...
@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version
#define VERSION_MAJOR "0"
#define VERSION_MINOR "9"
#define VERSION_REVISION "3
5
"
#define VERSION_REVISION "3
6
"
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
// server info.
#define RTMP_SIG_SRS_KEY "srs"
...
...
请
注册
或
登录
后发表评论