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

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

Issue 545593002: [Cast] Track audio queued in encoder; account for it in ShouldDropNextFrame(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« media/cast/sender/frame_sender.cc ('K') | « media/cast/sender/video_sender.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/sender/video_sender.cc
diff --git a/media/cast/sender/video_sender.cc b/media/cast/sender/video_sender.cc
index 7e356924c9151a79e6ffb0151a89d8c8448f969f..ae17cdedeb446c6f1a331d352b1c6574ea233c7a 100644
--- a/media/cast/sender/video_sender.cc
+++ b/media/cast/sender/video_sender.cc
@@ -50,7 +50,6 @@ VideoSender::VideoSender(
video_config.max_frame_rate,
video_config.target_playout_delay),
fixed_bitrate_(GetFixedBitrate(video_config)),
- frames_in_encoder_(0),
congestion_control_(cast_environment->Clock(),
video_config.max_bitrate,
video_config.min_bitrate,
@@ -297,32 +296,5 @@ void VideoSender::OnReceivedCastFeedback(const RtcpCastMessage& cast_feedback) {
}
}
-bool VideoSender::ShouldDropNextFrame(base::TimeTicks capture_time) const {
- DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN));
- int frames_in_flight = 0;
- base::TimeDelta duration_in_flight;
- if (!last_send_time_.is_null()) {
- frames_in_flight =
- static_cast<int32>(last_sent_frame_id_ - latest_acked_frame_id_);
- if (frames_in_flight > 0) {
- const uint32 oldest_unacked_frame_id = latest_acked_frame_id_ + 1;
- duration_in_flight =
- capture_time - GetRecordedReferenceTime(oldest_unacked_frame_id);
- }
- }
- frames_in_flight += frames_in_encoder_;
- VLOG(2) << frames_in_flight
- << " frames in flight; last sent: " << last_sent_frame_id_
- << "; latest acked: " << latest_acked_frame_id_
- << "; frames in encoder: " << frames_in_encoder_
- << "; duration in flight: "
- << duration_in_flight.InMicroseconds() << " usec ("
- << (target_playout_delay_ > base::TimeDelta() ?
- 100 * duration_in_flight / target_playout_delay_ :
- kint64max) << "%)";
- return frames_in_flight >= max_unacked_frames_ ||
- duration_in_flight >= target_playout_delay_;
-}
-
} // namespace cast
} // namespace media
« media/cast/sender/frame_sender.cc ('K') | « media/cast/sender/video_sender.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698