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}
diff --git a/modules/rtp_rtcp/source/receive_statistics_impl.h b/modules/rtp_rtcp/source/receive_statistics_impl.h
index c153281..3ab1160 100644
--- a/modules/rtp_rtcp/source/receive_statistics_impl.h
+++ b/modules/rtp_rtcp/source/receive_statistics_impl.h
@@ -30,7 +30,6 @@
  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 @@
 
   // 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_;