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

Side by Side Diff: webrtc/pc/rtpreceiver.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 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 return; 90 return;
91 } 91 }
92 if (channel_) { 92 if (channel_) {
93 // Allow that SetOutputVolume fail. This is the normal case when the 93 // Allow that SetOutputVolume fail. This is the normal case when the
94 // underlying media channel has already been deleted. 94 // underlying media channel has already been deleted.
95 channel_->SetOutputVolume(ssrc_, 0); 95 channel_->SetOutputVolume(ssrc_, 0);
96 } 96 }
97 stopped_ = true; 97 stopped_ = true;
98 } 98 }
99 99
100 std::vector<RtpSource> AudioRtpReceiver::GetSources() const {
101 return channel_->GetSources(ssrc_);
102 }
103
100 void AudioRtpReceiver::Reconfigure() { 104 void AudioRtpReceiver::Reconfigure() {
101 RTC_DCHECK(!stopped_); 105 RTC_DCHECK(!stopped_);
102 if (!channel_) { 106 if (!channel_) {
103 LOG(LS_ERROR) << "AudioRtpReceiver::Reconfigure: No audio channel exists."; 107 LOG(LS_ERROR) << "AudioRtpReceiver::Reconfigure: No audio channel exists.";
104 return; 108 return;
105 } 109 }
106 if (!channel_->SetOutputVolume(ssrc_, 110 if (!channel_->SetOutputVolume(ssrc_,
107 track_->enabled() ? cached_volume_ : 0)) { 111 track_->enabled() ? cached_volume_ : 0)) {
108 RTC_NOTREACHED(); 112 RTC_NOTREACHED();
109 } 113 }
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 } 233 }
230 234
231 void VideoRtpReceiver::OnFirstPacketReceived(cricket::BaseChannel* channel) { 235 void VideoRtpReceiver::OnFirstPacketReceived(cricket::BaseChannel* channel) {
232 if (observer_) { 236 if (observer_) {
233 observer_->OnFirstPacketReceived(media_type()); 237 observer_->OnFirstPacketReceived(media_type());
234 } 238 }
235 received_first_packet_ = true; 239 received_first_packet_ = true;
236 } 240 }
237 241
238 } // namespace webrtc 242 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698