Remove AsyncInvoker from WebRtcVideoChannel.
RequestEncoderFallback, RequestEncoderSwitch and SetVideoCodecSwitchingEnabledRequest are now all called on the worker thread. Before, the work already happened on that thread but WebRtcVideoChannel adapted internally when needed. With this CL, there are thread checks to make sure that these calls are always made the same way, we don't need the async invoker and there are fewer calls out from the encoder thread in VideoStreamEncoder (reducing the chance of unintentional blocking). Bug: webrtc:11908 Change-Id: If8738bc2a708a0fefc6fe850b32655f049f30bdc Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/184603 Commit-Queue: Tommi <tommi@webrtc.org> Reviewed-by: Henrik Boström <hbos@webrtc.org> Cr-Commit-Position: refs/heads/master@{#32151}
This commit is contained in:

committed by
Commit Bot

parent
612445ea60
commit
d41c2a6b8a
@ -5789,6 +5789,7 @@ TEST_F(VideoStreamEncoderTest, BitrateEncoderSwitch) {
|
||||
/*fraction_lost=*/0,
|
||||
/*rtt_ms=*/0,
|
||||
/*cwnd_reduce_ratio=*/0);
|
||||
AdvanceTime(TimeDelta::Millis(0));
|
||||
|
||||
video_stream_encoder_->Stop();
|
||||
}
|
||||
@ -5924,6 +5925,7 @@ TEST_F(VideoStreamEncoderTest, EncoderSelectorBitrateSwitch) {
|
||||
/*fraction_lost=*/0,
|
||||
/*rtt_ms=*/0,
|
||||
/*cwnd_reduce_ratio=*/0);
|
||||
AdvanceTime(TimeDelta::Millis(0));
|
||||
|
||||
video_stream_encoder_->Stop();
|
||||
}
|
||||
@ -5972,6 +5974,8 @@ TEST_F(VideoStreamEncoderTest, EncoderSelectorBrokenEncoderSwitch) {
|
||||
video_source_.IncomingCapturedFrame(CreateFrame(1, kDontCare, kDontCare));
|
||||
encode_attempted.Wait(3000);
|
||||
|
||||
AdvanceTime(TimeDelta::Millis(0));
|
||||
|
||||
video_stream_encoder_->Stop();
|
||||
|
||||
// The encoders produces by the VideoEncoderProxyFactory have a pointer back
|
||||
|
Reference in New Issue
Block a user