Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(357)

Side by Side Diff: chrome/renderer/media/audio_renderer_impl.cc

Issue 164195: Merge 21935 - Fixes an audio playback regression caused by seeking in audio/v... (Closed) Base URL: svn://chrome-svn/chrome/branches/195/src/
Patch Set: Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | media/filters/audio_renderer_base.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Modified: svn:mergeinfo
Merged /trunk/src/chrome/renderer/media/audio_renderer_impl.cc:r21935
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | media/filters/audio_renderer_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698