Remove unused/unnecessary things from ChannelSend.

Bug: none
Change-Id: I48e105d39597c3a84402599af7289f2ea9adc0c6
Reviewed-on: https://webrtc-review.googlesource.com/c/111183
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25671}
diff --git a/audio/channel_send.cc b/audio/channel_send.cc
index 09482a4..abdb980 100644
--- a/audio/channel_send.cc
+++ b/audio/channel_send.cc
@@ -442,12 +442,6 @@
   return true;
 }
 
-int ChannelSend::PreferredSampleRate() const {
-  // Return the bigger of playout and receive frequency in the ACM.
-  return std::max(audio_coding_->ReceiveFrequency(),
-                  audio_coding_->PlayoutFrequency());
-}
-
 ChannelSend::ChannelSend(rtc::TaskQueue* encoder_queue,
                          ProcessThread* module_process_thread,
                          MediaTransportInterface* media_transport,
@@ -505,26 +499,14 @@
 
   _rtpRtcpModule.reset(RtpRtcp::CreateRtpRtcp(configuration));
   _rtpRtcpModule->SetSendingMediaStatus(false);
-  Init();
-}
 
-ChannelSend::~ChannelSend() {
-  Terminate();
-  RTC_DCHECK(!channel_state_.Get().sending);
-}
-
-void ChannelSend::Init() {
   channel_state_.Reset();
 
-  // --- Add modules to process thread (for periodic schedulation)
   _moduleProcessThreadPtr->RegisterModule(_rtpRtcpModule.get(), RTC_FROM_HERE);
 
-  // --- ACM initialization
   int error = audio_coding_->InitializeReceiver();
   RTC_DCHECK_EQ(0, error);
 
-  // --- RTP/RTCP module initialization
-
   // Ensure that RTCP is enabled by default for the created channel.
   // Note that, the module will keep generating RTCP until it is explicitly
   // disabled by the user.
@@ -533,29 +515,22 @@
   // RTCP is enabled by default.
   _rtpRtcpModule->SetRTCPStatus(RtcpMode::kCompound);
 
-  // --- Register all permanent callbacks
   error = audio_coding_->RegisterTransportCallback(this);
   RTC_DCHECK_EQ(0, error);
 }
 
-void ChannelSend::Terminate() {
+ChannelSend::~ChannelSend() {
   RTC_DCHECK(construction_thread_.CalledOnValidThread());
-  // Must be called on the same thread as Init().
 
   StopSend();
 
-  // The order to safely shutdown modules in a channel is:
-  // 1. De-register callbacks in modules
-  // 2. De-register modules in process thread
-  // 3. Destroy modules
   int error = audio_coding_->RegisterTransportCallback(NULL);
   RTC_DCHECK_EQ(0, error);
 
-  // De-register modules in process thread
   if (_moduleProcessThreadPtr)
     _moduleProcessThreadPtr->DeRegisterModule(_rtpRtcpModule.get());
 
-  // End of modules shutdown
+  RTC_DCHECK(!channel_state_.Get().sending);
 }
 
 void ChannelSend::StartSend() {
@@ -853,10 +828,6 @@
   rtp_packet_sender_proxy_->SetPacketSender(nullptr);
 }
 
-void ChannelSend::SetRTCPStatus(bool enable) {
-  _rtpRtcpModule->SetRTCPStatus(enable ? RtcpMode::kCompound : RtcpMode::kOff);
-}
-
 void ChannelSend::SetRTCP_CNAME(absl::string_view c_name) {
   // Note: SetCNAME() accepts a c string of length at most 255.
   const std::string c_name_limited(c_name.substr(0, 255));