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

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

Issue 1917193008: Adding getParameters/setParameters APIs to RtpReceiver. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: objc compile errors Created 4 years, 7 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 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after
1212 1212
1213 void WebRtcSession::SetRawAudioSink(uint32_t ssrc, 1213 void WebRtcSession::SetRawAudioSink(uint32_t ssrc,
1214 std::unique_ptr<AudioSinkInterface> sink) { 1214 std::unique_ptr<AudioSinkInterface> sink) {
1215 ASSERT(signaling_thread()->IsCurrent()); 1215 ASSERT(signaling_thread()->IsCurrent());
1216 if (!voice_channel_) 1216 if (!voice_channel_)
1217 return; 1217 return;
1218 1218
1219 voice_channel_->SetRawAudioSink(ssrc, std::move(sink)); 1219 voice_channel_->SetRawAudioSink(ssrc, std::move(sink));
1220 } 1220 }
1221 1221
1222 RtpParameters WebRtcSession::GetAudioRtpParameters(uint32_t ssrc) const { 1222 RtpParameters WebRtcSession::GetAudioRtpSendParameters(uint32_t ssrc) const {
1223 ASSERT(signaling_thread()->IsCurrent()); 1223 ASSERT(signaling_thread()->IsCurrent());
1224 if (voice_channel_) { 1224 if (voice_channel_) {
1225 return voice_channel_->GetRtpParameters(ssrc); 1225 return voice_channel_->GetRtpSendParameters(ssrc);
1226 } 1226 }
1227 return RtpParameters(); 1227 return RtpParameters();
1228 } 1228 }
1229 1229
1230 bool WebRtcSession::SetAudioRtpParameters(uint32_t ssrc, 1230 bool WebRtcSession::SetAudioRtpSendParameters(uint32_t ssrc,
1231 const RtpParameters& parameters) { 1231 const RtpParameters& parameters) {
1232 ASSERT(signaling_thread()->IsCurrent()); 1232 ASSERT(signaling_thread()->IsCurrent());
1233 if (!voice_channel_) { 1233 if (!voice_channel_) {
1234 return false; 1234 return false;
1235 } 1235 }
1236 return voice_channel_->SetRtpParameters(ssrc, parameters); 1236 return voice_channel_->SetRtpSendParameters(ssrc, parameters);
1237 }
1238
1239 RtpParameters WebRtcSession::GetAudioRtpReceiveParameters(uint32_t ssrc) const {
1240 ASSERT(signaling_thread()->IsCurrent());
1241 if (voice_channel_) {
1242 return voice_channel_->GetRtpReceiveParameters(ssrc);
1243 }
1244 return RtpParameters();
1245 }
1246
1247 bool WebRtcSession::SetAudioRtpReceiveParameters(
1248 uint32_t ssrc,
1249 const RtpParameters& parameters) {
1250 ASSERT(signaling_thread()->IsCurrent());
1251 if (!voice_channel_) {
1252 return false;
1253 }
1254 return voice_channel_->SetRtpReceiveParameters(ssrc, parameters);
1237 } 1255 }
1238 1256
1239 bool WebRtcSession::SetSource( 1257 bool WebRtcSession::SetSource(
1240 uint32_t ssrc, 1258 uint32_t ssrc,
1241 rtc::VideoSourceInterface<cricket::VideoFrame>* source) { 1259 rtc::VideoSourceInterface<cricket::VideoFrame>* source) {
1242 ASSERT(signaling_thread()->IsCurrent()); 1260 ASSERT(signaling_thread()->IsCurrent());
1243 1261
1244 if (!video_channel_) { 1262 if (!video_channel_) {
1245 // |video_channel_| doesnt't exist. Probably because the remote end doesnt't 1263 // |video_channel_| doesnt't exist. Probably because the remote end doesnt't
1246 // support video. 1264 // support video.
(...skipping 30 matching lines...) Expand all
1277 return; 1295 return;
1278 } 1296 }
1279 if (!video_channel_->SetVideoSend(ssrc, enable, options)) { 1297 if (!video_channel_->SetVideoSend(ssrc, enable, options)) {
1280 // Allow that MuteStream fail if |enable| is false but assert otherwise. 1298 // Allow that MuteStream fail if |enable| is false but assert otherwise.
1281 // This in the normal case when the underlying media channel has already 1299 // This in the normal case when the underlying media channel has already
1282 // been deleted. 1300 // been deleted.
1283 ASSERT(enable == false); 1301 ASSERT(enable == false);
1284 } 1302 }
1285 } 1303 }
1286 1304
1287 RtpParameters WebRtcSession::GetVideoRtpParameters(uint32_t ssrc) const { 1305 RtpParameters WebRtcSession::GetVideoRtpSendParameters(uint32_t ssrc) const {
1288 ASSERT(signaling_thread()->IsCurrent()); 1306 ASSERT(signaling_thread()->IsCurrent());
1289 if (video_channel_) { 1307 if (video_channel_) {
1290 return video_channel_->GetRtpParameters(ssrc); 1308 return video_channel_->GetRtpSendParameters(ssrc);
1291 } 1309 }
1292 return RtpParameters(); 1310 return RtpParameters();
1293 } 1311 }
1294 1312
1295 bool WebRtcSession::SetVideoRtpParameters(uint32_t ssrc, 1313 bool WebRtcSession::SetVideoRtpSendParameters(uint32_t ssrc,
1296 const RtpParameters& parameters) { 1314 const RtpParameters& parameters) {
1297 ASSERT(signaling_thread()->IsCurrent()); 1315 ASSERT(signaling_thread()->IsCurrent());
1298 if (!video_channel_) { 1316 if (!video_channel_) {
1299 return false; 1317 return false;
1300 } 1318 }
1301 return video_channel_->SetRtpParameters(ssrc, parameters); 1319 return video_channel_->SetRtpSendParameters(ssrc, parameters);
1320 }
1321
1322 RtpParameters WebRtcSession::GetVideoRtpReceiveParameters(uint32_t ssrc) const {
1323 ASSERT(signaling_thread()->IsCurrent());
1324 if (video_channel_) {
1325 return video_channel_->GetRtpReceiveParameters(ssrc);
1326 }
1327 return RtpParameters();
1328 }
1329
1330 bool WebRtcSession::SetVideoRtpReceiveParameters(
1331 uint32_t ssrc,
1332 const RtpParameters& parameters) {
1333 ASSERT(signaling_thread()->IsCurrent());
1334 if (!video_channel_) {
1335 return false;
1336 }
1337 return video_channel_->SetRtpReceiveParameters(ssrc, parameters);
1302 } 1338 }
1303 1339
1304 bool WebRtcSession::CanInsertDtmf(const std::string& track_id) { 1340 bool WebRtcSession::CanInsertDtmf(const std::string& track_id) {
1305 ASSERT(signaling_thread()->IsCurrent()); 1341 ASSERT(signaling_thread()->IsCurrent());
1306 if (!voice_channel_) { 1342 if (!voice_channel_) {
1307 LOG(LS_ERROR) << "CanInsertDtmf: No audio channel exists."; 1343 LOG(LS_ERROR) << "CanInsertDtmf: No audio channel exists.";
1308 return false; 1344 return false;
1309 } 1345 }
1310 uint32_t send_ssrc = 0; 1346 uint32_t send_ssrc = 0;
1311 // The Dtmf is negotiated per channel not ssrc, so we only check if the ssrc 1347 // The Dtmf is negotiated per channel not ssrc, so we only check if the ssrc
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after
2128 ssl_cipher_suite); 2164 ssl_cipher_suite);
2129 } 2165 }
2130 } 2166 }
2131 2167
2132 void WebRtcSession::OnSentPacket_w(const rtc::SentPacket& sent_packet) { 2168 void WebRtcSession::OnSentPacket_w(const rtc::SentPacket& sent_packet) {
2133 RTC_DCHECK(worker_thread()->IsCurrent()); 2169 RTC_DCHECK(worker_thread()->IsCurrent());
2134 media_controller_->call_w()->OnSentPacket(sent_packet); 2170 media_controller_->call_w()->OnSentPacket(sent_packet);
2135 } 2171 }
2136 2172
2137 } // namespace webrtc 2173 } // 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