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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 stopped_ = true; | 198 stopped_ = true; |
199 } | 199 } |
200 | 200 |
201 void AudioRtpSender::SetAudioSend() { | 201 void AudioRtpSender::SetAudioSend() { |
202 RTC_DCHECK(!stopped_ && can_send_track()); | 202 RTC_DCHECK(!stopped_ && can_send_track()); |
203 if (!channel_) { | 203 if (!channel_) { |
204 LOG(LS_ERROR) << "SetAudioSend: No audio channel exists."; | 204 LOG(LS_ERROR) << "SetAudioSend: No audio channel exists."; |
205 return; | 205 return; |
206 } | 206 } |
207 cricket::AudioOptions options; | 207 cricket::AudioOptions options; |
208 #if !defined(WEBRTC_CHROMIUM_BUILD) | 208 #if !defined(WEBRTC_CHROMIUM_BUILD) && !defined(WEBRTC_WEBKIT_BUILD) |
209 // TODO(tommi): Remove this hack when we move CreateAudioSource out of | 209 // TODO(tommi): Remove this hack when we move CreateAudioSource out of |
210 // PeerConnection. This is a bit of a strange way to apply local audio | 210 // PeerConnection. This is a bit of a strange way to apply local audio |
211 // options since it is also applied to all streams/channels, local or remote. | 211 // options since it is also applied to all streams/channels, local or remote. |
212 if (track_->enabled() && track_->GetSource() && | 212 if (track_->enabled() && track_->GetSource() && |
213 !track_->GetSource()->remote()) { | 213 !track_->GetSource()->remote()) { |
214 // TODO(xians): Remove this static_cast since we should be able to connect | 214 // TODO(xians): Remove this static_cast since we should be able to connect |
215 // a remote audio track to a peer connection. | 215 // a remote audio track to a peer connection. |
216 options = static_cast<LocalAudioSource*>(track_->GetSource())->options(); | 216 options = static_cast<LocalAudioSource*>(track_->GetSource())->options(); |
217 } | 217 } |
218 #endif | 218 #endif |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 LOG(LS_WARNING) << "SetVideoSend: No video channel exists."; | 400 LOG(LS_WARNING) << "SetVideoSend: No video channel exists."; |
401 return; | 401 return; |
402 } | 402 } |
403 // Allow SetVideoSend to fail since |enable| is false and |source| is null. | 403 // Allow SetVideoSend to fail since |enable| is false and |source| is null. |
404 // This the normal case when the underlying media channel has already been | 404 // This the normal case when the underlying media channel has already been |
405 // deleted. | 405 // deleted. |
406 channel_->SetVideoSend(ssrc_, false, nullptr, nullptr); | 406 channel_->SetVideoSend(ssrc_, false, nullptr, nullptr); |
407 } | 407 } |
408 | 408 |
409 } // namespace webrtc | 409 } // namespace webrtc |
OLD | NEW |