mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
support change work_dir for oryx.
This commit is contained in:
parent
9bd2ff16e2
commit
2a01540433
5 changed files with 31 additions and 1 deletions
|
@ -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 != "utc_time" && n != "work_dir"
|
||||
) {
|
||||
ret = ERROR_SYSTEM_CONFIG_INVALID;
|
||||
srs_error("unsupported directive %s, ret=%d", n.c_str(), ret);
|
||||
|
@ -2172,6 +2172,17 @@ bool SrsConfig::get_utc_time()
|
|||
return SRS_CONF_PERFER_FALSE(conf->arg0());
|
||||
}
|
||||
|
||||
string SrsConfig::get_work_dir() {
|
||||
static string DEFAULT = "./";
|
||||
|
||||
SrsConfDirective* conf = root->get("work_dir");
|
||||
if( !conf || conf->arg0().empty()) {
|
||||
return DEFAULT;
|
||||
}
|
||||
|
||||
return conf->arg0();
|
||||
}
|
||||
|
||||
vector<SrsConfDirective*> SrsConfig::get_stream_casters()
|
||||
{
|
||||
srs_assert(root);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue