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
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.

@ -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()

@ -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<SrsRtpPacket2*> pkts;
uint64_t total_pkts = 0;

Loading…
Cancel
Save