mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
RTC: Refine log for twcc large timer
This commit is contained in:
parent
076182cde2
commit
aeca278de0
2 changed files with 7 additions and 2 deletions
|
@ -882,6 +882,7 @@ SrsRtcPublishStream::SrsRtcPublishStream(SrsRtcConnection* session, const SrsCon
|
||||||
session_ = session;
|
session_ = session;
|
||||||
request_keyframe_ = false;
|
request_keyframe_ = false;
|
||||||
pli_epp = new SrsErrorPithyPrint();
|
pli_epp = new SrsErrorPithyPrint();
|
||||||
|
twcc_epp_ = new SrsErrorPithyPrint(3.0);
|
||||||
|
|
||||||
req = NULL;
|
req = NULL;
|
||||||
source = NULL;
|
source = NULL;
|
||||||
|
@ -927,6 +928,7 @@ SrsRtcPublishStream::~SrsRtcPublishStream()
|
||||||
|
|
||||||
srs_freep(timer_);
|
srs_freep(timer_);
|
||||||
srs_freep(pli_worker_);
|
srs_freep(pli_worker_);
|
||||||
|
srs_freep(twcc_epp_);
|
||||||
srs_freep(pli_epp);
|
srs_freep(pli_epp);
|
||||||
srs_freep(req);
|
srs_freep(req);
|
||||||
}
|
}
|
||||||
|
@ -1282,9 +1284,11 @@ srs_error_t SrsRtcPublishStream::send_periodic_twcc()
|
||||||
srs_error_t err = srs_success;
|
srs_error_t err = srs_success;
|
||||||
|
|
||||||
if (last_time_send_twcc_) {
|
if (last_time_send_twcc_) {
|
||||||
|
uint32_t nn = 0;
|
||||||
srs_utime_t duration = srs_duration(last_time_send_twcc_, srs_get_system_time());
|
srs_utime_t duration = srs_duration(last_time_send_twcc_, srs_get_system_time());
|
||||||
if (duration > 80 * SRS_UTIME_MILLISECONDS) {
|
if (duration > 80 * SRS_UTIME_MILLISECONDS && twcc_epp_->can_print(0, &nn)) {
|
||||||
srs_warn2(TAG_LARGE_TIMER, "send_twcc interval exceeded %dms > 100ms", srsu2msi(duration));
|
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();
|
last_time_send_twcc_ = srs_get_system_time();
|
||||||
|
|
|
@ -317,6 +317,7 @@ private:
|
||||||
SrsHourGlass* timer_;
|
SrsHourGlass* timer_;
|
||||||
uint64_t nn_audio_frames;
|
uint64_t nn_audio_frames;
|
||||||
SrsRtcPLIWorker* pli_worker_;
|
SrsRtcPLIWorker* pli_worker_;
|
||||||
|
SrsErrorPithyPrint* twcc_epp_;
|
||||||
private:
|
private:
|
||||||
SrsRtcConnection* session_;
|
SrsRtcConnection* session_;
|
||||||
uint16_t pt_to_drop_;
|
uint16_t pt_to_drop_;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue