From 4639510f1b36afd2faf65659a4817c6425157f64 Mon Sep 17 00:00:00 2001 From: winlin Date: Mon, 17 May 2021 18:23:54 +0800 Subject: [PATCH] RTC: Allow config perf_stat and queue_length of rtc_server --- trunk/src/app/srs_app_config.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/trunk/src/app/srs_app_config.cpp b/trunk/src/app/srs_app_config.cpp index acb3e1689..1edee5a3d 100644 --- a/trunk/src/app/srs_app_config.cpp +++ b/trunk/src/app/srs_app_config.cpp @@ -326,6 +326,23 @@ srs_error_t srs_config_transform_vhost(SrsConfDirective* root) dir->name = "http_server"; continue; } + + // SRS4.0, removed the support of configs: + // rtc_server { perf_stat; queue_length; } + if (dir->name == "rtc_server") { + std::vector::iterator it; + for (it = dir->directives.begin(); it != dir->directives.end();) { + SrsConfDirective* conf = *it; + + if (conf->name == "perf_stat" || conf->name == "queue_length") { + dir->directives.erase(it); + srs_freep(conf); + continue; + } + + ++it; + } + } if (!dir->is_vhost()) { continue;