| OLD | NEW |
| 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 // a remote audio track to a peer connection. | 192 // a remote audio track to a peer connection. |
| 193 options = static_cast<LocalAudioSource*>(track_->GetSource())->options(); | 193 options = static_cast<LocalAudioSource*>(track_->GetSource())->options(); |
| 194 } | 194 } |
| 195 #endif | 195 #endif |
| 196 | 196 |
| 197 cricket::AudioRenderer* renderer = sink_adapter_.get(); | 197 cricket::AudioRenderer* renderer = sink_adapter_.get(); |
| 198 ASSERT(renderer != nullptr); | 198 ASSERT(renderer != nullptr); |
| 199 provider_->SetAudioSend(ssrc_, track_->enabled(), options, renderer); | 199 provider_->SetAudioSend(ssrc_, track_->enabled(), options, renderer); |
| 200 } | 200 } |
| 201 | 201 |
| 202 RTCRtpParameters AudioRtpSender::GetParameters() { |
| 203 return provider_->GetAudioRtpParameters(ssrc_); |
| 204 } |
| 205 |
| 206 bool AudioRtpSender::SetParameters(const RTCRtpParameters& parameters) { |
| 207 return provider_->SetAudioRtpParameters(ssrc_, parameters); |
| 208 } |
| 209 |
| 202 VideoRtpSender::VideoRtpSender(VideoTrackInterface* track, | 210 VideoRtpSender::VideoRtpSender(VideoTrackInterface* track, |
| 203 const std::string& stream_id, | 211 const std::string& stream_id, |
| 204 VideoProviderInterface* provider) | 212 VideoProviderInterface* provider) |
| 205 : id_(track->id()), | 213 : id_(track->id()), |
| 206 stream_id_(stream_id), | 214 stream_id_(stream_id), |
| 207 provider_(provider), | 215 provider_(provider), |
| 208 track_(track), | 216 track_(track), |
| 209 cached_track_enabled_(track->enabled()) { | 217 cached_track_enabled_(track->enabled()) { |
| 210 RTC_DCHECK(provider != nullptr); | 218 RTC_DCHECK(provider != nullptr); |
| 211 track_->RegisterObserver(this); | 219 track_->RegisterObserver(this); |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 void VideoRtpSender::SetVideoSend() { | 329 void VideoRtpSender::SetVideoSend() { |
| 322 RTC_DCHECK(!stopped_ && can_send_track()); | 330 RTC_DCHECK(!stopped_ && can_send_track()); |
| 323 const cricket::VideoOptions* options = nullptr; | 331 const cricket::VideoOptions* options = nullptr; |
| 324 VideoSourceInterface* source = track_->GetSource(); | 332 VideoSourceInterface* source = track_->GetSource(); |
| 325 if (track_->enabled() && source) { | 333 if (track_->enabled() && source) { |
| 326 options = source->options(); | 334 options = source->options(); |
| 327 } | 335 } |
| 328 provider_->SetVideoSend(ssrc_, track_->enabled(), options); | 336 provider_->SetVideoSend(ssrc_, track_->enabled(), options); |
| 329 } | 337 } |
| 330 | 338 |
| 339 RTCRtpParameters VideoRtpSender::GetParameters() { |
| 340 return provider_->GetVideoRtpParameters(ssrc_); |
| 341 } |
| 342 |
| 343 bool VideoRtpSender::SetParameters(const RTCRtpParameters& parameters) { |
| 344 return provider_->SetVideoRtpParameters(ssrc_, parameters); |
| 345 } |
| 346 |
| 331 } // namespace webrtc | 347 } // namespace webrtc |
| OLD | NEW |