From 8dd16259287f58f9273002717ec4d27e97127719 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 07:43:14 +0200 Subject: Merging upstream version 127.0. Signed-off-by: Daniel Baumann --- dom/media/webrtc/libwebrtcglue/VideoConduit.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'dom/media/webrtc/libwebrtcglue/VideoConduit.cpp') diff --git a/dom/media/webrtc/libwebrtcglue/VideoConduit.cpp b/dom/media/webrtc/libwebrtcglue/VideoConduit.cpp index 5862237711..e863934ebc 100644 --- a/dom/media/webrtc/libwebrtcglue/VideoConduit.cpp +++ b/dom/media/webrtc/libwebrtcglue/VideoConduit.cpp @@ -750,8 +750,20 @@ void WebrtcVideoConduit::OnControlConfigChange() { // TODO this is for webrtc-priority, but needs plumbing bits mEncoderConfig.bitrate_priority = 1.0; + // Populate simulcast_layers with their config (not dimensions or + // dimensions-derived properties, as they're only known as a frame to + // be sent is known). + mEncoderConfig.simulcast_layers.clear(); + for (size_t idx = 0; idx < streamCount; ++idx) { + webrtc::VideoStream video_stream; + auto& encoding = codecConfig->mEncodings[idx]; + video_stream.active = encoding.active; + mEncoderConfig.simulcast_layers.push_back(video_stream); + } + // Expected max number of encodings - mEncoderConfig.number_of_streams = streamCount; + mEncoderConfig.number_of_streams = + mEncoderConfig.simulcast_layers.size(); // libwebrtc disables this by default. mSendStreamConfig.suspend_below_min_bitrate = false; -- cgit v1.2.3