nisse | b8f9a32 | 2017-03-27 05:36:15 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2017 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 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 11 | #ifndef CALL_RTP_TRANSPORT_CONTROLLER_SEND_H_ |
| 12 | #define CALL_RTP_TRANSPORT_CONTROLLER_SEND_H_ |
nisse | b8f9a32 | 2017-03-27 05:36:15 -0700 | [diff] [blame] | 13 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 14 | #include "call/rtp_transport_controller_send_interface.h" |
Mirko Bonadei | 7120742 | 2017-09-15 13:58:09 +0200 | [diff] [blame] | 15 | #include "common_types.h" // NOLINT(build/include) |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 16 | #include "modules/congestion_controller/include/send_side_congestion_controller.h" |
| 17 | #include "rtc_base/constructormagic.h" |
nisse | cae45d0 | 2017-04-24 05:53:20 -0700 | [diff] [blame] | 18 | |
nisse | b8f9a32 | 2017-03-27 05:36:15 -0700 | [diff] [blame] | 19 | namespace webrtc { |
nisse | cae45d0 | 2017-04-24 05:53:20 -0700 | [diff] [blame] | 20 | class Clock; |
| 21 | class RtcEventLog; |
nisse | b8f9a32 | 2017-03-27 05:36:15 -0700 | [diff] [blame] | 22 | |
nisse | cae45d0 | 2017-04-24 05:53:20 -0700 | [diff] [blame] | 23 | // TODO(nisse): When we get the underlying transports here, we should |
| 24 | // have one object implementing RtpTransportControllerSendInterface |
| 25 | // per transport, sharing the same congestion controller. |
| 26 | class RtpTransportControllerSend : public RtpTransportControllerSendInterface { |
nisse | b8f9a32 | 2017-03-27 05:36:15 -0700 | [diff] [blame] | 27 | public: |
nisse | cae45d0 | 2017-04-24 05:53:20 -0700 | [diff] [blame] | 28 | RtpTransportControllerSend(Clock* clock, webrtc::RtcEventLog* event_log); |
nisse | b8f9a32 | 2017-03-27 05:36:15 -0700 | [diff] [blame] | 29 | |
nisse | cae45d0 | 2017-04-24 05:53:20 -0700 | [diff] [blame] | 30 | // Implements RtpTransportControllerSendInterface |
nisse | 76e62b0 | 2017-05-31 02:24:52 -0700 | [diff] [blame] | 31 | PacketRouter* packet_router() override; |
Stefan Holmer | 5c8942a | 2017-08-22 16:16:44 +0200 | [diff] [blame] | 32 | // TODO(holmer): Temporarily exposed, should be removed and the |
| 33 | // appropriate methods should be added to this class instead. |
| 34 | // In addition the PacedSender should be driven by this class, either |
| 35 | // by owning the process thread, or later by using a task queue. |
| 36 | PacedSender* pacer() override; |
nisse | 76e62b0 | 2017-05-31 02:24:52 -0700 | [diff] [blame] | 37 | SendSideCongestionController* send_side_cc() override; |
| 38 | TransportFeedbackObserver* transport_feedback_observer() override; |
| 39 | RtpPacketSender* packet_sender() override; |
sprang | db2a9fc | 2017-08-09 06:42:32 -0700 | [diff] [blame] | 40 | const RtpKeepAliveConfig& keepalive_config() const override; |
| 41 | |
Stefan Holmer | 5c8942a | 2017-08-22 16:16:44 +0200 | [diff] [blame] | 42 | void SetAllocatedSendBitrateLimits(int min_send_bitrate_bps, |
| 43 | int max_padding_bitrate_bps) override; |
| 44 | |
sprang | db2a9fc | 2017-08-09 06:42:32 -0700 | [diff] [blame] | 45 | void SetKeepAliveConfig(const RtpKeepAliveConfig& config); |
nisse | cae45d0 | 2017-04-24 05:53:20 -0700 | [diff] [blame] | 46 | |
| 47 | private: |
| 48 | PacketRouter packet_router_; |
Stefan Holmer | 5c8942a | 2017-08-22 16:16:44 +0200 | [diff] [blame] | 49 | PacedSender pacer_; |
nisse | cae45d0 | 2017-04-24 05:53:20 -0700 | [diff] [blame] | 50 | SendSideCongestionController send_side_cc_; |
sprang | db2a9fc | 2017-08-09 06:42:32 -0700 | [diff] [blame] | 51 | RtpKeepAliveConfig keepalive_; |
nisse | cae45d0 | 2017-04-24 05:53:20 -0700 | [diff] [blame] | 52 | |
| 53 | RTC_DISALLOW_COPY_AND_ASSIGN(RtpTransportControllerSend); |
nisse | b8f9a32 | 2017-03-27 05:36:15 -0700 | [diff] [blame] | 54 | }; |
| 55 | |
| 56 | } // namespace webrtc |
| 57 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 58 | #endif // CALL_RTP_TRANSPORT_CONTROLLER_SEND_H_ |