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

Unified Diff: media/filters/video_renderer_algorithm.h

Issue 1126413002: Handle incoming frames with the same timestamp. (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Typo. 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 61603b3e95a381c92bdd3557c1272b1e7a362eba..6e18f56f7e0c5178ce45e8e345631723237cab47 100644
--- a/media/filters/video_renderer_algorithm.h
+++ b/media/filters/video_renderer_algorithm.h
@@ -91,6 +91,10 @@ class MEDIA_EXPORT VideoRendererAlgorithm {
// stream frames. Frames inserted prior to the last rendered frame will not
// be used. They will be discarded on the next call to Render(), counting as
// dropped frames, or by RemoveExpiredFrames(), counting as expired frames.
+ //
+ // Attempting to enqueue a frame with the same timestamp as a previous frame
+ // will result in the previous frame being replaced if it has not been
+ // rendered yet. If it has been rendered, the new frame will be dropped.
void EnqueueFrame(const scoped_refptr<VideoFrame>& frame);
// Removes all frames from the |frame_queue_| and clears predictors. The
@@ -275,9 +279,14 @@ class MEDIA_EXPORT VideoRendererAlgorithm {
// more frames, or chosen a frame which exceeded acceptable drift.
bool last_render_had_glitch_;
- // For testing functionality which enables clockless playback of all frames.
+ // For testing functionality which enables clockless playback of all frames,
+ // does not prevent frame dropping due to equivalent timestamps.
bool frame_dropping_disabled_;
+ // Tracks frames dropped during enqueue when identical timestamps are added
+ // to the queue. Callers are told about these frames during Render().
+ size_t frames_dropped_during_enqueue_;
+
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