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

Side by Side Diff: webrtc/api/webrtcsession.cc

Issue 1766653002: Replace SetCapturer and SetCaptureDevice by SetSource. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebased, no longer any proxy object changes. Created 4 years, 8 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 | « webrtc/api/webrtcsession.h ('k') | webrtc/api/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 * 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 1243 matching lines...) Expand 10 before | Expand all | Expand 10 after
1254 1254
1255 bool WebRtcSession::SetAudioRtpParameters(uint32_t ssrc, 1255 bool WebRtcSession::SetAudioRtpParameters(uint32_t ssrc,
1256 const RtpParameters& parameters) { 1256 const RtpParameters& parameters) {
1257 ASSERT(signaling_thread()->IsCurrent()); 1257 ASSERT(signaling_thread()->IsCurrent());
1258 if (!voice_channel_) { 1258 if (!voice_channel_) {
1259 return false; 1259 return false;
1260 } 1260 }
1261 return voice_channel_->SetRtpParameters(ssrc, parameters); 1261 return voice_channel_->SetRtpParameters(ssrc, parameters);
1262 } 1262 }
1263 1263
1264 bool WebRtcSession::SetCaptureDevice(uint32_t ssrc, 1264 bool WebRtcSession::SetSource(
1265 cricket::VideoCapturer* camera) { 1265 uint32_t ssrc,
1266 rtc::VideoSourceInterface<cricket::VideoFrame>* source) {
1266 ASSERT(signaling_thread()->IsCurrent()); 1267 ASSERT(signaling_thread()->IsCurrent());
1267 1268
1268 if (!video_channel_) { 1269 if (!video_channel_) {
1269 // |video_channel_| doesnt't exist. Probably because the remote end doesnt't 1270 // |video_channel_| doesnt't exist. Probably because the remote end doesnt't
1270 // support video. 1271 // support video.
1271 LOG(LS_WARNING) << "Video not used in this call."; 1272 LOG(LS_WARNING) << "Video not used in this call.";
1272 return false; 1273 return false;
1273 } 1274 }
1274 if (!video_channel_->SetCapturer(ssrc, camera)) { 1275 video_channel_->SetSource(ssrc, source);
1275 // Allow that SetCapturer fail if |camera| is NULL but assert otherwise.
1276 // This in the normal case when the underlying media channel has already
1277 // been deleted.
1278 ASSERT(camera == NULL);
1279 return false;
1280 }
1281 return true; 1276 return true;
1282 } 1277 }
1283 1278
1284 void WebRtcSession::SetVideoPlayout( 1279 void WebRtcSession::SetVideoPlayout(
1285 uint32_t ssrc, 1280 uint32_t ssrc,
1286 bool enable, 1281 bool enable,
1287 rtc::VideoSinkInterface<cricket::VideoFrame>* sink) { 1282 rtc::VideoSinkInterface<cricket::VideoFrame>* sink) {
1288 ASSERT(signaling_thread()->IsCurrent()); 1283 ASSERT(signaling_thread()->IsCurrent());
1289 if (!video_channel_) { 1284 if (!video_channel_) {
1290 LOG(LS_WARNING) << "SetVideoPlayout: No video channel exists."; 1285 LOG(LS_WARNING) << "SetVideoPlayout: No video channel exists.";
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after
2160 } 2155 }
2161 } 2156 }
2162 2157
2163 void WebRtcSession::OnSentPacket_w(cricket::TransportChannel* channel, 2158 void WebRtcSession::OnSentPacket_w(cricket::TransportChannel* channel,
2164 const rtc::SentPacket& sent_packet) { 2159 const rtc::SentPacket& sent_packet) {
2165 RTC_DCHECK(worker_thread()->IsCurrent()); 2160 RTC_DCHECK(worker_thread()->IsCurrent());
2166 media_controller_->call_w()->OnSentPacket(sent_packet); 2161 media_controller_->call_w()->OnSentPacket(sent_packet);
2167 } 2162 }
2168 2163
2169 } // namespace webrtc 2164 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/api/webrtcsession.h ('k') | webrtc/api/webrtcsession_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698