Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 29719316bdaac1e0f04348413013dc624ca06f0b
      
https://github.com/WebKit/WebKit/commit/29719316bdaac1e0f04348413013dc624ca06f0b
  Author: Youenn Fablet <you...@apple.com>
  Date:   2024-09-16 (Mon, 16 Sep 2024)

  Changed paths:
    M LayoutTests/http/tests/webcodecs/h264-reordering.html
    M LayoutTests/http/tests/webcodecs/hevc-reordering.html
    M Source/ThirdParty/libwebrtc/Configurations/libwebrtc.exp
    M 
Source/ThirdParty/libwebrtc/Source/webrtc/webkit_sdk/WebKit/WebKitDecoder.h
    M 
Source/ThirdParty/libwebrtc/Source/webrtc/webkit_sdk/WebKit/WebKitDecoder.mm
    M 
Source/ThirdParty/libwebrtc/Source/webrtc/webkit_sdk/objc/base/RTCVideoDecoder.h
    M 
Source/ThirdParty/libwebrtc/Source/webrtc/webkit_sdk/objc/components/video_codec/RTCVideoDecoderH264.mm
    M 
Source/ThirdParty/libwebrtc/Source/webrtc/webkit_sdk/objc/components/video_codec/RTCVideoDecoderH265.mm
    M 
Source/ThirdParty/libwebrtc/Source/webrtc/webkit_sdk/objc/components/video_codec/RTCVideoDecoderVTBVP9.mm
    M 
Source/ThirdParty/libwebrtc/Source/webrtc/webkit_sdk/objc/native/src/objc_video_decoder_factory.mm
    M Source/WebCore/Modules/webcodecs/WebCodecsVideoDecoder.idl
    M Source/WebCore/platform/video-codecs/cocoa/RTCVideoDecoderVTBAV1.h
    M Source/WebCore/platform/video-codecs/cocoa/RTCVideoDecoderVTBAV1.mm
    M Source/WebCore/platform/video-codecs/cocoa/WebRTCVideoDecoder.h
    M Source/WebCore/testing/Internals.cpp
    M Source/WebCore/testing/Internals.h
    M Source/WebCore/testing/Internals.idl
    M Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.mm

  Log Message:
  -----------
  WebCodecs VideoDecoder should not have a pending activity in case of 
reordered frames
https://bugs.webkit.org/show_bug.cgi?id=279173
rdar://135328429

Reviewed by Jean-Yves Avenard.

In case of reordered frames, we submit A, B and C chunks.
A and B video frames will only be given to the decoder once C is decoded.
This means that if A and B are submitted but not C, the decoder callback of A 
and B would not be called.
This would disallow GCing the decoder until it gets stopped.

To improve this, we make it so that, in case of reordering, the libwebrtc 
decoder is calling the callback with a nil video frame.
This allows LibWebRTCCodecsProxy to be called and call the decoders's callback 
evne if no real video frame is given.

Covered by updated tests that use an Internal API to check whether a decoder 
has pending activity.

* LayoutTests/http/tests/webcodecs/h264-reordering.html:
* LayoutTests/http/tests/webcodecs/hevc-reordering.html:
* Source/ThirdParty/libwebrtc/Configurations/libwebrtc.exp:
* Source/ThirdParty/libwebrtc/Source/webrtc/webkit_sdk/WebKit/WebKitDecoder.h:
* Source/ThirdParty/libwebrtc/Source/webrtc/webkit_sdk/WebKit/WebKitDecoder.mm:
(-[WK_RTCLocalVideoH264H265VP9Decoder initH264DecoderWithCallback:]):
(-[WK_RTCLocalVideoH264H265VP9Decoder initH265DecoderWithCallback:]):
(-[WK_RTCLocalVideoH264H265VP9Decoder initVP9DecoderWithCallback:]):
* 
Source/ThirdParty/libwebrtc/Source/webrtc/webkit_sdk/objc/base/RTCVideoDecoder.h:
* 
Source/ThirdParty/libwebrtc/Source/webrtc/webkit_sdk/objc/components/video_codec/RTCVideoDecoderH264.mm:
(-[RTCVideoDecoderH264 flush]):
(-[RTCVideoDecoderH264 processFrame:reorderSize:]):
* 
Source/ThirdParty/libwebrtc/Source/webrtc/webkit_sdk/objc/components/video_codec/RTCVideoDecoderH265.mm:
(-[RTCVideoDecoderH265 flush]):
(-[RTCVideoDecoderH265 processFrame:reorderSize:]):
* 
Source/ThirdParty/libwebrtc/Source/webrtc/webkit_sdk/objc/components/video_codec/RTCVideoDecoderVTBVP9.mm:
(vp9DecompressionOutputCallback):
* 
Source/ThirdParty/libwebrtc/Source/webrtc/webkit_sdk/objc/native/src/objc_video_decoder_factory.mm:
* Source/WebCore/Modules/webcodecs/WebCodecsVideoDecoder.idl:
* Source/WebCore/platform/video-codecs/cocoa/RTCVideoDecoderVTBAV1.h:
* Source/WebCore/platform/video-codecs/cocoa/RTCVideoDecoderVTBAV1.mm:
(av1DecompressionOutputCallback):
* Source/WebCore/platform/video-codecs/cocoa/WebRTCVideoDecoder.h:
* Source/WebCore/testing/Internals.cpp:
(WebCore::Internals::hasPendingActivity const):
* Source/WebCore/testing/Internals.h:
* Source/WebCore/testing/Internals.idl:
* Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.mm:
(WebKit::LibWebRTCCodecsProxy::createDecoderCallback):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to