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

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

Issue 1504993003: Revert of Adding CHECK(false) for case when input audio fails to start on Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | no next file » | 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 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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698