diff --git a/trunk/auto/auto_headers.sh b/trunk/auto/auto_headers.sh index 6c5838c5c..e068f4715 100755 --- a/trunk/auto/auto_headers.sh +++ b/trunk/auto/auto_headers.sh @@ -166,11 +166,6 @@ if [ $SRS_OSX = YES ]; then else srs_undefine_macro "SRS_OSX" $SRS_AUTO_HEADERS_H fi -if [ $SRS_SENDMMSG = YES ]; then - srs_define_macro "SRS_SENDMMSG" $SRS_AUTO_HEADERS_H -else - srs_undefine_macro "SRS_SENDMMSG" $SRS_AUTO_HEADERS_H -fi if [ $SRS_DEBUG = YES ]; then srs_define_macro "SRS_DEBUG" $SRS_AUTO_HEADERS_H diff --git a/trunk/conf/full.conf b/trunk/conf/full.conf index 8310e57c0..675c32368 100644 --- a/trunk/conf/full.conf +++ b/trunk/conf/full.conf @@ -432,10 +432,6 @@ rtc_server { # If not, use RSA certificate. # default: on ecdsa on; - # The max UDP messages send by sendmmsg. - # @remark Always 1 if OS does not support sendmmsg, like OSX. - # default: 256 - sendmmsg 256; # Whether encrypt RTP packet by SRTP. # @remark Should always turn it on, or Chrome will fail. # default: on diff --git a/trunk/src/app/srs_app_config.cpp b/trunk/src/app/srs_app_config.cpp index ca5e4548f..4be42d63d 100644 --- a/trunk/src/app/srs_app_config.cpp +++ b/trunk/src/app/srs_app_config.cpp @@ -3644,7 +3644,7 @@ srs_error_t SrsConfig::check_normal_config() for (int i = 0; conf && i < (int)conf->directives.size(); i++) { string n = conf->at(i)->name; if (n != "enabled" && n != "listen" && n != "dir" && n != "candidate" && n != "ecdsa" - && n != "sendmmsg" && n != "encrypt" && n != "reuseport" && n != "merge_nalus" + && n != "encrypt" && n != "reuseport" && n != "merge_nalus" && n != "perf_stat" && n != "queue_length" && n != "black_hole" && n != "ip_family") { return srs_error_new(ERROR_SYSTEM_CONFIG_INVALID, "illegal rtc_server.%s", n.c_str()); @@ -4800,28 +4800,6 @@ bool SrsConfig::get_rtc_server_encrypt() return SRS_CONF_PERFER_TRUE(conf->arg0()); } -int SrsConfig::get_rtc_server_sendmmsg() -{ -#if !defined(SRS_SENDMMSG) - return 1; -#else - static int DEFAULT = 256; - - SrsConfDirective* conf = root->get("rtc_server"); - if (!conf) { - return DEFAULT; - } - - conf = conf->get("sendmmsg"); - if (!conf || conf->arg0().empty()) { - return DEFAULT; - } - - int v = ::atoi(conf->arg0().c_str()); - return srs_max(1, v); -#endif -} - int SrsConfig::get_rtc_server_reuseport() { int v = get_rtc_server_reuseport2(); diff --git a/trunk/src/app/srs_app_config.hpp b/trunk/src/app/srs_app_config.hpp index a2dcfa153..7995c50d1 100644 --- a/trunk/src/app/srs_app_config.hpp +++ b/trunk/src/app/srs_app_config.hpp @@ -527,7 +527,6 @@ public: virtual std::string get_rtc_server_candidates(); virtual std::string get_rtc_server_ip_family(); virtual bool get_rtc_server_ecdsa(); - virtual int get_rtc_server_sendmmsg(); virtual bool get_rtc_server_encrypt(); virtual int get_rtc_server_reuseport(); virtual bool get_rtc_server_merge_nalus(); diff --git a/trunk/src/app/srs_app_http_api.cpp b/trunk/src/app/srs_app_http_api.cpp index 1a58a9aab..7dff7e946 100644 --- a/trunk/src/app/srs_app_http_api.cpp +++ b/trunk/src/app/srs_app_http_api.cpp @@ -1335,7 +1335,7 @@ srs_error_t SrsGoApiPerf::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* p->set("target", SrsJsonAny::str(target.c_str())); p->set("reset", SrsJsonAny::str(reset.c_str())); - p->set("help", SrsJsonAny::str("?target=avframes|rtc|rtp|writev_iovs|sendmmsg|bytes")); + p->set("help", SrsJsonAny::str("?target=avframes|rtc|rtp|writev_iovs|bytes")); p->set("help2", SrsJsonAny::str("?reset=all")); } @@ -1371,15 +1371,6 @@ srs_error_t SrsGoApiPerf::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* } } - if (target.empty() || target == "sendmmsg") { - SrsJsonObject* p = SrsJsonAny::object(); - data->set("sendmmsg", p); - if ((err = stat->dumps_perf_sendmmsg(p)) != srs_success) { - int code = srs_error_code(err); srs_error_reset(err); - return srs_api_response_code(w, r, code); - } - } - if (target.empty() || target == "writev_iovs") { SrsJsonObject* p = SrsJsonAny::object(); data->set("writev_iovs", p); diff --git a/trunk/src/app/srs_app_statistic.cpp b/trunk/src/app/srs_app_statistic.cpp index 35c220166..6ce6adbb5 100644 --- a/trunk/src/app/srs_app_statistic.cpp +++ b/trunk/src/app/srs_app_statistic.cpp @@ -267,7 +267,6 @@ SrsStatistic::SrsStatistic() perf_iovs = new SrsStatisticCategory(); perf_msgs = new SrsStatisticCategory(); - perf_sendmmsg = new SrsStatisticCategory(); perf_rtp = new SrsStatisticCategory(); perf_rtc = new SrsStatisticCategory(); perf_bytes = new SrsStatisticCategory(); @@ -307,7 +306,6 @@ SrsStatistic::~SrsStatistic() srs_freep(perf_iovs); srs_freep(perf_msgs); - srs_freep(perf_sendmmsg); srs_freep(perf_rtp); srs_freep(perf_rtc); srs_freep(perf_bytes); @@ -631,16 +629,6 @@ srs_error_t SrsStatistic::dumps_perf_writev_iovs(SrsJsonObject* obj) return dumps_perf(perf_iovs, obj); } -void SrsStatistic::perf_on_sendmmsg_packets(int nb_packets) -{ - perf_on_packets(perf_sendmmsg, nb_packets); -} - -srs_error_t SrsStatistic::dumps_perf_sendmmsg(SrsJsonObject* obj) -{ - return dumps_perf(perf_sendmmsg, obj); -} - void SrsStatistic::perf_on_rtc_bytes(int nn_bytes, int nn_rtp_bytes, int nn_padding) { // a: AVFrame bytes. @@ -668,14 +656,12 @@ void SrsStatistic::reset_perf() { srs_freep(perf_iovs); srs_freep(perf_msgs); - srs_freep(perf_sendmmsg); srs_freep(perf_rtp); srs_freep(perf_rtc); srs_freep(perf_bytes); perf_iovs = new SrsStatisticCategory(); perf_msgs = new SrsStatisticCategory(); - perf_sendmmsg = new SrsStatisticCategory(); perf_rtp = new SrsStatisticCategory(); perf_rtc = new SrsStatisticCategory(); perf_bytes = new SrsStatisticCategory(); diff --git a/trunk/src/app/srs_app_statistic.hpp b/trunk/src/app/srs_app_statistic.hpp index 2b2844a2e..c80d1ca5f 100644 --- a/trunk/src/app/srs_app_statistic.hpp +++ b/trunk/src/app/srs_app_statistic.hpp @@ -170,7 +170,6 @@ private: // The perf stat for mw(merged write). SrsStatisticCategory* perf_iovs; SrsStatisticCategory* perf_msgs; - SrsStatisticCategory* perf_sendmmsg; SrsStatisticCategory* perf_rtp; SrsStatisticCategory* perf_rtc; SrsStatisticCategory* perf_bytes; @@ -250,10 +249,6 @@ public: // Stat for TCP writev, nb_iovs is the total number of iovec. virtual void perf_on_writev_iovs(int nb_iovs); virtual srs_error_t dumps_perf_writev_iovs(SrsJsonObject* obj); -public: - // Stat for packets UDP sendmmsg, nb_packets is the vlen for sendmmsg. - virtual void perf_on_sendmmsg_packets(int nb_packets); - virtual srs_error_t dumps_perf_sendmmsg(SrsJsonObject* obj); public: // Stat for bytes, nn_bytes is the size of bytes, nb_padding is padding bytes. virtual void perf_on_rtc_bytes(int nn_bytes, int nn_rtp_bytes, int nn_padding);