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

Unified Diff: media/cast/rtcp/rtcp.cc

Issue 281453003: Cast: Simplify code path for RTCP sender report (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged Created 6 years, 7 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
« no previous file with comments | « media/cast/rtcp/rtcp.h ('k') | media/cast/rtcp/rtcp_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/rtcp/rtcp.cc
diff --git a/media/cast/rtcp/rtcp.cc b/media/cast/rtcp/rtcp.cc
index 30fcde57f2f4f38db7781496b9fb0f8054a59210..40d29611afccdae9d8ef91d430da8960a93fe430 100644
--- a/media/cast/rtcp/rtcp.cc
+++ b/media/cast/rtcp/rtcp.cc
@@ -206,13 +206,16 @@ void Rtcp::SendRtcpFromRtpReceiver(
target_delay_ms_);
}
-void Rtcp::SendRtcpFromRtpSender(
- transport::RtcpSenderInfo sender_info) {
+void Rtcp::SendRtcpFromRtpSender(base::TimeTicks current_time,
+ uint32 current_time_as_rtp_timestamp) {
DCHECK(transport_sender_);
uint32 packet_type_flags = transport::kRtcpSr;
- base::TimeTicks now = cast_environment_->Clock()->NowTicks();
-
- SaveLastSentNtpTime(now, sender_info.ntp_seconds, sender_info.ntp_fraction);
+ uint32 current_ntp_seconds = 0;
+ uint32 current_ntp_fractions = 0;
+ ConvertTimeTicksToNtp(current_time, &current_ntp_seconds,
+ &current_ntp_fractions);
+ SaveLastSentNtpTime(current_time, current_ntp_seconds,
+ current_ntp_fractions);
transport::RtcpDlrrReportBlock dlrr;
if (!time_last_report_received_.is_null()) {
@@ -220,7 +223,7 @@ void Rtcp::SendRtcpFromRtpSender(
dlrr.last_rr = last_report_received_;
uint32 delay_seconds = 0;
uint32 delay_fraction = 0;
- base::TimeDelta delta = now - time_last_report_received_;
+ base::TimeDelta delta = current_time - time_last_report_received_;
ConvertTimeToFractions(delta.InMicroseconds(), &delay_seconds,
&delay_fraction);
@@ -228,8 +231,8 @@ void Rtcp::SendRtcpFromRtpSender(
}
transport_sender_->SendRtcpFromRtpSender(
- packet_type_flags, sender_info, dlrr, local_ssrc_,
- c_name_);
+ packet_type_flags, current_ntp_seconds, current_ntp_fractions,
+ current_time_as_rtp_timestamp, dlrr, local_ssrc_, c_name_);
UpdateNextTimeToSendRtcp();
}
« no previous file with comments | « media/cast/rtcp/rtcp.h ('k') | media/cast/rtcp/rtcp_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698