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

Side by Side Diff: webrtc/api/rtpsender.cc

Issue 1917193008: Adding getParameters/setParameters APIs to RtpReceiver. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Adding nil check and removing unneeded methods. Created 4 years, 7 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 options = static_cast<LocalAudioSource*>(track_->GetSource())->options(); 198 options = static_cast<LocalAudioSource*>(track_->GetSource())->options();
199 } 199 }
200 #endif 200 #endif
201 201
202 cricket::AudioSource* source = sink_adapter_.get(); 202 cricket::AudioSource* source = sink_adapter_.get();
203 ASSERT(source != nullptr); 203 ASSERT(source != nullptr);
204 provider_->SetAudioSend(ssrc_, track_->enabled(), options, source); 204 provider_->SetAudioSend(ssrc_, track_->enabled(), options, source);
205 } 205 }
206 206
207 RtpParameters AudioRtpSender::GetParameters() const { 207 RtpParameters AudioRtpSender::GetParameters() const {
208 return provider_->GetAudioRtpParameters(ssrc_); 208 return provider_->GetAudioRtpSendParameters(ssrc_);
209 } 209 }
210 210
211 bool AudioRtpSender::SetParameters(const RtpParameters& parameters) { 211 bool AudioRtpSender::SetParameters(const RtpParameters& parameters) {
212 TRACE_EVENT0("webrtc", "AudioRtpSender::SetParameters"); 212 TRACE_EVENT0("webrtc", "AudioRtpSender::SetParameters");
213 return provider_->SetAudioRtpParameters(ssrc_, parameters); 213 return provider_->SetAudioRtpSendParameters(ssrc_, parameters);
214 } 214 }
215 215
216 VideoRtpSender::VideoRtpSender(VideoTrackInterface* track, 216 VideoRtpSender::VideoRtpSender(VideoTrackInterface* track,
217 const std::string& stream_id, 217 const std::string& stream_id,
218 VideoProviderInterface* provider) 218 VideoProviderInterface* provider)
219 : id_(track->id()), 219 : id_(track->id()),
220 stream_id_(stream_id), 220 stream_id_(stream_id),
221 provider_(provider), 221 provider_(provider),
222 track_(track), 222 track_(track),
223 cached_track_enabled_(track->enabled()) { 223 cached_track_enabled_(track->enabled()) {
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 cricket::VideoOptions options; 337 cricket::VideoOptions options;
338 VideoTrackSourceInterface* source = track_->GetSource(); 338 VideoTrackSourceInterface* source = track_->GetSource();
339 if (source) { 339 if (source) {
340 options.is_screencast = rtc::Optional<bool>(source->is_screencast()); 340 options.is_screencast = rtc::Optional<bool>(source->is_screencast());
341 options.video_noise_reduction = source->needs_denoising(); 341 options.video_noise_reduction = source->needs_denoising();
342 } 342 }
343 provider_->SetVideoSend(ssrc_, track_->enabled(), &options); 343 provider_->SetVideoSend(ssrc_, track_->enabled(), &options);
344 } 344 }
345 345
346 RtpParameters VideoRtpSender::GetParameters() const { 346 RtpParameters VideoRtpSender::GetParameters() const {
347 return provider_->GetVideoRtpParameters(ssrc_); 347 return provider_->GetVideoRtpSendParameters(ssrc_);
348 } 348 }
349 349
350 bool VideoRtpSender::SetParameters(const RtpParameters& parameters) { 350 bool VideoRtpSender::SetParameters(const RtpParameters& parameters) {
351 TRACE_EVENT0("webrtc", "VideoRtpSender::SetParameters"); 351 TRACE_EVENT0("webrtc", "VideoRtpSender::SetParameters");
352 return provider_->SetVideoRtpParameters(ssrc_, parameters); 352 return provider_->SetVideoRtpSendParameters(ssrc_, parameters);
353 } 353 }
354 354
355 } // namespace webrtc 355 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698