diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
commit | 8dd16259287f58f9273002717ec4d27e97127719 (patch) | |
tree | 3863e62a53829a84037444beab3abd4ed9dfc7d0 /dom/media/webrtc/libwebrtcglue | |
parent | Releasing progress-linux version 126.0.1-1~progress7.99u1. (diff) | |
download | firefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz firefox-8dd16259287f58f9273002717ec4d27e97127719.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/media/webrtc/libwebrtcglue')
-rw-r--r-- | dom/media/webrtc/libwebrtcglue/VideoConduit.cpp | 14 | ||||
-rw-r--r-- | dom/media/webrtc/libwebrtcglue/VideoStreamFactory.cpp | 5 |
2 files changed, 16 insertions, 3 deletions
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; diff --git a/dom/media/webrtc/libwebrtcglue/VideoStreamFactory.cpp b/dom/media/webrtc/libwebrtcglue/VideoStreamFactory.cpp index 0ead26a453..d3047f4fca 100644 --- a/dom/media/webrtc/libwebrtcglue/VideoStreamFactory.cpp +++ b/dom/media/webrtc/libwebrtcglue/VideoStreamFactory.cpp @@ -150,6 +150,7 @@ std::vector<webrtc::VideoStream> VideoStreamFactory::CreateEncoderStreams( : aConfig.number_of_streams; MOZ_RELEASE_ASSERT(streamCount >= 1, "Should request at least one stream"); + MOZ_RELEASE_ASSERT(streamCount <= aConfig.simulcast_layers.size()); std::vector<webrtc::VideoStream> streams; streams.reserve(streamCount); @@ -160,10 +161,10 @@ std::vector<webrtc::VideoStream> VideoStreamFactory::CreateEncoderStreams( } for (size_t idx = 0; idx < streamCount; ++idx) { - webrtc::VideoStream video_stream; + webrtc::VideoStream video_stream = aConfig.simulcast_layers[idx]; auto& encoding = mCodecConfig.mEncodings[idx]; - video_stream.active = encoding.active; MOZ_ASSERT(encoding.constraints.scaleDownBy >= 1.0); + MOZ_ASSERT(video_stream.active == encoding.active); gfx::IntSize newSize(0, 0); |