Remove unused deprecated code in RTPSender.

Bug: webrtc:11340, webrtc:12470
Change-Id: I01a6262cfeb33d1900f8f3cd93cceee2ff73a8a0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227643
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34646}
diff --git a/modules/rtp_rtcp/source/packet_sequencer.cc b/modules/rtp_rtcp/source/packet_sequencer.cc
index 39d40eb..a4e7b46 100644
--- a/modules/rtp_rtcp/source/packet_sequencer.cc
+++ b/modules/rtp_rtcp/source/packet_sequencer.cc
@@ -39,9 +39,10 @@
       last_timestamp_time_ms_(0),
       last_packet_marker_bit_(false) {
   Random random(clock_->TimeInMicroseconds());
-  // TODO(bugs.webrtc.org/11340): Check if we can allow the full range of
-  // [0, 2^16[ to be used instead.
-  // Random start, 16 bits. Can't be 0.
+  // Random start, 16 bits. Upper half of range is avoided in order to prevent
+  // wraparound issues during startup. Sequence number 0 is avoided for
+  // historical reasons, presumably to avoid debugability or test usage
+  // conflicts.
   constexpr uint16_t kMaxInitRtpSeqNumber = 0x7fff;  // 2^15 - 1.
   media_sequence_number_ = random.Rand(1, kMaxInitRtpSeqNumber);
   rtx_sequence_number_ = random.Rand(1, kMaxInitRtpSeqNumber);
diff --git a/modules/rtp_rtcp/source/rtp_sender.cc b/modules/rtp_rtcp/source/rtp_sender.cc
index de79957..a0ea1e8 100644
--- a/modules/rtp_rtcp/source/rtp_sender.cc
+++ b/modules/rtp_rtcp/source/rtp_sender.cc
@@ -16,7 +16,6 @@
 #include <string>
 #include <utility>
 
-#include "absl/memory/memory.h"
 #include "absl/strings/match.h"
 #include "api/array_view.h"
 #include "api/rtc_event_log/rtc_event_log.h"
@@ -190,20 +189,6 @@
   RTC_DCHECK(packet_history_);
 }
 
-RTPSender::RTPSender(const RtpRtcpInterface::Configuration& config,
-                     RtpPacketHistory* packet_history,
-                     RtpPacketSender* packet_sender)
-    : RTPSender(config,
-                packet_history,
-                packet_sender,
-                new PacketSequencer(
-                    config.local_media_ssrc,
-                    config.rtx_send_ssrc,
-                    /*require_marker_before_media_padding_=*/!config.audio,
-                    config.clock)) {
-  owned_sequencer_ = absl::WrapUnique(sequencer_);
-}
-
 RTPSender::~RTPSender() {
   // TODO(tommi): Use a thread checker to ensure the object is created and
   // deleted on the same thread.  At the moment this isn't possible due to
diff --git a/modules/rtp_rtcp/source/rtp_sender.h b/modules/rtp_rtcp/source/rtp_sender.h
index 6662c33..6d5826e 100644
--- a/modules/rtp_rtcp/source/rtp_sender.h
+++ b/modules/rtp_rtcp/source/rtp_sender.h
@@ -49,12 +49,6 @@
             RtpPacketSender* packet_sender,
             PacketSequencer* packet_sequencer);
 
-  // TODO(bugs.webrtc.org/11340): Remove when downstream usage is gone.
-  RTPSender(const RtpRtcpInterface::Configuration& config,
-            RtpPacketHistory* packet_history,
-            RtpPacketSender* packet_sender)
-      ABSL_DEPRECATED("bugs.webrtc.org/11340");
-
   RTPSender() = delete;
   RTPSender(const RTPSender&) = delete;
   RTPSender& operator=(const RTPSender&) = delete;
@@ -100,10 +94,7 @@
   std::vector<std::unique_ptr<RtpPacketToSend>> GeneratePadding(
       size_t target_size_bytes,
       bool media_has_been_sent,
-      // TODO(bugs.webrtc.org/11340): Remove default value when downstream usage
-      // is fixed.
-      bool can_send_padding_on_media_ssrc = false)
-      RTC_LOCKS_EXCLUDED(send_mutex_);
+      bool can_send_padding_on_media_ssrc) RTC_LOCKS_EXCLUDED(send_mutex_);
 
   // NACK.
   void OnReceivedNack(const std::vector<uint16_t>& nack_sequence_numbers,
@@ -220,8 +211,6 @@
 
   // RTP variables
   uint32_t timestamp_offset_ RTC_GUARDED_BY(send_mutex_);
-  // TODO(bugs.webrtc.org/11340): Remove when downstream usage is gone.
-  std::unique_ptr<PacketSequencer> owned_sequencer_ RTC_GUARDED_BY(send_mutex_);
   PacketSequencer* const sequencer_ RTC_GUARDED_BY(send_mutex_);
   // RID value to send in the RID or RepairedRID header extension.
   std::string rid_ RTC_GUARDED_BY(send_mutex_);