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
wenjie.zhao
2015-03-13 01:32:51 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5969f723545ee68f2c5d3fdbb608b3a2d103d899
5969f723
1 parent
10da1828
for #340, refine ts prefix code.
隐藏空白字符变更
内嵌
并排对比
正在显示
5 个修改的文件
包含
22 行增加
和
5 行删除
trunk/conf/full.conf
trunk/conf/hls.conf
trunk/src/app/srs_app_config.cpp
trunk/src/app/srs_app_hls.cpp
trunk/src/app/srs_app_hls.hpp
trunk/conf/full.conf
查看文件 @
5969f72
...
...
@@ -526,6 +526,13 @@ vhost with-hls.srs.com {
# in a word, the hls_path is for vhost.
# default: ./objs/nginx/html
hls_path
./
objs
/
nginx
/
html
;
# the hls entry prefix, which is base url of ts url.
# if specified, the ts path in m3u8 will be like:
# http://your-server/live/livestream-0.ts
# http://your-server/live/livestream-1.ts
# ...
# optional, default to empty string.
hls_entry_prefix
http
://
your
-
server
/;
# the hls mount for hls_storage ram,
# which use srs embeded http server to delivery HLS,
# where the mount specifies the HTTP url to mount.
...
...
trunk/conf/hls.conf
查看文件 @
5969f72
...
...
@@ -9,7 +9,7 @@ vhost __defaultVhost__ {
enabled
on
;
hls_fragment
10
;
hls_window
60
;
#
hls_entry_prefix http://127.0.0.1/;
#
hls_entry_prefix http://127.0.0.1/;
hls_path
./
objs
/
nginx
/
html
;
}
}
...
...
trunk/src/app/srs_app_config.cpp
查看文件 @
5969f72
...
...
@@ -3152,7 +3152,17 @@ string SrsConfig::get_hls_entry_prefix(string vhost)
return
""
;
}
return
conf
->
arg0
();
std
::
string
hls_entry_prefix
=
conf
->
arg0
();
if
(
hls_entry_prefix
.
empty
())
{
return
""
;
}
char
last_char
=
hls_entry_prefix
[
hls_entry_prefix
.
length
()
-
1
];
if
(
last_char
!=
'/'
)
{
hls_entry_prefix
.
append
(
"/"
);
}
return
hls_entry_prefix
;
}
string
SrsConfig
::
get_hls_path
(
string
vhost
)
...
...
trunk/src/app/srs_app_hls.cpp
查看文件 @
5969f72
...
...
@@ -203,14 +203,14 @@ int SrsHlsMuxer::sequence_no()
return
_sequence_no
;
}
int
SrsHlsMuxer
::
update_config
(
SrsRequest
*
r
,
string
_entry_prefix
,
string
path
,
int
fragment
,
int
window
)
int
SrsHlsMuxer
::
update_config
(
SrsRequest
*
r
,
string
hls
_entry_prefix
,
string
path
,
int
fragment
,
int
window
)
{
int
ret
=
ERROR_SUCCESS
;
srs_freep
(
req
);
req
=
r
->
copy
();
entry_prefix
=
_entry_prefix
;
entry_prefix
=
hls
_entry_prefix
;
hls_path
=
path
;
hls_fragment
=
fragment
;
hls_window
=
window
;
...
...
trunk/src/app/srs_app_hls.hpp
查看文件 @
5969f72
...
...
@@ -208,7 +208,7 @@ public:
/**
* when publish, update the config for muxer.
*/
virtual
int
update_config
(
SrsRequest
*
r
,
std
::
string
_entry_prefix
,
std
::
string
path
,
int
fragment
,
int
window
);
virtual
int
update_config
(
SrsRequest
*
r
,
std
::
string
hls
_entry_prefix
,
std
::
string
path
,
int
fragment
,
int
window
);
/**
* open a new segment(a new ts file),
* @param segment_start_dts use to calc the segment duration,
...
...
请
注册
或
登录
后发表评论