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

Side by Side Diff: content/renderer/media/webrtc_audio_renderer.cc

Issue 148553003: Clean up histogram'd media enum max values. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 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
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 "content/renderer/media/webrtc_audio_renderer.h" 5 #include "content/renderer/media/webrtc_audio_renderer.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 DCHECK_GE(session_id_, 0); 323 DCHECK_GE(session_id_, 0);
324 sink_->InitializeUnifiedStream(sink_params, this, session_id_); 324 sink_->InitializeUnifiedStream(sink_params, this, session_id_);
325 325
326 sink_->Start(); 326 sink_->Start();
327 327
328 // User must call Play() before any audio can be heard. 328 // User must call Play() before any audio can be heard.
329 state_ = PAUSED; 329 state_ = PAUSED;
330 330
331 UMA_HISTOGRAM_ENUMERATION("WebRTC.AudioOutputChannelLayout", 331 UMA_HISTOGRAM_ENUMERATION("WebRTC.AudioOutputChannelLayout",
332 source_params.channel_layout(), 332 source_params.channel_layout(),
333 media::CHANNEL_LAYOUT_MAX); 333 media::CHANNEL_LAYOUT_HISTOGRAM_MAX);
334 UMA_HISTOGRAM_ENUMERATION("WebRTC.AudioOutputFramesPerBuffer", 334 UMA_HISTOGRAM_ENUMERATION("WebRTC.AudioOutputFramesPerBuffer",
335 source_params.frames_per_buffer(), 335 source_params.frames_per_buffer(),
336 kUnexpectedAudioBufferSize); 336 kUnexpectedAudioBufferSize);
337 AddHistogramFramesPerBuffer(source_params.frames_per_buffer()); 337 AddHistogramFramesPerBuffer(source_params.frames_per_buffer());
338 338
339 return true; 339 return true;
340 } 340 }
341 341
342 scoped_refptr<MediaStreamAudioRenderer> 342 scoped_refptr<MediaStreamAudioRenderer>
343 WebRtcAudioRenderer::CreateSharedAudioRendererProxy() { 343 WebRtcAudioRenderer::CreateSharedAudioRendererProxy() {
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 } 480 }
481 481
482 // De-interleave each channel and convert to 32-bit floating-point 482 // De-interleave each channel and convert to 32-bit floating-point
483 // with nominal range -1.0 -> +1.0 to match the callback format. 483 // with nominal range -1.0 -> +1.0 to match the callback format.
484 audio_bus->FromInterleaved(buffer_.get(), 484 audio_bus->FromInterleaved(buffer_.get(),
485 audio_bus->frames(), 485 audio_bus->frames(),
486 sizeof(buffer_[0])); 486 sizeof(buffer_[0]));
487 } 487 }
488 488
489 } // namespace content 489 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698