From 66e06055f1a28475ad5fe9e5206364f35a8c89fa Mon Sep 17 00:00:00 2001 From: Johannes Kron Date: Thu, 9 Sep 2021 10:47:41 +0200 Subject: [PATCH] Change kDefaultMaximumPreStreamDecoders to 1 The experiment WebRTC-PreStreamDecoders (aka Lazy decoder creation) has investigated the benefit of only creating a subset of all decoders during negotiation and the remaining decoders on demand. This CL changes the default value to only create one decoder during negotiation. This frees up hardware resources and reduces the SDP negotiation time. Bug: chromium:1202042 Change-Id: I6e2206839162aa857fcc948ccd53d0ff91cbdeaf Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231643 Reviewed-by: Ilya Nikolaevskiy Commit-Queue: Johannes Kron Cr-Commit-Position: refs/heads/main@{#34959} --- video/video_receive_stream2.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/video/video_receive_stream2.cc b/video/video_receive_stream2.cc index 725a9bb594..0776a40b35 100644 --- a/video/video_receive_stream2.cc +++ b/video/video_receive_stream2.cc @@ -65,7 +65,9 @@ constexpr int kMaxBaseMinimumDelayMs = 10000; constexpr int kMaxWaitForFrameMs = 3000; -constexpr int kDefaultMaximumPreStreamDecoders = 100; +// Create a decoder for the preferred codec before the stream starts and any +// other decoder lazily on demand. +constexpr int kDefaultMaximumPreStreamDecoders = 1; // Concrete instance of RecordableEncodedFrame wrapping needed content // from EncodedFrame.