Revert "[Unwrap] Migrate ReceiveStatisticsImpl to use RtpSequenceNumberUnwrapper"
This reverts commit 6762fbd9882c6b0436b4bcd0b04f070312c52981. Reason for revert: attempt to fix some broken tests. Original change's description: > [Unwrap] Migrate ReceiveStatisticsImpl to use RtpSequenceNumberUnwrapper > > Bug: webrtc:13982 > Change-Id: Ic971371d4295e87380a77ef6aa7986a83d86f615 > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288962 > Commit-Queue: Evan Shrubsole <eshr@webrtc.org> > Auto-Submit: Evan Shrubsole <eshr@webrtc.org> > Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> > Cr-Commit-Position: refs/heads/main@{#39046} Bug: webrtc:13982 Change-Id: Iad8dcacdce299b9671d6215bf90b0077da3bdf7a No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290760 Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com> Reviewed-by: Jeremy Leconte <jleconte@google.com> Owners-Override: Jeremy Leconte <jleconte@google.com> Commit-Queue: Jeremy Leconte <jleconte@webrtc.org> Reviewed-by: Jeremy Leconte <jleconte@webrtc.org> Cr-Commit-Position: refs/heads/main@{#39054}
This commit is contained in:
parent
885ededbb8
commit
c4991048b2
@ -21,6 +21,7 @@
|
||||
#include "modules/rtp_rtcp/source/rtcp_packet/report_block.h"
|
||||
#include "modules/rtp_rtcp/source/rtp_packet_received.h"
|
||||
#include "modules/rtp_rtcp/source/rtp_rtcp_config.h"
|
||||
#include "modules/rtp_rtcp/source/time_util.h"
|
||||
#include "rtc_base/logging.h"
|
||||
#include "rtc_base/time_utils.h"
|
||||
#include "system_wrappers/include/clock.h"
|
||||
@ -116,9 +117,8 @@ void StreamStatisticianImpl::UpdateCounters(const RtpPacketReceived& packet) {
|
||||
receive_counters_.transmitted.AddPacket(packet);
|
||||
--cumulative_loss_;
|
||||
|
||||
// Use PeekUnwrap and later update the state to avoid updating the state for
|
||||
// out of order packets.
|
||||
int64_t sequence_number = seq_unwrapper_.PeekUnwrap(packet.SequenceNumber());
|
||||
int64_t sequence_number =
|
||||
seq_unwrapper_.UnwrapWithoutUpdate(packet.SequenceNumber());
|
||||
|
||||
if (!ReceivedRtpPacket()) {
|
||||
received_seq_first_ = sequence_number;
|
||||
@ -131,8 +131,7 @@ void StreamStatisticianImpl::UpdateCounters(const RtpPacketReceived& packet) {
|
||||
// In order packet.
|
||||
cumulative_loss_ += sequence_number - received_seq_max_;
|
||||
received_seq_max_ = sequence_number;
|
||||
// Update the internal state of `seq_unwrapper_`.
|
||||
seq_unwrapper_.Unwrap(packet.SequenceNumber());
|
||||
seq_unwrapper_.UpdateLast(sequence_number);
|
||||
|
||||
// If new time stamp and more than one in-order packet received, calculate
|
||||
// new jitter statistics.
|
||||
|
||||
@ -18,10 +18,10 @@
|
||||
#include <vector>
|
||||
|
||||
#include "absl/types/optional.h"
|
||||
#include "modules/include/module_common_types_public.h"
|
||||
#include "modules/rtp_rtcp/include/receive_statistics.h"
|
||||
#include "modules/rtp_rtcp/source/rtcp_packet/report_block.h"
|
||||
#include "rtc_base/containers/flat_map.h"
|
||||
#include "rtc_base/numerics/sequence_number_unwrapper.h"
|
||||
#include "rtc_base/rate_statistics.h"
|
||||
#include "rtc_base/synchronization/mutex.h"
|
||||
#include "rtc_base/thread_annotations.h"
|
||||
@ -96,7 +96,7 @@ class StreamStatisticianImpl : public StreamStatisticianImplInterface {
|
||||
|
||||
int64_t last_receive_time_ms_;
|
||||
uint32_t last_received_timestamp_;
|
||||
RtpSequenceNumberUnwrapper seq_unwrapper_;
|
||||
SequenceNumberUnwrapper seq_unwrapper_;
|
||||
int64_t received_seq_first_;
|
||||
int64_t received_seq_max_;
|
||||
// Assume that the other side restarted when there are two sequential packets
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user