OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2004 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 1244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1255 }; | 1255 }; |
1256 | 1256 |
1257 class WebRtcVoiceMediaChannel::WebRtcAudioReceiveStream { | 1257 class WebRtcVoiceMediaChannel::WebRtcAudioReceiveStream { |
1258 public: | 1258 public: |
1259 WebRtcAudioReceiveStream(int ch, | 1259 WebRtcAudioReceiveStream(int ch, |
1260 uint32_t remote_ssrc, | 1260 uint32_t remote_ssrc, |
1261 uint32_t local_ssrc, | 1261 uint32_t local_ssrc, |
1262 bool use_transport_cc, | 1262 bool use_transport_cc, |
1263 const std::string& sync_group, | 1263 const std::string& sync_group, |
1264 const std::vector<webrtc::RtpExtension>& extensions, | 1264 const std::vector<webrtc::RtpExtension>& extensions, |
1265 webrtc::Call* call) | 1265 webrtc::Call* call, |
| 1266 webrtc::Transport* rtcp_send_transport) |
1266 : call_(call), config_() { | 1267 : call_(call), config_() { |
1267 RTC_DCHECK_GE(ch, 0); | 1268 RTC_DCHECK_GE(ch, 0); |
1268 RTC_DCHECK(call); | 1269 RTC_DCHECK(call); |
1269 config_.rtp.remote_ssrc = remote_ssrc; | 1270 config_.rtp.remote_ssrc = remote_ssrc; |
1270 config_.rtp.local_ssrc = local_ssrc; | 1271 config_.rtp.local_ssrc = local_ssrc; |
| 1272 config_.rtcp_send_transport = rtcp_send_transport; |
1271 config_.voe_channel_id = ch; | 1273 config_.voe_channel_id = ch; |
1272 config_.sync_group = sync_group; | 1274 config_.sync_group = sync_group; |
1273 RecreateAudioReceiveStream(use_transport_cc, extensions); | 1275 RecreateAudioReceiveStream(use_transport_cc, extensions); |
1274 } | 1276 } |
1275 | 1277 |
1276 ~WebRtcAudioReceiveStream() { | 1278 ~WebRtcAudioReceiveStream() { |
1277 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 1279 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
1278 call_->DestroyAudioReceiveStream(stream_); | 1280 call_->DestroyAudioReceiveStream(stream_); |
1279 } | 1281 } |
1280 | 1282 |
(...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2092 // can obtain RTT from the send channel) | 2094 // can obtain RTT from the send channel) |
2093 engine()->voe()->base()->AssociateSendChannel(channel, send_channel); | 2095 engine()->voe()->base()->AssociateSendChannel(channel, send_channel); |
2094 LOG(LS_INFO) << "VoiceEngine channel #" << channel | 2096 LOG(LS_INFO) << "VoiceEngine channel #" << channel |
2095 << " is associated with channel #" << send_channel << "."; | 2097 << " is associated with channel #" << send_channel << "."; |
2096 } | 2098 } |
2097 | 2099 |
2098 recv_streams_.insert(std::make_pair( | 2100 recv_streams_.insert(std::make_pair( |
2099 ssrc, new WebRtcAudioReceiveStream(channel, ssrc, receiver_reports_ssrc_, | 2101 ssrc, new WebRtcAudioReceiveStream(channel, ssrc, receiver_reports_ssrc_, |
2100 recv_transport_cc_enabled_, | 2102 recv_transport_cc_enabled_, |
2101 sp.sync_label, recv_rtp_extensions_, | 2103 sp.sync_label, recv_rtp_extensions_, |
2102 call_))); | 2104 call_, this))); |
2103 | 2105 |
2104 SetNack(channel, send_codec_spec_.nack_enabled); | 2106 SetNack(channel, send_codec_spec_.nack_enabled); |
2105 SetPlayout(channel, playout_); | 2107 SetPlayout(channel, playout_); |
2106 | 2108 |
2107 return true; | 2109 return true; |
2108 } | 2110 } |
2109 | 2111 |
2110 bool WebRtcVoiceMediaChannel::RemoveRecvStream(uint32_t ssrc) { | 2112 bool WebRtcVoiceMediaChannel::RemoveRecvStream(uint32_t ssrc) { |
2111 TRACE_EVENT0("webrtc", "WebRtcVoiceMediaChannel::RemoveRecvStream"); | 2113 TRACE_EVENT0("webrtc", "WebRtcVoiceMediaChannel::RemoveRecvStream"); |
2112 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 2114 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2559 } | 2561 } |
2560 } else { | 2562 } else { |
2561 LOG(LS_INFO) << "Stopping playout for channel #" << channel; | 2563 LOG(LS_INFO) << "Stopping playout for channel #" << channel; |
2562 engine()->voe()->base()->StopPlayout(channel); | 2564 engine()->voe()->base()->StopPlayout(channel); |
2563 } | 2565 } |
2564 return true; | 2566 return true; |
2565 } | 2567 } |
2566 } // namespace cricket | 2568 } // namespace cricket |
2567 | 2569 |
2568 #endif // HAVE_WEBRTC_VOICE | 2570 #endif // HAVE_WEBRTC_VOICE |
OLD | NEW |