Remove StreamStatistician::IsPacketInOrder

this function is now only used in combination with StreamStatistician::IsRetransmitOfOldPacket
but IsRetransmitOfOldPacket internally checks if packet is in_order, thus making extra check unnecessary

In addition to making code simpler, removing this checks avoids
taking two extra CritSection on common code path of incoming rtp packet.

Bug: webrtc:8016
Change-Id: I050004e256b5698ce700e3416aa86b55f446a270
Reviewed-on: https://webrtc-review.googlesource.com/85361
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23762}
This commit is contained in:
Danil Chapovalov
2018-06-25 16:58:54 +02:00
committed by Commit Bot
parent 968b1dd0d7
commit 64b17c2aca
7 changed files with 11 additions and 42 deletions

View File

@ -310,11 +310,6 @@ bool StreamStatisticianImpl::IsRetransmitOfOldPacket(
return time_diff_ms > rtp_time_stamp_diff_ms + max_delay_ms;
}
bool StreamStatisticianImpl::IsPacketInOrder(uint16_t sequence_number) const {
rtc::CritScope cs(&stream_lock_);
return InOrderPacketInternal(sequence_number);
}
bool StreamStatisticianImpl::InOrderPacketInternal(
uint16_t sequence_number) const {
// First packet is always in order.