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

write pid to ./objs/srs.pid.

This commit is contained in:
winlin 2014-03-21 15:45:34 +08:00
parent 0686b8fa5a
commit f25c6558a5
8 changed files with 256 additions and 145 deletions

View file

@ -682,6 +682,7 @@ int SrsConfig::parse_file(const char* filename)
// TODO: check forward.
// TODO: check ffmpeg.
// TODO: check http.
// TODO: check pid.
return ret;
}
@ -1440,6 +1441,17 @@ SrsConfDirective* SrsConfig::get_listen()
return root->get("listen");
}
string SrsConfig::get_pid_file()
{
SrsConfDirective* conf = root->get("pid");
if (!conf) {
return SRS_CONF_DEFAULT_PID_FILE;
}
return conf->arg0();
}
int SrsConfig::get_chunk_size(const std::string &vhost)
{
SrsConfDirective* conf = get_vhost(vhost);