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

Side by Side Diff: media/base/pipeline_impl.cc

Issue 1824923002: Revert of media: Stop flushing the renderer for pipeline suspend (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | media/base/pipeline_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/base/pipeline_impl.h" 5 #include "media/base/pipeline_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 } 663 }
664 664
665 // Queue the asynchronous actions required to stop playback. (Matches setup in 665 // Queue the asynchronous actions required to stop playback. (Matches setup in
666 // DoSeek().) 666 // DoSeek().)
667 // TODO(sandersd): Share implementation with DoSeek(). 667 // TODO(sandersd): Share implementation with DoSeek().
668 SerialRunner::Queue fns; 668 SerialRunner::Queue fns;
669 669
670 if (text_renderer_) { 670 if (text_renderer_) {
671 fns.Push(base::Bind(&TextRenderer::Pause, 671 fns.Push(base::Bind(&TextRenderer::Pause,
672 base::Unretained(text_renderer_.get()))); 672 base::Unretained(text_renderer_.get())));
673 }
674
675 fns.Push(base::Bind(&Renderer::Flush, base::Unretained(renderer_.get())));
676
677 if (text_renderer_) {
673 fns.Push(base::Bind(&TextRenderer::Flush, 678 fns.Push(base::Bind(&TextRenderer::Flush,
674 base::Unretained(text_renderer_.get()))); 679 base::Unretained(text_renderer_.get())));
675 } 680 }
676 681
677 pending_callbacks_ = SerialRunner::Run( 682 pending_callbacks_ = SerialRunner::Run(
678 fns, base::Bind(&PipelineImpl::StateTransitionTask, weak_this_)); 683 fns, base::Bind(&PipelineImpl::StateTransitionTask, weak_this_));
679 } 684 }
680 685
681 void PipelineImpl::ResumeTask(scoped_ptr<Renderer> renderer, 686 void PipelineImpl::ResumeTask(scoped_ptr<Renderer> renderer,
682 base::TimeDelta timestamp, 687 base::TimeDelta timestamp,
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 metadata_cb_.Run(metadata); 863 metadata_cb_.Run(metadata);
859 } 864 }
860 865
861 void PipelineImpl::BufferingStateChanged(BufferingState new_buffering_state) { 866 void PipelineImpl::BufferingStateChanged(BufferingState new_buffering_state) {
862 DVLOG(1) << __FUNCTION__ << "(" << new_buffering_state << ") "; 867 DVLOG(1) << __FUNCTION__ << "(" << new_buffering_state << ") ";
863 DCHECK(task_runner_->BelongsToCurrentThread()); 868 DCHECK(task_runner_->BelongsToCurrentThread());
864 buffering_state_cb_.Run(new_buffering_state); 869 buffering_state_cb_.Run(new_buffering_state);
865 } 870 }
866 871
867 } // namespace media 872 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | media/base/pipeline_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698