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

support asprocess for oryx. 2.0.218

This commit is contained in:
winlin 2016-09-23 15:00:50 +08:00
parent 2a01540433
commit b748fac23a
7 changed files with 53 additions and 3 deletions

View file

@ -1567,7 +1567,7 @@ int SrsConfig::check_config()
&& n != "max_connections" && n != "daemon" && n != "heartbeat"
&& n != "http_api" && n != "stats" && n != "vhost" && n != "pithy_print_ms"
&& n != "http_stream" && n != "http_server" && n != "stream_caster"
&& n != "utc_time" && n != "work_dir"
&& n != "utc_time" && n != "work_dir" && n != "asprocess"
) {
ret = ERROR_SYSTEM_CONFIG_INVALID;
srs_error("unsupported directive %s, ret=%d", n.c_str(), ret);
@ -2055,6 +2055,13 @@ int SrsConfig::check_config()
// TODO: FIXME: required http server when hls storage is ram or both.
}
// asprocess conflict with daemon
if (get_asprocess() && get_deamon()) {
ret = ERROR_SYSTEM_CONFIG_INVALID;
srs_error("daemon conflict with asprocess, ret=%d", ret);
return ret;
}
return ret;
}
@ -2183,6 +2190,18 @@ string SrsConfig::get_work_dir() {
return conf->arg0();
}
bool SrsConfig::get_asprocess()
{
static bool DEFAULT = false;
SrsConfDirective* conf = root->get("asprocess");
if (!conf || conf->arg0().empty()) {
return DEFAULT;
}
return SRS_CONF_PERFER_FALSE(conf->arg0());
}
vector<SrsConfDirective*> SrsConfig::get_stream_casters()
{
srs_assert(root);