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

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

Issue 2268253002: UMA stats for browser/renderer audio rendering buffer size mismatch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: histogram rename Created 4 years, 3 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 | content/renderer/media/audio_device_factory.cc » ('j') | 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 #ifndef CONTENT_RENDERER_MEDIA_AUDIO_DEVICE_FACTORY_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_AUDIO_DEVICE_FACTORY_H_
6 #define CONTENT_RENDERER_MEDIA_AUDIO_DEVICE_FACTORY_H_ 6 #define CONTENT_RENDERER_MEDIA_AUDIO_DEVICE_FACTORY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
14 #include "media/base/audio_latency.h"
14 #include "media/base/output_device_info.h" 15 #include "media/base/output_device_info.h"
15 16
16 namespace media { 17 namespace media {
17 class AudioRendererSink; 18 class AudioRendererSink;
18 class SwitchableAudioRendererSink; 19 class SwitchableAudioRendererSink;
19 class AudioCapturerSource; 20 class AudioCapturerSource;
20 } 21 }
21 22
22 namespace url { 23 namespace url {
23 class Origin; 24 class Origin;
(...skipping 17 matching lines...) Expand all
41 kSourceMediaElement, 42 kSourceMediaElement,
42 kSourceWebRtc, 43 kSourceWebRtc,
43 kSourceNonRtcAudioTrack, 44 kSourceNonRtcAudioTrack,
44 kSourceWebAudioInteractive, 45 kSourceWebAudioInteractive,
45 kSourceWebAudioBalanced, 46 kSourceWebAudioBalanced,
46 kSourceWebAudioPlayback, 47 kSourceWebAudioPlayback,
47 kSourceWebAudioExact, 48 kSourceWebAudioExact,
48 kSourceLast = kSourceWebAudioExact // Only used for validation of format. 49 kSourceLast = kSourceWebAudioExact // Only used for validation of format.
49 }; 50 };
50 51
52 // Maps the source type to the audio latency it requires.
53 static media::AudioLatency::LatencyType GetSourceLatencyType(
54 SourceType source);
55
51 // Creates a sink for AudioRendererMixer. 56 // Creates a sink for AudioRendererMixer.
52 // |render_frame_id| refers to the RenderFrame containing the entity 57 // |render_frame_id| refers to the RenderFrame containing the entity
53 // producing the audio. If |session_id| is nonzero, it is used by the browser 58 // producing the audio. If |session_id| is nonzero, it is used by the browser
54 // to select the correct input device ID and its associated output device, if 59 // to select the correct input device ID and its associated output device, if
55 // it exists. If |session_id| is zero, |device_id| and |security_origin| 60 // it exists. If |session_id| is zero, |device_id| and |security_origin|
56 // identify the output device to use. 61 // identify the output device to use.
57 // If |session_id| is zero and |device_id| and |security_origin| are empty, 62 // If |session_id| is zero and |device_id| and |security_origin| are empty,
58 // the default output device will be selected. 63 // the default output device will be selected.
59 static scoped_refptr<media::AudioRendererSink> NewAudioRendererMixerSink( 64 static scoped_refptr<media::AudioRendererSink> NewAudioRendererMixerSink(
60 int render_frame_id, 65 int render_frame_id,
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 int session_id, 147 int session_id,
143 const std::string& device_id, 148 const std::string& device_id,
144 const url::Origin& security_origin); 149 const url::Origin& security_origin);
145 150
146 DISALLOW_COPY_AND_ASSIGN(AudioDeviceFactory); 151 DISALLOW_COPY_AND_ASSIGN(AudioDeviceFactory);
147 }; 152 };
148 153
149 } // namespace content 154 } // namespace content
150 155
151 #endif // CONTENT_RENDERER_MEDIA_AUDIO_DEVICE_FACTORY_H_ 156 #endif // CONTENT_RENDERER_MEDIA_AUDIO_DEVICE_FACTORY_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/audio_device_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698