[webkit-changes] [WebKit/WebKit] fa141c: Implement WebCodecsVideoDecoder with GPUProcess ba...

youennf noreply at github.com
Thu Oct 6 04:47:22 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fa141c1bec03e30b20c636431b346ce4f15142fc
      https://github.com/WebKit/WebKit/commit/fa141c1bec03e30b20c636431b346ce4f15142fc
  Author: Youenn Fablet <youennf at gmail.com>
  Date:   2022-10-06 (Thu, 06 Oct 2022)

  Changed paths:
    M LayoutTests/imported/w3c/web-platform-tests/webcodecs/video-decoder.crossOriginIsolated.https.any-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/webcodecs/video-decoder.crossOriginIsolated.https.any.worker-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/webcodecs/videoDecoder-codec-specific.https.any.worker_h264_annexb-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/webcodecs/videoDecoder-codec-specific.https.any.worker_h264_avc-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/webcodecs/videoDecoder-codec-specific.https.any_h264_annexb-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/webcodecs/videoDecoder-codec-specific.https.any_h264_avc-expected.txt
    M LayoutTests/platform/mac-wk1/TestExpectations
    M Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderH264.mm
    M Source/WebCore/Modules/webcodecs/WebCodecsVideoDecoder.cpp
    M Source/WebCore/platform/VideoDecoder.cpp
    M Source/WebCore/platform/VideoDecoder.h
    M Source/WebKit/Sources.txt
    M Source/WebKit/WebKit.xcodeproj/project.pbxproj
    A Source/WebKit/WebProcess/GPU/media/RemoteVideoCodecFactory.cpp
    A Source/WebKit/WebProcess/GPU/media/RemoteVideoCodecFactory.h
    M Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp
    M Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.h
    M Source/WebKit/WebProcess/WebProcess.cpp
    M Source/WebKit/WebProcess/WebProcess.h

  Log Message:
  -----------
  Implement WebCodecsVideoDecoder with GPUProcess backend
https://bugs.webkit.org/show_bug.cgi?id=246015
rdar://problem/100760198

Reviewed by Eric Carlson.

Add a WebCore hook to extend VideoDecoders and make use of it in WebKit.
Add a check in RTCVideoDecoderH264 to handle the case of empty frames.

Implement RemoteVideoDecoder through LibWebRTCCodecs.
Add support for AnnexB decoding of H.264 and HEVC.

Coverd by rebased tests.

* LayoutTests/imported/w3c/web-platform-tests/webcodecs/video-decoder.crossOriginIsolated.https.any-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/webcodecs/video-decoder.crossOriginIsolated.https.any.worker-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/webcodecs/videoDecoder-codec-specific.https.any.worker_h264_annexb-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/webcodecs/videoDecoder-codec-specific.https.any.worker_h264_avc-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/webcodecs/videoDecoder-codec-specific.https.any_h264_annexb-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/webcodecs/videoDecoder-codec-specific.https.any_h264_avc-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/webcodecs/videoFrame-construction.window-expected.txt:
* Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderH264.mm:
(-[RTCVideoDecoderH264 decodeData:size:timeStamp:]):
* Source/WebCore/Modules/webcodecs/WebCodecsVideoDecoder.cpp:
(WebCore::WebCodecsVideoDecoder::configure):
(WebCore::isValidDecoderConfig):
* Source/WebCore/platform/VideoDecoder.cpp:
(WebCore::VideoDecoder::setCreatorCallback):
(WebCore::VideoDecoder::create):
(WebCore::VideoDecoder::createLocalDecoder):
* Source/WebCore/platform/VideoDecoder.h:
* Source/WebKit/Sources.txt:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Source/WebKit/WebProcess/GPU/media/RemoteVideoCodecFactory.cpp: Added.
(WebKit::RemoteVideoDecoderCallbacks::create):
-(WebKit::RemoteVideoDecoderCallbacks::postTask):
(WebKit::RemoteVideoDecoderCallbacks::close):
(WebKit::RemoteVideoDecoderCallbacks::addDuration):
(WebKit::RemoteVideoCodecFactory::RemoteVideoCodecFactory):
(WebKit::RemoteVideoCodecFactory::~RemoteVideoCodecFactory):
(WebKit::RemoteVideoCodecFactory::createDecoder):
(WebKit::RemoteVideoDecoder::RemoteVideoDecoder):
(WebKit::RemoteVideoDecoder::~RemoteVideoDecoder):
(WebKit::RemoteVideoDecoder::decode):
(WebKit::RemoteVideoDecoder::flush):
(WebKit::RemoteVideoDecoder::reset):
(WebKit::RemoteVideoDecoder::close):
(WebKit::RemoteVideoDecoderCallbacks::RemoteVideoDecoderCallbacks):
(WebKit::RemoteVideoDecoderCallbacks::notifyVideoFrame):
* Source/WebKit/WebProcess/GPU/media/RemoteVideoCodecFactory.h: Added.
* Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:
(WebKit::LibWebRTCCodecs::videoCodecTypeFromWebCodec):
(WebKit::LibWebRTCCodecs::createDecoder):
(WebKit::LibWebRTCCodecs::releaseDecoder):
(WebKit::LibWebRTCCodecs::decodeFrame):
(WebKit::LibWebRTCCodecs::registerDecodeFrameCallback):
(WebKit::LibWebRTCCodecs::registerDecodedVideoFrameCallback):
(WebKit::LibWebRTCCodecs::completedDecoding):
(WebKit::LibWebRTCCodecs::completedDecodingCV):
* Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.h:
(WebKit::LibWebRTCCodecs::createDecoder):
* Source/WebKit/WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
* Source/WebKit/WebProcess/WebProcess.h:

Canonical link: https://commits.webkit.org/255215@main




More information about the webkit-changes mailing list