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

fix forward conf file bug, change pid file. change to 0.9.48

This commit is contained in:
winlin 2014-04-04 15:35:17 +08:00
parent 28b0c3a27f
commit b7093246e4
6 changed files with 65 additions and 54 deletions

View file

@ -1266,54 +1266,6 @@ string SrsConfig::get_engine_output(SrsConfDirective* engine)
return conf->arg0();
}
string SrsConfig::get_ffmpeg_log_dir()
{
srs_assert(root);
SrsConfDirective* conf = root->get("ff_log_dir");
if (!conf || conf->arg0().empty()) {
return "./objs/logs";
}
return conf->arg0();
}
string SrsConfig::get_srs_log_file()
{
srs_assert(root);
SrsConfDirective* conf = root->get("srs_log_file");
if (!conf || conf->arg0().empty()) {
return "./objs/srs.log";
}
return conf->arg0();
}
string SrsConfig::get_srs_log_level()
{
srs_assert(root);
SrsConfDirective* conf = root->get("srs_log_level");
if (!conf || conf->arg0().empty()) {
return "trace";
}
return conf->arg0();
}
bool SrsConfig::get_srs_log_tank_file()
{
srs_assert(root);
SrsConfDirective* conf = root->get("srs_log_tank");
if (conf && conf->arg0() == "console") {
return false;
}
return true;
}
bool SrsConfig::get_deamon()
{
srs_assert(root);
@ -1397,6 +1349,54 @@ SrsConfDirective* SrsConfig::get_forward(string vhost)
return conf->get("forward");
}
string SrsConfig::get_srs_log_file()
{
srs_assert(root);
SrsConfDirective* conf = root->get("srs_log_file");
if (!conf || conf->arg0().empty()) {
return "./objs/srs.log";
}
return conf->arg0();
}
string SrsConfig::get_ffmpeg_log_dir()
{
srs_assert(root);
SrsConfDirective* conf = root->get("ff_log_dir");
if (!conf || conf->arg0().empty()) {
return "./objs/logs";
}
return conf->arg0();
}
string SrsConfig::get_srs_log_level()
{
srs_assert(root);
SrsConfDirective* conf = root->get("srs_log_level");
if (!conf || conf->arg0().empty()) {
return "trace";
}
return conf->arg0();
}
bool SrsConfig::get_srs_log_tank_file()
{
srs_assert(root);
SrsConfDirective* conf = root->get("srs_log_tank");
if (conf && conf->arg0() == "console") {
return false;
}
return true;
}
SrsConfDirective* SrsConfig::get_hls(string vhost)
{
SrsConfDirective* conf = get_vhost(vhost);