Change the default setting for PreStreamDecoders/LazyDecoderCreation
The experiment has been approved for a full launch. Changing the
default value so that no decoder is created before the stream starts.
All decoders are created lazily on demand when we receive payload
data of the corresponding type.
Bug: chromium:1319864
Change-Id: Ifb412bbe49a7577a45c340496d5b8572ebc1ba44
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/277120
Auto-Submit: Johannes Kron <kron@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38232}
diff --git a/video/video_receive_stream2_unittest.cc b/video/video_receive_stream2_unittest.cc
index a05524f..4a0f777 100644
--- a/video/video_receive_stream2_unittest.cc
+++ b/video/video_receive_stream2_unittest.cc
@@ -485,19 +485,15 @@
rtppacket.SetSequenceNumber(1);
rtppacket.SetTimestamp(0);
- // Only 1 decoder is created by default. It will be H265 since that was the
- // first in the decoder list.
+ // No decoders are created by default.
EXPECT_CALL(mock_h264_decoder_factory_, CreateVideoDecoder(_)).Times(0);
- EXPECT_CALL(
- mock_h264_decoder_factory_,
- CreateVideoDecoder(Field(&SdpVideoFormat::name, testing::Eq("H265"))));
video_receive_stream_->Start();
- // Decoder creation happens on the decoder thread, make sure it runs.
time_controller_.AdvanceTime(TimeDelta::Zero());
EXPECT_TRUE(
testing::Mock::VerifyAndClearExpectations(&mock_h264_decoder_factory_));
-
+ // Verify that the decoder is created when we receive payload data and tries
+ // to decode a frame.
EXPECT_CALL(
mock_h264_decoder_factory_,
CreateVideoDecoder(Field(&SdpVideoFormat::name, testing::Eq("H264"))));