blob: 45d6db0feeed5fbf1bd092f18854ad6b4e9fff38 [file] [log] [blame]
nisseb8f9a322017-03-27 05:36:15 -07001/*
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 Bonadei92ea95e2017-09-15 06:47:31 +020011#ifndef CALL_RTP_TRANSPORT_CONTROLLER_SEND_H_
12#define CALL_RTP_TRANSPORT_CONTROLLER_SEND_H_
nisseb8f9a322017-03-27 05:36:15 -070013
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020014#include "call/rtp_transport_controller_send_interface.h"
Mirko Bonadei71207422017-09-15 13:58:09 +020015#include "common_types.h" // NOLINT(build/include)
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020016#include "modules/congestion_controller/include/send_side_congestion_controller.h"
Niels Möllerfd6c0912017-10-31 10:19:10 +010017#include "modules/pacing/packet_router.h"
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020018#include "rtc_base/constructormagic.h"
nissecae45d02017-04-24 05:53:20 -070019
nisseb8f9a322017-03-27 05:36:15 -070020namespace webrtc {
nissecae45d02017-04-24 05:53:20 -070021class Clock;
22class RtcEventLog;
nisseb8f9a322017-03-27 05:36:15 -070023
nissecae45d02017-04-24 05:53:20 -070024// TODO(nisse): When we get the underlying transports here, we should
25// have one object implementing RtpTransportControllerSendInterface
26// per transport, sharing the same congestion controller.
27class RtpTransportControllerSend : public RtpTransportControllerSendInterface {
nisseb8f9a322017-03-27 05:36:15 -070028 public:
nissecae45d02017-04-24 05:53:20 -070029 RtpTransportControllerSend(Clock* clock, webrtc::RtcEventLog* event_log);
nisseb8f9a322017-03-27 05:36:15 -070030
nissecae45d02017-04-24 05:53:20 -070031 // Implements RtpTransportControllerSendInterface
nisse76e62b02017-05-31 02:24:52 -070032 PacketRouter* packet_router() override;
Stefan Holmer5c8942a2017-08-22 16:16:44 +020033 // TODO(holmer): Temporarily exposed, should be removed and the
34 // appropriate methods should be added to this class instead.
35 // In addition the PacedSender should be driven by this class, either
36 // by owning the process thread, or later by using a task queue.
37 PacedSender* pacer() override;
nisse76e62b02017-05-31 02:24:52 -070038 SendSideCongestionController* send_side_cc() override;
39 TransportFeedbackObserver* transport_feedback_observer() override;
40 RtpPacketSender* packet_sender() override;
sprangdb2a9fc2017-08-09 06:42:32 -070041 const RtpKeepAliveConfig& keepalive_config() const override;
42
Stefan Holmer5c8942a2017-08-22 16:16:44 +020043 void SetAllocatedSendBitrateLimits(int min_send_bitrate_bps,
44 int max_padding_bitrate_bps) override;
45
sprangdb2a9fc2017-08-09 06:42:32 -070046 void SetKeepAliveConfig(const RtpKeepAliveConfig& config);
nissecae45d02017-04-24 05:53:20 -070047
48 private:
49 PacketRouter packet_router_;
Stefan Holmer5c8942a2017-08-22 16:16:44 +020050 PacedSender pacer_;
nissecae45d02017-04-24 05:53:20 -070051 SendSideCongestionController send_side_cc_;
sprangdb2a9fc2017-08-09 06:42:32 -070052 RtpKeepAliveConfig keepalive_;
nissecae45d02017-04-24 05:53:20 -070053
54 RTC_DISALLOW_COPY_AND_ASSIGN(RtpTransportControllerSend);
nisseb8f9a322017-03-27 05:36:15 -070055};
56
57} // namespace webrtc
58
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020059#endif // CALL_RTP_TRANSPORT_CONTROLLER_SEND_H_