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

Merge branch '3.0release' into develop

This commit is contained in:
winlin 2020-02-05 14:18:07 +08:00
commit bdc7973596
13 changed files with 108 additions and 70 deletions

View file

@ -3488,6 +3488,7 @@ srs_error_t SrsConfig::check_normal_config()
&& n != "http_api" && n != "stats" && n != "vhost" && n != "pithy_print_ms"
&& n != "http_server" && n != "stream_caster" && n != "srt_server"
&& n != "utc_time" && n != "work_dir" && n != "asprocess"
&& n != "ff_log_level"
) {
return srs_error_new(ERROR_SYSTEM_CONFIG_INVALID, "illegal directive %s", n.c_str());
}
@ -5775,13 +5776,13 @@ string SrsConfig::get_log_file()
return conf->arg0();
}
bool SrsConfig::get_ffmpeg_log_enabled()
bool SrsConfig::get_ff_log_enabled()
{
string log = get_ffmpeg_log_dir();
string log = get_ff_log_dir();
return log != SRS_CONSTS_NULL_FILE;
}
string SrsConfig::get_ffmpeg_log_dir()
string SrsConfig::get_ff_log_dir()
{
static string DEFAULT = "./objs";
@ -5793,6 +5794,18 @@ string SrsConfig::get_ffmpeg_log_dir()
return conf->arg0();
}
string SrsConfig::get_ff_log_level()
{
static string DEFAULT = "info";
SrsConfDirective* conf = root->get("ff_log_level");
if (!conf || conf->arg0().empty()) {
return DEFAULT;
}
return conf->arg0();
}
SrsConfDirective* SrsConfig::get_dash(string vhost)
{
SrsConfDirective* conf = get_vhost(vhost);