mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix #136, support hls without io(in ram). 2.0.112
This commit is contained in:
parent
89b37d3469
commit
a23191497f
14 changed files with 688 additions and 87 deletions
|
@ -1479,7 +1479,9 @@ 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_path" && m != "hls_fragment" && m != "hls_window" && m != "hls_on_error"
|
||||
&& m != "hls_storage" && m != "hls_mount"
|
||||
) {
|
||||
ret = ERROR_SYSTEM_CONFIG_INVALID;
|
||||
srs_error("unsupported vhost hls directive %s, ret=%d", m.c_str(), ret);
|
||||
return ret;
|
||||
|
@ -1799,6 +1801,7 @@ int SrsConfig::check_config()
|
|||
}
|
||||
}
|
||||
#endif
|
||||
// TODO: FIXME: required http server when hls storage is ram or both.
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@ -3278,6 +3281,40 @@ string SrsConfig::get_hls_on_error(string vhost)
|
|||
return conf->arg0();
|
||||
}
|
||||
|
||||
string SrsConfig::get_hls_storage(string vhost)
|
||||
{
|
||||
SrsConfDirective* hls = get_hls(vhost);
|
||||
|
||||
if (!hls) {
|
||||
return SRS_CONF_DEFAULT_HLS_STORAGE;
|
||||
}
|
||||
|
||||
SrsConfDirective* conf = hls->get("hls_storage");
|
||||
|
||||
if (!conf) {
|
||||
return SRS_CONF_DEFAULT_HLS_STORAGE;
|
||||
}
|
||||
|
||||
return conf->arg0();
|
||||
}
|
||||
|
||||
string SrsConfig::get_hls_mount(string vhost)
|
||||
{
|
||||
SrsConfDirective* hls = get_hls(vhost);
|
||||
|
||||
if (!hls) {
|
||||
return SRS_CONF_DEFAULT_HLS_MOUNT;
|
||||
}
|
||||
|
||||
SrsConfDirective* conf = hls->get("hls_mount");
|
||||
|
||||
if (!conf) {
|
||||
return SRS_CONF_DEFAULT_HLS_MOUNT;
|
||||
}
|
||||
|
||||
return conf->arg0();
|
||||
}
|
||||
|
||||
SrsConfDirective* SrsConfig::get_dvr(string vhost)
|
||||
{
|
||||
SrsConfDirective* conf = get_vhost(vhost);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue