Set RtpRtcp config receive_only in voe::ChannelReceive

Followup to https://webrtc-review.googlesource.com/c/103803

Bug: webrtc:9801
Change-Id: I8467aea241f0470aa116639ddcf5f7ef9a3cc711
Reviewed-on: https://webrtc-review.googlesource.com/c/106860
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25501}
diff --git a/audio/channel_receive.cc b/audio/channel_receive.cc
index 1626dd2..ac02482 100644
--- a/audio/channel_receive.cc
+++ b/audio/channel_receive.cc
@@ -299,9 +299,7 @@
   rtp_receive_statistics_->EnableRetransmitDetection(remote_ssrc_, true);
   RtpRtcp::Configuration configuration;
   configuration.audio = true;
-  // TODO(nisse): Also set receiver_only = true, but that seems to break RTT
-  // estimation, resulting in test failures for
-  // PeerConnectionIntegrationTest.GetCaptureStartNtpTimeWithOldStatsApi
+  configuration.receiver_only = true;
   configuration.outgoing_transport = rtcp_send_transport;
   configuration.receive_statistics = rtp_receive_statistics_.get();
 
@@ -779,6 +777,8 @@
   int64_t avg_rtt = 0;
   int64_t max_rtt = 0;
   int64_t min_rtt = 0;
+  // TODO(nisse): This method computes RTT based on sender reports, even though
+  // a receive stream is not supposed to do that.
   if (_rtpRtcpModule->RTT(remote_ssrc_, &rtt, &avg_rtt, &min_rtt, &max_rtt) !=
       0) {
     return 0;
diff --git a/modules/rtp_rtcp/source/rtcp_receiver.cc b/modules/rtp_rtcp/source/rtcp_receiver.cc
index 202d42d..3635c4a 100644
--- a/modules/rtp_rtcp/source/rtcp_receiver.cc
+++ b/modules/rtp_rtcp/source/rtcp_receiver.cc
@@ -504,7 +504,14 @@
   // If no SR has been received yet, the field is set to zero.
   // Receiver rtp_rtcp module is not expected to calculate rtt using
   // Sender Reports even if it accidentally can.
-  if (!receiver_only_ && send_time_ntp != 0) {
+
+  // TODO(nisse): Use this way to determine the RTT only when |receiver_only_|
+  // is false. However, that currently breaks the tests of the
+  // googCaptureStartNtpTimeMs stat for audio receive streams. To fix, either
+  // delete all dependencies on RTT measurements for audio receive streams, or
+  // ensure that audio receive streams that need RTT and stats that depend on it
+  // are configured with an associated audio send stream.
+  if (send_time_ntp != 0) {
     uint32_t delay_ntp = report_block.delay_since_last_sr();
     // Local NTP time.
     uint32_t receive_time_ntp =