Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(468)

Unified Diff: webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc

Issue 2986543002: Remove RtpRtcp::RemoteRTCPStat(RTCPSenderInfo*) as unused (Closed)
Patch Set: rebase Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc b/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc
index 5172a802bde69aa05397ff8067ca912f40ea22c7..1f1d4f81fae2aa5185895a06f7478dde4d842f47 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc
@@ -119,6 +119,7 @@ RTCPReceiver::RTCPReceiver(
bitrate_allocation_observer_(bitrate_allocation_observer),
main_ssrc_(0),
remote_ssrc_(0),
+ remote_sender_rtp_time_(0),
xr_rrtr_status_(false),
xr_rr_rtt_ms_(0),
oldest_tmmbr_info_ms_(0),
@@ -129,7 +130,6 @@ RTCPReceiver::RTCPReceiver(
num_skipped_packets_(0),
last_skipped_packets_warning_ms_(clock->TimeInMilliseconds()) {
RTC_DCHECK(owner);
- memset(&remote_sender_info_, 0, sizeof(remote_sender_info_));
}
RTCPReceiver::~RTCPReceiver() {}
@@ -155,7 +155,6 @@ int64_t RTCPReceiver::LastReceivedReceiverReport() const {
void RTCPReceiver::SetRemoteSSRC(uint32_t ssrc) {
rtc::CritScope lock(&rtcp_receiver_lock_);
// New SSRC reset old reports.
- memset(&remote_sender_info_, 0, sizeof(remote_sender_info_));
last_received_sr_ntp_.Reset();
remote_ssrc_ = ssrc;
}
@@ -234,13 +233,13 @@ bool RTCPReceiver::NTP(uint32_t* received_ntp_secs,
// NTP from incoming SenderReport.
if (received_ntp_secs)
- *received_ntp_secs = remote_sender_info_.NTPseconds;
+ *received_ntp_secs = remote_sender_ntp_time_.seconds();
if (received_ntp_frac)
- *received_ntp_frac = remote_sender_info_.NTPfraction;
+ *received_ntp_frac = remote_sender_ntp_time_.fractions();
// Rtp time from incoming SenderReport.
if (rtcp_timestamp)
- *rtcp_timestamp = remote_sender_info_.RTPtimeStamp;
+ *rtcp_timestamp = remote_sender_rtp_time_;
// Local NTP time when we received a RTCP packet with a send block.
if (rtcp_arrival_time_secs)
@@ -269,16 +268,6 @@ bool RTCPReceiver::LastReceivedXrReferenceTimeInfo(
return true;
}
-int32_t RTCPReceiver::SenderInfoReceived(RTCPSenderInfo* sender_info) const {
- RTC_DCHECK(sender_info);
- rtc::CritScope lock(&rtcp_receiver_lock_);
- if (!last_received_sr_ntp_.Valid())
- return -1;
-
- memcpy(sender_info, &remote_sender_info_, sizeof(RTCPSenderInfo));
- return 0;
-}
-
// We can get multiple receive reports when we receive the report from a CE.
int32_t RTCPReceiver::StatisticsReceived(
std::vector<RTCPReportBlock>* receive_blocks) const {
@@ -413,13 +402,8 @@ void RTCPReceiver::HandleSenderReport(const CommonHeader& rtcp_block,
// Only signal that we have received a SR when we accept one.
packet_information->packet_type_flags |= kRtcpSr;
- // Save the NTP time of this report.
- remote_sender_info_.NTPseconds = sender_report.ntp().seconds();
- remote_sender_info_.NTPfraction = sender_report.ntp().fractions();
- remote_sender_info_.RTPtimeStamp = sender_report.rtp_timestamp();
- remote_sender_info_.sendPacketCount = sender_report.sender_packet_count();
- remote_sender_info_.sendOctetCount = sender_report.sender_octet_count();
-
+ remote_sender_ntp_time_ = sender_report.ntp();
+ remote_sender_rtp_time_ = sender_report.rtp_timestamp();
last_received_sr_ntp_ = clock_->CurrentNtpTime();
} else {
// We will only store the send report from one source, but
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtcp_receiver.h ('k') | webrtc/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698