OLD | NEW |
---|---|
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 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
614 void Pipeline::InitializeTask(PipelineStatus last_stage_status) { | 614 void Pipeline::InitializeTask(PipelineStatus last_stage_status) { |
615 DCHECK(message_loop_->BelongsToCurrentThread()); | 615 DCHECK(message_loop_->BelongsToCurrentThread()); |
616 | 616 |
617 if (last_stage_status != PIPELINE_OK) { | 617 if (last_stage_status != PIPELINE_OK) { |
618 // Currently only VideoDecoders have a recoverable error code. | 618 // Currently only VideoDecoders have a recoverable error code. |
619 if (state_ == kInitVideoDecoder && | 619 if (state_ == kInitVideoDecoder && |
620 last_stage_status == DECODER_ERROR_NOT_SUPPORTED) { | 620 last_stage_status == DECODER_ERROR_NOT_SUPPORTED) { |
621 state_ = kInitAudioRenderer; | 621 state_ = kInitAudioRenderer; |
622 } else { | 622 } else { |
623 SetError(last_stage_status); | 623 SetError(last_stage_status); |
624 return; | |
scherkus (not reviewing)
2012/08/08 21:15:02
ha!
| |
624 } | 625 } |
625 } | 626 } |
626 | 627 |
627 // If we have received the stop or error signal, return immediately. | 628 // If we have received the stop or error signal, return immediately. |
628 if (IsPipelineStopPending() || IsPipelineStopped() || !IsPipelineOk()) | 629 if (IsPipelineStopPending() || IsPipelineStopped() || !IsPipelineOk()) |
629 return; | 630 return; |
630 | 631 |
631 DCHECK(state_ == kInitDemuxer || | 632 DCHECK(state_ == kInitDemuxer || |
632 state_ == kInitAudioDecoder || | 633 state_ == kInitAudioDecoder || |
633 state_ == kInitAudioRenderer || | 634 state_ == kInitAudioRenderer || |
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1276 void Pipeline::StartClockIfWaitingForTimeUpdate_Locked() { | 1277 void Pipeline::StartClockIfWaitingForTimeUpdate_Locked() { |
1277 lock_.AssertAcquired(); | 1278 lock_.AssertAcquired(); |
1278 if (!waiting_for_clock_update_) | 1279 if (!waiting_for_clock_update_) |
1279 return; | 1280 return; |
1280 | 1281 |
1281 waiting_for_clock_update_ = false; | 1282 waiting_for_clock_update_ = false; |
1282 clock_->Play(); | 1283 clock_->Play(); |
1283 } | 1284 } |
1284 | 1285 |
1285 } // namespace media | 1286 } // namespace media |
OLD | NEW |