[webkit-changes] [WebKit/WebKit] 9b9b91: Use NativePromise for VideoDecoder and VideoEncode...
youennf
noreply at github.com
Tue Oct 15 02:15:59 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9b9b91b47d7e40b5a5a4e75c7af74507731a3566
https://github.com/WebKit/WebKit/commit/9b9b91b47d7e40b5a5a4e75c7af74507731a3566
Author: Youenn Fablet <youenn at apple.com>
Date: 2024-10-15 (Tue, 15 Oct 2024)
Changed paths:
M Source/WebCore/Modules/webcodecs/WebCodecsVideoDecoder.cpp
M Source/WebCore/Modules/webcodecs/WebCodecsVideoEncoder.cpp
M Source/WebCore/platform/VideoDecoder.cpp
M Source/WebCore/platform/VideoDecoder.h
M Source/WebCore/platform/VideoEncoder.cpp
M Source/WebCore/platform/VideoEncoder.h
M Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm
M Source/WebCore/platform/mediarecorder/cocoa/MediaRecorderPrivateWriterWebM.mm
Log Message:
-----------
Use NativePromise for VideoDecoder and VideoEncoder create methods
rdar://137864703
https://bugs.webkit.org/show_bug.cgi?id=281415
Reviewed by Jean-Yves Avenard.
Make VideoDecoder::create and VideoEncoder::create return promises instead of taking a create callback.
Update the client code accordingly, which makes code more readable.
This notably simplifies the isConfigSupported methods since we can use ScriptExecutionContext::enqueueTaskWhenSettled,
which allows to capture the DeferredPromise object in the native promise handler.
* Source/WebCore/Modules/webcodecs/WebCodecsVideoDecoder.cpp:
(WebCore::WebCodecsVideoDecoder::configure):
(WebCore::WebCodecsVideoDecoder::isConfigSupported):
* Source/WebCore/Modules/webcodecs/WebCodecsVideoEncoder.cpp:
(WebCore::WebCodecsVideoEncoder::configure):
(WebCore::WebCodecsVideoEncoder::isConfigSupported):
* Source/WebCore/platform/VideoDecoder.cpp:
(WebCore::VideoDecoder::create):
* Source/WebCore/platform/VideoDecoder.h:
* Source/WebCore/platform/VideoEncoder.cpp:
(WebCore::VideoEncoder::create):
* Source/WebCore/platform/VideoEncoder.h:
* Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm:
(WebCore::WebCoreDecompressionSession::initializeVideoDecoder):
* Source/WebCore/platform/mediarecorder/cocoa/MediaRecorderPrivateWriterWebM.mm:
(WebCore::MediaRecorderPrivateWriterWebM::appendVideoFrame):
Canonical link: https://commits.webkit.org/285184@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list