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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 vie_receiver_.SetRtpRtcpModule(rtp_rtcp_modules_[0]); | 137 vie_receiver_.SetRtpRtcpModule(rtp_rtcp_modules_[0]); |
138 vcm_->SetNackSettings(kMaxNackListSize, max_nack_reordering_threshold_, 0); | 138 vcm_->SetNackSettings(kMaxNackListSize, max_nack_reordering_threshold_, 0); |
139 } | 139 } |
140 | 140 |
141 int32_t ViEChannel::Init() { | 141 int32_t ViEChannel::Init() { |
142 module_process_thread_->RegisterModule(vie_receiver_.GetReceiveStatistics()); | 142 module_process_thread_->RegisterModule(vie_receiver_.GetReceiveStatistics()); |
143 | 143 |
144 // RTP/RTCP initialization. | 144 // RTP/RTCP initialization. |
145 module_process_thread_->RegisterModule(rtp_rtcp_modules_[0]); | 145 module_process_thread_->RegisterModule(rtp_rtcp_modules_[0]); |
146 | 146 |
147 rtp_rtcp_modules_[0]->SetKeyFrameRequestMethod(kKeyFrameReqFirRtp); | 147 rtp_rtcp_modules_[0]->SetKeyFrameRequestMethod(kKeyFrameReqPliRtcp); |
148 if (paced_sender_) { | 148 if (paced_sender_) { |
149 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) | 149 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) |
150 rtp_rtcp->SetStorePacketsStatus(true, nack_history_size_sender_); | 150 rtp_rtcp->SetStorePacketsStatus(true, nack_history_size_sender_); |
151 } | 151 } |
152 packet_router_->AddRtpModule(rtp_rtcp_modules_[0]); | 152 packet_router_->AddRtpModule(rtp_rtcp_modules_[0]); |
153 if (sender_) { | 153 if (sender_) { |
154 std::list<RtpRtcp*> send_rtp_modules(1, rtp_rtcp_modules_[0]); | 154 std::list<RtpRtcp*> send_rtp_modules(1, rtp_rtcp_modules_[0]); |
155 send_payload_router_->SetSendingRtpModules(send_rtp_modules); | 155 send_payload_router_->SetSendingRtpModules(send_rtp_modules); |
156 RTC_DCHECK(!send_payload_router_->active()); | 156 RTC_DCHECK(!send_payload_router_->active()); |
157 } | 157 } |
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 return 0; | 602 return 0; |
603 } | 603 } |
604 | 604 |
605 int ViEChannel::GetRequiredNackListSize(int target_delay_ms) { | 605 int ViEChannel::GetRequiredNackListSize(int target_delay_ms) { |
606 // The max size of the nack list should be large enough to accommodate the | 606 // The max size of the nack list should be large enough to accommodate the |
607 // the number of packets (frames) resulting from the increased delay. | 607 // the number of packets (frames) resulting from the increased delay. |
608 // Roughly estimating for ~40 packets per frame @ 30fps. | 608 // Roughly estimating for ~40 packets per frame @ 30fps. |
609 return target_delay_ms * 40 * 30 / 1000; | 609 return target_delay_ms * 40 * 30 / 1000; |
610 } | 610 } |
611 | 611 |
612 int32_t ViEChannel::SetKeyFrameRequestMethod( | |
613 const KeyFrameRequestMethod method) { | |
614 return rtp_rtcp_modules_[0]->SetKeyFrameRequestMethod(method); | |
615 } | |
616 | |
617 void ViEChannel::EnableRemb(bool enable) { | 612 void ViEChannel::EnableRemb(bool enable) { |
618 rtp_rtcp_modules_[0]->SetREMBStatus(enable); | 613 rtp_rtcp_modules_[0]->SetREMBStatus(enable); |
619 } | 614 } |
620 | 615 |
621 int ViEChannel::SetSendTimestampOffsetStatus(bool enable, int id) { | 616 int ViEChannel::SetSendTimestampOffsetStatus(bool enable, int id) { |
622 // Disable any previous registrations of this extension to avoid errors. | 617 // Disable any previous registrations of this extension to avoid errors. |
623 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { | 618 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { |
624 rtp_rtcp->DeregisterSendRtpHeaderExtension( | 619 rtp_rtcp->DeregisterSendRtpHeaderExtension( |
625 kRtpExtensionTransmissionTimeOffset); | 620 kRtpExtensionTransmissionTimeOffset); |
626 } | 621 } |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
695 } | 690 } |
696 | 691 |
697 int ViEChannel::SetReceiveTransportSequenceNumber(bool enable, int id) { | 692 int ViEChannel::SetReceiveTransportSequenceNumber(bool enable, int id) { |
698 return vie_receiver_.SetReceiveTransportSequenceNumber(enable, id) ? 0 : -1; | 693 return vie_receiver_.SetReceiveTransportSequenceNumber(enable, id) ? 0 : -1; |
699 } | 694 } |
700 | 695 |
701 void ViEChannel::SetRtcpXrRrtrStatus(bool enable) { | 696 void ViEChannel::SetRtcpXrRrtrStatus(bool enable) { |
702 rtp_rtcp_modules_[0]->SetRtcpXrRrtrStatus(enable); | 697 rtp_rtcp_modules_[0]->SetRtcpXrRrtrStatus(enable); |
703 } | 698 } |
704 | 699 |
705 void ViEChannel::SetTransmissionSmoothingStatus(bool enable) { | |
706 RTC_DCHECK(paced_sender_ && "No paced sender registered."); | |
707 paced_sender_->SetStatus(enable); | |
708 } | |
709 | |
710 void ViEChannel::EnableTMMBR(bool enable) { | 700 void ViEChannel::EnableTMMBR(bool enable) { |
711 rtp_rtcp_modules_[0]->SetTMMBRStatus(enable); | 701 rtp_rtcp_modules_[0]->SetTMMBRStatus(enable); |
712 } | 702 } |
713 | 703 |
714 int32_t ViEChannel::SetSSRC(const uint32_t SSRC, | 704 int32_t ViEChannel::SetSSRC(const uint32_t SSRC, |
715 const StreamType usage, | 705 const StreamType usage, |
716 const uint8_t simulcast_idx) { | 706 const uint8_t simulcast_idx) { |
717 RtpRtcp* rtp_rtcp = rtp_rtcp_modules_[simulcast_idx]; | 707 RtpRtcp* rtp_rtcp = rtp_rtcp_modules_[simulcast_idx]; |
718 if (usage == kViEStreamTypeRtx) { | 708 if (usage == kViEStreamTypeRtx) { |
719 rtp_rtcp->SetRtxSsrc(SSRC); | 709 rtp_rtcp->SetRtxSsrc(SSRC); |
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1255 CriticalSectionScoped cs(crit_.get()); | 1245 CriticalSectionScoped cs(crit_.get()); |
1256 receive_stats_callback_ = receive_statistics_proxy; | 1246 receive_stats_callback_ = receive_statistics_proxy; |
1257 } | 1247 } |
1258 | 1248 |
1259 void ViEChannel::SetIncomingVideoStream( | 1249 void ViEChannel::SetIncomingVideoStream( |
1260 IncomingVideoStream* incoming_video_stream) { | 1250 IncomingVideoStream* incoming_video_stream) { |
1261 CriticalSectionScoped cs(crit_.get()); | 1251 CriticalSectionScoped cs(crit_.get()); |
1262 incoming_video_stream_ = incoming_video_stream; | 1252 incoming_video_stream_ = incoming_video_stream; |
1263 } | 1253 } |
1264 } // namespace webrtc | 1254 } // namespace webrtc |
OLD | NEW |