Add sending REMB support to RtcpTransceiver
Bug: webrtc:8239
Change-Id: If22de91a69b5752baf616520a247f2fdedacc220
Reviewed-on: https://webrtc-review.googlesource.com/22080
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20657}
diff --git a/modules/rtp_rtcp/source/rtcp_transceiver_impl.h b/modules/rtp_rtcp/source/rtcp_transceiver_impl.h
index db702ec..81f0cac 100644
--- a/modules/rtp_rtcp/source/rtcp_transceiver_impl.h
+++ b/modules/rtp_rtcp/source/rtcp_transceiver_impl.h
@@ -17,7 +17,9 @@
#include <vector>
#include "api/array_view.h"
+#include "api/optional.h"
#include "modules/rtp_rtcp/source/rtcp_packet/common_header.h"
+#include "modules/rtp_rtcp/source/rtcp_packet/remb.h"
#include "modules/rtp_rtcp/source/rtcp_packet/report_block.h"
#include "modules/rtp_rtcp/source/rtcp_transceiver_config.h"
#include "rtc_base/constructormagic.h"
@@ -40,6 +42,12 @@
// Sends RTCP packets starting with a sender or receiver report.
void SendCompoundPacket();
+ // (REMB) Receiver Estimated Max Bitrate.
+ // Includes REMB in following compound packets.
+ void SetRemb(int bitrate_bps, std::vector<uint32_t> ssrcs);
+ // Stops sending REMB in following compound packets.
+ void UnsetRemb();
+
private:
struct SenderReportTimes {
int64_t local_received_time_us;
@@ -56,6 +64,7 @@
const RtcpTransceiverConfig config_;
+ rtc::Optional<rtcp::Remb> remb_;
std::map<uint32_t, SenderReportTimes> last_received_sender_reports_;
rtc::WeakPtrFactory<RtcpTransceiverImpl> ptr_factory_;