Don't try to send REMB or VideoBitrateAllocation when RTCP is off.
Bug: webrtc:12978 Change-Id: I0bd9cb239c9d74695c1408dde985c92b2834ba2d Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/225961 Reviewed-by: Erik Språng <sprang@webrtc.org> Commit-Queue: Philipp Hancke <phancke@nvidia.com> Cr-Commit-Position: refs/heads/master@{#34610}
This commit is contained in:

committed by
WebRTC LUCI CQ

parent
af9a3c6676
commit
c219a53c80
@ -282,6 +282,10 @@ int32_t RTCPSender::SendLossNotification(const FeedbackState& feedback_state,
|
|||||||
void RTCPSender::SetRemb(int64_t bitrate_bps, std::vector<uint32_t> ssrcs) {
|
void RTCPSender::SetRemb(int64_t bitrate_bps, std::vector<uint32_t> ssrcs) {
|
||||||
RTC_CHECK_GE(bitrate_bps, 0);
|
RTC_CHECK_GE(bitrate_bps, 0);
|
||||||
MutexLock lock(&mutex_rtcp_sender_);
|
MutexLock lock(&mutex_rtcp_sender_);
|
||||||
|
if (method_ == RtcpMode::kOff) {
|
||||||
|
RTC_LOG(LS_WARNING) << "Can't send rtcp if it is disabled.";
|
||||||
|
return;
|
||||||
|
}
|
||||||
remb_bitrate_ = bitrate_bps;
|
remb_bitrate_ = bitrate_bps;
|
||||||
remb_ssrcs_ = std::move(ssrcs);
|
remb_ssrcs_ = std::move(ssrcs);
|
||||||
|
|
||||||
@ -887,6 +891,10 @@ bool RTCPSender::AllVolatileFlagsConsumed() const {
|
|||||||
void RTCPSender::SetVideoBitrateAllocation(
|
void RTCPSender::SetVideoBitrateAllocation(
|
||||||
const VideoBitrateAllocation& bitrate) {
|
const VideoBitrateAllocation& bitrate) {
|
||||||
MutexLock lock(&mutex_rtcp_sender_);
|
MutexLock lock(&mutex_rtcp_sender_);
|
||||||
|
if (method_ == RtcpMode::kOff) {
|
||||||
|
RTC_LOG(LS_WARNING) << "Can't send rtcp if it is disabled.";
|
||||||
|
return;
|
||||||
|
}
|
||||||
// Check if this allocation is first ever, or has a different set of
|
// Check if this allocation is first ever, or has a different set of
|
||||||
// spatial/temporal layers signaled and enabled, if so trigger an rtcp report
|
// spatial/temporal layers signaled and enabled, if so trigger an rtcp report
|
||||||
// as soon as possible.
|
// as soon as possible.
|
||||||
|
Reference in New Issue
Block a user