Make ReceiveStatisticsImpl::SetMaxReorderingThreshold apply per ssrc

Bug: webrtc:10669
Change-Id: I9fec43fefe301b1e05eaea774a1453c93c4cc106
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138202
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28069}
This commit is contained in:
Niels Möller
2019-05-24 14:04:28 +02:00
committed by Commit Bot
parent ad44b75a7c
commit 87da109df5
6 changed files with 59 additions and 52 deletions

View File

@ -30,7 +30,6 @@ class StreamStatisticianImpl : public StreamStatistician,
public:
StreamStatisticianImpl(uint32_t ssrc,
Clock* clock,
bool enable_retransmit_detection,
int max_reordering_threshold,
RtcpStatisticsCallback* rtcp_callback,
StreamDataCountersCallback* rtp_callback);
@ -125,11 +124,16 @@ class ReceiveStatisticsImpl : public ReceiveStatistics {
// Implements ReceiveStatistics.
void FecPacketReceived(const RtpPacketReceived& packet) override;
StreamStatistician* GetStatistician(uint32_t ssrc) const override;
// Note: More specific return type for use in the implementation.
StreamStatisticianImpl* GetStatistician(uint32_t ssrc) const override;
void SetMaxReorderingThreshold(int max_reordering_threshold) override;
void SetMaxReorderingThreshold(uint32_t ssrc,
int max_reordering_threshold) override;
void EnableRetransmitDetection(uint32_t ssrc, bool enable) override;
private:
StreamStatisticianImpl* GetOrCreateStatistician(uint32_t ssrc);
Clock* const clock_;
rtc::CriticalSection receive_statistics_lock_;
uint32_t last_returned_ssrc_;