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

Side by Side Diff: webrtc/audio/audio_receive_stream.cc

Issue 2770233003: Implemented the GetSources() in native code. (Closed)
Patch Set: Add a direct dependency to the webrtc/voice_engine/BUILD.gn Created 3 years, 8 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) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 void AudioReceiveStream::SetSink(std::unique_ptr<AudioSinkInterface> sink) { 212 void AudioReceiveStream::SetSink(std::unique_ptr<AudioSinkInterface> sink) {
213 RTC_DCHECK_RUN_ON(&worker_thread_checker_); 213 RTC_DCHECK_RUN_ON(&worker_thread_checker_);
214 channel_proxy_->SetSink(std::move(sink)); 214 channel_proxy_->SetSink(std::move(sink));
215 } 215 }
216 216
217 void AudioReceiveStream::SetGain(float gain) { 217 void AudioReceiveStream::SetGain(float gain) {
218 RTC_DCHECK_RUN_ON(&worker_thread_checker_); 218 RTC_DCHECK_RUN_ON(&worker_thread_checker_);
219 channel_proxy_->SetChannelOutputVolumeScaling(gain); 219 channel_proxy_->SetChannelOutputVolumeScaling(gain);
220 } 220 }
221 221
222 std::vector<RtpSource> AudioReceiveStream::GetSources() const {
223 RTC_DCHECK_RUN_ON(&worker_thread_checker_);
224 return channel_proxy_->GetSources();
225 }
226
222 AudioMixer::Source::AudioFrameInfo AudioReceiveStream::GetAudioFrameWithInfo( 227 AudioMixer::Source::AudioFrameInfo AudioReceiveStream::GetAudioFrameWithInfo(
223 int sample_rate_hz, 228 int sample_rate_hz,
224 AudioFrame* audio_frame) { 229 AudioFrame* audio_frame) {
225 return channel_proxy_->GetAudioFrameWithInfo(sample_rate_hz, audio_frame); 230 return channel_proxy_->GetAudioFrameWithInfo(sample_rate_hz, audio_frame);
226 } 231 }
227 232
228 int AudioReceiveStream::Ssrc() const { 233 int AudioReceiveStream::Ssrc() const {
229 return config_.rtp.remote_ssrc; 234 return config_.rtp.remote_ssrc;
230 } 235 }
231 236
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 int AudioReceiveStream::SetVoiceEnginePlayout(bool playout) { 333 int AudioReceiveStream::SetVoiceEnginePlayout(bool playout) {
329 ScopedVoEInterface<VoEBase> base(voice_engine()); 334 ScopedVoEInterface<VoEBase> base(voice_engine());
330 if (playout) { 335 if (playout) {
331 return base->StartPlayout(config_.voe_channel_id); 336 return base->StartPlayout(config_.voe_channel_id);
332 } else { 337 } else {
333 return base->StopPlayout(config_.voe_channel_id); 338 return base->StopPlayout(config_.voe_channel_id);
334 } 339 }
335 } 340 }
336 } // namespace internal 341 } // namespace internal
337 } // namespace webrtc 342 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698