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

Side by Side Diff: media/base/audio_renderer_mixer.h

Issue 2517503003: Reland: Make more media APIs aware of |delay| and |delay_timestamp| (Closed)
Patch Set: Comments from chcunningham@ and Dale Created 4 years 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 | « media/base/audio_parameters.h ('k') | media/base/audio_renderer_mixer.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 MEDIA_BASE_AUDIO_RENDERER_MIXER_H_ 5 #ifndef MEDIA_BASE_AUDIO_RENDERER_MIXER_H_
6 #define MEDIA_BASE_AUDIO_RENDERER_MIXER_H_ 6 #define MEDIA_BASE_AUDIO_RENDERER_MIXER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 const AudioParameters& GetOutputParamsForTesting() { return output_params_; }; 57 const AudioParameters& GetOutputParamsForTesting() { return output_params_; };
58 58
59 private: 59 private:
60 class UMAMaxValueTracker; 60 class UMAMaxValueTracker;
61 61
62 // Maps input sample rate to the dedicated converter. 62 // Maps input sample rate to the dedicated converter.
63 using AudioConvertersMap = 63 using AudioConvertersMap =
64 std::map<int, std::unique_ptr<LoopbackAudioConverter>>; 64 std::map<int, std::unique_ptr<LoopbackAudioConverter>>;
65 65
66 // AudioRendererSink::RenderCallback implementation. 66 // AudioRendererSink::RenderCallback implementation.
67 int Render(AudioBus* audio_bus, 67 int Render(base::TimeDelta delay,
68 uint32_t frames_delayed, 68 base::TimeTicks delay_timestamp,
69 uint32_t frames_skipped) override; 69 int prior_frames_skipped,
70 AudioBus* audio_bus) override;
70 void OnRenderError() override; 71 void OnRenderError() override;
71 72
72 bool is_master_sample_rate(int sample_rate) { 73 bool is_master_sample_rate(int sample_rate) {
73 return sample_rate == output_params_.sample_rate(); 74 return sample_rate == output_params_.sample_rate();
74 } 75 }
75 76
76 // Output parameters for this mixer. 77 // Output parameters for this mixer.
77 const AudioParameters output_params_; 78 const AudioParameters output_params_;
78 79
79 // Output sink for this mixer. 80 // Output sink for this mixer.
(...skipping 24 matching lines...) Expand all
104 // Tracks the maximum number of simultaneous mixer inputs and logs it into 105 // Tracks the maximum number of simultaneous mixer inputs and logs it into
105 // UMA histogram upon the destruction. 106 // UMA histogram upon the destruction.
106 std::unique_ptr<UMAMaxValueTracker> input_count_tracker_; 107 std::unique_ptr<UMAMaxValueTracker> input_count_tracker_;
107 108
108 DISALLOW_COPY_AND_ASSIGN(AudioRendererMixer); 109 DISALLOW_COPY_AND_ASSIGN(AudioRendererMixer);
109 }; 110 };
110 111
111 } // namespace media 112 } // namespace media
112 113
113 #endif // MEDIA_BASE_AUDIO_RENDERER_MIXER_H_ 114 #endif // MEDIA_BASE_AUDIO_RENDERER_MIXER_H_
OLDNEW
« no previous file with comments | « media/base/audio_parameters.h ('k') | media/base/audio_renderer_mixer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698