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

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

Issue 2136513002: Setting AudioOutputDevice authorization timeout to 1000ms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | 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 "content/renderer/media/audio_device_factory.h" 5 #include "content/renderer/media/audio_device_factory.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 13 matching lines...) Expand all
24 24
25 // static 25 // static
26 AudioDeviceFactory* AudioDeviceFactory::factory_ = NULL; 26 AudioDeviceFactory* AudioDeviceFactory::factory_ = NULL;
27 27
28 namespace { 28 namespace {
29 #if defined(OS_WIN) 29 #if defined(OS_WIN)
30 // Due to driver deadlock issues on Windows (http://crbug/422522) there is a 30 // Due to driver deadlock issues on Windows (http://crbug/422522) there is a
31 // chance device authorization response is never received from the browser side. 31 // chance device authorization response is never received from the browser side.
32 // In this case we will time out, to avoid renderer hang forever waiting for 32 // In this case we will time out, to avoid renderer hang forever waiting for
33 // device authorization (http://crbug/615589). This will result in "no audio". 33 // device authorization (http://crbug/615589). This will result in "no audio".
34 const int64_t kMaxAuthorizationTimeoutMs = 900; 34 const int64_t kMaxAuthorizationTimeoutMs = 1000;
35 #else 35 #else
36 const int64_t kMaxAuthorizationTimeoutMs = 0; // No timeout. 36 const int64_t kMaxAuthorizationTimeoutMs = 0; // No timeout.
37 #endif // defined(OS_WIN) 37 #endif // defined(OS_WIN)
38 38
39 media::AudioLatency::LatencyType GetSourceLatencyType( 39 media::AudioLatency::LatencyType GetSourceLatencyType(
40 AudioDeviceFactory::SourceType source) { 40 AudioDeviceFactory::SourceType source) {
41 switch (source) { 41 switch (source) {
42 case AudioDeviceFactory::kSourceWebAudioInteractive: 42 case AudioDeviceFactory::kSourceWebAudioInteractive:
43 return media::AudioLatency::LATENCY_INTERACTIVE; 43 return media::AudioLatency::LATENCY_INTERACTIVE;
44 case AudioDeviceFactory::kSourceNone: 44 case AudioDeviceFactory::kSourceNone:
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 device_id, security_origin); 209 device_id, security_origin);
210 if (sink) 210 if (sink)
211 return sink; 211 return sink;
212 } 212 }
213 213
214 return NewOutputDevice(render_frame_id, session_id, device_id, 214 return NewOutputDevice(render_frame_id, session_id, device_id,
215 security_origin); 215 security_origin);
216 } 216 }
217 217
218 } // namespace content 218 } // namespace content
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