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/audio_conference_mixer/source/memory_pool.h" | |
| 23 #include "webrtc/modules/include/module_common_types.h" | 22 #include "webrtc/modules/include/module_common_types.h" |
| 24 | 23 |
| 25 namespace webrtc { | 24 namespace webrtc { |
| 26 class AudioProcessing; | 25 class AudioProcessing; |
| 27 class CriticalSectionWrapper; | 26 class CriticalSectionWrapper; |
| 28 | 27 |
| 29 struct FrameAndMuteInfo { | 28 struct FrameAndMuteInfo { |
| 30 FrameAndMuteInfo(AudioFrame* f, bool m) : frame(f), muted(m) {} | 29 FrameAndMuteInfo(AudioFrame* f, bool m) : frame(f), muted(m) {} |
| 31 AudioFrame* frame; | 30 AudioFrame* frame; |
| 32 bool muted; | 31 bool muted; |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 57 bool is_mixed_; | 56 bool is_mixed_; |
| 58 }; | 57 }; |
| 59 | 58 |
| 60 class NewAudioConferenceMixerImpl : public NewAudioConferenceMixer { | 59 class NewAudioConferenceMixerImpl : public NewAudioConferenceMixer { |
| 61 public: | 60 public: |
| 62 // AudioProcessing only accepts 10 ms frames. | 61 // AudioProcessing only accepts 10 ms frames. |
| 63 enum { kProcessPeriodicityInMs = 10 }; | 62 enum { kProcessPeriodicityInMs = 10 }; |
| 64 | 63 |
| 65 explicit NewAudioConferenceMixerImpl(int id); | 64 explicit NewAudioConferenceMixerImpl(int id); |
| 66 | 65 |
| 66 ~NewAudioConferenceMixerImpl() override; | |
|
aleloi
2016/08/11 08:09:39
Added explicit destructor because of chromium-styl
| |
| 67 | |
| 67 // Must be called after ctor. | 68 // Must be called after ctor. |
| 68 bool Init(); | 69 bool Init(); |
| 69 | 70 |
| 70 // NewAudioConferenceMixer functions | 71 // NewAudioConferenceMixer functions |
| 71 int32_t SetMixabilityStatus(MixerAudioSource* audio_source, | 72 int32_t SetMixabilityStatus(MixerAudioSource* audio_source, |
| 72 bool mixable) override; | 73 bool mixable) override; |
| 73 bool MixabilityStatus(const MixerAudioSource& audio_source) const override; | 74 bool MixabilityStatus(const MixerAudioSource& audio_source) const override; |
| 74 int32_t SetAnonymousMixabilityStatus(MixerAudioSource* audio_source, | 75 int32_t SetAnonymousMixabilityStatus(MixerAudioSource* audio_source, |
| 75 bool mixable) override; | 76 bool mixable) override; |
| 76 void Mix(int sample_rate, | 77 void Mix(int sample_rate, |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 148 | 149 |
| 149 // Ensures that Mix is called from the same thread. | 150 // Ensures that Mix is called from the same thread. |
| 150 rtc::ThreadChecker thread_checker_; | 151 rtc::ThreadChecker thread_checker_; |
| 151 | 152 |
| 152 // Used for inhibiting saturation in mixing. | 153 // Used for inhibiting saturation in mixing. |
| 153 std::unique_ptr<AudioProcessing> limiter_; | 154 std::unique_ptr<AudioProcessing> limiter_; |
| 154 }; | 155 }; |
| 155 } // namespace webrtc | 156 } // namespace webrtc |
| 156 | 157 |
| 157 #endif // WEBRTC_MODULES_AUDIO_MIXER_NEW_AUDIO_CONFERENCE_MIXER_IMPL_H_ | 158 #endif // WEBRTC_MODULES_AUDIO_MIXER_NEW_AUDIO_CONFERENCE_MIXER_IMPL_H_ |
| OLD | NEW |