OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this |
2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
3 // LICENSE file. | 3 // LICENSE file. |
4 | 4 |
5 #include "chrome/common/render_messages.h" | 5 #include "chrome/common/render_messages.h" |
6 #include "chrome/renderer/audio_message_filter.h" | 6 #include "chrome/renderer/audio_message_filter.h" |
7 #include "chrome/renderer/media/audio_renderer_impl.h" | 7 #include "chrome/renderer/media/audio_renderer_impl.h" |
8 #include "chrome/renderer/render_view.h" | 8 #include "chrome/renderer/render_view.h" |
9 #include "chrome/renderer/render_thread.h" | 9 #include "chrome/renderer/render_thread.h" |
10 #include "media/base/filter_host.h" | 10 #include "media/base/filter_host.h" |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 void AudioRendererImpl::OnStateChanged(AudioOutputStream::State state, | 187 void AudioRendererImpl::OnStateChanged(AudioOutputStream::State state, |
188 int info) { | 188 int info) { |
189 DCHECK(MessageLoop::current() == io_loop_); | 189 DCHECK(MessageLoop::current() == io_loop_); |
190 | 190 |
191 AutoLock auto_lock(lock_); | 191 AutoLock auto_lock(lock_); |
192 if (stopped_) | 192 if (stopped_) |
193 return; | 193 return; |
194 | 194 |
195 switch (state) { | 195 switch (state) { |
196 case AudioOutputStream::STATE_ERROR: | 196 case AudioOutputStream::STATE_ERROR: |
197 host()->Error(media::PIPELINE_ERROR_AUDIO_HARDWARE); | 197 host()->SetError(media::PIPELINE_ERROR_AUDIO_HARDWARE); |
198 break; | 198 break; |
199 // TODO(hclam): handle these events. | 199 // TODO(hclam): handle these events. |
200 case AudioOutputStream::STATE_STARTED: | 200 case AudioOutputStream::STATE_STARTED: |
201 case AudioOutputStream::STATE_PAUSED: | 201 case AudioOutputStream::STATE_PAUSED: |
202 break; | 202 break; |
203 default: | 203 default: |
204 NOTREACHED(); | 204 NOTREACHED(); |
205 break; | 205 break; |
206 } | 206 } |
207 } | 207 } |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 prerolling_ = false; | 307 prerolling_ = false; |
308 preroll_bytes_ = 0; | 308 preroll_bytes_ = 0; |
309 filter_->Send(new ViewHostMsg_StartAudioStream(0, stream_id_)); | 309 filter_->Send(new ViewHostMsg_StartAudioStream(0, stream_id_)); |
310 } else { | 310 } else { |
311 preroll_bytes_ -= filled; | 311 preroll_bytes_ -= filled; |
312 } | 312 } |
313 } | 313 } |
314 } | 314 } |
315 } | 315 } |
316 } | 316 } |
OLD | NEW |