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

RTC: Eliminate unused perf_stat

This commit is contained in:
winlin 2021-05-15 12:04:21 +08:00
parent ddd7a378b1
commit 9b6a1b16e1
3 changed files with 1 additions and 23 deletions

View file

@ -520,10 +520,6 @@ rtc_server {
# @see https://github.com/ossrs/srs/issues/307#issuecomment-612806318 # @see https://github.com/ossrs/srs/issues/307#issuecomment-612806318
# default: off # default: off
merge_nalus off; merge_nalus off;
# Whether enable the perf stat at http://localhost:1985/api/v1/perf
# TODO: FIXME: We should enable it when refined.
# default: off
perf_stat off;
# The black-hole to copy packet to, for debugging. # The black-hole to copy packet to, for debugging.
# For example, when debugging Chrome publish stream, the received packets are encrypted cipher, # For example, when debugging Chrome publish stream, the received packets are encrypted cipher,
# we can set the publisher black-hole, SRS will copy the plaintext packets to black-hole, and # we can set the publisher black-hole, SRS will copy the plaintext packets to black-hole, and

View file

@ -3678,7 +3678,7 @@ srs_error_t SrsConfig::check_normal_config()
for (int i = 0; conf && i < (int)conf->directives.size(); i++) { for (int i = 0; conf && i < (int)conf->directives.size(); i++) {
string n = conf->at(i)->name; string n = conf->at(i)->name;
if (n != "enabled" && n != "listen" && n != "dir" && n != "candidate" && n != "ecdsa" if (n != "enabled" && n != "listen" && n != "dir" && n != "candidate" && n != "ecdsa"
&& n != "encrypt" && n != "reuseport" && n != "merge_nalus" && n != "perf_stat" && n != "black_hole" && n != "encrypt" && n != "reuseport" && n != "merge_nalus" && n != "black_hole"
&& n != "ip_family") { && n != "ip_family") {
return srs_error_new(ERROR_SYSTEM_CONFIG_INVALID, "illegal rtc_server.%s", n.c_str()); return srs_error_new(ERROR_SYSTEM_CONFIG_INVALID, "illegal rtc_server.%s", n.c_str());
} }
@ -5033,23 +5033,6 @@ bool SrsConfig::get_rtc_server_merge_nalus()
return SRS_CONF_PERFER_TRUE(conf->arg0()); return SRS_CONF_PERFER_TRUE(conf->arg0());
} }
bool SrsConfig::get_rtc_server_perf_stat()
{
static bool DEFAULT = false;
SrsConfDirective* conf = root->get("rtc_server");
if (!conf) {
return DEFAULT;
}
conf = conf->get("perf_stat");
if (!conf || conf->arg0().empty()) {
return DEFAULT;
}
return SRS_CONF_PERFER_FALSE(conf->arg0());
}
bool SrsConfig::get_rtc_server_black_hole() bool SrsConfig::get_rtc_server_black_hole()
{ {
static bool DEFAULT = false; static bool DEFAULT = false;

View file

@ -542,7 +542,6 @@ public:
virtual bool get_rtc_server_encrypt(); virtual bool get_rtc_server_encrypt();
virtual int get_rtc_server_reuseport(); virtual int get_rtc_server_reuseport();
virtual bool get_rtc_server_merge_nalus(); virtual bool get_rtc_server_merge_nalus();
virtual bool get_rtc_server_perf_stat();
public: public:
virtual bool get_rtc_server_black_hole(); virtual bool get_rtc_server_black_hole();
virtual std::string get_rtc_server_black_hole_addr(); virtual std::string get_rtc_server_black_hole_addr();