| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 transport_feedback_observer_, | 114 transport_feedback_observer_, |
| 115 rtt_stats_, | 115 rtt_stats_, |
| 116 &rtcp_packet_type_counter_observer_, | 116 &rtcp_packet_type_counter_observer_, |
| 117 remote_bitrate_estimator, | 117 remote_bitrate_estimator, |
| 118 paced_sender_, | 118 paced_sender_, |
| 119 packet_router_, | 119 packet_router_, |
| 120 &send_bitrate_observer_, | 120 &send_bitrate_observer_, |
| 121 &send_frame_count_observer_, | 121 &send_frame_count_observer_, |
| 122 &send_side_delay_observer_, | 122 &send_side_delay_observer_, |
| 123 max_rtp_streams)) { | 123 max_rtp_streams)) { |
| 124 vie_receiver_.SetRtpRtcpModule(rtp_rtcp_modules_[0]); | 124 vie_receiver_.Init(rtp_rtcp_modules_); |
| 125 if (sender_) { | 125 if (sender_) { |
| 126 RTC_DCHECK(send_payload_router_); | 126 RTC_DCHECK(send_payload_router_); |
| 127 RTC_DCHECK(!vcm_); | 127 RTC_DCHECK(!vcm_); |
| 128 } else { | 128 } else { |
| 129 RTC_DCHECK(!send_payload_router_); | 129 RTC_DCHECK(!send_payload_router_); |
| 130 RTC_DCHECK(vcm_); | 130 RTC_DCHECK(vcm_); |
| 131 vcm_->SetNackSettings(kMaxNackListSize, max_nack_reordering_threshold_, 0); | 131 vcm_->SetNackSettings(kMaxNackListSize, max_nack_reordering_threshold_, 0); |
| 132 } | 132 } |
| 133 } | 133 } |
| 134 | 134 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 } | 238 } |
| 239 // Update the RTP module with the settings. | 239 // Update the RTP module with the settings. |
| 240 // Stop and Start the RTP module -> trigger new SSRC, if an SSRC hasn't been | 240 // Stop and Start the RTP module -> trigger new SSRC, if an SSRC hasn't been |
| 241 // set explicitly. | 241 // set explicitly. |
| 242 // The first layer is always active, so the first module can be checked for | 242 // The first layer is always active, so the first module can be checked for |
| 243 // sending status. | 243 // sending status. |
| 244 bool is_sending = rtp_rtcp_modules_[0]->Sending(); | 244 bool is_sending = rtp_rtcp_modules_[0]->Sending(); |
| 245 send_payload_router_->set_active(false); | 245 send_payload_router_->set_active(false); |
| 246 send_payload_router_->SetSendingRtpModules(0); | 246 send_payload_router_->SetSendingRtpModules(0); |
| 247 | 247 |
| 248 std::vector<RtpRtcp*> registered_modules; | |
| 249 size_t num_active_modules = video_codec.numberOfSimulcastStreams > 0 | 248 size_t num_active_modules = video_codec.numberOfSimulcastStreams > 0 |
| 250 ? video_codec.numberOfSimulcastStreams | 249 ? video_codec.numberOfSimulcastStreams |
| 251 : 1; | 250 : 1; |
| 252 for (size_t i = 0; i < num_active_modules; ++i) | |
| 253 registered_modules.push_back(rtp_rtcp_modules_[i]); | |
| 254 | |
| 255 // |RegisterSimulcastRtpRtcpModules| resets all old weak pointers and old | |
| 256 // modules can be deleted after this step. | |
| 257 vie_receiver_.RegisterRtpRtcpModules(registered_modules); | |
| 258 | 251 |
| 259 // Update the packet and payload routers with the sending RtpRtcp modules. | 252 // Update the packet and payload routers with the sending RtpRtcp modules. |
| 260 send_payload_router_->SetSendingRtpModules(num_active_modules); | 253 send_payload_router_->SetSendingRtpModules(num_active_modules); |
| 261 | 254 |
| 262 send_payload_router_->set_active(is_sending); | 255 send_payload_router_->set_active(is_sending); |
| 263 | 256 |
| 264 return 0; | 257 return 0; |
| 265 } | 258 } |
| 266 | 259 |
| 267 void ViEChannel::SetProtectionMode(bool enable_nack, | 260 void ViEChannel::SetProtectionMode(bool enable_nack, |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 619 rtc::CritScope lock(&crit_); | 612 rtc::CritScope lock(&crit_); |
| 620 receive_stats_callback_ = receive_statistics_proxy; | 613 receive_stats_callback_ = receive_statistics_proxy; |
| 621 } | 614 } |
| 622 | 615 |
| 623 void ViEChannel::SetIncomingVideoStream( | 616 void ViEChannel::SetIncomingVideoStream( |
| 624 IncomingVideoStream* incoming_video_stream) { | 617 IncomingVideoStream* incoming_video_stream) { |
| 625 rtc::CritScope lock(&crit_); | 618 rtc::CritScope lock(&crit_); |
| 626 incoming_video_stream_ = incoming_video_stream; | 619 incoming_video_stream_ = incoming_video_stream; |
| 627 } | 620 } |
| 628 } // namespace webrtc | 621 } // namespace webrtc |
| OLD | NEW |