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

Unified Diff: media/cast/sender/frame_sender.cc

Issue 502333002: [Cast] In Audio/VideoSender, drop frames when too-long a duration is in-flight. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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: media/cast/sender/frame_sender.cc
diff --git a/media/cast/sender/frame_sender.cc b/media/cast/sender/frame_sender.cc
index b531a069fe46022d5089aab45b79945e8f8c64dc..b5a9dc96a4806e3baff209fdde38f156d7f681ea 100644
--- a/media/cast/sender/frame_sender.cc
+++ b/media/cast/sender/frame_sender.cc
@@ -51,8 +51,7 @@ void FrameSender::SendRtcpReport(bool schedule_future_reports) {
DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN));
const base::TimeTicks now = cast_environment_->Clock()->NowTicks();
uint32 now_as_rtp_timestamp = 0;
- if (rtp_timestamp_helper_.GetCurrentTimeAsRtpTimestamp(
- now, &now_as_rtp_timestamp)) {
+ if (rtp_timestamp_helper_.EstimateRtpTimestamp(now, &now_as_rtp_timestamp)) {
transport_sender_->SendSenderReport(ssrc_, now, now_as_rtp_timestamp);
} else {
// |rtp_timestamp_helper_| should have stored a mapping by this point.
@@ -81,6 +80,9 @@ void FrameSender::SetTargetPlayoutDelay(
1 + static_cast<int>(target_playout_delay_ *
max_frame_rate_ /
base::TimeDelta::FromSeconds(1)));
+ max_unacked_rtp_delta_ =
+ 1 + TimeDeltaToRtpDelta(target_playout_delay_,
+ rtp_timestamp_helper_.frequency());
send_target_playout_delay_ = true;
}

Powered by Google App Engine
This is Rietveld 408576698