1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-15 04:42:04 +00:00

RTC: Refine log for twcc large timer

This commit is contained in:
winlin 2021-02-02 18:05:23 +08:00
parent e9a0060890
commit 1db8a3c92e
2 changed files with 7 additions and 2 deletions

View file

@ -882,6 +882,7 @@ SrsRtcPublishStream::SrsRtcPublishStream(SrsRtcConnection* session, const SrsCon
session_ = session;
request_keyframe_ = false;
pli_epp = new SrsErrorPithyPrint();
twcc_epp_ = new SrsErrorPithyPrint(3.0);
req = NULL;
source = NULL;
@ -927,6 +928,7 @@ SrsRtcPublishStream::~SrsRtcPublishStream()
srs_freep(timer_);
srs_freep(pli_worker_);
srs_freep(twcc_epp_);
srs_freep(pli_epp);
srs_freep(req);
}
@ -1282,9 +1284,11 @@ srs_error_t SrsRtcPublishStream::send_periodic_twcc()
srs_error_t err = srs_success;
if (last_time_send_twcc_) {
uint32_t nn = 0;
srs_utime_t duration = srs_duration(last_time_send_twcc_, srs_get_system_time());
if (duration > 80 * SRS_UTIME_MILLISECONDS) {
srs_warn2(TAG_LARGE_TIMER, "send_twcc interval exceeded %dms > 100ms", srsu2msi(duration));
if (duration > 80 * SRS_UTIME_MILLISECONDS && twcc_epp_->can_print(0, &nn)) {
srs_warn2(TAG_LARGE_TIMER, "send_twcc interval exceeded %dms > 100ms, count=%u/%u",
srsu2msi(duration), nn, twcc_epp_->nn_count);
}
}
last_time_send_twcc_ = srs_get_system_time();

View file

@ -317,6 +317,7 @@ private:
SrsHourGlass* timer_;
uint64_t nn_audio_frames;
SrsRtcPLIWorker* pli_worker_;
SrsErrorPithyPrint* twcc_epp_;
private:
SrsRtcConnection* session_;
uint16_t pt_to_drop_;