Skip to content

Commit

Permalink
Don't signal updated bitrate allocation on encoder paused
Browse files Browse the repository at this point in the history
If the paced queue gets too long becaused of e.g. encoder overshoot,
the encoder is paused by setting the target bitrate to 0. Don't signal
this 0-bitrate via RTCP TargetBitrate message as the overall target
bitrate is probably unchanged.

(cherry picked from commit f4ef2dd)

Bug: webrtc:9734, chromium:883434
Change-Id: I77f23b707a8d4494d0c89fa05005ac1482eace52
Reviewed-on: https://webrtc-review.googlesource.com/99507
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Original-Commit-Position: refs/heads/master@{#24679}
Reviewed-on: https://webrtc-review.googlesource.com/100102
Cr-Commit-Position: refs/branch-heads/70@{open-webrtc-toolkit#8}
Cr-Branched-From: f18b352-refs/heads/master@{#24472}
  • Loading branch information
Erik Språng committed Sep 13, 2018
1 parent 87df656 commit 2cd0c92
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion video/video_send_stream_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,10 @@ void VideoSendStreamImpl::SignalEncoderTimedOut() {

void VideoSendStreamImpl::OnBitrateAllocationUpdated(
const VideoBitrateAllocation& allocation) {
rtp_video_sender_->OnBitrateAllocationUpdated(allocation);
if (encoder_target_rate_bps_ != 0) {
// Send bitrate allocation metadata only if encoder is not paused.
rtp_video_sender_->OnBitrateAllocationUpdated(allocation);
}
}

void VideoSendStreamImpl::SignalEncoderActive() {
Expand Down

0 comments on commit 2cd0c92

Please sign in to comment.