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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 module_process_thread_->RegisterModule(vie_receiver_.GetReceiveStatistics()); | 143 module_process_thread_->RegisterModule(vie_receiver_.GetReceiveStatistics()); |
144 | 144 |
145 // RTP/RTCP initialization. | 145 // RTP/RTCP initialization. |
146 module_process_thread_->RegisterModule(rtp_rtcp_modules_[0]); | 146 module_process_thread_->RegisterModule(rtp_rtcp_modules_[0]); |
147 | 147 |
148 rtp_rtcp_modules_[0]->SetKeyFrameRequestMethod(kKeyFrameReqPliRtcp); | 148 rtp_rtcp_modules_[0]->SetKeyFrameRequestMethod(kKeyFrameReqPliRtcp); |
149 if (paced_sender_) { | 149 if (paced_sender_) { |
150 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) | 150 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) |
151 rtp_rtcp->SetStorePacketsStatus(true, nack_history_size_sender_); | 151 rtp_rtcp->SetStorePacketsStatus(true, nack_history_size_sender_); |
152 } | 152 } |
153 packet_router_->AddRtpModule(rtp_rtcp_modules_[0]); | 153 packet_router_->AddRtpModule(rtp_rtcp_modules_[0], sender_); |
154 if (sender_) { | 154 if (sender_) { |
155 std::list<RtpRtcp*> send_rtp_modules(1, rtp_rtcp_modules_[0]); | 155 std::list<RtpRtcp*> send_rtp_modules(1, rtp_rtcp_modules_[0]); |
156 send_payload_router_->SetSendingRtpModules(send_rtp_modules); | 156 send_payload_router_->SetSendingRtpModules(send_rtp_modules); |
157 RTC_DCHECK(!send_payload_router_->active()); | 157 RTC_DCHECK(!send_payload_router_->active()); |
158 } | 158 } |
159 if (vcm_->RegisterReceiveCallback(this) != 0) { | 159 if (vcm_->RegisterReceiveCallback(this) != 0) { |
160 return -1; | 160 return -1; |
161 } | 161 } |
162 vcm_->RegisterFrameTypeCallback(this); | 162 vcm_->RegisterFrameTypeCallback(this); |
163 vcm_->RegisterReceiveStatisticsCallback(this); | 163 vcm_->RegisterReceiveStatisticsCallback(this); |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 send_payload_router_->set_active(true); | 407 send_payload_router_->set_active(true); |
408 | 408 |
409 // Deregister previously registered modules. | 409 // Deregister previously registered modules. |
410 for (size_t i = num_active_modules; i < num_prev_active_modules; ++i) { | 410 for (size_t i = num_active_modules; i < num_prev_active_modules; ++i) { |
411 module_process_thread_->DeRegisterModule(rtp_rtcp_modules_[i]); | 411 module_process_thread_->DeRegisterModule(rtp_rtcp_modules_[i]); |
412 packet_router_->RemoveRtpModule(rtp_rtcp_modules_[i]); | 412 packet_router_->RemoveRtpModule(rtp_rtcp_modules_[i]); |
413 } | 413 } |
414 // Register new active modules. | 414 // Register new active modules. |
415 for (size_t i = num_prev_active_modules; i < num_active_modules; ++i) { | 415 for (size_t i = num_prev_active_modules; i < num_active_modules; ++i) { |
416 module_process_thread_->RegisterModule(rtp_rtcp_modules_[i]); | 416 module_process_thread_->RegisterModule(rtp_rtcp_modules_[i]); |
417 packet_router_->AddRtpModule(rtp_rtcp_modules_[i]); | 417 packet_router_->AddRtpModule(rtp_rtcp_modules_[i], sender_); |
418 } | 418 } |
419 return 0; | 419 return 0; |
420 } | 420 } |
421 | 421 |
422 int32_t ViEChannel::SetReceiveCodec(const VideoCodec& video_codec) { | 422 int32_t ViEChannel::SetReceiveCodec(const VideoCodec& video_codec) { |
423 RTC_DCHECK(!sender_); | 423 RTC_DCHECK(!sender_); |
424 if (!vie_receiver_.SetReceiveCodec(video_codec)) { | 424 if (!vie_receiver_.SetReceiveCodec(video_codec)) { |
425 return -1; | 425 return -1; |
426 } | 426 } |
427 | 427 |
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1206 rtc::CritScope lock(&crit_); | 1206 rtc::CritScope lock(&crit_); |
1207 receive_stats_callback_ = receive_statistics_proxy; | 1207 receive_stats_callback_ = receive_statistics_proxy; |
1208 } | 1208 } |
1209 | 1209 |
1210 void ViEChannel::SetIncomingVideoStream( | 1210 void ViEChannel::SetIncomingVideoStream( |
1211 IncomingVideoStream* incoming_video_stream) { | 1211 IncomingVideoStream* incoming_video_stream) { |
1212 rtc::CritScope lock(&crit_); | 1212 rtc::CritScope lock(&crit_); |
1213 incoming_video_stream_ = incoming_video_stream; | 1213 incoming_video_stream_ = incoming_video_stream; |
1214 } | 1214 } |
1215 } // namespace webrtc | 1215 } // namespace webrtc |
OLD | NEW |