RTC: Disable player perf stat, because it should be refined.

pull/2252/head
winlin 4 years ago
parent f689b74cc7
commit ab601ff386

@ -488,8 +488,9 @@ rtc_server {
# default: off # default: off
merge_nalus off; merge_nalus off;
# Whether enable the perf stat at http://localhost:1985/api/v1/perf # Whether enable the perf stat at http://localhost:1985/api/v1/perf
# default: on # TODO: FIXME: We should enable it when refined.
perf_stat on; # default: off
perf_stat off;
# For RTP packet and its payload cache. # For RTP packet and its payload cache.
rtp_cache { rtp_cache {
# Whether enable the RTP packet cache. # Whether enable the RTP packet cache.

@ -4887,7 +4887,7 @@ bool SrsConfig::get_rtc_server_merge_nalus()
bool SrsConfig::get_rtc_server_perf_stat() bool SrsConfig::get_rtc_server_perf_stat()
{ {
static bool DEFAULT = true; static bool DEFAULT = false;
SrsConfDirective* conf = root->get("rtc_server"); SrsConfDirective* conf = root->get("rtc_server");
if (!conf) { if (!conf) {
@ -4899,7 +4899,7 @@ bool SrsConfig::get_rtc_server_perf_stat()
return DEFAULT; return DEFAULT;
} }
return SRS_CONF_PERFER_TRUE(conf->arg0()); return SRS_CONF_PERFER_FALSE(conf->arg0());
} }
SrsConfDirective* SrsConfig::get_rtc_server_rtp_cache() SrsConfDirective* SrsConfig::get_rtc_server_rtp_cache()

@ -550,10 +550,13 @@ srs_error_t SrsRtcPlayStream::cycle()
realtime = _srs_config->get_realtime_enabled(req_->vhost, true); realtime = _srs_config->get_realtime_enabled(req_->vhost, true);
mw_msgs = _srs_config->get_mw_msgs(req_->vhost, realtime, 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. // TODO: FIXME: Add cost in ms.
SrsContextId cid = source->source_id(); 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(), 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); cid.c_str(), source->pre_source_id().c_str(), realtime, mw_msgs, stat_enabled);
SrsErrorPithyPrint* epp = new SrsErrorPithyPrint(); SrsErrorPithyPrint* epp = new SrsErrorPithyPrint();
SrsAutoFree(SrsErrorPithyPrint, epp); SrsAutoFree(SrsErrorPithyPrint, epp);
@ -561,9 +564,6 @@ srs_error_t SrsRtcPlayStream::cycle()
SrsPithyPrint* pprint = SrsPithyPrint::create_rtc_play(); SrsPithyPrint* pprint = SrsPithyPrint::create_rtc_play();
SrsAutoFree(SrsPithyPrint, pprint); SrsAutoFree(SrsPithyPrint, pprint);
bool stat_enabled = _srs_config->get_rtc_server_perf_stat();
SrsStatistic* stat = SrsStatistic::instance();
// TODO: FIXME: Use cache for performance? // TODO: FIXME: Use cache for performance?
vector<SrsRtpPacket2*> pkts; vector<SrsRtpPacket2*> pkts;
uint64_t total_pkts = 0; uint64_t total_pkts = 0;

Loading…
Cancel
Save