From a90a5cba08fdf6c0ceb95101c275108a152a3aed Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 07:35:37 +0200 Subject: Merging upstream version 127.0. Signed-off-by: Daniel Baumann --- dom/media/webcodecs/VideoEncoder.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'dom/media/webcodecs/VideoEncoder.cpp') 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& 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); } -- cgit v1.2.3