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

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

Issue 2109333006: Removed TimeScheduler, Process() and TimeToNextProcess() from mixer (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@remove_callback
Patch Set: Upstream: renamed files, add gyp. Created 4 years, 5 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/engine_configurations.h" 18 #include "webrtc/engine_configurations.h"
19 #include "webrtc/modules/audio_mixer/include/new_audio_conference_mixer.h" 19 #include "webrtc/modules/audio_mixer/include/new_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"
22 #include "webrtc/modules/include/module_common_types.h" 21 #include "webrtc/modules/include/module_common_types.h"
23 22
24 namespace webrtc { 23 namespace webrtc {
25 class AudioProcessing; 24 class AudioProcessing;
26 class CriticalSectionWrapper; 25 class CriticalSectionWrapper;
27 26
28 struct FrameAndMuteInfo { 27 struct FrameAndMuteInfo {
29 FrameAndMuteInfo(AudioFrame* f, bool m) : frame(f), muted(m) {} 28 FrameAndMuteInfo(AudioFrame* f, bool m) : frame(f), muted(m) {}
30 AudioFrame* frame; 29 AudioFrame* frame;
31 bool muted; 30 bool muted;
(...skipping 28 matching lines...) Expand all
60 public: 59 public:
61 // AudioProcessing only accepts 10 ms frames. 60 // AudioProcessing only accepts 10 ms frames.
62 enum { kProcessPeriodicityInMs = 10 }; 61 enum { kProcessPeriodicityInMs = 10 };
63 62
64 NewAudioConferenceMixerImpl(int id); 63 NewAudioConferenceMixerImpl(int id);
65 ~NewAudioConferenceMixerImpl(); 64 ~NewAudioConferenceMixerImpl();
66 65
67 // Must be called after ctor. 66 // Must be called after ctor.
68 bool Init(); 67 bool Init();
69 68
70 // Module functions
71 int64_t TimeUntilNextProcess() override;
72 void Process() override;
73
74 // NewAudioConferenceMixer functions 69 // NewAudioConferenceMixer functions
75 void Mix(AudioFrame*) override; 70 void Mix(AudioFrame*) override;
76 int32_t SetMixabilityStatus(MixerAudioSource* participant, 71 int32_t SetMixabilityStatus(MixerAudioSource* participant,
77 bool mixable) override; 72 bool mixable) override;
78 bool MixabilityStatus(const MixerAudioSource& participant) const override; 73 bool MixabilityStatus(const MixerAudioSource& participant) const override;
79 int32_t SetMinimumMixingFrequency(Frequency freq) override; 74 int32_t SetMinimumMixingFrequency(Frequency freq) override;
80 int32_t SetAnonymousMixabilityStatus(MixerAudioSource* participant, 75 int32_t SetAnonymousMixabilityStatus(MixerAudioSource* participant,
81 bool mixable) override; 76 bool mixable) override;
82 bool AnonymousMixabilityStatus( 77 bool AnonymousMixabilityStatus(
83 const MixerAudioSource& participant) const override; 78 const MixerAudioSource& participant) const override;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 // Always mixed, anonomously. 156 // Always mixed, anonomously.
162 MixerAudioSourceList _additionalParticipantList; 157 MixerAudioSourceList _additionalParticipantList;
163 158
164 size_t _numMixedParticipants; 159 size_t _numMixedParticipants;
165 // Determines if we will use a limiter for clipping protection during 160 // Determines if we will use a limiter for clipping protection during
166 // mixing. 161 // mixing.
167 bool use_limiter_; 162 bool use_limiter_;
168 163
169 uint32_t _timeStamp; 164 uint32_t _timeStamp;
170 165
171 // Metronome class.
172 TimeScheduler _timeScheduler;
173
174 // Counter keeping track of concurrent calls to process.
175 // Note: should never be higher than 1 or lower than 0.
176 int16_t _processCalls;
177
178 // Used for inhibiting saturation in mixing. 166 // Used for inhibiting saturation in mixing.
179 std::unique_ptr<AudioProcessing> _limiter; 167 std::unique_ptr<AudioProcessing> _limiter;
180 }; 168 };
181 } // namespace webrtc 169 } // namespace webrtc
182 170
183 #endif // WEBRTC_MODULES_AUDIO_MIXER_SOURCE_NEW_AUDIO_CONFERENCE_MIXER_IMPL_H_ 171 #endif // WEBRTC_MODULES_AUDIO_MIXER_SOURCE_NEW_AUDIO_CONFERENCE_MIXER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698