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

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

Issue 10918172: Remove VideoDecoder::PrepareForShutdownHack() and friends. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: blah Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « media/base/pipeline.h ('k') | media/base/video_decoder.h » ('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.h" 5 #include "media/base/pipeline.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 713
714 void Pipeline::StopTask(const base::Closure& stop_cb) { 714 void Pipeline::StopTask(const base::Closure& stop_cb) {
715 DCHECK(message_loop_->BelongsToCurrentThread()); 715 DCHECK(message_loop_->BelongsToCurrentThread());
716 DCHECK(stop_cb_.is_null()); 716 DCHECK(stop_cb_.is_null());
717 717
718 if (state_ == kStopped) { 718 if (state_ == kStopped) {
719 stop_cb.Run(); 719 stop_cb.Run();
720 return; 720 return;
721 } 721 }
722 722
723 // TODO(scherkus): Remove after pipeline state machine refactoring has some
724 // time to bake http://crbug.com/110228
725 if (video_renderer_)
726 video_renderer_->PrepareForShutdownHack();
727
728 SetState(kStopping); 723 SetState(kStopping);
729 pending_callbacks_.reset(); 724 pending_callbacks_.reset();
730 stop_cb_ = stop_cb; 725 stop_cb_ = stop_cb;
731 726
732 DoStop(base::Bind(&Pipeline::OnStopCompleted, this)); 727 DoStop(base::Bind(&Pipeline::OnStopCompleted, this));
733 } 728 }
734 729
735 void Pipeline::ErrorChangedTask(PipelineStatus error) { 730 void Pipeline::ErrorChangedTask(PipelineStatus error) {
736 DCHECK(message_loop_->BelongsToCurrentThread()); 731 DCHECK(message_loop_->BelongsToCurrentThread());
737 DCHECK_NE(PIPELINE_OK, error) << "PIPELINE_OK isn't an error!"; 732 DCHECK_NE(PIPELINE_OK, error) << "PIPELINE_OK isn't an error!";
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 void Pipeline::StartClockIfWaitingForTimeUpdate_Locked() { 951 void Pipeline::StartClockIfWaitingForTimeUpdate_Locked() {
957 lock_.AssertAcquired(); 952 lock_.AssertAcquired();
958 if (!waiting_for_clock_update_) 953 if (!waiting_for_clock_update_)
959 return; 954 return;
960 955
961 waiting_for_clock_update_ = false; 956 waiting_for_clock_update_ = false;
962 clock_->Play(); 957 clock_->Play();
963 } 958 }
964 959
965 } // namespace media 960 } // namespace media
OLDNEW
« no previous file with comments | « media/base/pipeline.h ('k') | media/base/video_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698