Remove contention between RTCP packets and encoding.

Receiving RTCP often caused the worker thread to stall for >20 ms
(>100ms observed) due to contention on VideoSender's send_crit_ (used to
protect encoding).

This change removes an unnecessary acquire of send_crit_ and caches
encoder settings in ViEEncoder instead of acquiring them through
::SendCodec() in VCM (which is blocking).

BUG=webrtc:5106
R=stefan@webrtc.org

Review URL: https://codereview.webrtc.org/1433703002 .

Cr-Commit-Position: refs/heads/master@{#10582}
This commit is contained in:
Peter Boström
2015-11-10 15:27:12 +00:00
parent cfc319be1d
commit d153a37801
5 changed files with 41 additions and 96 deletions

View File

@ -369,7 +369,6 @@ void VideoSender::SuspendBelowMinBitrate() {
}
bool VideoSender::VideoSuspended() const {
rtc::CritScope lock(&send_crit_);
return _mediaOpt.IsVideoSuspended();
}
} // namespace vcm