Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 from VoEVolumeControl | |
|
minyue-webrtc
2016/08/11 10:27:33
comment is a bit misleading, revise the wording.
aleloi
2016/08/11 12:15:19
Done.
| |
| 130 uint32_t GetSpeechOutputLevel() override; | |
|
minyue-webrtc
2016/08/11 10:27:33
why does this have to be "speech"?
aleloi
2016/08/11 12:15:19
Historical reasons, I'd say. The function name in
| |
| 131 | |
| 132 uint32_t GetSpeechOutputLevelFullRange() 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_; | |
|
aleloi
2016/08/11 12:15:19
Will add capitalization and sentence break (sorry,
| |
| 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_ |
| OLD | NEW |