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

Unified Diff: media/cast/receiver/frame_receiver.cc

Issue 339743002: Cast: Make vp8 3-buffer mode work (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge, fix, cleanup, rince, repeat 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/receiver/frame_receiver.cc
diff --git a/media/cast/receiver/frame_receiver.cc b/media/cast/receiver/frame_receiver.cc
index 1f6d75ed9b697b86ca5cc485c5afec5f58c5d4b6..8deb6d2c7bc53b7348923022e9e170e3e4a299ff 100644
--- a/media/cast/receiver/frame_receiver.cc
+++ b/media/cast/receiver/frame_receiver.cc
@@ -217,9 +217,10 @@ void FrameReceiver::EmitAvailableEncodedFrames() {
// skipping one or more frames. Skip if the missing frame wouldn't complete
// playing before the start of playback of the available frame.
if (!is_consecutively_next_frame) {
- // TODO(miu): Also account for expected decode time here?
+ // This assumes that decoding takes as long as playing, which might
+ // not be true.
const base::TimeTicks earliest_possible_end_time_of_missing_frame =
- now + expected_frame_duration_;
+ now + expected_frame_duration_ * 2;
if (earliest_possible_end_time_of_missing_frame < playout_time) {
VLOG(1) << "Wait for next consecutive frame instead of skipping.";
if (!is_waiting_for_consecutive_frame_) {
@@ -235,6 +236,8 @@ void FrameReceiver::EmitAvailableEncodedFrames() {
}
}
+ framer_.AckFrame(encoded_frame->frame_id);
Alpha Left Google 2014/08/25 23:23:44 Please add a comment to explain why frame is ACKed
hubbe 2014/08/27 04:14:03 Done.
+
// Decrypt the payload data in the frame, if crypto is being used.
if (decryptor_.is_activated()) {
std::string decrypted_data;

Powered by Google App Engine
This is Rietveld 408576698