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 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 const PipelineStatusCB& done_cb) { | 479 const PipelineStatusCB& done_cb) { |
480 DCHECK(task_runner_->BelongsToCurrentThread()); | 480 DCHECK(task_runner_->BelongsToCurrentThread()); |
481 DCHECK(!pending_callbacks_.get()); | 481 DCHECK(!pending_callbacks_.get()); |
482 SerialRunner::Queue bound_fns; | 482 SerialRunner::Queue bound_fns; |
483 | 483 |
484 // Pause. | 484 // Pause. |
485 if (audio_renderer_) { | 485 if (audio_renderer_) { |
486 bound_fns.Push(base::Bind( | 486 bound_fns.Push(base::Bind( |
487 &AudioRenderer::Pause, base::Unretained(audio_renderer_.get()))); | 487 &AudioRenderer::Pause, base::Unretained(audio_renderer_.get()))); |
488 } | 488 } |
489 if (video_renderer_) { | |
490 bound_fns.Push(base::Bind( | |
491 &VideoRenderer::Pause, base::Unretained(video_renderer_.get()))); | |
492 } | |
493 if (text_renderer_) { | 489 if (text_renderer_) { |
494 bound_fns.Push(base::Bind( | 490 bound_fns.Push(base::Bind( |
495 &TextRenderer::Pause, base::Unretained(text_renderer_.get()))); | 491 &TextRenderer::Pause, base::Unretained(text_renderer_.get()))); |
496 } | 492 } |
497 | 493 |
498 // Flush. | 494 // Flush. |
499 if (audio_renderer_) { | 495 if (audio_renderer_) { |
500 bound_fns.Push(base::Bind( | 496 bound_fns.Push(base::Bind( |
501 &AudioRenderer::Flush, base::Unretained(audio_renderer_.get()))); | 497 &AudioRenderer::Flush, base::Unretained(audio_renderer_.get()))); |
502 } | 498 } |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
902 void Pipeline::StartClockIfWaitingForTimeUpdate_Locked() { | 898 void Pipeline::StartClockIfWaitingForTimeUpdate_Locked() { |
903 lock_.AssertAcquired(); | 899 lock_.AssertAcquired(); |
904 if (!waiting_for_clock_update_) | 900 if (!waiting_for_clock_update_) |
905 return; | 901 return; |
906 | 902 |
907 waiting_for_clock_update_ = false; | 903 waiting_for_clock_update_ = false; |
908 clock_->Play(); | 904 clock_->Play(); |
909 } | 905 } |
910 | 906 |
911 } // namespace media | 907 } // namespace media |
OLD | NEW |