diff --git a/trunk/conf/full.conf b/trunk/conf/full.conf index 3593c832d..34b871ee7 100644 --- a/trunk/conf/full.conf +++ b/trunk/conf/full.conf @@ -488,8 +488,9 @@ rtc_server { # default: off merge_nalus off; # Whether enable the perf stat at http://localhost:1985/api/v1/perf - # default: on - perf_stat on; + # TODO: FIXME: We should enable it when refined. + # default: off + perf_stat off; # For RTP packet and its payload cache. rtp_cache { # Whether enable the RTP packet cache. diff --git a/trunk/src/app/srs_app_config.cpp b/trunk/src/app/srs_app_config.cpp index 4d6771bf0..1e31d9c76 100644 --- a/trunk/src/app/srs_app_config.cpp +++ b/trunk/src/app/srs_app_config.cpp @@ -4887,7 +4887,7 @@ bool SrsConfig::get_rtc_server_merge_nalus() bool SrsConfig::get_rtc_server_perf_stat() { - static bool DEFAULT = true; + static bool DEFAULT = false; SrsConfDirective* conf = root->get("rtc_server"); if (!conf) { @@ -4899,7 +4899,7 @@ bool SrsConfig::get_rtc_server_perf_stat() return DEFAULT; } - return SRS_CONF_PERFER_TRUE(conf->arg0()); + return SRS_CONF_PERFER_FALSE(conf->arg0()); } SrsConfDirective* SrsConfig::get_rtc_server_rtp_cache() diff --git a/trunk/src/app/srs_app_rtc_conn.cpp b/trunk/src/app/srs_app_rtc_conn.cpp index 894d5c65f..23e7b6dc6 100644 --- a/trunk/src/app/srs_app_rtc_conn.cpp +++ b/trunk/src/app/srs_app_rtc_conn.cpp @@ -550,10 +550,13 @@ srs_error_t SrsRtcPlayStream::cycle() realtime = _srs_config->get_realtime_enabled(req_->vhost, true); mw_msgs = _srs_config->get_mw_msgs(req_->vhost, realtime, true); + bool stat_enabled = _srs_config->get_rtc_server_perf_stat(); + SrsStatistic* stat = SrsStatistic::instance(); + // TODO: FIXME: Add cost in ms. SrsContextId cid = source->source_id(); - srs_trace("RTC: start play url=%s, source_id=%s/%s, realtime=%d, mw_msgs=%d", req_->get_stream_url().c_str(), - cid.c_str(), source->pre_source_id().c_str(), realtime, mw_msgs); + srs_trace("RTC: start play url=%s, source_id=%s/%s, realtime=%d, mw_msgs=%d, stat=%d", req_->get_stream_url().c_str(), + cid.c_str(), source->pre_source_id().c_str(), realtime, mw_msgs, stat_enabled); SrsErrorPithyPrint* epp = new SrsErrorPithyPrint(); SrsAutoFree(SrsErrorPithyPrint, epp); @@ -561,9 +564,6 @@ srs_error_t SrsRtcPlayStream::cycle() SrsPithyPrint* pprint = SrsPithyPrint::create_rtc_play(); SrsAutoFree(SrsPithyPrint, pprint); - bool stat_enabled = _srs_config->get_rtc_server_perf_stat(); - SrsStatistic* stat = SrsStatistic::instance(); - // TODO: FIXME: Use cache for performance? vector pkts; uint64_t total_pkts = 0;