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

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

Issue 1815423002: media: Stop flushing the renderer for pipeline suspend (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing Flush from unittests 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_) {
678 fns.Push(base::Bind(&TextRenderer::Flush, 673 fns.Push(base::Bind(&TextRenderer::Flush,
679 base::Unretained(text_renderer_.get()))); 674 base::Unretained(text_renderer_.get())));
680 } 675 }
681 676
682 pending_callbacks_ = SerialRunner::Run( 677 pending_callbacks_ = SerialRunner::Run(
683 fns, base::Bind(&PipelineImpl::StateTransitionTask, weak_this_)); 678 fns, base::Bind(&PipelineImpl::StateTransitionTask, weak_this_));
684 } 679 }
685 680
686 void PipelineImpl::ResumeTask(scoped_ptr<Renderer> renderer, 681 void PipelineImpl::ResumeTask(scoped_ptr<Renderer> renderer,
687 base::TimeDelta timestamp, 682 base::TimeDelta timestamp,
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 metadata_cb_.Run(metadata); 858 metadata_cb_.Run(metadata);
864 } 859 }
865 860
866 void PipelineImpl::BufferingStateChanged(BufferingState new_buffering_state) { 861 void PipelineImpl::BufferingStateChanged(BufferingState new_buffering_state) {
867 DVLOG(1) << __FUNCTION__ << "(" << new_buffering_state << ") "; 862 DVLOG(1) << __FUNCTION__ << "(" << new_buffering_state << ") ";
868 DCHECK(task_runner_->BelongsToCurrentThread()); 863 DCHECK(task_runner_->BelongsToCurrentThread());
869 buffering_state_cb_.Run(new_buffering_state); 864 buffering_state_cb_.Run(new_buffering_state);
870 } 865 }
871 866
872 } // namespace media 867 } // 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