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

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

Issue 2221443002: Changed mixing api and removed resampler (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 4 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_SOURCE_NEW_AUDIO_CONFERENCE_MIXER_IMPL_H_ 11 #ifndef WEBRTC_MODULES_AUDIO_MIXER_SOURCE_NEW_AUDIO_CONFERENCE_MIXER_IMPL_H_
12 #define WEBRTC_MODULES_AUDIO_MIXER_SOURCE_NEW_AUDIO_CONFERENCE_MIXER_IMPL_H_ 12 #define WEBRTC_MODULES_AUDIO_MIXER_SOURCE_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 17
18 #include "webrtc/base/thread_checker.h" 18 #include "webrtc/base/thread_checker.h"
19 #include "webrtc/engine_configurations.h" 19 #include "webrtc/engine_configurations.h"
20 #include "webrtc/modules/audio_mixer/include/new_audio_conference_mixer.h" 20 #include "webrtc/modules/audio_mixer/include/new_audio_conference_mixer.h"
21 #include "webrtc/modules/audio_conference_mixer/source/memory_pool.h" 21 #include "webrtc/modules/audio_conference_mixer/source/memory_pool.h"
22 #include "webrtc/modules/include/module_common_types.h" 22 #include "webrtc/modules/include/module_common_types.h"
23 #include "webrtc/common_audio/resampler/include/push_resampler.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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 68
68 // Must be called after ctor. 69 // Must be called after ctor.
69 bool Init(); 70 bool Init();
70 71
71 // NewAudioConferenceMixer functions 72 // NewAudioConferenceMixer functions
72 int32_t SetMixabilityStatus(MixerAudioSource* audio_source, 73 int32_t SetMixabilityStatus(MixerAudioSource* audio_source,
73 bool mixable) override; 74 bool mixable) override;
74 bool MixabilityStatus(const MixerAudioSource& audio_source) const override; 75 bool MixabilityStatus(const MixerAudioSource& audio_source) const override;
75 int32_t SetAnonymousMixabilityStatus(MixerAudioSource* audio_source, 76 int32_t SetAnonymousMixabilityStatus(MixerAudioSource* audio_source,
76 bool mixable) override; 77 bool mixable) override;
77 void Mix(AudioFrame* audio_frame_for_mixing) override; 78 void Mix(int sample_rate,
79 size_t number_of_channels,
80 void* audio_data) override;
78 int32_t SetMinimumMixingFrequency(Frequency freq) override; 81 int32_t SetMinimumMixingFrequency(Frequency freq) override;
79 bool AnonymousMixabilityStatus( 82 bool AnonymousMixabilityStatus(
80 const MixerAudioSource& audio_source) const override; 83 const MixerAudioSource& audio_source) const override;
81 84
82 private: 85 private:
83 // Set/get mix frequency 86 // Set/get mix frequency
84 int32_t SetOutputFrequency(const Frequency& frequency); 87 int32_t SetOutputFrequency(const Frequency& frequency);
85 Frequency OutputFrequency() const; 88 Frequency OutputFrequency() const;
86 89
87 // Compute what audio sources to mix from audio_source_list_. Ramp in 90 // Compute what audio sources to mix from audio_source_list_. Ramp in
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 // mixing. 152 // mixing.
150 bool use_limiter_; 153 bool use_limiter_;
151 154
152 uint32_t _timeStamp; 155 uint32_t _timeStamp;
153 156
154 // Ensures that Mix is called from the same thread. 157 // Ensures that Mix is called from the same thread.
155 rtc::ThreadChecker thread_checker_; 158 rtc::ThreadChecker thread_checker_;
156 159
157 // Used for inhibiting saturation in mixing. 160 // Used for inhibiting saturation in mixing.
158 std::unique_ptr<AudioProcessing> _limiter; 161 std::unique_ptr<AudioProcessing> _limiter;
162 // Converts mixed audio to the audio device output rate.
aleloi 2016/08/05 09:52:22 Moved here from the former 'OutputMixer'.
the sun 2016/08/05 12:26:00 I thought the idea was that ACM/NetEq could delive
aleloi 2016/08/05 12:37:14 Thank you. I just got reminded of that when workin
163 PushResampler<int16_t> resampler_;
159 }; 164 };
160 } // namespace webrtc 165 } // namespace webrtc
161 166
162 #endif // WEBRTC_MODULES_AUDIO_MIXER_SOURCE_NEW_AUDIO_CONFERENCE_MIXER_IMPL_H_ 167 #endif // WEBRTC_MODULES_AUDIO_MIXER_SOURCE_NEW_AUDIO_CONFERENCE_MIXER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698