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-12-15 13:23:03 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b3ef28f831b07419d237c5129390e265176ac7f2
b3ef28f8
1 parent
3ad692bf
fix bug of get hls enabled config
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
14 行增加
和
10 行删除
trunk/conf/srs.conf
trunk/src/core/srs_core_config.cpp
trunk/src/core/srs_core_hls.cpp
trunk/conf/srs.conf
查看文件 @
b3ef28f
...
...
@@ -23,14 +23,14 @@ vhost __defaultVhost__ {
gop_cache
on
;
forward
127
.
0
.
0
.
1
:
19350
;
hls
{
hls
on
;
enabled
on
;
hls_path
./
objs
/
nginx
/
html
;
hls_fragment
5
;
hls_window
30
;
}
transcode
{
enabled
on
;
ffmpeg
./
objs
/
ffmpeg
/
bin
/
ffmpeg
;
enabled
on
;
ffmpeg
./
objs
/
ffmpeg
/
bin
/
ffmpeg
;
engine
ld
{
enabled
on
;
vfilter
{
...
...
@@ -85,7 +85,7 @@ vhost dev {
gop_cache
on
;
#forward 127.0.0.1:19350;
hls
{
hls
off
;
enabled
on
;
hls_path
./
objs
/
nginx
/
html
;
hls_fragment
5
;
hls_window
30
;
...
...
@@ -635,7 +635,7 @@ vhost with-hls.vhost.com {
# whether the hls is enabled.
# if off, donot write hls(ts and m3u8) when publish.
# default: off
hls
on
;
enabled
on
;
# the hls output path.
# the app dir is auto created under the hls_path.
# for example, for rtmp stream:
...
...
@@ -662,7 +662,7 @@ vhost no-hls.vhost.com {
# whether the hls is enabled.
# if off, donot write hls(ts and m3u8) when publish.
# default: off
hls
off
;
enabled
off
;
}
}
# the vhost for min delay, donot cache any stream.
...
...
trunk/src/core/srs_core_config.cpp
查看文件 @
b3ef28f
...
...
@@ -1312,11 +1312,17 @@ bool SrsConfig::get_hls_enabled(string vhost)
return
false
;
}
if
(
hls
->
arg0
()
==
"off"
)
{
SrsConfDirective
*
conf
=
hls
->
get
(
"enabled"
);
if
(
!
conf
)
{
return
false
;
}
return
true
;
if
(
conf
->
arg0
()
==
"on"
)
{
return
true
;
}
return
false
;
}
string
SrsConfig
::
get_hls_path
(
string
vhost
)
...
...
trunk/src/core/srs_core_hls.cpp
查看文件 @
b3ef28f
...
...
@@ -1148,7 +1148,6 @@ int SrsHls::on_publish(SrsRequest* req)
std
::
string
stream
=
req
->
stream
;
std
::
string
app
=
req
->
app
;
// TODO: support reload.
if
(
!
config
->
get_hls_enabled
(
vhost
))
{
return
ret
;
}
...
...
@@ -1156,7 +1155,6 @@ int SrsHls::on_publish(SrsRequest* req)
// if enabled, open the muxer.
hls_enabled
=
true
;
// TODO: subscribe the reload event.
int
hls_fragment
=
config
->
get_hls_fragment
(
vhost
);
int
hls_window
=
config
->
get_hls_window
(
vhost
);
...
...
请
注册
或
登录
后发表评论