OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 |
11 #ifndef WEBRTC_CALL_FAKE_RTP_TRANSPORT_CONTROLLER_SEND_H_ | 11 #ifndef WEBRTC_CALL_FAKE_RTP_TRANSPORT_CONTROLLER_SEND_H_ |
12 #define WEBRTC_CALL_FAKE_RTP_TRANSPORT_CONTROLLER_SEND_H_ | 12 #define WEBRTC_CALL_FAKE_RTP_TRANSPORT_CONTROLLER_SEND_H_ |
13 | 13 |
14 #include "webrtc/call/rtp_transport_controller_send_interface.h" | 14 #include "webrtc/call/rtp_transport_controller_send_interface.h" |
| 15 #include "webrtc/common_types.h" |
15 #include "webrtc/modules/congestion_controller/include/send_side_congestion_cont
roller.h" | 16 #include "webrtc/modules/congestion_controller/include/send_side_congestion_cont
roller.h" |
16 #include "webrtc/modules/pacing/packet_router.h" | 17 #include "webrtc/modules/pacing/packet_router.h" |
17 | 18 |
18 namespace webrtc { | 19 namespace webrtc { |
19 | 20 |
20 class FakeRtpTransportControllerSend | 21 class FakeRtpTransportControllerSend |
21 : public RtpTransportControllerSendInterface { | 22 : public RtpTransportControllerSendInterface { |
22 public: | 23 public: |
23 explicit FakeRtpTransportControllerSend( | 24 explicit FakeRtpTransportControllerSend( |
24 PacketRouter* packet_router, | 25 PacketRouter* packet_router, |
25 SendSideCongestionController* send_side_cc) | 26 SendSideCongestionController* send_side_cc) |
26 : packet_router_(packet_router), send_side_cc_(send_side_cc) { | 27 : packet_router_(packet_router), send_side_cc_(send_side_cc) { |
27 RTC_DCHECK(send_side_cc); | 28 RTC_DCHECK(send_side_cc); |
28 } | 29 } |
29 | 30 |
30 PacketRouter* packet_router() override { return packet_router_; } | 31 PacketRouter* packet_router() override { return packet_router_; } |
31 | 32 |
32 SendSideCongestionController* send_side_cc() override { | 33 SendSideCongestionController* send_side_cc() override { |
33 return send_side_cc_; | 34 return send_side_cc_; |
34 } | 35 } |
35 | 36 |
36 TransportFeedbackObserver* transport_feedback_observer() override { | 37 TransportFeedbackObserver* transport_feedback_observer() override { |
37 return send_side_cc_; | 38 return send_side_cc_; |
38 } | 39 } |
39 | 40 |
40 RtpPacketSender* packet_sender() override { return send_side_cc_->pacer(); } | 41 RtpPacketSender* packet_sender() override { return send_side_cc_->pacer(); } |
41 | 42 |
| 43 const RtpKeepAliveConfig& keepalive_config() const override { |
| 44 return keepalive_; |
| 45 } |
| 46 |
| 47 void set_keepalive_config(const RtpKeepAliveConfig& keepalive_config) { |
| 48 keepalive_ = keepalive_config; |
| 49 } |
| 50 |
42 private: | 51 private: |
43 PacketRouter* packet_router_; | 52 PacketRouter* packet_router_; |
44 SendSideCongestionController* send_side_cc_; | 53 SendSideCongestionController* send_side_cc_; |
| 54 RtpKeepAliveConfig keepalive_; |
45 }; | 55 }; |
46 | 56 |
47 } // namespace webrtc | 57 } // namespace webrtc |
48 | 58 |
49 #endif // WEBRTC_CALL_FAKE_RTP_TRANSPORT_CONTROLLER_SEND_H_ | 59 #endif // WEBRTC_CALL_FAKE_RTP_TRANSPORT_CONTROLLER_SEND_H_ |
OLD | NEW |