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

Side by Side Diff: media/audio/mac/audio_low_latency_input_mac.cc

Issue 1750403004: Adds Media.Audio.InputStartWasDeferredAudioWorkedMac UMA stat (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 9 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
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
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/mac/audio_low_latency_input_mac.h" 5 #include "media/audio/mac/audio_low_latency_input_mac.h"
6 #include <CoreServices/CoreServices.h> 6 #include <CoreServices/CoreServices.h>
7 #include <mach/mach.h> 7 #include <mach/mach.h>
8 #include <string> 8 #include <string>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 CloseAudioUnit(); 553 CloseAudioUnit();
554 // Disable the listener for device property changes. 554 // Disable the listener for device property changes.
555 DeRegisterDeviceChangeListener(); 555 DeRegisterDeviceChangeListener();
556 // Add more UMA stats but only if AGC was activated, i.e. for e.g. WebRTC 556 // Add more UMA stats but only if AGC was activated, i.e. for e.g. WebRTC
557 // audio input streams. 557 // audio input streams.
558 if (GetAutomaticGainControl()) { 558 if (GetAutomaticGainControl()) {
559 // Check if any device property changes are added by filtering out a 559 // Check if any device property changes are added by filtering out a
560 // selected set of the |device_property_changes_map_| map. Add UMA stats 560 // selected set of the |device_property_changes_map_| map. Add UMA stats
561 // if valuable data is found. 561 // if valuable data is found.
562 AddDevicePropertyChangesToUMA(false); 562 AddDevicePropertyChangesToUMA(false);
563 // Log whether call to Start() was deferred or not. To be compared with
564 // Media.Audio.InputStartWasDeferredMac which logs the same value but only
565 // when input audio fails to start.
566 UMA_HISTOGRAM_BOOLEAN("Media.Audio.InputStartWasDeferredAudioWorkedMac",
567 start_was_deferred_);
568 // Log if a change of I/O buffer size was required. To be compared with
569 // Media.Audio.InputBufferSizeWasChangedMac which logs the same value but
570 // only when input audio fails to start.
571 UMA_HISTOGRAM_BOOLEAN("Media.Audio.InputBufferSizeWasChangedAudioWorkedMac",
572 buffer_size_was_changed_);
563 // TODO(henrika): possibly add more values here... 573 // TODO(henrika): possibly add more values here...
564 } 574 }
565 // Inform the audio manager that we have been closed. This will cause our 575 // Inform the audio manager that we have been closed. This will cause our
566 // destruction. 576 // destruction.
567 manager_->ReleaseInputStream(this); 577 manager_->ReleaseInputStream(this);
568 } 578 }
569 579
570 double AUAudioInputStream::GetMaxVolume() { 580 double AUAudioInputStream::GetMaxVolume() {
571 // Verify that we have a valid device. 581 // Verify that we have a valid device.
572 if (input_device_id_ == kAudioObjectUnknown) { 582 if (input_device_id_ == kAudioObjectUnknown) {
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
1318 1328
1319 number_of_frames_provided_ = 0; 1329 number_of_frames_provided_ = 0;
1320 glitches_detected_ = 0; 1330 glitches_detected_ = 0;
1321 last_sample_time_ = 0; 1331 last_sample_time_ = 0;
1322 last_number_of_frames_ = 0; 1332 last_number_of_frames_ = 0;
1323 total_lost_frames_ = 0; 1333 total_lost_frames_ = 0;
1324 largest_glitch_frames_ = 0; 1334 largest_glitch_frames_ = 0;
1325 } 1335 }
1326 1336
1327 } // namespace media 1337 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698