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-Original-Commit-Position: refs/heads/master@{#10582}
Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc
Cr-Mirrored-Commit: d153a37801d9b1258ffff9f878064fa0ddfd3b0a
5 files changed