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

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

Issue 2195633002: Revert of Rewrote UpdateToMix in the audio mixer. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@remove_memory_pool
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
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 void Mix(AudioFrame* audio_frame_for_mixing) override; 77 void Mix(AudioFrame* audio_frame_for_mixing) override;
78 int32_t SetMinimumMixingFrequency(Frequency freq) override; 78 int32_t SetMinimumMixingFrequency(Frequency freq) override;
79 bool AnonymousMixabilityStatus( 79 bool AnonymousMixabilityStatus(
80 const MixerAudioSource& audio_source) const override; 80 const MixerAudioSource& audio_source) const override;
81 81
82 private: 82 private:
83 // Set/get mix frequency 83 // Set/get mix frequency
84 int32_t SetOutputFrequency(const Frequency& frequency); 84 int32_t SetOutputFrequency(const Frequency& frequency);
85 Frequency OutputFrequency() const; 85 Frequency OutputFrequency() const;
86 86
87 // Compute what audio sources to mix from audio_source_list_. Ramp in 87 // Fills mixList with the AudioFrames pointers that should be used when
88 // and out. Update mixed status. maxAudioFrameCounter specifies how 88 // mixing.
89 // many participants are allowed to be mixed. 89 // maxAudioFrameCounter both input and output specifies how many more
90 AudioFrameList UpdateToMix(size_t maxAudioFrameCounter) const; 90 // AudioFrames that are allowed to be mixed.
91 // rampOutList contain AudioFrames corresponding to an audio stream that
92 // used to be mixed but shouldn't be mixed any longer. These AudioFrames
93 // should be ramped out over this AudioFrame to avoid audio discontinuities.
94 void UpdateToMix(AudioFrameList* mixList,
95 AudioFrameList* rampOutList,
96 std::map<int, MixerAudioSource*>* mixAudioSourceList,
97 size_t* maxAudioFrameCounter) const;
91 98
92 // Return the lowest mixing frequency that can be used without having to 99 // Return the lowest mixing frequency that can be used without having to
93 // downsample any audio. 100 // downsample any audio.
94 int32_t GetLowestMixingFrequency() const; 101 int32_t GetLowestMixingFrequency() const;
95 int32_t GetLowestMixingFrequencyFromList( 102 int32_t GetLowestMixingFrequencyFromList(
96 const MixerAudioSourceList& mixList) const; 103 const MixerAudioSourceList& mixList) const;
97 104
98 // Return the AudioFrames that should be mixed anonymously. 105 // Return the AudioFrames that should be mixed anonymously.
99 void GetAdditionalAudio(AudioFrameList* additionalFramesList) const; 106 void GetAdditionalAudio(AudioFrameList* additionalFramesList) const;
100 107
108 // Update the NewMixHistory of all MixerAudioSources. mixedAudioSourcesList
109 // should contain a map of MixerAudioSources that have been mixed.
110 void UpdateMixedStatus(
111 const std::map<int, MixerAudioSource*>& mixedAudioSourcesList) const;
112
101 // Clears audioFrameList and reclaims all memory associated with it. 113 // Clears audioFrameList and reclaims all memory associated with it.
102 void ClearAudioFrameList(AudioFrameList* audioFrameList) const; 114 void ClearAudioFrameList(AudioFrameList* audioFrameList) const;
103 115
104 // This function returns true if it finds the MixerAudioSource in the 116 // This function returns true if it finds the MixerAudioSource in the
105 // specified list of MixerAudioSources. 117 // specified list of MixerAudioSources.
106 bool IsAudioSourceInList(const MixerAudioSource& audio_source, 118 bool IsAudioSourceInList(const MixerAudioSource& audio_source,
107 const MixerAudioSourceList& audioSourceList) const; 119 const MixerAudioSourceList& audioSourceList) const;
108 120
109 // Add/remove the MixerAudioSource to the specified 121 // Add/remove the MixerAudioSource to the specified
110 // MixerAudioSource list. 122 // MixerAudioSource list.
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 165
154 // Ensures that Mix is called from the same thread. 166 // Ensures that Mix is called from the same thread.
155 rtc::ThreadChecker thread_checker_; 167 rtc::ThreadChecker thread_checker_;
156 168
157 // Used for inhibiting saturation in mixing. 169 // Used for inhibiting saturation in mixing.
158 std::unique_ptr<AudioProcessing> _limiter; 170 std::unique_ptr<AudioProcessing> _limiter;
159 }; 171 };
160 } // namespace webrtc 172 } // namespace webrtc
161 173
162 #endif // WEBRTC_MODULES_AUDIO_MIXER_SOURCE_NEW_AUDIO_CONFERENCE_MIXER_IMPL_H_ 174 #endif // WEBRTC_MODULES_AUDIO_MIXER_SOURCE_NEW_AUDIO_CONFERENCE_MIXER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698