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); |
772 } | 777 } |
773 } | 778 } |
774 } | 779 } |
775 | 780 |
776 void AUAudioInputStream::CloseAudioUnit() { | 781 void AUAudioInputStream::CloseAudioUnit() { |
777 DCHECK(thread_checker_.CalledOnValidThread()); | 782 DCHECK(thread_checker_.CalledOnValidThread()); |
778 if (!audio_unit_) | 783 if (!audio_unit_) |
779 return; | 784 return; |
780 OSStatus result = AudioUnitUninitialize(audio_unit_); | 785 OSStatus result = AudioUnitUninitialize(audio_unit_); |
781 OSSTATUS_DLOG_IF(ERROR, result != noErr, result) | 786 OSSTATUS_DLOG_IF(ERROR, result != noErr, result) |
(...skipping 12 matching lines...) Expand all Loading... |
794 buffer_size_was_changed_); | 799 buffer_size_was_changed_); |
795 UMA_HISTOGRAM_COUNTS_1000("Media.Audio.NumberOfOutputStreamsMac", | 800 UMA_HISTOGRAM_COUNTS_1000("Media.Audio.NumberOfOutputStreamsMac", |
796 manager_->output_streams()); | 801 manager_->output_streams()); |
797 UMA_HISTOGRAM_COUNTS_1000("Media.Audio.NumberOfLowLatencyInputStreamsMac", | 802 UMA_HISTOGRAM_COUNTS_1000("Media.Audio.NumberOfLowLatencyInputStreamsMac", |
798 manager_->low_latency_input_streams()); | 803 manager_->low_latency_input_streams()); |
799 UMA_HISTOGRAM_COUNTS_1000("Media.Audio.NumberOfBasicInputStreamsMac", | 804 UMA_HISTOGRAM_COUNTS_1000("Media.Audio.NumberOfBasicInputStreamsMac", |
800 manager_->basic_input_streams()); | 805 manager_->basic_input_streams()); |
801 } | 806 } |
802 | 807 |
803 } // namespace media | 808 } // namespace media |
OLD | NEW |