FrameForwarder: remove lock recursions.

This change removes lock recursions and adds thread annotations.

Bug: webrtc:11567
Change-Id: I5416cfc8e482bd966eec87c3790abbebc37a84d8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176224
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31403}
This commit is contained in:
Markus Handell
2020-05-28 08:37:30 +02:00
committed by Commit Bot
parent 5cc28b0c6a
commit 16038abb90
3 changed files with 25 additions and 7 deletions

View File

@ -554,9 +554,9 @@ class AdaptingFrameForwarder : public test::FrameForwarder {
void AddOrUpdateSink(rtc::VideoSinkInterface<VideoFrame>* sink,
const rtc::VideoSinkWants& wants) override {
rtc::CritScope cs(&crit_);
last_wants_ = sink_wants();
last_wants_ = sink_wants_locked();
adapter_.OnSinkWants(wants);
test::FrameForwarder::AddOrUpdateSink(sink, wants);
test::FrameForwarder::AddOrUpdateSinkLocked(sink, wants);
}
cricket::VideoAdapter adapter_;
bool adaptation_enabled_ RTC_GUARDED_BY(crit_);