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_CONFERENCE_MIXER_SOURCE_AUDIO_CONFERENCE_MIXER_IMPL
_H_ | 11 #ifndef WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_SOURCE_AUDIO_CONFERENCE_MIXER_IMPL
_H_ |
12 #define WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_SOURCE_AUDIO_CONFERENCE_MIXER_IMPL
_H_ | 12 #define WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_SOURCE_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 | 17 |
| 18 #include "webrtc/base/criticalsection.h" |
18 #include "webrtc/modules/audio_conference_mixer/include/audio_conference_mixer.h
" | 19 #include "webrtc/modules/audio_conference_mixer/include/audio_conference_mixer.h
" |
19 #include "webrtc/modules/audio_conference_mixer/source/memory_pool.h" | 20 #include "webrtc/modules/audio_conference_mixer/source/memory_pool.h" |
20 #include "webrtc/modules/audio_conference_mixer/source/time_scheduler.h" | 21 #include "webrtc/modules/audio_conference_mixer/source/time_scheduler.h" |
21 #include "webrtc/modules/include/module_common_types.h" | 22 #include "webrtc/modules/include/module_common_types.h" |
22 #include "webrtc/typedefs.h" | 23 #include "webrtc/typedefs.h" |
23 | 24 |
24 namespace webrtc { | 25 namespace webrtc { |
25 class AudioProcessing; | 26 class AudioProcessing; |
26 class CriticalSectionWrapper; | |
27 | 27 |
28 struct FrameAndMuteInfo { | 28 struct FrameAndMuteInfo { |
29 FrameAndMuteInfo(AudioFrame* f, bool m) : frame(f), muted(m) {} | 29 FrameAndMuteInfo(AudioFrame* f, bool m) : frame(f), muted(m) {} |
30 AudioFrame* frame; | 30 AudioFrame* frame; |
31 bool muted; | 31 bool muted; |
32 }; | 32 }; |
33 | 33 |
34 typedef std::list<FrameAndMuteInfo> AudioFrameList; | 34 typedef std::list<FrameAndMuteInfo> AudioFrameList; |
35 typedef std::list<MixerParticipant*> MixerParticipantList; | 35 typedef std::list<MixerParticipant*> MixerParticipantList; |
36 | 36 |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 const AudioFrameList& audioFrameList) const; | 141 const AudioFrameList& audioFrameList) const; |
142 | 142 |
143 // Mix the AudioFrames stored in audioFrameList into mixedAudio. No | 143 // Mix the AudioFrames stored in audioFrameList into mixedAudio. No |
144 // record will be kept of this mix (e.g. the corresponding MixerParticipants | 144 // record will be kept of this mix (e.g. the corresponding MixerParticipants |
145 // will not be marked as IsMixed() | 145 // will not be marked as IsMixed() |
146 int32_t MixAnonomouslyFromList(AudioFrame* mixedAudio, | 146 int32_t MixAnonomouslyFromList(AudioFrame* mixedAudio, |
147 const AudioFrameList& audioFrameList) const; | 147 const AudioFrameList& audioFrameList) const; |
148 | 148 |
149 bool LimitMixedAudio(AudioFrame* mixedAudio) const; | 149 bool LimitMixedAudio(AudioFrame* mixedAudio) const; |
150 | 150 |
151 std::unique_ptr<CriticalSectionWrapper> _crit; | 151 const rtc::CriticalSection _crit; |
152 std::unique_ptr<CriticalSectionWrapper> _cbCrit; | 152 const rtc::CriticalSection _cbCrit; |
153 | 153 |
154 int32_t _id; | 154 int32_t _id; |
155 | 155 |
156 Frequency _minimumMixingFreq; | 156 Frequency _minimumMixingFreq; |
157 | 157 |
158 // Mix result callback | 158 // Mix result callback |
159 AudioMixerOutputReceiver* _mixReceiver; | 159 AudioMixerOutputReceiver* _mixReceiver; |
160 | 160 |
161 // The current sample frequency and sample size when mixing. | 161 // The current sample frequency and sample size when mixing. |
162 Frequency _outputFrequency; | 162 Frequency _outputFrequency; |
(...skipping 20 matching lines...) Expand all Loading... |
183 // Counter keeping track of concurrent calls to process. | 183 // Counter keeping track of concurrent calls to process. |
184 // Note: should never be higher than 1 or lower than 0. | 184 // Note: should never be higher than 1 or lower than 0. |
185 int16_t _processCalls; | 185 int16_t _processCalls; |
186 | 186 |
187 // Used for inhibiting saturation in mixing. | 187 // Used for inhibiting saturation in mixing. |
188 std::unique_ptr<AudioProcessing> _limiter; | 188 std::unique_ptr<AudioProcessing> _limiter; |
189 }; | 189 }; |
190 } // namespace webrtc | 190 } // namespace webrtc |
191 | 191 |
192 #endif // WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_SOURCE_AUDIO_CONFERENCE_MIXER_IM
PL_H_ | 192 #endif // WEBRTC_MODULES_AUDIO_CONFERENCE_MIXER_SOURCE_AUDIO_CONFERENCE_MIXER_IM
PL_H_ |
OLD | NEW |