[getStats] Make remote-inbound-rtp.ssrc match outbound-rtp.ssrc.

Per discussions at https://crbug.com/webrtc/10753, the
remote-outbound-rtp.ssrc is supposed to reflect the SSRC of the RTP
media stream (i.e. outbound-rtp.ssrc) and not the sender that the
corresponding RTCP report block was transmitted on.

Bug: webrtc:10753
Change-Id: Id88f5fdbe6397ba81a46f0ef430bd6f08e66b145
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143484
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28354}
diff --git a/pc/rtc_stats_collector.cc b/pc/rtc_stats_collector.cc
index c180dd6..d6ade5b 100644
--- a/pc/rtc_stats_collector.cc
+++ b/pc/rtc_stats_collector.cc
@@ -92,15 +92,14 @@
   return sb.str();
 }
 
-std::string RTCRemoteInboundRtpStreamStatsIdFromSsrcs(
+std::string RTCRemoteInboundRtpStreamStatsIdFromSourceSsrc(
     cricket::MediaType media_type,
-    uint32_t sender_ssrc,
     uint32_t source_ssrc) {
   char buf[1024];
   rtc::SimpleStringBuilder sb(buf);
   sb << "RTCRemoteInboundRtp"
      << (media_type == cricket::MEDIA_TYPE_AUDIO ? "Audio" : "Video")
-     << "Stream_" << sender_ssrc << "_" << source_ssrc;
+     << "Stream_" << source_ssrc;
   return sb.str();
 }
 
@@ -408,10 +407,10 @@
   // for "remote-[outbound/inbound]-rtp" it refers to the local time when the
   // Report Block was received.
   auto remote_inbound = absl::make_unique<RTCRemoteInboundRtpStreamStats>(
-      RTCRemoteInboundRtpStreamStatsIdFromSsrcs(
-          media_type, report_block.sender_ssrc, report_block.source_ssrc),
+      RTCRemoteInboundRtpStreamStatsIdFromSourceSsrc(media_type,
+                                                     report_block.source_ssrc),
       /*timestamp=*/report_block_data.report_block_timestamp_utc_us());
-  remote_inbound->ssrc = report_block.sender_ssrc;
+  remote_inbound->ssrc = report_block.source_ssrc;
   remote_inbound->kind =
       media_type == cricket::MEDIA_TYPE_AUDIO ? "audio" : "video";
   remote_inbound->packets_lost = report_block.packets_lost;