| 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 AutoLock auto_lock(lock_); | 173 AutoLock auto_lock(lock_); |
| 174 DCHECK(!pending_request_); | 174 DCHECK(!pending_request_); |
| 175 pending_request_ = true; | 175 pending_request_ = true; |
| 176 | 176 |
| 177 // Use the information provided by the IPC message to adjust the playback | 177 // Use the information provided by the IPC message to adjust the playback |
| 178 // delay. | 178 // delay. |
| 179 request_timestamp_ = message_timestamp; | 179 request_timestamp_ = message_timestamp; |
| 180 request_delay_ = ConvertToDuration(bytes_in_buffer); | 180 request_delay_ = ConvertToDuration(bytes_in_buffer); |
| 181 } | 181 } |
| 182 | 182 |
| 183 // Try to fill in the fulfil the packet request. | 183 // Try to fill in the fulfill the packet request. |
| 184 OnNotifyPacketReady(); | 184 OnNotifyPacketReady(); |
| 185 } | 185 } |
| 186 | 186 |
| 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; |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 prerolling_ = false; | 311 prerolling_ = false; |
| 312 preroll_bytes_ = 0; | 312 preroll_bytes_ = 0; |
| 313 filter_->Send(new ViewHostMsg_StartAudioStream(0, stream_id_)); | 313 filter_->Send(new ViewHostMsg_StartAudioStream(0, stream_id_)); |
| 314 } else { | 314 } else { |
| 315 preroll_bytes_ -= filled; | 315 preroll_bytes_ -= filled; |
| 316 } | 316 } |
| 317 } | 317 } |
| 318 } | 318 } |
| 319 } | 319 } |
| 320 } | 320 } |
| OLD | NEW |