| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
| (...skipping 1311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1322 if (!video_channel_->SetCapturer(ssrc, camera)) { | 1322 if (!video_channel_->SetCapturer(ssrc, camera)) { |
| 1323 // Allow that SetCapturer fail if |camera| is NULL but assert otherwise. | 1323 // Allow that SetCapturer fail if |camera| is NULL but assert otherwise. |
| 1324 // This in the normal case when the underlying media channel has already | 1324 // This in the normal case when the underlying media channel has already |
| 1325 // been deleted. | 1325 // been deleted. |
| 1326 ASSERT(camera == NULL); | 1326 ASSERT(camera == NULL); |
| 1327 return false; | 1327 return false; |
| 1328 } | 1328 } |
| 1329 return true; | 1329 return true; |
| 1330 } | 1330 } |
| 1331 | 1331 |
| 1332 void WebRtcSession::SetVideoPlayout(uint32_t ssrc, | 1332 void WebRtcSession::SetVideoPlayout( |
| 1333 bool enable, | 1333 uint32_t ssrc, |
| 1334 cricket::VideoRenderer* renderer) { | 1334 bool enable, |
| 1335 rtc::VideoSinkInterface<cricket::VideoFrame>* sink) { |
| 1335 ASSERT(signaling_thread()->IsCurrent()); | 1336 ASSERT(signaling_thread()->IsCurrent()); |
| 1336 if (!video_channel_) { | 1337 if (!video_channel_) { |
| 1337 LOG(LS_WARNING) << "SetVideoPlayout: No video channel exists."; | 1338 LOG(LS_WARNING) << "SetVideoPlayout: No video channel exists."; |
| 1338 return; | 1339 return; |
| 1339 } | 1340 } |
| 1340 if (!video_channel_->SetRenderer(ssrc, enable ? renderer : NULL)) { | 1341 if (!video_channel_->SetSink(ssrc, enable ? sink : NULL)) { |
| 1341 // Allow that SetRenderer fail if |renderer| is NULL but assert otherwise. | 1342 // Allow that SetSink fail if |sink| is NULL but assert otherwise. |
| 1342 // This in the normal case when the underlying media channel has already | 1343 // This in the normal case when the underlying media channel has already |
| 1343 // been deleted. | 1344 // been deleted. |
| 1344 ASSERT(renderer == NULL); | 1345 ASSERT(sink == NULL); |
| 1345 } | 1346 } |
| 1346 } | 1347 } |
| 1347 | 1348 |
| 1348 void WebRtcSession::SetVideoSend(uint32_t ssrc, | 1349 void WebRtcSession::SetVideoSend(uint32_t ssrc, |
| 1349 bool enable, | 1350 bool enable, |
| 1350 const cricket::VideoOptions* options) { | 1351 const cricket::VideoOptions* options) { |
| 1351 ASSERT(signaling_thread()->IsCurrent()); | 1352 ASSERT(signaling_thread()->IsCurrent()); |
| 1352 if (!video_channel_) { | 1353 if (!video_channel_) { |
| 1353 LOG(LS_WARNING) << "SetVideoSend: No video channel exists."; | 1354 LOG(LS_WARNING) << "SetVideoSend: No video channel exists."; |
| 1354 return; | 1355 return; |
| (...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2176 } | 2177 } |
| 2177 } | 2178 } |
| 2178 | 2179 |
| 2179 void WebRtcSession::OnSentPacket_w(cricket::TransportChannel* channel, | 2180 void WebRtcSession::OnSentPacket_w(cricket::TransportChannel* channel, |
| 2180 const rtc::SentPacket& sent_packet) { | 2181 const rtc::SentPacket& sent_packet) { |
| 2181 RTC_DCHECK(worker_thread()->IsCurrent()); | 2182 RTC_DCHECK(worker_thread()->IsCurrent()); |
| 2182 media_controller_->call_w()->OnSentPacket(sent_packet); | 2183 media_controller_->call_w()->OnSentPacket(sent_packet); |
| 2183 } | 2184 } |
| 2184 | 2185 |
| 2185 } // namespace webrtc | 2186 } // namespace webrtc |
| OLD | NEW |