1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

add hls prefix of uri supported

This commit is contained in:
wenjie.zhao 2015-03-13 00:22:55 +08:00
parent efe3050d7a
commit 10da182853
5 changed files with 32 additions and 5 deletions

View file

@ -1480,7 +1480,7 @@ int SrsConfig::check_config()
} else if (n == "hls") {
for (int j = 0; j < (int)conf->directives.size(); j++) {
string m = conf->at(j)->name.c_str();
if (m != "enabled" && m != "hls_path" && m != "hls_fragment" && m != "hls_window" && m != "hls_on_error"
if (m != "enabled" && m != "hls_entry_prefix" && m != "hls_path" && m != "hls_fragment" && m != "hls_window" && m != "hls_on_error"
&& m != "hls_storage" && m != "hls_mount" && m != "hls_td_ratio" && m != "hls_acodec" && m != "hls_vcodec"
) {
ret = ERROR_SYSTEM_CONFIG_INVALID;
@ -3138,6 +3138,23 @@ bool SrsConfig::get_hls_enabled(string vhost)
return false;
}
string SrsConfig::get_hls_entry_prefix(string vhost)
{
SrsConfDirective* hls = get_hls(vhost);
if (!hls) {
return "";
}
SrsConfDirective* conf = hls->get("hls_entry_prefix");
if (!conf) {
return "";
}
return conf->arg0();
}
string SrsConfig::get_hls_path(string vhost)
{
SrsConfDirective* hls = get_hls(vhost);