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-03-17 07:57:58 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2241ba0e3490d2f17fbe38c2aec67b62a53b3ef1
2241ba0e
1 parent
1a12ff0d
for #340, #343, add wiki and use srs string function, support hls_entry_prefix(h…
…ls base url). 2.0.142
显示空白字符变更
内嵌
并排对比
正在显示
5 个修改的文件
包含
12 行增加
和
20 行删除
trunk/conf/full.conf
trunk/src/app/srs_app_config.cpp
trunk/src/app/srs_app_hls.cpp
trunk/src/app/srs_app_hls.hpp
trunk/src/core/srs_core.hpp
trunk/conf/full.conf
查看文件 @
2241ba0
...
...
@@ -532,7 +532,7 @@ vhost with-hls.srs.com {
# http://your-server/live/livestream-1.ts
# ...
# optional, default to empty string.
hls_entry_prefix
http
://
your
-
server
/
;
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/src/app/srs_app_config.cpp
查看文件 @
2241ba0
...
...
@@ -3152,17 +3152,7 @@ string SrsConfig::get_hls_entry_prefix(string vhost)
return
""
;
}
std
::
string
prefix
=
conf
->
arg0
();
if
(
prefix
.
empty
())
{
return
""
;
}
const
char
last
=
prefix
[
prefix
.
length
()
-
1
];
if
(
last
!=
'/'
)
{
return
prefix
.
append
(
"/"
);
}
return
prefix
;
return
conf
->
arg0
();
}
string
SrsConfig
::
get_hls_path
(
string
vhost
)
...
...
trunk/src/app/srs_app_hls.cpp
查看文件 @
2241ba0
...
...
@@ -203,14 +203,14 @@ int SrsHlsMuxer::sequence_no()
return
_sequence_no
;
}
int
SrsHlsMuxer
::
update_config
(
SrsRequest
*
r
,
string
hls_entry_prefix
,
string
path
,
int
fragment
,
int
window
)
int
SrsHlsMuxer
::
update_config
(
SrsRequest
*
r
,
string
entry_prefix
,
string
path
,
int
fragment
,
int
window
)
{
int
ret
=
ERROR_SUCCESS
;
srs_freep
(
req
);
req
=
r
->
copy
();
entry_prefix
=
hls_
entry_prefix
;
hls_entry_prefix
=
entry_prefix
;
hls_path
=
path
;
hls_fragment
=
fragment
;
hls_window
=
window
;
...
...
@@ -301,8 +301,10 @@ int SrsHlsMuxer::segment_open(int64_t segment_start_dts)
current
->
full_path
+=
"/"
;
current
->
full_path
+=
filename
;
// TODO: support base url, and so on.
current
->
uri
+=
entry_prefix
;
current
->
uri
+=
hls_entry_prefix
;
if
(
!
hls_entry_prefix
.
empty
()
&&
!
srs_string_ends_with
(
hls_entry_prefix
,
"/"
))
{
current
->
uri
+=
"/"
;
}
current
->
uri
+=
filename
;
std
::
string
tmp_file
=
current
->
full_path
+
".tmp"
;
...
...
trunk/src/app/srs_app_hls.hpp
查看文件 @
2241ba0
...
...
@@ -167,7 +167,7 @@ class SrsHlsMuxer
private
:
SrsRequest
*
req
;
private
:
std
::
string
entry_prefix
;
std
::
string
hls_
entry_prefix
;
std
::
string
hls_path
;
int
hls_fragment
;
int
hls_window
;
...
...
@@ -208,7 +208,7 @@ public:
/**
* when publish, update the config for muxer.
*/
virtual
int
update_config
(
SrsRequest
*
r
,
std
::
string
hls_
entry_prefix
,
std
::
string
path
,
int
fragment
,
int
window
);
virtual
int
update_config
(
SrsRequest
*
r
,
std
::
string
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,
...
...
trunk/src/core/srs_core.hpp
查看文件 @
2241ba0
...
...
@@ -29,9 +29,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
// current release version
#define VERSION_MAJOR
3
#define VERSION_MAJOR
2
#define VERSION_MINOR 0
#define VERSION_REVISION
0
#define VERSION_REVISION
142
// server info.
#define RTMP_SIG_SRS_KEY "SRS"
...
...
请
注册
或
登录
后发表评论