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

add config to read ingesters

This commit is contained in:
winlin 2014-04-07 11:57:24 +08:00
parent f5c4f492da
commit 9107831b0e
2 changed files with 21 additions and 0 deletions

View file

@ -1590,6 +1590,24 @@ string SrsConfig::get_engine_output(SrsConfDirective* engine)
return conf->arg0();
}
void SrsConfig::get_ingesters(std::string vhost, std::vector<SrsConfDirective*>& ingeters)
{
SrsConfDirective* vhost_conf = get_vhost(vhost);
if (!vhost_conf) {
return;
}
for (int i = 0; i < (int)vhost_conf->directives.size(); i++) {
SrsConfDirective* conf = vhost_conf->directives[i];
if (conf->name == "ingest") {
ingeters.push_back(conf);
}
}
return;
}
string SrsConfig::get_srs_log_file()
{
srs_assert(root);

View file

@ -184,6 +184,9 @@ public:
virtual int get_engine_achannels(SrsConfDirective* engine);
virtual void get_engine_aparams(SrsConfDirective* engine, std::vector<std::string>& aparams);
virtual std::string get_engine_output(SrsConfDirective* engine);
// vhost ingest section
public:
virtual void get_ingesters(std::string vhost, std::vector<SrsConfDirective*>& ingeters);
// log section
public:
virtual bool get_srs_log_tank_file();