diff --git a/trunk/src/app/srs_app_config.cpp b/trunk/src/app/srs_app_config.cpp index 143bd3d5a..b6c35d67d 100644 --- a/trunk/src/app/srs_app_config.cpp +++ b/trunk/src/app/srs_app_config.cpp @@ -1590,6 +1590,24 @@ string SrsConfig::get_engine_output(SrsConfDirective* engine) return conf->arg0(); } +void SrsConfig::get_ingesters(std::string vhost, std::vector& 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); diff --git a/trunk/src/app/srs_app_config.hpp b/trunk/src/app/srs_app_config.hpp index 43d2f4162..50b822458 100644 --- a/trunk/src/app/srs_app_config.hpp +++ b/trunk/src/app/srs_app_config.hpp @@ -184,6 +184,9 @@ public: virtual int get_engine_achannels(SrsConfDirective* engine); virtual void get_engine_aparams(SrsConfDirective* engine, std::vector& aparams); virtual std::string get_engine_output(SrsConfDirective* engine); +// vhost ingest section +public: + virtual void get_ingesters(std::string vhost, std::vector& ingeters); // log section public: virtual bool get_srs_log_tank_file();