mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
RTC: Reorder code for NACK.
This commit is contained in:
parent
f2951ec46a
commit
31de2c71d0
2 changed files with 17 additions and 13 deletions
|
@ -141,6 +141,14 @@ void SrsRtpRingBuffer::notify_drop_seq(uint16_t seq)
|
|||
{
|
||||
}
|
||||
|
||||
SrsNackOption::SrsNackOption()
|
||||
{
|
||||
max_count = 10;
|
||||
max_alive_time = 2 * SRS_UTIME_SECONDS;
|
||||
first_nack_interval = 10 * SRS_UTIME_MILLISECONDS;
|
||||
nack_interval = 400 * SRS_UTIME_MILLISECONDS;
|
||||
}
|
||||
|
||||
SrsRtpNackInfo::SrsRtpNackInfo()
|
||||
{
|
||||
generate_time_ = srs_update_system_time();
|
||||
|
@ -148,6 +156,10 @@ SrsRtpNackInfo::SrsRtpNackInfo()
|
|||
req_nack_count_ = 0;
|
||||
}
|
||||
|
||||
bool SrsRtpNackForReceiver::SeqComp::operator()(const uint16_t& low, const uint16_t& high) const {
|
||||
return srs_rtp_seq_distance(low, high) > 0;
|
||||
}
|
||||
|
||||
SrsRtpNackForReceiver::SrsRtpNackForReceiver(SrsRtpRingBuffer* rtp, size_t queue_size)
|
||||
{
|
||||
max_queue_size_ = queue_size;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue