Replace RtcpReceiveTimeInfo with rtcp::ReceiveTimeInfo
structs are exactly the same but last one follow naming style.

BUG=webrtc:5565

Review-Url: https://codereview.webrtc.org/2368983002
Cr-Commit-Position: refs/heads/master@{#14415}
diff --git a/webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h b/webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h
index 6676fe0..648e25d 100644
--- a/webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h
+++ b/webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h
@@ -161,13 +161,6 @@
   uint32_t delaySinceLastSR;
 };
 
-struct RtcpReceiveTimeInfo {
-  // Fields as described by RFC 3611 4.5.
-  uint32_t sourceSSRC;
-  uint32_t lastRR;
-  uint32_t delaySinceLastRR;
-};
-
 typedef std::list<RTCPReportBlock> ReportBlockList;
 
 struct RtpState {
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc b/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc
index 638922c..7e876df 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc
@@ -251,15 +251,15 @@
 }
 
 bool RTCPReceiver::LastReceivedXrReferenceTimeInfo(
-    RtcpReceiveTimeInfo* info) const {
+    rtcp::ReceiveTimeInfo* info) const {
   assert(info);
   rtc::CritScope lock(&_criticalSectionRTCPReceiver);
   if (_lastReceivedXRNTPsecs == 0 && _lastReceivedXRNTPfrac == 0) {
     return false;
   }
 
-  info->sourceSSRC = _remoteXRReceiveTimeInfo.sourceSSRC;
-  info->lastRR = _remoteXRReceiveTimeInfo.lastRR;
+  info->ssrc = remote_time_info_.ssrc;
+  info->last_rr = remote_time_info_.last_rr;
 
   // Get the delay since last received report (RFC 3611).
   uint32_t receive_time =
@@ -270,7 +270,7 @@
   _clock->CurrentNtp(ntp_sec, ntp_frac);
   uint32_t now = RTCPUtility::MidNtp(ntp_sec, ntp_frac);
 
-  info->delaySinceLastRR = now - receive_time;
+  info->delay_since_last_rr = now - receive_time;
   return true;
 }
 
@@ -809,8 +809,8 @@
 void RTCPReceiver::HandleXrReceiveReferenceTime(
     uint32_t sender_ssrc,
     const rtcp::Rrtr& rrtr) {
-  _remoteXRReceiveTimeInfo.sourceSSRC = sender_ssrc;
-  _remoteXRReceiveTimeInfo.lastRR = CompactNtp(rrtr.ntp());
+  remote_time_info_.ssrc = sender_ssrc;
+  remote_time_info_.last_rr = CompactNtp(rrtr.ntp());
   _clock->CurrentNtp(_lastReceivedXRNTPsecs, _lastReceivedXRNTPfrac);
 }
 
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_receiver.h b/webrtc/modules/rtp_rtcp/source/rtcp_receiver.h
index 0fbcdbc..f459003 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_receiver.h
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_receiver.h
@@ -19,6 +19,7 @@
 #include "webrtc/base/criticalsection.h"
 #include "webrtc/base/thread_annotations.h"
 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
+#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/dlrr.h"
 #include "webrtc/modules/rtp_rtcp/source/rtcp_receiver_help.h"
 #include "webrtc/modules/rtp_rtcp/source/rtcp_utility.h"
 #include "webrtc/typedefs.h"
@@ -26,7 +27,6 @@
 namespace webrtc {
 namespace rtcp {
 class CommonHeader;
-struct ReceiveTimeInfo;
 class ReportBlock;
 class Rrtr;
 class TmmbItem;
@@ -74,7 +74,7 @@
            uint32_t* RTCPArrivalTimeFrac,
            uint32_t* rtcp_timestamp) const;
 
-  bool LastReceivedXrReferenceTimeInfo(RtcpReceiveTimeInfo* info) const;
+  bool LastReceivedXrReferenceTimeInfo(rtcp::ReceiveTimeInfo* info) const;
 
   // get rtt
   int32_t RTT(uint32_t remoteSSRC,
@@ -233,7 +233,7 @@
   uint32_t _lastReceivedSRNTPfrac;
 
   // Received XR receive time report.
-  RtcpReceiveTimeInfo _remoteXRReceiveTimeInfo;
+  rtcp::ReceiveTimeInfo remote_time_info_;
   // Time when the report was received.
   uint32_t _lastReceivedXRNTPsecs;
   uint32_t _lastReceivedXRNTPfrac;
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc b/webrtc/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc
index 6f8fe45..6a393cd 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc
@@ -719,19 +719,19 @@
   xr.SetSenderSsrc(kSenderSsrc);
   xr.AddRrtr(rrtr);
 
-  RtcpReceiveTimeInfo rrtime;
+  rtcp::ReceiveTimeInfo rrtime;
   EXPECT_FALSE(rtcp_receiver_.LastReceivedXrReferenceTimeInfo(&rrtime));
 
   InjectRtcpPacket(xr);
 
   EXPECT_TRUE(rtcp_receiver_.LastReceivedXrReferenceTimeInfo(&rrtime));
-  EXPECT_EQ(rrtime.sourceSSRC, kSenderSsrc);
-  EXPECT_EQ(rrtime.lastRR, CompactNtp(kNtp));
-  EXPECT_EQ(0u, rrtime.delaySinceLastRR);
+  EXPECT_EQ(rrtime.ssrc, kSenderSsrc);
+  EXPECT_EQ(rrtime.last_rr, CompactNtp(kNtp));
+  EXPECT_EQ(0U, rrtime.delay_since_last_rr);
 
   system_clock_.AdvanceTimeMilliseconds(1500);
   EXPECT_TRUE(rtcp_receiver_.LastReceivedXrReferenceTimeInfo(&rrtime));
-  EXPECT_NEAR(1500, CompactNtpRttToMs(rrtime.delaySinceLastRR), 1);
+  EXPECT_NEAR(1500, CompactNtpRttToMs(rrtime.delay_since_last_rr), 1);
 }
 
 TEST_F(RtcpReceiverTest, ExtendedReportsDlrrPacketNotToUsIgnored) {
@@ -809,7 +809,7 @@
 
   InjectRtcpPacket(xr);
 
-  RtcpReceiveTimeInfo rrtime;
+  rtcp::ReceiveTimeInfo rrtime;
   EXPECT_TRUE(rtcp_receiver_.LastReceivedXrReferenceTimeInfo(&rrtime));
   int64_t rtt_ms = 0;
   EXPECT_TRUE(rtcp_receiver_.GetAndResetXrRrRtt(&rtt_ms));
@@ -836,7 +836,7 @@
   InjectRtcpPacket(packet);
 
   // Validate Rrtr was received and processed.
-  RtcpReceiveTimeInfo rrtime;
+  rtcp::ReceiveTimeInfo rrtime;
   EXPECT_TRUE(rtcp_receiver_.LastReceivedXrReferenceTimeInfo(&rrtime));
   // Validate Dlrr report wasn't processed.
   int64_t rtt_ms = 0;
@@ -897,7 +897,7 @@
 }
 
 TEST_F(RtcpReceiverTest, LastReceivedXrReferenceTimeInfoInitiallyFalse) {
-  RtcpReceiveTimeInfo info;
+  rtcp::ReceiveTimeInfo info;
   EXPECT_FALSE(rtcp_receiver_.LastReceivedXrReferenceTimeInfo(&info));
 }
 
@@ -913,15 +913,15 @@
 
   InjectRtcpPacket(xr);
 
-  RtcpReceiveTimeInfo info;
+  rtcp::ReceiveTimeInfo info;
   EXPECT_TRUE(rtcp_receiver_.LastReceivedXrReferenceTimeInfo(&info));
-  EXPECT_EQ(kSenderSsrc, info.sourceSSRC);
-  EXPECT_EQ(kNtpMid, info.lastRR);
-  EXPECT_EQ(0U, info.delaySinceLastRR);
+  EXPECT_EQ(kSenderSsrc, info.ssrc);
+  EXPECT_EQ(kNtpMid, info.last_rr);
+  EXPECT_EQ(0U, info.delay_since_last_rr);
 
   system_clock_.AdvanceTimeMilliseconds(1000);
   EXPECT_TRUE(rtcp_receiver_.LastReceivedXrReferenceTimeInfo(&info));
-  EXPECT_EQ(65536U, info.delaySinceLastRR);
+  EXPECT_EQ(65536U, info.delay_since_last_rr);
 }
 
 TEST_F(RtcpReceiverTest, ReceiveReportTimeout) {
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc b/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc
index 859ac05..17a610d 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc
@@ -714,8 +714,8 @@
   xr->SetSenderSsrc(ssrc_);
 
   rtcp::Dlrr dlrr;
-  const RtcpReceiveTimeInfo& info = ctx.feedback_state_.last_xr_rr;
-  dlrr.AddDlrrItem(info.sourceSSRC, info.lastRR, info.delaySinceLastRR);
+  RTC_DCHECK(ctx.feedback_state_.has_last_xr_rr);
+  dlrr.AddDlrrItem(ctx.feedback_state_.last_xr_rr);
 
   xr->AddDlrr(dlrr);
 
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_sender.h b/webrtc/modules/rtp_rtcp/source/rtcp_sender.h
index 1e88ce8..ce9eda1 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_sender.h
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_sender.h
@@ -27,6 +27,7 @@
 #include "webrtc/modules/rtp_rtcp/include/receive_statistics.h"
 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet.h"
+#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/dlrr.h"
 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/report_block.h"
 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmb_item.h"
 #include "webrtc/modules/rtp_rtcp/source/rtcp_utility.h"
@@ -70,7 +71,7 @@
     uint32_t remote_sr;
 
     bool has_last_xr_rr;
-    RtcpReceiveTimeInfo last_xr_rr;
+    rtcp::ReceiveTimeInfo last_xr_rr;
 
     // Used when generating TMMBR.
     ModuleRtpRtcpImpl* module;
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_sender_unittest.cc b/webrtc/modules/rtp_rtcp/source/rtcp_sender_unittest.cc
index 4b257e5..60abb6f 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_sender_unittest.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_sender_unittest.cc
@@ -635,21 +635,20 @@
   rtcp_sender_->SetRTCPStatus(RtcpMode::kCompound);
   RTCPSender::FeedbackState feedback_state = rtp_rtcp_impl_->GetFeedbackState();
   feedback_state.has_last_xr_rr = true;
-  RtcpReceiveTimeInfo last_xr_rr;
-  last_xr_rr.sourceSSRC = 0x11111111;
-  last_xr_rr.lastRR = 0x22222222;
-  last_xr_rr.delaySinceLastRR = 0x33333333;
+  rtcp::ReceiveTimeInfo last_xr_rr;
+  last_xr_rr.ssrc = 0x11111111;
+  last_xr_rr.last_rr = 0x22222222;
+  last_xr_rr.delay_since_last_rr = 0x33333333;
   feedback_state.last_xr_rr = last_xr_rr;
   EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state, kRtcpReport));
   EXPECT_EQ(1, parser()->xr()->num_packets());
   EXPECT_EQ(kSenderSsrc, parser()->xr()->sender_ssrc());
   EXPECT_EQ(1U, parser()->xr()->dlrrs().size());
   EXPECT_EQ(1U, parser()->xr()->dlrrs()[0].sub_blocks().size());
