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

for #513, remove hls ram from srs2 to srs3+. 2.0.224

This commit is contained in:
winlin 2016-12-15 14:48:38 +08:00
parent 34e5cdcd12
commit 759c84a395
17 changed files with 26 additions and 556 deletions

View file

@ -82,8 +82,6 @@ const char* _srs_version = "XCORE-"RTMP_SIG_SRS_SERVER;
#define SRS_CONF_DEFAULT_HLS_ON_ERROR_DISCONNECT "disconnect"
#define SRS_CONF_DEFAULT_HLS_ON_ERROR_CONTINUE "continue"
#define SRS_CONF_DEFAULT_HLS_ON_ERROR SRS_CONF_DEFAULT_HLS_ON_ERROR_IGNORE
#define SRS_CONF_DEFAULT_HLS_STORAGE "disk"
#define SRS_CONF_DEFAULT_HLS_MOUNT "[vhost]/[app]/[stream].m3u8"
#define SRS_CONF_DEFAULT_HLS_ACODEC "aac"
#define SRS_CONF_DEFAULT_HLS_VCODEC "h264"
#define SRS_CONF_DEFAULT_HLS_CLEANUP true
@ -1906,6 +1904,11 @@ int SrsConfig::check_config()
srs_error("unsupported vhost hls directive %s, ret=%d", m.c_str(), ret);
return ret;
}
// TODO: FIXME: remove it in future.
if (m == "hls_storage" || m == "hls_mount") {
srs_warn("HLS RAM is removed from SRS2 to SRS3+, please read https://github.com/ossrs/srs/issues/513.");
}
}
} else if (n == "http_hooks") {
for (int j = 0; j < (int)conf->directives.size(); j++) {
@ -3793,40 +3796,6 @@ 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();
}
string SrsConfig::get_hls_acodec(string vhost)
{
SrsConfDirective* hls = get_hls(vhost);