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

Unified Diff: media/filters/video_renderer_base.cc

Issue 27120: Added IsEndOfStream and IsDiscontiguous flags to buffers. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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 | « media/filters/test_video_renderer.h ('k') | media/filters/video_renderer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/video_renderer_base.cc
===================================================================
--- media/filters/video_renderer_base.cc (revision 10301)
+++ media/filters/video_renderer_base.cc (working copy)
@@ -178,25 +178,19 @@
{
AutoLock auto_lock(lock_);
if (IsRunning()) {
- // TODO(ralphl): if (!preroll_complete_ && EndOfStream) call_init = true
- // and preroll_complete_ = true.
- // TODO(ralphl): If(Seek()) then discard but we don't have SeekFrame().
- if (false) {
- // TODO(ralphl): this is the seek() logic.
+ if (video_frame->IsDiscontinuous()) {
DiscardAllFrames();
- ++number_of_reads_needed_;
- PostSubmitReadsTask();
- } else {
- if (UpdateQueue(host_->GetPipelineStatus()->GetInterpolatedTime(),
- video_frame)) {
- request_repaint = preroll_complete_;
- }
- if (!preroll_complete_ && queue_.size() == number_of_frames_) {
- preroll_complete_ = true;
- call_initialized = true;
- request_repaint = true;
- }
}
+ if (UpdateQueue(host_->GetPipelineStatus()->GetInterpolatedTime(),
+ video_frame)) {
+ request_repaint = preroll_complete_;
+ }
+ if (!preroll_complete_ && (queue_.size() == number_of_frames_ ||
+ video_frame->IsEndOfStream())) {
+ preroll_complete_ = true;
+ call_initialized = true;
+ request_repaint = true;
+ }
}
}
// |lock_| no longer held. Call the pipeline if we've just entered a
« no previous file with comments | « media/filters/test_video_renderer.h ('k') | media/filters/video_renderer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698