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

Unified Diff: media/filters/video_renderer_algorithm.h

Issue 1124333012: Don't carry over frame overage unless frame is selected by cadence. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clarify. Cleanup test. Created 5 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 | « no previous file | media/filters/video_renderer_algorithm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/video_renderer_algorithm.h
diff --git a/media/filters/video_renderer_algorithm.h b/media/filters/video_renderer_algorithm.h
index 3c37e7f300f6bf79c3260a184357efa72032dc46..6e39446d129f670b49a73f777667d558e685341f 100644
--- a/media/filters/video_renderer_algorithm.h
+++ b/media/filters/video_renderer_algorithm.h
@@ -192,20 +192,15 @@ class MEDIA_EXPORT VideoRendererAlgorithm {
// If |cadence_estimator_| has detected a valid cadence, attempts to find the
// next frame which should be rendered. Returns -1 if not enough frames are
- // available for cadence selection or there is no cadence. Will adjust the
- // selected frame's ideal render count if the last rendered frame has been
- // over selected.
- int FindBestFrameByCadence();
-
- // Similar to FindBestFrameByCadence(), but instead of adjusting the last
- // rendered frame's ideal render count in the case of over selection.
- // Optionally returns the number of times a prior frame was over displayed and
- // ate into the returned frames ideal render count via |remaining_overage|.
+ // available for cadence selection or there is no cadence.
+ //
+ // Returns the number of times a prior frame was over displayed and ate into
+ // the returned frames ideal render count via |remaining_overage|.
//
// For example, if we have 2 frames and each has an ideal display count of 3,
// but the first was displayed 4 times, the best frame is the second one, but
// it should only be displayed twice instead of thrice, so it's overage is 1.
- int FindBestFrameByCadenceInternal(int* remaining_overage) const;
+ int FindBestFrameByCadence(int* remaining_overage) const;
// Iterates over |frame_queue_| and finds the frame which covers the most of
// the deadline interval. If multiple frames have coverage of the interval,
@@ -291,6 +286,10 @@ class MEDIA_EXPORT VideoRendererAlgorithm {
// to the queue. Callers are told about these frames during Render().
size_t frames_dropped_during_enqueue_;
+ // When cadence is present, we don't want to start counting against cadence
+ // until the first frame has reached its presentation time.
+ bool first_frame_;
+
DISALLOW_COPY_AND_ASSIGN(VideoRendererAlgorithm);
};
« no previous file with comments | « no previous file | media/filters/video_renderer_algorithm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698