OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 #include "webrtc/video/video_send_stream.h" | 10 #include "webrtc/video/video_send_stream.h" |
(...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
809 | 809 |
810 transport->send_side_cc()->EnablePeriodicAlrProbing( | 810 transport->send_side_cc()->EnablePeriodicAlrProbing( |
811 config_->periodic_alr_bandwidth_probing); | 811 config_->periodic_alr_bandwidth_probing); |
812 | 812 |
813 // RTP/RTCP initialization. | 813 // RTP/RTCP initialization. |
814 | 814 |
815 // We add the highest spatial layer first to ensure it'll be prioritized | 815 // We add the highest spatial layer first to ensure it'll be prioritized |
816 // when sending padding, with the hope that the packet rate will be smaller, | 816 // when sending padding, with the hope that the packet rate will be smaller, |
817 // and that it's more important to protect than the lower layers. | 817 // and that it's more important to protect than the lower layers. |
818 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) | 818 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) |
819 transport->packet_router()->AddRtpModule(rtp_rtcp); | 819 transport->packet_router()->AddSendRtpModule(rtp_rtcp); |
820 | 820 |
821 for (size_t i = 0; i < config_->rtp.extensions.size(); ++i) { | 821 for (size_t i = 0; i < config_->rtp.extensions.size(); ++i) { |
822 const std::string& extension = config_->rtp.extensions[i].uri; | 822 const std::string& extension = config_->rtp.extensions[i].uri; |
823 int id = config_->rtp.extensions[i].id; | 823 int id = config_->rtp.extensions[i].id; |
824 // One-byte-extension local identifiers are in the range 1-14 inclusive. | 824 // One-byte-extension local identifiers are in the range 1-14 inclusive. |
825 RTC_DCHECK_GE(id, 1); | 825 RTC_DCHECK_GE(id, 1); |
826 RTC_DCHECK_LE(id, 14); | 826 RTC_DCHECK_LE(id, 14); |
827 RTC_DCHECK(RtpExtension::IsSupportedForVideo(extension)); | 827 RTC_DCHECK(RtpExtension::IsSupportedForVideo(extension)); |
828 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { | 828 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { |
829 RTC_CHECK_EQ(0, rtp_rtcp->RegisterSendRtpHeaderExtension( | 829 RTC_CHECK_EQ(0, rtp_rtcp->RegisterSendRtpHeaderExtension( |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
888 VideoSendStreamImpl::~VideoSendStreamImpl() { | 888 VideoSendStreamImpl::~VideoSendStreamImpl() { |
889 RTC_DCHECK_RUN_ON(worker_queue_); | 889 RTC_DCHECK_RUN_ON(worker_queue_); |
890 RTC_DCHECK(!payload_router_.IsActive()) | 890 RTC_DCHECK(!payload_router_.IsActive()) |
891 << "VideoSendStreamImpl::Stop not called"; | 891 << "VideoSendStreamImpl::Stop not called"; |
892 LOG(LS_INFO) << "~VideoSendStreamInternal: " << config_->ToString(); | 892 LOG(LS_INFO) << "~VideoSendStreamInternal: " << config_->ToString(); |
893 | 893 |
894 rtp_rtcp_modules_[0]->SetREMBStatus(false); | 894 rtp_rtcp_modules_[0]->SetREMBStatus(false); |
895 remb_->RemoveRembSender(rtp_rtcp_modules_[0]); | 895 remb_->RemoveRembSender(rtp_rtcp_modules_[0]); |
896 | 896 |
897 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { | 897 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { |
898 transport_->packet_router()->RemoveRtpModule(rtp_rtcp); | 898 transport_->packet_router()->RemoveSendRtpModule(rtp_rtcp); |
899 delete rtp_rtcp; | 899 delete rtp_rtcp; |
900 } | 900 } |
901 } | 901 } |
902 | 902 |
903 bool VideoSendStreamImpl::DeliverRtcp(const uint8_t* packet, size_t length) { | 903 bool VideoSendStreamImpl::DeliverRtcp(const uint8_t* packet, size_t length) { |
904 // Runs on a network thread. | 904 // Runs on a network thread. |
905 RTC_DCHECK(!worker_queue_->IsCurrent()); | 905 RTC_DCHECK(!worker_queue_->IsCurrent()); |
906 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) | 906 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) |
907 rtp_rtcp->IncomingRtcpPacket(packet, length); | 907 rtp_rtcp->IncomingRtcpPacket(packet, length); |
908 return true; | 908 return true; |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1333 std::min(config_->rtp.max_packet_size, | 1333 std::min(config_->rtp.max_packet_size, |
1334 kPathMTU - transport_overhead_bytes_per_packet_); | 1334 kPathMTU - transport_overhead_bytes_per_packet_); |
1335 | 1335 |
1336 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { | 1336 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { |
1337 rtp_rtcp->SetMaxRtpPacketSize(rtp_packet_size); | 1337 rtp_rtcp->SetMaxRtpPacketSize(rtp_packet_size); |
1338 } | 1338 } |
1339 } | 1339 } |
1340 | 1340 |
1341 } // namespace internal | 1341 } // namespace internal |
1342 } // namespace webrtc | 1342 } // namespace webrtc |
OLD | NEW |