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

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

Issue 2124503002: UMA stats for AudioRendererSinkCache utilization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressing review comments 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 | content/renderer/media/audio_renderer_sink_cache_impl.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 #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 "build/build_config.h" 11 #include "build/build_config.h"
11 #include "content/common/content_constants_internal.h" 12 #include "content/common/content_constants_internal.h"
12 #include "content/renderer/media/audio_input_message_filter.h" 13 #include "content/renderer/media/audio_input_message_filter.h"
13 #include "content/renderer/media/audio_message_filter.h" 14 #include "content/renderer/media/audio_message_filter.h"
14 #include "content/renderer/media/audio_renderer_mixer_manager.h" 15 #include "content/renderer/media/audio_renderer_mixer_manager.h"
15 #include "content/renderer/render_thread_impl.h" 16 #include "content/renderer/render_thread_impl.h"
16 #include "media/audio/audio_input_device.h" 17 #include "media/audio/audio_input_device.h"
17 #include "media/audio/audio_output_device.h" 18 #include "media/audio/audio_output_device.h"
18 #include "media/base/audio_latency.h" 19 #include "media/base/audio_latency.h"
19 #include "media/base/audio_renderer_mixer_input.h" 20 #include "media/base/audio_renderer_mixer_input.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 session_id, device_id, 122 session_id, device_id,
122 security_origin); 123 security_origin);
123 if (device) 124 if (device)
124 return device; 125 return device;
125 } 126 }
126 127
127 if (IsMixable(source_type)) 128 if (IsMixable(source_type))
128 return NewMixableSink(source_type, render_frame_id, session_id, device_id, 129 return NewMixableSink(source_type, render_frame_id, session_id, device_id,
129 security_origin); 130 security_origin);
130 131
132 UMA_HISTOGRAM_BOOLEAN("Media.Audio.Render.SinkCache.UsedForSinkCreation",
133 false);
131 return NewFinalAudioRendererSink(render_frame_id, session_id, device_id, 134 return NewFinalAudioRendererSink(render_frame_id, session_id, device_id,
132 security_origin); 135 security_origin);
133 } 136 }
134 137
135 // static 138 // static
136 scoped_refptr<media::SwitchableAudioRendererSink> 139 scoped_refptr<media::SwitchableAudioRendererSink>
137 AudioDeviceFactory::NewSwitchableAudioRendererSink( 140 AudioDeviceFactory::NewSwitchableAudioRendererSink(
138 SourceType source_type, 141 SourceType source_type,
139 int render_frame_id, 142 int render_frame_id,
140 int session_id, 143 int session_id,
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 device_id, security_origin); 212 device_id, security_origin);
210 if (sink) 213 if (sink)
211 return sink; 214 return sink;
212 } 215 }
213 216
214 return NewOutputDevice(render_frame_id, session_id, device_id, 217 return NewOutputDevice(render_frame_id, session_id, device_id,
215 security_origin); 218 security_origin);
216 } 219 }
217 220
218 } // namespace content 221 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/audio_renderer_sink_cache_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698