OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. |
| 3 * |
| 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 |
| 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ |
| 10 |
| 11 #ifndef WEBRTC_CALL_FAKE_RTP_TRANSPORT_CONTROLLER_SEND_H_ |
| 12 #define WEBRTC_CALL_FAKE_RTP_TRANSPORT_CONTROLLER_SEND_H_ |
| 13 |
| 14 #include "webrtc/call/rtp_transport_controller_send_interface.h" |
| 15 #include "webrtc/modules/congestion_controller/include/send_side_congestion_cont
roller.h" |
| 16 #include "webrtc/modules/pacing/packet_router.h" |
| 17 |
| 18 namespace webrtc { |
| 19 |
| 20 class FakeRtpTransportControllerSend |
| 21 : public RtpTransportControllerSendInterface { |
| 22 public: |
| 23 explicit FakeRtpTransportControllerSend( |
| 24 SendSideCongestionController* send_side_cc) |
| 25 : send_side_cc_(send_side_cc) { |
| 26 RTC_DCHECK(send_side_cc); |
| 27 } |
| 28 |
| 29 PacketRouter* packet_router() override { return &packet_router_; } |
| 30 |
| 31 SendSideCongestionController* send_side_cc() override { |
| 32 return send_side_cc_; |
| 33 } |
| 34 |
| 35 TransportFeedbackObserver* transport_feedback_observer() override { |
| 36 return send_side_cc_; |
| 37 } |
| 38 |
| 39 RtpPacketSender* packet_sender() override { return send_side_cc_->pacer(); } |
| 40 |
| 41 private: |
| 42 PacketRouter packet_router_; |
| 43 SendSideCongestionController* send_side_cc_; |
| 44 }; |
| 45 |
| 46 } // namespace webrtc |
| 47 |
| 48 #endif // WEBRTC_CALL_FAKE_RTP_TRANSPORT_CONTROLLER_SEND_H_ |
OLD | NEW |