| OLD | NEW |
| 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 | 6 |
| 7 #include <CoreServices/CoreServices.h> | 7 #include <CoreServices/CoreServices.h> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 762 // problem and the stream is considered dead. | 762 // problem and the stream is considered dead. |
| 763 const bool input_callback_is_active = GetInputCallbackIsActive(); | 763 const bool input_callback_is_active = GetInputCallbackIsActive(); |
| 764 UMA_HISTOGRAM_BOOLEAN("Media.Audio.InputStartupSuccessMac", | 764 UMA_HISTOGRAM_BOOLEAN("Media.Audio.InputStartupSuccessMac", |
| 765 input_callback_is_active); | 765 input_callback_is_active); |
| 766 DVLOG(1) << "input_callback_is_active: " << input_callback_is_active; | 766 DVLOG(1) << "input_callback_is_active: " << input_callback_is_active; |
| 767 | 767 |
| 768 if (!input_callback_is_active) { | 768 if (!input_callback_is_active) { |
| 769 // Now when we know that startup has failed for some reason, add extra | 769 // Now when we know that startup has failed for some reason, add extra |
| 770 // UMA stats in an attempt to figure out the exact reason. | 770 // UMA stats in an attempt to figure out the exact reason. |
| 771 AddHistogramsForFailedStartup(); | 771 AddHistogramsForFailedStartup(); |
| 772 // Kill the browser and create a crash log. This is just a temporary | |
| 773 // test (intended for Canary) where the goal is to gather some more | |
| 774 // detailed stats about how and why we can hit this problem. | |
| 775 // See crbug.com/549021 for details. | |
| 776 CHECK(false); | |
| 777 } | 772 } |
| 778 } | 773 } |
| 779 } | 774 } |
| 780 | 775 |
| 781 void AUAudioInputStream::CloseAudioUnit() { | 776 void AUAudioInputStream::CloseAudioUnit() { |
| 782 DCHECK(thread_checker_.CalledOnValidThread()); | 777 DCHECK(thread_checker_.CalledOnValidThread()); |
| 783 if (!audio_unit_) | 778 if (!audio_unit_) |
| 784 return; | 779 return; |
| 785 OSStatus result = AudioUnitUninitialize(audio_unit_); | 780 OSStatus result = AudioUnitUninitialize(audio_unit_); |
| 786 OSSTATUS_DLOG_IF(ERROR, result != noErr, result) | 781 OSSTATUS_DLOG_IF(ERROR, result != noErr, result) |
| (...skipping 12 matching lines...) Expand all Loading... |
| 799 buffer_size_was_changed_); | 794 buffer_size_was_changed_); |
| 800 UMA_HISTOGRAM_COUNTS_1000("Media.Audio.NumberOfOutputStreamsMac", | 795 UMA_HISTOGRAM_COUNTS_1000("Media.Audio.NumberOfOutputStreamsMac", |
| 801 manager_->output_streams()); | 796 manager_->output_streams()); |
| 802 UMA_HISTOGRAM_COUNTS_1000("Media.Audio.NumberOfLowLatencyInputStreamsMac", | 797 UMA_HISTOGRAM_COUNTS_1000("Media.Audio.NumberOfLowLatencyInputStreamsMac", |
| 803 manager_->low_latency_input_streams()); | 798 manager_->low_latency_input_streams()); |
| 804 UMA_HISTOGRAM_COUNTS_1000("Media.Audio.NumberOfBasicInputStreamsMac", | 799 UMA_HISTOGRAM_COUNTS_1000("Media.Audio.NumberOfBasicInputStreamsMac", |
| 805 manager_->basic_input_streams()); | 800 manager_->basic_input_streams()); |
| 806 } | 801 } |
| 807 | 802 |
| 808 } // namespace media | 803 } // namespace media |
| OLD | NEW |