[webkit-changes] [WebKit/WebKit] 07f75c: Cherry-pick 285195 at main (f364dfc9eccc). https://bu...

Jean-Yves Avenard noreply at github.com
Wed Oct 16 05:21:24 PDT 2024


  Branch: refs/heads/webkitglib/2.46
  Home:   https://github.com/WebKit/WebKit
  Commit: 07f75cbf849e7b377208b86e6e1eb9767d82e22c
      https://github.com/WebKit/WebKit/commit/07f75cbf849e7b377208b86e6e1eb9767d82e22c
  Author: Olivier Blin <olivier.blin at softathome.com>
  Date:   2024-10-16 (Wed, 16 Oct 2024)

  Changed paths:
    M Source/WebCore/platform/gstreamer/VideoEncoderPrivateGStreamer.cpp
    M Source/WebCore/platform/gstreamer/VideoEncoderPrivateGStreamer.h

  Log Message:
  -----------
  Cherry-pick 285195 at main (f364dfc9eccc). https://bugs.webkit.org/show_bug.cgi?id=281487

    [GStreamer] Fix VideoEncoderPrivateGStreamer build without WebCodecs
    https://bugs.webkit.org/show_bug.cgi?id=281487

    Reviewed by Philippe Normand.

    VideoEncoderPrivateGStreamer.h included VideoEncoder.h for the ScalabilityMode
    enum, but this is only available when WEB_CODECS is enabled.

    To be able to use VideoEncoderPrivateGStreamer for MediaRecorder and MediaStream
    when WebCodecs is disabled, use VideoEncoderScalabilityMode.h instead.

    * Source/WebCore/platform/gstreamer/VideoEncoderPrivateGStreamer.cpp:
    (webkit_video_encoder_class_init):
    * Source/WebCore/platform/gstreamer/VideoEncoderPrivateGStreamer.h:
    (WebKitVideoEncoderBitRateAllocation::create):
    (WebKitVideoEncoderBitRateAllocation::scalabilityMode const):
    (WebKitVideoEncoderBitRateAllocation::WebKitVideoEncoderBitRateAllocation):

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

Canonical link: https://commits.webkit.org/282416.216@webkitglib/2.46


  Commit: 109f29bf761b89371942363f0a206faebd9ba644
      https://github.com/WebKit/WebKit/commit/109f29bf761b89371942363f0a206faebd9ba644
  Author: Jean-Yves Avenard <jya at apple.com>
  Date:   2024-10-16 (Wed, 16 Oct 2024)

  Changed paths:
    M Source/WebCore/Modules/mediasource/MediaSource.cpp
    M Source/WebCore/Modules/mediasource/MediaSource.h
    M Source/WebCore/Modules/mediasource/MediaSourceInterfaceMainThread.cpp
    M Source/WebCore/Modules/mediasource/MediaSourceInterfaceMainThread.h
    M Source/WebCore/Modules/mediasource/MediaSourceInterfaceProxy.h
    M Source/WebCore/Modules/mediasource/MediaSourceInterfaceWorker.cpp
    M Source/WebCore/Modules/mediasource/MediaSourceInterfaceWorker.h
    M Source/WebCore/html/HTMLMediaElement.cpp

  Log Message:
  -----------
  Cherry-pick 285110 at main (9a18e435893e). https://bugs.webkit.org/show_bug.cgi?id=278659

    [ Sonoma Debug arm64]: ASSERTION FAILED: m_clients.contains(client) in imported/w3c/web-platform-tests/media-source/URL-createObjectURL-null.html
    https://bugs.webkit.org/show_bug.cgi?id=278659
    rdar://134709579

    Reviewed by Youenn Fablet.

    This has been a long standing issue.
    When the HTMLMediaElement was being destructed, it would call MediaSource::detachElement.
    MediaSource::detachElement then goes through the official steps of detaching
    all source buffers, which then detach the various tracks from the media element.
    However, by that time the HTMLMediaElement is already mid-destruction. Its tracks
    have already been detached.
    Attempting to detach the tracks again would cause the assertion.

    To disambiguate between when the MediaSource is being detached from the element
    when the src/srcObject are being cleared from when the HTMLMediaElement is being
    destructed, we add a new MediaSource::elementIsShuttingDown method which will
    clear the MediaSource's link to the HTMLMediaElement. This will stop the MediaSource
    from making re-entrant call into the media element while it's being destroyed.

    Covered by existing tests.

    * LayoutTests/platform/mac-wk2/TestExpectations:
    * Source/WebCore/Modules/mediasource/MediaSource.cpp:
    (WebCore::MediaSource::elementIsShuttingDown):
    * Source/WebCore/Modules/mediasource/MediaSource.h:
    * Source/WebCore/Modules/mediasource/MediaSourceInterfaceMainThread.cpp:
    (WebCore::MediaSourceInterfaceMainThread::elementIsShuttingDown):
    * Source/WebCore/Modules/mediasource/MediaSourceInterfaceMainThread.h:
    * Source/WebCore/Modules/mediasource/MediaSourceInterfaceProxy.h:
    * Source/WebCore/Modules/mediasource/MediaSourceInterfaceWorker.cpp:
    (WebCore::MediaSourceInterfaceWorker::elementIsShuttingDown):
    * Source/WebCore/Modules/mediasource/MediaSourceInterfaceWorker.h:
    * Source/WebCore/html/HTMLMediaElement.cpp:
    (WebCore::HTMLMediaElement::~HTMLMediaElement):

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

Canonical link: https://commits.webkit.org/282416.217@webkitglib/2.46


Compare: https://github.com/WebKit/WebKit/compare/86c3aae5dba6...109f29bf761b

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