正在显示
2 个修改的文件
包含
21 行增加
和
0 行删除
| @@ -1590,6 +1590,24 @@ string SrsConfig::get_engine_output(SrsConfDirective* engine) | @@ -1590,6 +1590,24 @@ string SrsConfig::get_engine_output(SrsConfDirective* engine) | ||
| 1590 | return conf->arg0(); | 1590 | return conf->arg0(); |
| 1591 | } | 1591 | } |
| 1592 | 1592 | ||
| 1593 | +void SrsConfig::get_ingesters(std::string vhost, std::vector<SrsConfDirective*>& ingeters) | ||
| 1594 | +{ | ||
| 1595 | + SrsConfDirective* vhost_conf = get_vhost(vhost); | ||
| 1596 | + if (!vhost_conf) { | ||
| 1597 | + return; | ||
| 1598 | + } | ||
| 1599 | + | ||
| 1600 | + for (int i = 0; i < (int)vhost_conf->directives.size(); i++) { | ||
| 1601 | + SrsConfDirective* conf = vhost_conf->directives[i]; | ||
| 1602 | + | ||
| 1603 | + if (conf->name == "ingest") { | ||
| 1604 | + ingeters.push_back(conf); | ||
| 1605 | + } | ||
| 1606 | + } | ||
| 1607 | + | ||
| 1608 | + return; | ||
| 1609 | +} | ||
| 1610 | + | ||
| 1593 | string SrsConfig::get_srs_log_file() | 1611 | string SrsConfig::get_srs_log_file() |
| 1594 | { | 1612 | { |
| 1595 | srs_assert(root); | 1613 | srs_assert(root); |
| @@ -184,6 +184,9 @@ public: | @@ -184,6 +184,9 @@ public: | ||
| 184 | virtual int get_engine_achannels(SrsConfDirective* engine); | 184 | virtual int get_engine_achannels(SrsConfDirective* engine); |
| 185 | virtual void get_engine_aparams(SrsConfDirective* engine, std::vector<std::string>& aparams); | 185 | virtual void get_engine_aparams(SrsConfDirective* engine, std::vector<std::string>& aparams); |
| 186 | virtual std::string get_engine_output(SrsConfDirective* engine); | 186 | virtual std::string get_engine_output(SrsConfDirective* engine); |
| 187 | +// vhost ingest section | ||
| 188 | +public: | ||
| 189 | + virtual void get_ingesters(std::string vhost, std::vector<SrsConfDirective*>& ingeters); | ||
| 187 | // log section | 190 | // log section |
| 188 | public: | 191 | public: |
| 189 | virtual bool get_srs_log_tank_file(); | 192 | virtual bool get_srs_log_tank_file(); |
-
请 注册 或 登录 后发表评论