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

Side by Side Diff: talk/app/webrtc/webrtcsession.cc

Issue 1668493002: Replace uses of cricket::VideoRenderer by rtc::VideoSinkInterface. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « talk/app/webrtc/webrtcsession.h ('k') | talk/app/webrtc/webrtcsession_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « talk/app/webrtc/webrtcsession.h ('k') | talk/app/webrtc/webrtcsession_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698