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_SOURCE_AUDIO_CONFERENCE_MIXER_IMPL_H_ | 11 #ifndef WEBRTC_MODULES_AUDIO_MIXER_SOURCE_AUDIO_CONFERENCE_MIXER_IMPL_H_ |
| 12 #define WEBRTC_MODULES_AUDIO_MIXER_SOURCE_AUDIO_CONFERENCE_MIXER_IMPL_H_ | 12 #define WEBRTC_MODULES_AUDIO_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/engine_configurations.h" | 18 #include "webrtc/engine_configurations.h" |
| 19 #include "webrtc/modules/audio_mixer/include/audio_conference_mixer.h" | 19 #include "webrtc/modules/audio_mixer/include/audio_conference_mixer.h" |
| 20 #include "webrtc/modules/audio_conference_mixer/source/memory_pool.h" | 20 #include "webrtc/modules/audio_conference_mixer/source/memory_pool.h" |
| 21 #include "webrtc/modules/audio_conference_mixer/source/time_scheduler.h" | 21 #include "webrtc/modules/audio_conference_mixer/source/time_scheduler.h" |
|
ivoc
2016/07/01 11:35:20
Is this include still needed?
aleloi
2016/07/01 11:42:13
No, it's not. Thank you!
| |
| 22 #include "webrtc/modules/include/module_common_types.h" | 22 #include "webrtc/modules/include/module_common_types.h" |
| 23 | 23 |
| 24 namespace webrtc { | 24 namespace webrtc { |
| 25 class AudioProcessing; | 25 class AudioProcessing; |
| 26 class CriticalSectionWrapper; | 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; |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 60 public: | 60 public: |
| 61 // AudioProcessing only accepts 10 ms frames. | 61 // AudioProcessing only accepts 10 ms frames. |
| 62 enum { kProcessPeriodicityInMs = 10 }; | 62 enum { kProcessPeriodicityInMs = 10 }; |
| 63 | 63 |
| 64 NewAudioConferenceMixerImpl(int id); | 64 NewAudioConferenceMixerImpl(int id); |
| 65 ~NewAudioConferenceMixerImpl(); | 65 ~NewAudioConferenceMixerImpl(); |
| 66 | 66 |
| 67 // Must be called after ctor. | 67 // Must be called after ctor. |
| 68 bool Init(); | 68 bool Init(); |
| 69 | 69 |
| 70 // Module functions | |
| 71 int64_t TimeUntilNextProcess() override; | |
| 72 void Process() override; | |
| 73 | |
| 74 // NewAudioConferenceMixer functions | 70 // NewAudioConferenceMixer functions |
| 75 void Mix(AudioFrame*) override; | 71 void Mix(AudioFrame*) override; |
|
ivoc
2016/07/01 11:35:20
Please add a name for the input variable (i.e. aud
aleloi
2016/07/01 11:42:13
Done.
| |
| 76 int32_t RegisterMixedStreamCallback( | 72 int32_t RegisterMixedStreamCallback( |
| 77 AudioMixerOutputReceiver* mixReceiver) override; | 73 AudioMixerOutputReceiver* mixReceiver) override; |
| 78 int32_t UnRegisterMixedStreamCallback() override; | 74 int32_t UnRegisterMixedStreamCallback() override; |
| 79 int32_t SetMixabilityStatus(MixerAudioSource* participant, | 75 int32_t SetMixabilityStatus(MixerAudioSource* participant, |
| 80 bool mixable) override; | 76 bool mixable) override; |
| 81 bool MixabilityStatus(const MixerAudioSource& participant) const override; | 77 bool MixabilityStatus(const MixerAudioSource& participant) const override; |
| 82 int32_t SetMinimumMixingFrequency(Frequency freq) override; | 78 int32_t SetMinimumMixingFrequency(Frequency freq) override; |
| 83 int32_t SetAnonymousMixabilityStatus(MixerAudioSource* participant, | 79 int32_t SetAnonymousMixabilityStatus(MixerAudioSource* participant, |
| 84 bool mixable) override; | 80 bool mixable) override; |
| 85 bool AnonymousMixabilityStatus( | 81 bool AnonymousMixabilityStatus( |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 167 // Always mixed, anonomously. | 163 // Always mixed, anonomously. |
| 168 MixerAudioSourceList _additionalParticipantList; | 164 MixerAudioSourceList _additionalParticipantList; |
| 169 | 165 |
| 170 size_t _numMixedParticipants; | 166 size_t _numMixedParticipants; |
| 171 // Determines if we will use a limiter for clipping protection during | 167 // Determines if we will use a limiter for clipping protection during |
| 172 // mixing. | 168 // mixing. |
| 173 bool use_limiter_; | 169 bool use_limiter_; |
| 174 | 170 |
| 175 uint32_t _timeStamp; | 171 uint32_t _timeStamp; |
| 176 | 172 |
| 177 // Metronome class. | |
| 178 TimeScheduler _timeScheduler; | |
| 179 | |
| 180 // Counter keeping track of concurrent calls to process. | |
| 181 // Note: should never be higher than 1 or lower than 0. | |
| 182 int16_t _processCalls; | |
| 183 | |
| 184 // Used for inhibiting saturation in mixing. | 173 // Used for inhibiting saturation in mixing. |
| 185 std::unique_ptr<AudioProcessing> _limiter; | 174 std::unique_ptr<AudioProcessing> _limiter; |
| 186 }; | 175 }; |
| 187 } // namespace webrtc | 176 } // namespace webrtc |
| 188 | 177 |
| 189 #endif // WEBRTC_MODULES_AUDIO_MIXER_SOURCE_AUDIO_CONFERENCE_MIXER_IMPL_H_ | 178 #endif // WEBRTC_MODULES_AUDIO_MIXER_SOURCE_AUDIO_CONFERENCE_MIXER_IMPL_H_ |
| OLD | NEW |