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 910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
921 if (!message_loop_->BelongsToCurrentThread()) { | 921 if (!message_loop_->BelongsToCurrentThread()) { |
922 message_loop_->PostTask(FROM_HERE, base::Bind( | 922 message_loop_->PostTask(FROM_HERE, base::Bind( |
923 &Pipeline::OnAudioUnderflow, base::Unretained(this))); | 923 &Pipeline::OnAudioUnderflow, base::Unretained(this))); |
924 return; | 924 return; |
925 } | 925 } |
926 | 926 |
927 if (state_ != kStarted) | 927 if (state_ != kStarted) |
928 return; | 928 return; |
929 | 929 |
930 if (audio_renderer_) | 930 if (audio_renderer_) |
931 audio_renderer_->ResumeAfterUnderflow(true); | 931 audio_renderer_->ResumeAfterUnderflow(); |
932 } | 932 } |
933 | 933 |
934 void Pipeline::StartClockIfWaitingForTimeUpdate_Locked() { | 934 void Pipeline::StartClockIfWaitingForTimeUpdate_Locked() { |
935 lock_.AssertAcquired(); | 935 lock_.AssertAcquired(); |
936 if (!waiting_for_clock_update_) | 936 if (!waiting_for_clock_update_) |
937 return; | 937 return; |
938 | 938 |
939 waiting_for_clock_update_ = false; | 939 waiting_for_clock_update_ = false; |
940 clock_->Play(); | 940 clock_->Play(); |
941 } | 941 } |
942 | 942 |
943 } // namespace media | 943 } // namespace media |
OLD | NEW |