Chromium Code Reviews| Index: media/base/audio_renderer_mixer.h |
| diff --git a/media/base/audio_renderer_mixer.h b/media/base/audio_renderer_mixer.h |
| index 68f7aec1e2a72972704d3d71753d81802187a137..1d5afb475ce2f591d0ba0f6c205222ed55036af1 100644 |
| --- a/media/base/audio_renderer_mixer.h |
| +++ b/media/base/audio_renderer_mixer.h |
| @@ -27,7 +27,8 @@ class MEDIA_EXPORT AudioRendererMixer |
| : NON_EXPORTED_BASE(public AudioRendererSink::RenderCallback) { |
| public: |
| AudioRendererMixer(const AudioParameters& output_params, |
| - scoped_refptr<AudioRendererSink> sink); |
| + scoped_refptr<AudioRendererSink> sink, |
| + const std::string& uma_histogram); |
| ~AudioRendererMixer() override; |
| // Add or remove a mixer input from mixing; called by AudioRendererMixerInput. |
| @@ -48,7 +49,11 @@ class MEDIA_EXPORT AudioRendererMixer |
| OutputDeviceInfo GetOutputDeviceInfo(); |
| + AudioParameters GetOutputParamsForTesting() { return output_params_; }; |
|
tommi (sloooow) - chröme
2016/06/28 14:14:54
nit: const&
o1ka
2016/06/29 10:11:26
Done.
|
| + |
| private: |
| + class UMAMaxValueTracker; |
| + |
| // Maps input sample rate to the dedicated converter. |
| using AudioConvertersMap = |
| std::map<int, std::unique_ptr<LoopbackAudioConverter>>; |
| @@ -91,6 +96,10 @@ class MEDIA_EXPORT AudioRendererMixer |
| base::TimeTicks last_play_time_; |
| bool playing_; |
| + // Tracks the maximum number of simultaneous mixer inputs and logs it into |
| + // UMA histogram upon the destruction. |
| + std::unique_ptr<UMAMaxValueTracker> input_count_tracker_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(AudioRendererMixer); |
| }; |