| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/filters/pipeline_controller.h" | 5 #include "media/filters/pipeline_controller.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "media/base/demuxer.h" | 8 #include "media/base/demuxer.h" |
| 9 | 9 |
| 10 namespace media { | 10 namespace media { |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 } | 97 } |
| 98 } | 98 } |
| 99 | 99 |
| 100 bool PipelineController::IsStable() { | 100 bool PipelineController::IsStable() { |
| 101 DCHECK(thread_checker_.CalledOnValidThread()); | 101 DCHECK(thread_checker_.CalledOnValidThread()); |
| 102 return state_ == State::PLAYING; | 102 return state_ == State::PLAYING; |
| 103 } | 103 } |
| 104 | 104 |
| 105 bool PipelineController::IsSuspended() { | 105 bool PipelineController::IsSuspended() { |
| 106 DCHECK(thread_checker_.CalledOnValidThread()); | 106 DCHECK(thread_checker_.CalledOnValidThread()); |
| 107 return (pending_suspend_ || state_ == State::SUSPENDED) && !pending_resume_; | 107 return (pending_suspend_ || state_ == State::SUSPENDING || |
| 108 state_ == State::SUSPENDED) && |
| 109 !pending_resume_; |
| 108 } | 110 } |
| 109 | 111 |
| 110 bool PipelineController::IsPipelineSuspended() { | 112 bool PipelineController::IsPipelineSuspended() { |
| 111 DCHECK(thread_checker_.CalledOnValidThread()); | 113 DCHECK(thread_checker_.CalledOnValidThread()); |
| 112 return state_ == State::SUSPENDED; | 114 return state_ == State::SUSPENDED; |
| 113 } | 115 } |
| 114 | 116 |
| 115 void PipelineController::OnPipelineStatus(State state, | 117 void PipelineController::OnPipelineStatus(State state, |
| 116 PipelineStatus pipeline_status) { | 118 PipelineStatus pipeline_status) { |
| 117 DCHECK(thread_checker_.CalledOnValidThread()); | 119 DCHECK(thread_checker_.CalledOnValidThread()); |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 pending_seeked_cb_ = false; | 227 pending_seeked_cb_ = false; |
| 226 bool was_pending_time_updated = pending_time_updated_; | 228 bool was_pending_time_updated = pending_time_updated_; |
| 227 pending_time_updated_ = false; | 229 pending_time_updated_ = false; |
| 228 seeked_cb_.Run(was_pending_time_updated); | 230 seeked_cb_.Run(was_pending_time_updated); |
| 229 return; | 231 return; |
| 230 } | 232 } |
| 231 } | 233 } |
| 232 } | 234 } |
| 233 | 235 |
| 234 } // namespace media | 236 } // namespace media |
| OLD | NEW |