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

Side by Side Diff: webrtc/modules/audio_mixer/new_audio_conference_mixer_impl.h

Issue 2230823004: Added a level indicator to new mixer. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@mixer_gn_fixes
Patch Set: Made local variable const. 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #ifndef WEBRTC_MODULES_AUDIO_MIXER_NEW_AUDIO_CONFERENCE_MIXER_IMPL_H_ 11 #ifndef WEBRTC_MODULES_AUDIO_MIXER_NEW_AUDIO_CONFERENCE_MIXER_IMPL_H_
12 #define WEBRTC_MODULES_AUDIO_MIXER_NEW_AUDIO_CONFERENCE_MIXER_IMPL_H_ 12 #define WEBRTC_MODULES_AUDIO_MIXER_NEW_AUDIO_CONFERENCE_MIXER_IMPL_H_
13 13
14 #include <list> 14 #include <list>
15 #include <map> 15 #include <map>
16 #include <memory> 16 #include <memory>
17 #include <vector> 17 #include <vector>
18 18
19 #include "webrtc/base/thread_checker.h" 19 #include "webrtc/base/thread_checker.h"
20 #include "webrtc/engine_configurations.h" 20 #include "webrtc/engine_configurations.h"
21 #include "webrtc/modules/audio_mixer/new_audio_conference_mixer.h" 21 #include "webrtc/modules/audio_mixer/new_audio_conference_mixer.h"
22 #include "webrtc/modules/include/module_common_types.h" 22 #include "webrtc/modules/include/module_common_types.h"
23 #include "webrtc/voice_engine/level_indicator.h"
23 24
24 namespace webrtc { 25 namespace webrtc {
25 class AudioProcessing; 26 class AudioProcessing;
26 class CriticalSectionWrapper; 27 class CriticalSectionWrapper;
27 28
28 struct FrameAndMuteInfo { 29 struct FrameAndMuteInfo {
29 FrameAndMuteInfo(AudioFrame* f, bool m) : frame(f), muted(m) {} 30 FrameAndMuteInfo(AudioFrame* f, bool m) : frame(f), muted(m) {}
30 AudioFrame* frame; 31 AudioFrame* frame;
31 bool muted; 32 bool muted;
32 }; 33 };
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 bool use_limiter); 119 bool use_limiter);
119 120
120 // Mix the AudioFrames stored in audioFrameList into mixedAudio. No 121 // Mix the AudioFrames stored in audioFrameList into mixedAudio. No
121 // record will be kept of this mix (e.g. the corresponding MixerAudioSources 122 // record will be kept of this mix (e.g. the corresponding MixerAudioSources
122 // will not be marked as IsMixed() 123 // will not be marked as IsMixed()
123 int32_t MixAnonomouslyFromList(AudioFrame* mixedAudio, 124 int32_t MixAnonomouslyFromList(AudioFrame* mixedAudio,
124 const AudioFrameList& audioFrameList) const; 125 const AudioFrameList& audioFrameList) const;
125 126
126 bool LimitMixedAudio(AudioFrame* mixedAudio) const; 127 bool LimitMixedAudio(AudioFrame* mixedAudio) const;
127 128
129 // Output level functions for VoEVolumeControl.
130 int GetOutputAudioLevel() override;
131
132 int GetOutputAudioLevelFullRange() override;
133
128 std::unique_ptr<CriticalSectionWrapper> crit_; 134 std::unique_ptr<CriticalSectionWrapper> crit_;
129 std::unique_ptr<CriticalSectionWrapper> cb_crit_; 135 std::unique_ptr<CriticalSectionWrapper> cb_crit_;
130 136
131 int32_t id_; 137 int32_t id_;
132 138
133 // The current sample frequency and sample size when mixing. 139 // The current sample frequency and sample size when mixing.
134 Frequency output_frequency_; 140 Frequency output_frequency_;
135 size_t sample_size_; 141 size_t sample_size_;
136 142
137 // List of all audio sources. Note all lists are disjunct 143 // List of all audio sources. Note all lists are disjunct
138 MixerAudioSourceList audio_source_list_; // May be mixed. 144 MixerAudioSourceList audio_source_list_; // May be mixed.
139 145
140 // Always mixed, anonomously. 146 // Always mixed, anonomously.
141 MixerAudioSourceList additional_audio_source_list_; 147 MixerAudioSourceList additional_audio_source_list_;
142 148
143 size_t num_mixed_audio_sources_; 149 size_t num_mixed_audio_sources_;
144 // Determines if we will use a limiter for clipping protection during 150 // Determines if we will use a limiter for clipping protection during
145 // mixing. 151 // mixing.
146 bool use_limiter_; 152 bool use_limiter_;
147 153
148 uint32_t time_stamp_; 154 uint32_t time_stamp_;
149 155
150 // Ensures that Mix is called from the same thread. 156 // Ensures that Mix is called from the same thread.
151 rtc::ThreadChecker thread_checker_; 157 rtc::ThreadChecker thread_checker_;
152 158
153 // Used for inhibiting saturation in mixing. 159 // Used for inhibiting saturation in mixing.
154 std::unique_ptr<AudioProcessing> limiter_; 160 std::unique_ptr<AudioProcessing> limiter_;
161
162 // Measures audio level for the combined signal.
163 voe::AudioLevel audio_level_;
155 }; 164 };
156 } // namespace webrtc 165 } // namespace webrtc
157 166
158 #endif // WEBRTC_MODULES_AUDIO_MIXER_NEW_AUDIO_CONFERENCE_MIXER_IMPL_H_ 167 #endif // WEBRTC_MODULES_AUDIO_MIXER_NEW_AUDIO_CONFERENCE_MIXER_IMPL_H_
OLDNEW
« no previous file with comments | « webrtc/modules/audio_mixer/new_audio_conference_mixer.h ('k') | webrtc/modules/audio_mixer/new_audio_conference_mixer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698