diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:37 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:37 +0000 |
commit | a90a5cba08fdf6c0ceb95101c275108a152a3aed (patch) | |
tree | 532507288f3defd7f4dcf1af49698bcb76034855 /dom/media/webcodecs/VideoEncoder.cpp | |
parent | Adding debian version 126.0.1-1. (diff) | |
download | firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.tar.xz firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/media/webcodecs/VideoEncoder.cpp')
-rw-r--r-- | dom/media/webcodecs/VideoEncoder.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/dom/media/webcodecs/VideoEncoder.cpp b/dom/media/webcodecs/VideoEncoder.cpp index 5407e917b6..4ce74fa0cb 100644 --- a/dom/media/webcodecs/VideoEncoder.cpp +++ b/dom/media/webcodecs/VideoEncoder.cpp @@ -343,25 +343,16 @@ static bool CanEncode(const RefPtr<VideoEncoderConfigInternal>& aConfig) { if (!IsSupportedVideoCodec(parsedCodecString)) { return false; } - - // TODO (bug 1872879, bug 1872880): Support this on Windows and Mac. if (aConfig->mScalabilityMode.isSome()) { - // We only support L1T2 and L1T3 ScalabilityMode in VP8 and VP9 encoders on - // Linux. - bool supported = IsOnLinux() && (IsVP8CodecString(parsedCodecString) || - IsVP9CodecString(parsedCodecString)) - ? aConfig->mScalabilityMode->EqualsLiteral("L1T2") || - aConfig->mScalabilityMode->EqualsLiteral("L1T3") - : false; - - if (!supported) { + // Check if ScalabilityMode string is valid. + if (!aConfig->mScalabilityMode->EqualsLiteral("L1T2") && + !aConfig->mScalabilityMode->EqualsLiteral("L1T3")) { LOGE("Scalability mode %s not supported for codec: %s", NS_ConvertUTF16toUTF8(aConfig->mScalabilityMode.value()).get(), NS_ConvertUTF16toUTF8(parsedCodecString).get()); return false; } } - return EncoderSupport::Supports(aConfig); } |