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

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

Issue 2429433002: Setting device authorization timeout to 2000 ms on MAC (Closed)
Patch Set: fix for compile error Created 4 years, 2 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 "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 14 matching lines...) Expand all
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 = 1000; 34 const int64_t kMaxAuthorizationTimeoutMs = 1000;
35 #elif defined(OS_MACOSX)
36 const int64_t kMaxAuthorizationTimeoutMs = 2000;
35 #else 37 #else
36 const int64_t kMaxAuthorizationTimeoutMs = 0; // No timeout. 38 const int64_t kMaxAuthorizationTimeoutMs = 0; // No timeout.
37 #endif // defined(OS_WIN) 39 #endif // defined(OS_WIN)
38 40
39 scoped_refptr<media::AudioOutputDevice> NewOutputDevice( 41 scoped_refptr<media::AudioOutputDevice> NewOutputDevice(
40 int render_frame_id, 42 int render_frame_id,
41 int session_id, 43 int session_id,
42 const std::string& device_id, 44 const std::string& device_id,
43 const url::Origin& security_origin) { 45 const url::Origin& security_origin) {
44 AudioMessageFilter* const filter = AudioMessageFilter::Get(); 46 AudioMessageFilter* const filter = AudioMessageFilter::Get();
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 device_id, security_origin); 213 device_id, security_origin);
212 if (sink) 214 if (sink)
213 return sink; 215 return sink;
214 } 216 }
215 217
216 return NewOutputDevice(render_frame_id, session_id, device_id, 218 return NewOutputDevice(render_frame_id, session_id, device_id,
217 security_origin); 219 security_origin);
218 } 220 }
219 221
220 } // namespace content 222 } // 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