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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 } | 465 } |
466 | 466 |
467 uint32_t ViEChannel::DiscardedPackets() const { | 467 uint32_t ViEChannel::DiscardedPackets() const { |
468 return vcm_->DiscardedPackets(); | 468 return vcm_->DiscardedPackets(); |
469 } | 469 } |
470 | 470 |
471 int ViEChannel::ReceiveDelay() const { | 471 int ViEChannel::ReceiveDelay() const { |
472 return vcm_->Delay(); | 472 return vcm_->Delay(); |
473 } | 473 } |
474 | 474 |
475 void ViEChannel::SetRTCPMode(const RTCPMethod rtcp_mode) { | 475 void ViEChannel::SetRTCPMode(const RtcpMode rtcp_mode) { |
476 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) | 476 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) |
477 rtp_rtcp->SetRTCPStatus(rtcp_mode); | 477 rtp_rtcp->SetRTCPStatus(rtcp_mode); |
478 } | 478 } |
479 | 479 |
480 void ViEChannel::SetProtectionMode(bool enable_nack, | 480 void ViEChannel::SetProtectionMode(bool enable_nack, |
481 bool enable_fec, | 481 bool enable_fec, |
482 int payload_type_red, | 482 int payload_type_red, |
483 int payload_type_fec) { | 483 int payload_type_fec) { |
484 // Validate payload types. | 484 // Validate payload types. |
485 if (enable_fec) { | 485 if (enable_fec) { |
(...skipping 25 matching lines...) Expand all Loading... |
511 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { | 511 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { |
512 rtp_rtcp->SetGenericFECStatus(enable_fec, | 512 rtp_rtcp->SetGenericFECStatus(enable_fec, |
513 static_cast<uint8_t>(payload_type_red), | 513 static_cast<uint8_t>(payload_type_red), |
514 static_cast<uint8_t>(payload_type_fec)); | 514 static_cast<uint8_t>(payload_type_fec)); |
515 } | 515 } |
516 } | 516 } |
517 | 517 |
518 void ViEChannel::ProcessNACKRequest(const bool enable) { | 518 void ViEChannel::ProcessNACKRequest(const bool enable) { |
519 if (enable) { | 519 if (enable) { |
520 // Turn on NACK. | 520 // Turn on NACK. |
521 if (rtp_rtcp_modules_[0]->RTCP() == kRtcpOff) | 521 if (rtp_rtcp_modules_[0]->RTCP() == RtcpMode::kOff) |
522 return; | 522 return; |
523 vie_receiver_.SetNackStatus(true, max_nack_reordering_threshold_); | 523 vie_receiver_.SetNackStatus(true, max_nack_reordering_threshold_); |
524 | 524 |
525 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) | 525 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) |
526 rtp_rtcp->SetStorePacketsStatus(true, nack_history_size_sender_); | 526 rtp_rtcp->SetStorePacketsStatus(true, nack_history_size_sender_); |
527 | 527 |
528 vcm_->RegisterPacketRequestCallback(this); | 528 vcm_->RegisterPacketRequestCallback(this); |
529 // Don't introduce errors when NACK is enabled. | 529 // Don't introduce errors when NACK is enabled. |
530 vcm_->SetDecodeErrorMode(kNoErrors); | 530 vcm_->SetDecodeErrorMode(kNoErrors); |
531 } else { | 531 } else { |
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1162 configuration.send_frame_count_observer = send_frame_count_observer; | 1162 configuration.send_frame_count_observer = send_frame_count_observer; |
1163 configuration.send_side_delay_observer = send_side_delay_observer; | 1163 configuration.send_side_delay_observer = send_side_delay_observer; |
1164 configuration.bandwidth_callback = bandwidth_callback; | 1164 configuration.bandwidth_callback = bandwidth_callback; |
1165 configuration.transport_feedback_callback = transport_feedback_callback; | 1165 configuration.transport_feedback_callback = transport_feedback_callback; |
1166 | 1166 |
1167 std::vector<RtpRtcp*> modules; | 1167 std::vector<RtpRtcp*> modules; |
1168 for (size_t i = 0; i < num_modules; ++i) { | 1168 for (size_t i = 0; i < num_modules; ++i) { |
1169 RtpRtcp* rtp_rtcp = RtpRtcp::CreateRtpRtcp(configuration); | 1169 RtpRtcp* rtp_rtcp = RtpRtcp::CreateRtpRtcp(configuration); |
1170 rtp_rtcp->SetSendingStatus(false); | 1170 rtp_rtcp->SetSendingStatus(false); |
1171 rtp_rtcp->SetSendingMediaStatus(false); | 1171 rtp_rtcp->SetSendingMediaStatus(false); |
1172 rtp_rtcp->SetRTCPStatus(kRtcpCompound); | 1172 rtp_rtcp->SetRTCPStatus(RtcpMode::kCompound); |
1173 modules.push_back(rtp_rtcp); | 1173 modules.push_back(rtp_rtcp); |
1174 // Receive statistics and remote bitrate estimator should only be set for | 1174 // Receive statistics and remote bitrate estimator should only be set for |
1175 // the primary (first) module. | 1175 // the primary (first) module. |
1176 configuration.receive_statistics = null_receive_statistics; | 1176 configuration.receive_statistics = null_receive_statistics; |
1177 configuration.remote_bitrate_estimator = nullptr; | 1177 configuration.remote_bitrate_estimator = nullptr; |
1178 } | 1178 } |
1179 return modules; | 1179 return modules; |
1180 } | 1180 } |
1181 | 1181 |
1182 void ViEChannel::StartDecodeThread() { | 1182 void ViEChannel::StartDecodeThread() { |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1253 CriticalSectionScoped cs(crit_.get()); | 1253 CriticalSectionScoped cs(crit_.get()); |
1254 receive_stats_callback_ = receive_statistics_proxy; | 1254 receive_stats_callback_ = receive_statistics_proxy; |
1255 } | 1255 } |
1256 | 1256 |
1257 void ViEChannel::SetIncomingVideoStream( | 1257 void ViEChannel::SetIncomingVideoStream( |
1258 IncomingVideoStream* incoming_video_stream) { | 1258 IncomingVideoStream* incoming_video_stream) { |
1259 CriticalSectionScoped cs(crit_.get()); | 1259 CriticalSectionScoped cs(crit_.get()); |
1260 incoming_video_stream_ = incoming_video_stream; | 1260 incoming_video_stream_ = incoming_video_stream; |
1261 } | 1261 } |
1262 } // namespace webrtc | 1262 } // namespace webrtc |
OLD | NEW |