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

Side by Side Diff: media/audio/audio_output_controller.cc

Issue 377803004: Fixes for re-enabling more MSVC level 4 warnings: media/ edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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/base/audio_hash.h » ('j') | media/cast/rtcp/test_rtcp_packet_builder.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/audio/audio_output_controller.h" 5 #include "media/audio/audio_output_controller.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/task_runner_util.h" 10 #include "base/task_runner_util.h"
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 TRACE_EVENT0("audio", "AudioOutputController::DoPause"); 216 TRACE_EVENT0("audio", "AudioOutputController::DoPause");
217 217
218 StopStream(); 218 StopStream();
219 219
220 if (state_ != kPaused) 220 if (state_ != kPaused)
221 return; 221 return;
222 222
223 // Let the renderer know we've stopped. Necessary to let PPAPI clients know 223 // Let the renderer know we've stopped. Necessary to let PPAPI clients know
224 // audio has been shutdown. TODO(dalecurtis): This stinks. PPAPI should have 224 // audio has been shutdown. TODO(dalecurtis): This stinks. PPAPI should have
225 // a better way to know when it should exit PPB_Audio_Shared::Run(). 225 // a better way to know when it should exit PPB_Audio_Shared::Run().
226 sync_reader_->UpdatePendingBytes(-1); 226 sync_reader_->UpdatePendingBytes(0xFFFFFFFF);
ddorwin 2014/07/08 18:17:50 nit: kuint32max
Peter Kasting 2014/07/08 18:39:14 Done.
227 227
228 handler_->OnPaused(); 228 handler_->OnPaused();
229 } 229 }
230 230
231 void AudioOutputController::DoClose() { 231 void AudioOutputController::DoClose() {
232 DCHECK(message_loop_->BelongsToCurrentThread()); 232 DCHECK(message_loop_->BelongsToCurrentThread());
233 SCOPED_UMA_HISTOGRAM_TIMER("Media.AudioOutputController.CloseTime"); 233 SCOPED_UMA_HISTOGRAM_TIMER("Media.AudioOutputController.CloseTime");
234 TRACE_EVENT0("audio", "AudioOutputController::DoClose"); 234 TRACE_EVENT0("audio", "AudioOutputController::DoClose");
235 235
236 if (state_ != kClosed) { 236 if (state_ != kClosed) {
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 DCHECK(message_loop_->BelongsToCurrentThread()); 424 DCHECK(message_loop_->BelongsToCurrentThread());
425 425
426 // If we should be playing and we haven't, that's a wedge. 426 // If we should be playing and we haven't, that's a wedge.
427 if (state_ == kPlaying) { 427 if (state_ == kPlaying) {
428 UMA_HISTOGRAM_BOOLEAN("Media.AudioOutputControllerPlaybackStartupSuccess", 428 UMA_HISTOGRAM_BOOLEAN("Media.AudioOutputControllerPlaybackStartupSuccess",
429 base::AtomicRefCountIsOne(&on_more_io_data_called_)); 429 base::AtomicRefCountIsOne(&on_more_io_data_called_));
430 } 430 }
431 } 431 }
432 432
433 } // namespace media 433 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | media/base/audio_hash.h » ('j') | media/cast/rtcp/test_rtcp_packet_builder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698