| 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 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #include "webrtc/base/thread_checker.h" | 31 #include "webrtc/base/thread_checker.h" |
| 32 #include "webrtc/base/trace_event.h" | 32 #include "webrtc/base/trace_event.h" |
| 33 #include "webrtc/call/bitrate_allocator.h" | 33 #include "webrtc/call/bitrate_allocator.h" |
| 34 #include "webrtc/call/call.h" | 34 #include "webrtc/call/call.h" |
| 35 #include "webrtc/call/flexfec_receive_stream_impl.h" | 35 #include "webrtc/call/flexfec_receive_stream_impl.h" |
| 36 #include "webrtc/call/rtp_transport_controller_send.h" | 36 #include "webrtc/call/rtp_transport_controller_send.h" |
| 37 #include "webrtc/config.h" | 37 #include "webrtc/config.h" |
| 38 #include "webrtc/logging/rtc_event_log/rtc_event_log.h" | 38 #include "webrtc/logging/rtc_event_log/rtc_event_log.h" |
| 39 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h" | 39 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h" |
| 40 #include "webrtc/modules/congestion_controller/include/receive_side_congestion_c
ontroller.h" | 40 #include "webrtc/modules/congestion_controller/include/receive_side_congestion_c
ontroller.h" |
| 41 #include "webrtc/modules/congestion_controller/include/send_side_congestion_cont
roller.h" | |
| 42 #include "webrtc/modules/pacing/paced_sender.h" | 41 #include "webrtc/modules/pacing/paced_sender.h" |
| 43 #include "webrtc/modules/rtp_rtcp/include/flexfec_receiver.h" | 42 #include "webrtc/modules/rtp_rtcp/include/flexfec_receiver.h" |
| 44 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" | 43 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" |
| 45 #include "webrtc/modules/rtp_rtcp/source/byte_io.h" | 44 #include "webrtc/modules/rtp_rtcp/source/byte_io.h" |
| 46 #include "webrtc/modules/rtp_rtcp/source/rtp_header_extension.h" | 45 #include "webrtc/modules/rtp_rtcp/source/rtp_header_extension.h" |
| 47 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_received.h" | 46 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_received.h" |
| 48 #include "webrtc/modules/utility/include/process_thread.h" | 47 #include "webrtc/modules/utility/include/process_thread.h" |
| 49 #include "webrtc/system_wrappers/include/clock.h" | 48 #include "webrtc/system_wrappers/include/clock.h" |
| 50 #include "webrtc/system_wrappers/include/cpu_info.h" | 49 #include "webrtc/system_wrappers/include/cpu_info.h" |
| 51 #include "webrtc/system_wrappers/include/metrics.h" | 50 #include "webrtc/system_wrappers/include/metrics.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 81 } | 80 } |
| 82 | 81 |
| 83 bool UseSendSideBwe(const AudioReceiveStream::Config& config) { | 82 bool UseSendSideBwe(const AudioReceiveStream::Config& config) { |
| 84 return UseSendSideBwe(config.rtp.extensions, config.rtp.transport_cc); | 83 return UseSendSideBwe(config.rtp.extensions, config.rtp.transport_cc); |
| 85 } | 84 } |
| 86 | 85 |
| 87 bool UseSendSideBwe(const FlexfecReceiveStream::Config& config) { | 86 bool UseSendSideBwe(const FlexfecReceiveStream::Config& config) { |
| 88 return UseSendSideBwe(config.rtp_header_extensions, config.transport_cc); | 87 return UseSendSideBwe(config.rtp_header_extensions, config.transport_cc); |
| 89 } | 88 } |
| 90 | 89 |
| 91 class RtpTransportControllerSend : public RtpTransportControllerSendInterface { | |
| 92 public: | |
| 93 RtpTransportControllerSend(Clock* clock, webrtc::RtcEventLog* event_log); | |
| 94 | |
| 95 void RegisterNetworkObserver( | |
| 96 SendSideCongestionController::Observer* observer); | |
| 97 | |
| 98 // Implements RtpTransportControllerSendInterface | |
| 99 PacketRouter* packet_router() override { return &packet_router_; } | |
| 100 SendSideCongestionController* send_side_cc() override { | |
| 101 return &send_side_cc_; | |
| 102 } | |
| 103 TransportFeedbackObserver* transport_feedback_observer() override { | |
| 104 return &send_side_cc_; | |
| 105 } | |
| 106 RtpPacketSender* packet_sender() override { return send_side_cc_.pacer(); } | |
| 107 | |
| 108 private: | |
| 109 PacketRouter packet_router_; | |
| 110 SendSideCongestionController send_side_cc_; | |
| 111 }; | |
| 112 | |
| 113 RtpTransportControllerSend::RtpTransportControllerSend( | |
| 114 Clock* clock, | |
| 115 webrtc::RtcEventLog* event_log) | |
| 116 : send_side_cc_(clock, nullptr /* observer */, event_log, &packet_router_) { | |
| 117 } | |
| 118 | |
| 119 void RtpTransportControllerSend::RegisterNetworkObserver( | |
| 120 SendSideCongestionController::Observer* observer) { | |
| 121 // Must be called only once. | |
| 122 send_side_cc_.RegisterNetworkObserver(observer); | |
| 123 } | |
| 124 | |
| 125 } // namespace | 90 } // namespace |
| 126 | 91 |
| 127 namespace internal { | 92 namespace internal { |
| 128 | 93 |
| 129 class Call : public webrtc::Call, | 94 class Call : public webrtc::Call, |
| 130 public PacketReceiver, | 95 public PacketReceiver, |
| 131 public RecoveredPacketReceiver, | 96 public RecoveredPacketReceiver, |
| 132 public SendSideCongestionController::Observer, | 97 public SendSideCongestionController::Observer, |
| 133 public BitrateAllocator::LimitObserver { | 98 public BitrateAllocator::LimitObserver { |
| 134 public: | 99 public: |
| (...skipping 1187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1322 (use_send_side_bwe && header.extension.hasTransportSequenceNumber)) { | 1287 (use_send_side_bwe && header.extension.hasTransportSequenceNumber)) { |
| 1323 receive_side_cc_.OnReceivedPacket( | 1288 receive_side_cc_.OnReceivedPacket( |
| 1324 packet.arrival_time_ms(), packet.payload_size() + packet.padding_size(), | 1289 packet.arrival_time_ms(), packet.payload_size() + packet.padding_size(), |
| 1325 header); | 1290 header); |
| 1326 } | 1291 } |
| 1327 } | 1292 } |
| 1328 | 1293 |
| 1329 } // namespace internal | 1294 } // namespace internal |
| 1330 | 1295 |
| 1331 } // namespace webrtc | 1296 } // namespace webrtc |
| OLD | NEW |