[webkit-changes] [WebKit/WebKit] a7b3c2: VideoDecoder.configure should not throw on unsuppo...
youennf
noreply at github.com
Fri Aug 25 03:41:01 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a7b3c2e07fde5c075d317f64cfa1efdef53f9207
https://github.com/WebKit/WebKit/commit/a7b3c2e07fde5c075d317f64cfa1efdef53f9207
Author: Youenn Fablet <youennf at gmail.com>
Date: 2023-08-25 (Fri, 25 Aug 2023)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/webcodecs/video-decoder.https.any-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/webcodecs/video-decoder.https.any.js
M LayoutTests/imported/w3c/web-platform-tests/webcodecs/video-decoder.https.any.worker-expected.txt
M LayoutTests/platform/glib/TestExpectations
M Source/WebCore/Modules/webcodecs/WebCodecsVideoDecoder.cpp
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/platform/graphics/HEVCUtilities.cpp
M Source/WebCore/platform/graphics/cocoa/HEVCUtilitiesCocoa.h
M Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.h
M Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.messages.in
M Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.mm
M Source/WebKit/WebProcess/GPU/media/RemoteVideoCodecFactory.cpp
M Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp
M Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.h
Log Message:
-----------
VideoDecoder.configure should not throw on unsupported codecs
https://bugs.webkit.org/show_bug.cgi?id=260622
rdar://114336853
Reviewed by Eric Carlson.
Make sure isConfigSupported resolves the promise with unsupported = true in this case.
Ditto for VideoDecoder.configure.
To do this, we add additional checks in LibWebRTCCodecsProxy to better validate codec string support in GPUProcess.
Since decoder creation may now fail, we update IPC code like for encoders to return the failure to WebProcess.
We add specific checks for VP9, H264 and H265.
* LayoutTests/imported/w3c/web-platform-tests/webcodecs/video-decoder.https.any-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/webcodecs/video-decoder.https.any.js:
(validButUnsupportedConfigs.forEach.entry.promise_test.async t):
(validConfigs.forEach.entry.promise_test.async t):
* LayoutTests/imported/w3c/web-platform-tests/webcodecs/video-decoder.https.any.worker-expected.txt:
* LayoutTests/platform/glib/TestExpectations:
* Source/WebCore/Modules/webcodecs/WebCodecsVideoDecoder.cpp:
(WebCore::isSupportedDecoderCodec):
(WebCore::isValidDecoderConfig):
(WebCore::WebCodecsVideoDecoder::configure):
(WebCore::WebCodecsVideoDecoder::isConfigSupported):
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/platform/graphics/HEVCUtilities.cpp:
(WebCore::parseAVCCodecParameters):
* Source/WebCore/platform/graphics/cocoa/HEVCUtilitiesCocoa.h:
* Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.h:
* Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.messages.in:
* Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.mm:
(WebKit::validateCodecString):
(WebKit::LibWebRTCCodecsProxy::createDecoder):
(WebKit::LibWebRTCCodecsProxy::releaseDecoder):
(WebKit::LibWebRTCCodecsProxy::doDecoderTask):
* Source/WebKit/WebProcess/GPU/media/RemoteVideoCodecFactory.cpp:
(WebKit::RemoteVideoCodecFactory::createDecoder):
* Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:
(WebKit::LibWebRTCCodecs::videoCodecTypeFromWebCodec):
(WebKit::createRemoteDecoder):
(WebKit::LibWebRTCCodecs::createDecoder):
(WebKit::LibWebRTCCodecs::createDecoderAndWaitUntilReady):
(WebKit::LibWebRTCCodecs::createDecoderInternal):
(WebKit::LibWebRTCCodecs::gpuProcessConnectionDidClose):
* Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.h:
Canonical link: https://commits.webkit.org/267272@main
More information about the webkit-changes
mailing list