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

for #304, rewrite hls/ts code, support h.264+mp3 for hls. 2.0.117.

This commit is contained in:
winlin 2015-02-15 17:43:35 +08:00
parent 3c813847bd
commit 922150b2cf
8 changed files with 54 additions and 10 deletions

View file

@ -1480,7 +1480,7 @@ int SrsConfig::check_config()
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"
&& m != "hls_storage" && m != "hls_mount" && m != "hls_td_ratio"
&& m != "hls_storage" && m != "hls_mount" && m != "hls_td_ratio" && m != "hls_acodec"
) {
ret = ERROR_SYSTEM_CONFIG_INVALID;
srs_error("unsupported vhost hls directive %s, ret=%d", m.c_str(), ret);
@ -3332,6 +3332,23 @@ string SrsConfig::get_hls_mount(string vhost)
return conf->arg0();
}
string SrsConfig::get_hls_acodec(string vhost)
{
SrsConfDirective* hls = get_hls(vhost);
if (!hls) {
return SRS_CONF_DEFAULT_HLS_ACODEC;
}
SrsConfDirective* conf = hls->get("hls_acodec");
if (!conf) {
return SRS_CONF_DEFAULT_HLS_ACODEC;
}
return conf->arg0();
}
SrsConfDirective* SrsConfig::get_dvr(string vhost)
{
SrsConfDirective* conf = get_vhost(vhost);