Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 39a1102365fe8338a6ee5082b47000ae8a1560e9
https://github.com/WebKit/WebKit/commit/39a1102365fe8338a6ee5082b47000ae8a1560e9
Author: Youenn Fablet <[email protected]>
Date: 2024-09-04 (Wed, 04 Sep 2024)
Changed paths:
M Source/WebCore/Modules/webcodecs/WebCodecsAudioDecoder.cpp
M Source/WebCore/Modules/webcodecs/WebCodecsAudioEncoder.cpp
M Source/WebCore/Modules/webcodecs/WebCodecsVideoDecoder.cpp
M Source/WebCore/Modules/webcodecs/WebCodecsVideoEncoder.cpp
M Source/WebCore/Modules/webcodecs/WebCodecsVideoEncoder.h
M Source/WebCore/platform/AudioDecoder.h
M Source/WebCore/platform/AudioEncoder.h
M Source/WebCore/platform/VideoDecoder.h
M Source/WebCore/platform/VideoEncoder.h
M Source/WebCore/platform/audio/gstreamer/AudioDecoderGStreamer.cpp
M Source/WebCore/platform/audio/gstreamer/AudioDecoderGStreamer.h
M Source/WebCore/platform/audio/gstreamer/AudioEncoderGStreamer.cpp
M Source/WebCore/platform/audio/gstreamer/AudioEncoderGStreamer.h
M Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm
M Source/WebCore/platform/graphics/gstreamer/VideoDecoderGStreamer.cpp
M Source/WebCore/platform/graphics/gstreamer/VideoDecoderGStreamer.h
M Source/WebCore/platform/graphics/gstreamer/VideoEncoderGStreamer.cpp
M Source/WebCore/platform/graphics/gstreamer/VideoEncoderGStreamer.h
M Source/WebCore/platform/libwebrtc/LibWebRTCVPXVideoDecoder.cpp
M Source/WebCore/platform/libwebrtc/LibWebRTCVPXVideoDecoder.h
M Source/WebCore/platform/libwebrtc/LibWebRTCVPXVideoEncoder.cpp
M Source/WebCore/platform/libwebrtc/LibWebRTCVPXVideoEncoder.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
M Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.messages.in
Log Message:
-----------
Use NativePromise for WebCodecs encode/decode/flush methods
https://bugs.webkit.org/show_bug.cgi?id=278909
rdar://135005637
Reviewed by Philippe Normand and Jean-Yves Avenard.
We move all these methods to NativePromise as it is easier to read and is
easier for maintenance.
For instance, the NativePromises are wrapped via
ScriptExecutionContext::enqueueTaskWhenSettled so that
it is guaranteed for the callback to be executed and destroyed in the context
thread.
This will allow us to use ActiveDOMObject pending activities as part of these
callbacks in a follow-up.
Another step will be to migrate the create encoder/decoder methods to
NativePromise as well.
* Source/WebCore/Modules/webcodecs/WebCodecsAudioDecoder.cpp:
(WebCore::WebCodecsAudioDecoder::decode):
(WebCore::WebCodecsAudioDecoder::flush):
(WebCore::WebCore::WebCodecsAudioDecoder::suspend):
(WebCore::WebCodecsAudioDecoder::stop):
* Source/WebCore/Modules/webcodecs/WebCodecsAudioEncoder.cpp:
(WebCore::WebCodecsAudioEncoder::configure):
(WebCore::WebCodecsAudioEncoder::encode):
(WebCore::WebCodecsAudioEncoder::flush):
(WebCore::WebCore::WebCodecsAudioEncoder::suspend):
(WebCore::WebCodecsAudioEncoder::stop):
* Source/WebCore/Modules/webcodecs/WebCodecsVideoDecoder.cpp:
(WebCore::WebCodecsVideoDecoder::decode):
(WebCore::WebCodecsVideoDecoder::flush):
(WebCore::WebCore::WebCodecsVideoDecoder::suspend):
(WebCore::WebCodecsVideoDecoder::stop):
* Source/WebCore/Modules/webcodecs/WebCodecsVideoEncoder.cpp:
(WebCore::WebCodecsVideoEncoder::updateRates):
(WebCore::WebCodecsVideoEncoder::configure):
(WebCore::WebCodecsVideoEncoder::encode):
(WebCore::WebCodecsVideoEncoder::flush):
(WebCore::WebCore::WebCodecsVideoEncoder::suspend):
(WebCore::WebCodecsVideoEncoder::stop):
* Source/WebCore/Modules/webcodecs/WebCodecsVideoEncoder.h:
* Source/WebCore/platform/AudioDecoder.h:
* Source/WebCore/platform/AudioEncoder.h:
* Source/WebCore/platform/VideoDecoder.h:
* Source/WebCore/platform/VideoEncoder.h:
(WebCore::VideoEncoder::setRates): Deleted.
* Source/WebCore/platform/audio/gstreamer/AudioDecoderGStreamer.cpp:
(WebCore::GStreamerAudioDecoder::decode):
(WebCore::GStreamerAudioDecoder::flush):
(WebCore::GStreamerInternalAudioDecoder::GStreamerInternalAudioDecoder):
(WebCore::GStreamerInternalAudioDecoder::decode):
(WebCore::GStreamerInternalAudioDecoder::flush):
* Source/WebCore/platform/audio/gstreamer/AudioDecoderGStreamer.h:
* Source/WebCore/platform/audio/gstreamer/AudioEncoderGStreamer.cpp:
(WebCore::GStreamerAudioEncoder::encode):
(WebCore::GStreamerAudioEncoder::flush):
(WebCore::GStreamerInternalAudioEncoder::GStreamerInternalAudioEncoder):
(WebCore::GStreamerInternalAudioEncoder::flush):
* Source/WebCore/platform/audio/gstreamer/AudioEncoderGStreamer.h:
* Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm:
(WebCore::WebCoreDecompressionSession::decodeSample):
* Source/WebCore/platform/graphics/gstreamer/VideoDecoderGStreamer.cpp:
(WebCore::GStreamerVideoDecoder::decode):
(WebCore::GStreamerVideoDecoder::flush):
(WebCore::GStreamerInternalVideoDecoder::decode):
(WebCore::GStreamerInternalVideoDecoder::flush):
* Source/WebCore/platform/graphics/gstreamer/VideoDecoderGStreamer.h:
* Source/WebCore/platform/graphics/gstreamer/VideoEncoderGStreamer.cpp:
(WebCore::GStreamerInternalVideoEncoder::create):
(WebCore::GStreamerVideoEncoder::create):
(WebCore::GStreamerVideoEncoder::GStreamerVideoEncoder):
(WebCore::GStreamerVideoEncoder::encode):
(WebCore::GStreamerVideoEncoder::flush):
(WebCore::GStreamerVideoEncoder::setRates):
(WebCore::GStreamerInternalVideoEncoder::GStreamerInternalVideoEncoder):
(WebCore::GStreamerInternalVideoEncoder::initialize):
(WebCore::GStreamerInternalVideoEncoder::setRates):
(WebCore::GStreamerInternalVideoEncoder::applyRates):
(WebCore::GStreamerInternalVideoEncoder::flush):
* Source/WebCore/platform/graphics/gstreamer/VideoEncoderGStreamer.h:
* Source/WebCore/platform/libwebrtc/LibWebRTCVPXVideoDecoder.cpp:
(WebCore::LibWebRTCVPXVideoDecoder::decode):
(WebCore::LibWebRTCVPXVideoDecoder::flush):
(WebCore::LibWebRTCVPXInternalVideoDecoder::decode):
* Source/WebCore/platform/libwebrtc/LibWebRTCVPXVideoDecoder.h:
* Source/WebCore/platform/libwebrtc/LibWebRTCVPXVideoEncoder.cpp:
(WebCore::LibWebRTCVPXVideoEncoder::encode):
(WebCore::LibWebRTCVPXVideoEncoder::flush):
(WebCore::LibWebRTCVPXVideoEncoder::setRates):
(WebCore::LibWebRTCVPXInternalVideoEncoder::encode):
* Source/WebCore/platform/libwebrtc/LibWebRTCVPXVideoEncoder.h:
* Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.h:
* Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.messages.in:
* Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.mm:
(WebKit::LibWebRTCCodecsProxy::flushDecoder):
(WebKit::LibWebRTCCodecsProxy::setEncodeRates):
* Source/WebKit/WebProcess/GPU/media/RemoteVideoCodecFactory.cpp:
(WebKit::RemoteVideoDecoder::decode):
(WebKit::RemoteVideoDecoder::flush):
(WebKit::RemoteVideoEncoder::encode):
(WebKit::RemoteVideoEncoder::setRates):
(WebKit::RemoteVideoEncoder::flush):
* Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:
(WebKit::decodeVideoFrame):
(WebKit::LibWebRTCCodecs::flushDecoder):
(WebKit::LibWebRTCCodecs::sendFrameToDecode):
(WebKit::LibWebRTCCodecs::decodeWebRTCFrame):
(WebKit::LibWebRTCCodecs::decodeFrame):
(WebKit::LibWebRTCCodecs::decodeFrameInternal):
(WebKit::LibWebRTCCodecs::encodeFrameInternal):
(WebKit::LibWebRTCCodecs::encodeFrame):
(WebKit::LibWebRTCCodecs::flushEncoder):
(WebKit::LibWebRTCCodecs::setEncodeRates):
(WebKit::LibWebRTCCodecs::gpuProcessConnectionDidClose):
(WebKit::LibWebRTCCodecs::setDecoderConnection):
(WebKit::LibWebRTCCodecs::flushDecoderCompleted): Deleted.
* Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.h:
* Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.messages.in:
Canonical link: https://commits.webkit.org/283145@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes