| 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 28 matching lines...) Expand all Loading... |
| 80 } | 79 } |
| 81 | 80 |
| 82 bool UseSendSideBwe(const AudioReceiveStream::Config& config) { | 81 bool UseSendSideBwe(const AudioReceiveStream::Config& config) { |
| 83 return UseSendSideBwe(config.rtp.extensions, config.rtp.transport_cc); | 82 return UseSendSideBwe(config.rtp.extensions, config.rtp.transport_cc); |
| 84 } | 83 } |
| 85 | 84 |
| 86 bool UseSendSideBwe(const FlexfecReceiveStream::Config& config) { | 85 bool UseSendSideBwe(const FlexfecReceiveStream::Config& config) { |
| 87 return UseSendSideBwe(config.rtp_header_extensions, config.transport_cc); | 86 return UseSendSideBwe(config.rtp_header_extensions, config.transport_cc); |
| 88 } | 87 } |
| 89 | 88 |
| 90 class RtpTransportControllerSend : public RtpTransportControllerSendInterface { | |
| 91 public: | |
| 92 RtpTransportControllerSend(Clock* clock, webrtc::RtcEventLog* event_log); | |
| 93 | |
| 94 void RegisterNetworkObserver( | |
| 95 SendSideCongestionController::Observer* observer); | |
| 96 | |
| 97 // Implements RtpTransportControllerSendInterface | |
| 98 PacketRouter* packet_router() override { return &packet_router_; } | |
| 99 SendSideCongestionController* send_side_cc() override { | |
| 100 return &send_side_cc_; | |
| 101 } | |
| 102 TransportFeedbackObserver* transport_feedback_observer() override { | |
| 103 return &send_side_cc_; | |
| 104 } | |
| 105 RtpPacketSender* packet_sender() override { return send_side_cc_.pacer(); } | |
| 106 | |
| 107 private: | |
| 108 PacketRouter packet_router_; | |
| 109 SendSideCongestionController send_side_cc_; | |
| 110 }; | |
| 111 | |
| 112 RtpTransportControllerSend::RtpTransportControllerSend( | |
| 113 Clock* clock, | |
| 114 webrtc::RtcEventLog* event_log) | |
| 115 : send_side_cc_(clock, nullptr /* observer */, event_log, &packet_router_) { | |
| 116 } | |
| 117 | |
| 118 void RtpTransportControllerSend::RegisterNetworkObserver( | |
| 119 SendSideCongestionController::Observer* observer) { | |
| 120 // Must be called only once. | |
| 121 send_side_cc_.RegisterNetworkObserver(observer); | |
| 122 } | |
| 123 | |
| 124 } // namespace | 89 } // namespace |
| 125 | 90 |
| 126 namespace internal { | 91 namespace internal { |
| 127 | 92 |
| 128 class Call : public webrtc::Call, | 93 class Call : public webrtc::Call, |
| 129 public PacketReceiver, | 94 public PacketReceiver, |
| 130 public RecoveredPacketReceiver, | 95 public RecoveredPacketReceiver, |
| 131 public SendSideCongestionController::Observer, | 96 public SendSideCongestionController::Observer, |
| 132 public BitrateAllocator::LimitObserver { | 97 public BitrateAllocator::LimitObserver { |
| 133 public: | 98 public: |
| (...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1317 (use_send_side_bwe && header.extension.hasTransportSequenceNumber)) { | 1282 (use_send_side_bwe && header.extension.hasTransportSequenceNumber)) { |
| 1318 receive_side_cc_.OnReceivedPacket( | 1283 receive_side_cc_.OnReceivedPacket( |
| 1319 packet.arrival_time_ms(), packet.payload_size() + packet.padding_size(), | 1284 packet.arrival_time_ms(), packet.payload_size() + packet.padding_size(), |
| 1320 header); | 1285 header); |
| 1321 } | 1286 } |
| 1322 } | 1287 } |
| 1323 | 1288 |
| 1324 } // namespace internal | 1289 } // namespace internal |
| 1325 | 1290 |
| 1326 } // namespace webrtc | 1291 } // namespace webrtc |
| OLD | NEW |