-  EXPECT_EQ(last_xr_rr.sourceSSRC,
-            parser()->xr()->dlrrs()[0].sub_blocks()[0].ssrc);
-  EXPECT_EQ(last_xr_rr.lastRR,
+  EXPECT_EQ(last_xr_rr.ssrc, parser()->xr()->dlrrs()[0].sub_blocks()[0].ssrc);
+  EXPECT_EQ(last_xr_rr.last_rr,
             parser()->xr()->dlrrs()[0].sub_blocks()[0].last_rr);
-  EXPECT_EQ(last_xr_rr.delaySinceLastRR,
+  EXPECT_EQ(last_xr_rr.delay_since_last_rr,
             parser()->xr()->dlrrs()[0].sub_blocks()[0].delay_since_last_rr);
 }
 
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
index 78ad5a0..dfa146e 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
@@ -324,7 +324,8 @@
                   &state.last_rr_ntp_frac,
                   &state.remote_sr);
 
-  state.has_last_xr_rr = LastReceivedXrReferenceTimeInfo(&state.last_xr_rr);
+  state.has_last_xr_rr =
+      rtcp_receiver_.LastReceivedXrReferenceTimeInfo(&state.last_xr_rr);
 
   uint32_t tmp;
   BitrateSent(&state.send_bitrate, &tmp, &tmp, &tmp);
@@ -898,11 +899,6 @@
   return true;
 }
 
-bool ModuleRtpRtcpImpl::LastReceivedXrReferenceTimeInfo(
-    RtcpReceiveTimeInfo* info) const {
-  return rtcp_receiver_.LastReceivedXrReferenceTimeInfo(info);
-}
-
 bool ModuleRtpRtcpImpl::UpdateRTCPReceiveInformationTimers() {
   // If this returns true this channel has timed out.
   // Periodically check if this is true and if so call UpdateTMMBR.
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h
index 6d2e641..55f1d4f 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h
+++ b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h
@@ -294,8 +294,6 @@
                        uint32_t* NTPfrac,
                        uint32_t* remote_sr) const;
 
-  bool LastReceivedXrReferenceTimeInfo(RtcpReceiveTimeInfo* info) const;
-
   std::vector<rtcp::TmmbItem> BoundingSet(bool* tmmbr_owner);
 
   void BitrateSent(uint32_t* total_rate,