Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 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 1237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1248 | 1248 |
| 1249 void WebRtcSession::SetRawAudioSink(uint32_t ssrc, | 1249 void WebRtcSession::SetRawAudioSink(uint32_t ssrc, |
| 1250 rtc::scoped_ptr<AudioSinkInterface> sink) { | 1250 rtc::scoped_ptr<AudioSinkInterface> sink) { |
| 1251 ASSERT(signaling_thread()->IsCurrent()); | 1251 ASSERT(signaling_thread()->IsCurrent()); |
| 1252 if (!voice_channel_) | 1252 if (!voice_channel_) |
| 1253 return; | 1253 return; |
| 1254 | 1254 |
| 1255 voice_channel_->SetRawAudioSink(ssrc, std::move(sink)); | 1255 voice_channel_->SetRawAudioSink(ssrc, std::move(sink)); |
| 1256 } | 1256 } |
| 1257 | 1257 |
| 1258 RTCRtpParameters WebRtcSession::GetAudioRtpParameters(uint32_t ssrc) { | |
| 1259 ASSERT(signaling_thread()->IsCurrent()); | |
| 1260 if (voice_channel_) { | |
| 1261 return voice_channel_->GetRtpParameters(ssrc); | |
| 1262 } | |
| 1263 return RTCRtpParameters(); | |
| 1264 } | |
| 1265 | |
| 1266 bool WebRtcSession::SetAudioRtpParameters(uint32_t ssrc, | |
| 1267 const RTCRtpParameters& parameters) { | |
| 1268 ASSERT(signaling_thread()->IsCurrent()); | |
| 1269 if (!voice_channel_) | |
|
pthatcher1
2016/03/12 01:21:03
{}s please
skvlad
2016/03/15 21:18:18
Done.
| |
| 1270 return false; | |
| 1271 return voice_channel_->SetRtpParameters(ssrc, parameters); | |
| 1272 } | |
| 1273 | |
| 1258 bool WebRtcSession::SetCaptureDevice(uint32_t ssrc, | 1274 bool WebRtcSession::SetCaptureDevice(uint32_t ssrc, |
| 1259 cricket::VideoCapturer* camera) { | 1275 cricket::VideoCapturer* camera) { |
| 1260 ASSERT(signaling_thread()->IsCurrent()); | 1276 ASSERT(signaling_thread()->IsCurrent()); |
| 1261 | 1277 |
| 1262 if (!video_channel_) { | 1278 if (!video_channel_) { |
| 1263 // |video_channel_| doesnt't exist. Probably because the remote end doesnt't | 1279 // |video_channel_| doesnt't exist. Probably because the remote end doesnt't |
| 1264 // support video. | 1280 // support video. |
| 1265 LOG(LS_WARNING) << "Video not used in this call."; | 1281 LOG(LS_WARNING) << "Video not used in this call."; |
| 1266 return false; | 1282 return false; |
| 1267 } | 1283 } |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1301 return; | 1317 return; |
| 1302 } | 1318 } |
| 1303 if (!video_channel_->SetVideoSend(ssrc, enable, options)) { | 1319 if (!video_channel_->SetVideoSend(ssrc, enable, options)) { |
| 1304 // Allow that MuteStream fail if |enable| is false but assert otherwise. | 1320 // Allow that MuteStream fail if |enable| is false but assert otherwise. |
| 1305 // This in the normal case when the underlying media channel has already | 1321 // This in the normal case when the underlying media channel has already |
| 1306 // been deleted. | 1322 // been deleted. |
| 1307 ASSERT(enable == false); | 1323 ASSERT(enable == false); |
| 1308 } | 1324 } |
| 1309 } | 1325 } |
| 1310 | 1326 |
| 1327 RTCRtpParameters WebRtcSession::GetVideoRtpParameters(uint32_t ssrc) { | |
| 1328 ASSERT(signaling_thread()->IsCurrent()); | |
| 1329 if (video_channel_) { | |
| 1330 return video_channel_->GetRtpParameters(ssrc); | |
| 1331 } | |
| 1332 return RTCRtpParameters(); | |
| 1333 } | |
| 1334 | |
| 1335 bool WebRtcSession::SetVideoRtpParameters(uint32_t ssrc, | |
| 1336 const RTCRtpParameters& parameters) { | |
| 1337 ASSERT(signaling_thread()->IsCurrent()); | |
|
pthatcher1
2016/03/12 01:21:03
and here
skvlad
2016/03/15 21:18:17
Done.
| |
| 1338 if (!video_channel_) | |
| 1339 return false; | |
| 1340 return video_channel_->SetRtpParameters(ssrc, parameters); | |
| 1341 } | |
| 1342 | |
| 1311 bool WebRtcSession::CanInsertDtmf(const std::string& track_id) { | 1343 bool WebRtcSession::CanInsertDtmf(const std::string& track_id) { |
| 1312 ASSERT(signaling_thread()->IsCurrent()); | 1344 ASSERT(signaling_thread()->IsCurrent()); |
| 1313 if (!voice_channel_) { | 1345 if (!voice_channel_) { |
| 1314 LOG(LS_ERROR) << "CanInsertDtmf: No audio channel exists."; | 1346 LOG(LS_ERROR) << "CanInsertDtmf: No audio channel exists."; |
| 1315 return false; | 1347 return false; |
| 1316 } | 1348 } |
| 1317 uint32_t send_ssrc = 0; | 1349 uint32_t send_ssrc = 0; |
| 1318 // The Dtmf is negotiated per channel not ssrc, so we only check if the ssrc | 1350 // The Dtmf is negotiated per channel not ssrc, so we only check if the ssrc |
| 1319 // exists. | 1351 // exists. |
| 1320 if (!local_desc_ || | 1352 if (!local_desc_ || |
| (...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2119 } | 2151 } |
| 2120 } | 2152 } |
| 2121 | 2153 |
| 2122 void WebRtcSession::OnSentPacket_w(cricket::TransportChannel* channel, | 2154 void WebRtcSession::OnSentPacket_w(cricket::TransportChannel* channel, |
| 2123 const rtc::SentPacket& sent_packet) { | 2155 const rtc::SentPacket& sent_packet) { |
| 2124 RTC_DCHECK(worker_thread()->IsCurrent()); | 2156 RTC_DCHECK(worker_thread()->IsCurrent()); |
| 2125 media_controller_->call_w()->OnSentPacket(sent_packet); | 2157 media_controller_->call_w()->OnSentPacket(sent_packet); |
| 2126 } | 2158 } |
| 2127 | 2159 |
| 2128 } // namespace webrtc | 2160 } // namespace webrtc |
| OLD | NEW |