Simplify RtpRtcp interface for REMB
Remove REMB accessor as used for debug checks only. Merge SetRembData and SetRembStatus(true) eliminating state 'remb can be send, but no data available yet' Bug: None Change-Id: I4c1c19435657e5cde02a17de90ec6de9f00b7daf Reviewed-on: https://webrtc-review.googlesource.com/7983 Reviewed-by: Elad Alon <eladalon@webrtc.org> Reviewed-by: Åsa Persson <asapersson@webrtc.org> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20240}
This commit is contained in:
committed by
Commit Bot
parent
d931705f84
commit
51e21aaa7a
@ -340,12 +340,20 @@ class RtpRtcp : public Module {
|
||||
virtual bool RtcpXrRrtrStatus() const = 0;
|
||||
|
||||
// (REMB) Receiver Estimated Max Bitrate.
|
||||
virtual bool REMB() const = 0;
|
||||
// Schedules sending REMB on next and following sender/receiver reports.
|
||||
virtual void SetRemb(uint32_t bitrate_bps,
|
||||
const std::vector<uint32_t>& ssrcs) = 0;
|
||||
// Stops sending REMB on next and following sender/receiver reports.
|
||||
virtual void UnsetRemb() = 0;
|
||||
|
||||
virtual void SetREMBStatus(bool enable) = 0;
|
||||
|
||||
virtual void SetREMBData(uint32_t bitrate,
|
||||
const std::vector<uint32_t>& ssrcs) = 0;
|
||||
RTC_DEPRECATED void SetREMBStatus(bool enable) {
|
||||
if (!enable)
|
||||
UnsetRemb();
|
||||
}
|
||||
RTC_DEPRECATED void SetREMBData(uint32_t bitrate,
|
||||
const std::vector<uint32_t>& ssrcs) {
|
||||
SetRemb(bitrate, ssrcs);
|
||||
}
|
||||
|
||||
// (TMMBR) Temporary Max Media Bit Rate
|
||||
virtual bool TMMBR() const = 0;
|
||||
|
||||
@ -157,10 +157,9 @@ class MockRtpRtcp : public RtpRtcp {
|
||||
MOCK_METHOD1(SetRTCPVoIPMetrics, int32_t(const RTCPVoIPMetric* voip_metric));
|
||||
MOCK_METHOD1(SetRtcpXrRrtrStatus, void(bool enable));
|
||||
MOCK_CONST_METHOD0(RtcpXrRrtrStatus, bool());
|
||||
MOCK_CONST_METHOD0(REMB, bool());
|
||||
MOCK_METHOD1(SetREMBStatus, void(bool enable));
|
||||
MOCK_METHOD2(SetREMBData,
|
||||
MOCK_METHOD2(SetRemb,
|
||||
void(uint32_t bitrate, const std::vector<uint32_t>& ssrcs));
|
||||
MOCK_METHOD0(UnsetRemb, void());
|
||||
MOCK_CONST_METHOD0(TMMBR, bool());
|
||||
MOCK_METHOD1(SetTMMBRStatus, void(bool enable));
|
||||
MOCK_METHOD1(OnBandwidthEstimateUpdate, void(uint16_t bandwidth_kbit));
|
||||
|
||||
@ -629,17 +629,14 @@ int32_t ModuleRtpRtcpImpl::RemoteRTCPStat(
|
||||
}
|
||||
|
||||
// (REMB) Receiver Estimated Max Bitrate.
|
||||
bool ModuleRtpRtcpImpl::REMB() const {
|
||||
return rtcp_sender_.REMB();
|
||||
void ModuleRtpRtcpImpl::SetRemb(uint32_t bitrate_bps,
|
||||
const std::vector<uint32_t>& ssrcs) {
|
||||
rtcp_sender_.SetREMBStatus(true);
|
||||
rtcp_sender_.SetREMBData(bitrate_bps, ssrcs);
|
||||
}
|
||||
|
||||
void ModuleRtpRtcpImpl::SetREMBStatus(const bool enable) {
|
||||
rtcp_sender_.SetREMBStatus(enable);
|
||||
}
|
||||
|
||||
void ModuleRtpRtcpImpl::SetREMBData(const uint32_t bitrate,
|
||||
const std::vector<uint32_t>& ssrcs) {
|
||||
rtcp_sender_.SetREMBData(bitrate, ssrcs);
|
||||
void ModuleRtpRtcpImpl::UnsetRemb() {
|
||||
rtcp_sender_.SetREMBStatus(false);
|
||||
}
|
||||
|
||||
int32_t ModuleRtpRtcpImpl::RegisterSendRtpHeaderExtension(
|
||||
|
||||
@ -192,12 +192,9 @@ class ModuleRtpRtcpImpl : public RtpRtcp, public RTCPReceiver::ModuleRtpRtcp {
|
||||
std::vector<RTCPReportBlock>* receive_blocks) const override;
|
||||
|
||||
// (REMB) Receiver Estimated Max Bitrate.
|
||||
bool REMB() const override;
|
||||
|
||||
void SetREMBStatus(bool enable) override;
|
||||
|
||||
void SetREMBData(uint32_t bitrate,
|
||||
const std::vector<uint32_t>& ssrcs) override;
|
||||
void SetRemb(uint32_t bitrate_bps,
|
||||
const std::vector<uint32_t>& ssrcs) override;
|
||||
void UnsetRemb() override;
|
||||
|
||||
// (TMMBR) Temporary Max Media Bit Rate.
|
||||
bool TMMBR() const override;
|
||||
|
||||
Reference in New Issue
Block a user