[webkit-changes] [WebKit/WebKit] 5813c1: [GStreamer][WPE] Replace platform ifdefs with runt...

Philippe Normand noreply at github.com
Thu Mar 14 02:33:27 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5813c1e253b04bd1912f1729bc4cf7eae4efa3b1
      https://github.com/WebKit/WebKit/commit/5813c1e253b04bd1912f1729bc4cf7eae4efa3b1
  Author: Philippe Normand <philn at igalia.com>
  Date:   2024-03-14 (Thu, 14 Mar 2024)

  Changed paths:
    A LayoutTests/platform/wpe/media/video-punch-hole-expected.txt
    A LayoutTests/platform/wpe/media/video-punch-hole.html
    M Source/WebCore/html/HTMLVideoElement.h
    M Source/WebCore/platform/SourcesGStreamer.txt
    M Source/WebCore/platform/audio/gstreamer/AudioDestinationGStreamer.cpp
    M Source/WebCore/platform/audio/gstreamer/AudioFileReaderGStreamer.cpp
    M Source/WebCore/platform/graphics/MediaPlayer.cpp
    M Source/WebCore/platform/graphics/MediaPlayer.h
    M Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp
    M Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp
    M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
    M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h
    A Source/WebCore/platform/gstreamer/GStreamerHolePunchQuirkBcmNexus.cpp
    A Source/WebCore/platform/gstreamer/GStreamerHolePunchQuirkBcmNexus.h
    A Source/WebCore/platform/gstreamer/GStreamerHolePunchQuirkFake.h
    A Source/WebCore/platform/gstreamer/GStreamerHolePunchQuirkWesteros.cpp
    A Source/WebCore/platform/gstreamer/GStreamerHolePunchQuirkWesteros.h
    A Source/WebCore/platform/gstreamer/GStreamerQuirkAmLogic.cpp
    A Source/WebCore/platform/gstreamer/GStreamerQuirkAmLogic.h
    A Source/WebCore/platform/gstreamer/GStreamerQuirkBcmNexus.cpp
    A Source/WebCore/platform/gstreamer/GStreamerQuirkBcmNexus.h
    A Source/WebCore/platform/gstreamer/GStreamerQuirkBroadcom.cpp
    A Source/WebCore/platform/gstreamer/GStreamerQuirkBroadcom.h
    A Source/WebCore/platform/gstreamer/GStreamerQuirkRealtek.cpp
    A Source/WebCore/platform/gstreamer/GStreamerQuirkRealtek.h
    A Source/WebCore/platform/gstreamer/GStreamerQuirkWesteros.cpp
    A Source/WebCore/platform/gstreamer/GStreamerQuirkWesteros.h
    A Source/WebCore/platform/gstreamer/GStreamerQuirks.cpp
    A Source/WebCore/platform/gstreamer/GStreamerQuirks.h
    M Source/WebCore/testing/Internals.cpp
    M Source/WebCore/testing/Internals.h
    M Source/WebCore/testing/Internals.idl
    M Source/cmake/OptionsWPE.cmake
    M Tools/Scripts/webkitpy/port/glib.py

  Log Message:
  -----------
  [GStreamer][WPE] Replace platform ifdefs with runtime quirks
https://bugs.webkit.org/show_bug.cgi?id=269287

Reviewed by Xabier Rodriguez-Calvar.

Compile-time quirks prevent re-usability of the same binaries across different platforms (using
containers). The proposed solution is to always compile those, they don't depend on any specific
APIs so that shouldn't be an issue. Then at runtime quirks can be tweaked using the
WEBKIT_GST_QUIRKS and WEBKIT_GST_HOLE_PUNCH environment variables.

* Source/WebCore/platform/SourcesGStreamer.txt:
* Source/WebCore/platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
(WebCore::AudioDestinationGStreamer::AudioDestinationGStreamer):
* Source/WebCore/platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
(WebCore::decodebinAutoplugSelectCallback):
(WebCore::AudioFileReader::~AudioFileReader):
(WebCore::AudioFileReader::decodeAudioForBusCreation):
* Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp:
(WebCore::ensureGStreamerInitialized):
(WebCore::registerWebKitGStreamerElements):
* Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
(WebCore::GStreamerRegistryScanner::ElementFactories::ElementFactories):
(WebCore::GStreamerRegistryScanner::ElementFactories::hasElementForCaps const):
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
(WebCore::setSyncOnClock):
(WebCore::MediaPlayerPrivateGStreamer::createAudioSink):
(WebCore::MediaPlayerPrivateGStreamer::gstreamerPositionFromSinks const):
(WebCore::MediaPlayerPrivateGStreamer::naturalSize const):
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
(WebCore::MediaPlayerPrivateGStreamer::configureElement):
(WebCore::MediaPlayerPrivateGStreamer::configureElementPlatformQuirks):
(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
(WebCore::MediaPlayerPrivateGStreamer::swapBuffersIfNeeded):
(WebCore::setRectangleToVideoSink):
(WebCore::MediaPlayerPrivateGStreamer::isHolePunchRenderingEnabled const):
(WebCore::MediaPlayerPrivateGStreamer::createHolePunchVideoSink):
(WebCore::MediaPlayerPrivateGStreamer::shouldIgnoreIntrinsicSize):
(WebCore::MediaPlayerPrivateGStreamer::createVideoSink):
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
* Source/WebCore/platform/gstreamer/GStreamerHolePunchQuirkBcmNexus.cpp: Added.
(WebCore::GStreamerHolePunchQuirkBcmNexus::setHolePunchVideoRectangle):
* Source/WebCore/platform/gstreamer/GStreamerHolePunchQuirkBcmNexus.h: Added.
* Source/WebCore/platform/gstreamer/GStreamerHolePunchQuirkWesteros.cpp: Added.
(WebCore::GStreamerHolePunchQuirkWesteros::createHolePunchVideoSink):
(WebCore::GStreamerHolePunchQuirkWesteros::setHolePunchVideoRectangle):
* Source/WebCore/platform/gstreamer/GStreamerHolePunchQuirkWesteros.h: Added.
* Source/WebCore/platform/gstreamer/GStreamerQuirkAmLogic.cpp: Added.
(WebCore::GStreamerQuirkAmLogic::GStreamerQuirkAmLogic):
(WebCore::GStreamerQuirkAmLogic::createWebAudioSink):
(WebCore::GStreamerQuirkAmLogic::configureElement):
* Source/WebCore/platform/gstreamer/GStreamerQuirkAmLogic.h: Added.
* Source/WebCore/platform/gstreamer/GStreamerQuirkBcmNexus.cpp: Added.
(WebCore::GStreamerQuirkBcmNexus::GStreamerQuirkBcmNexus):
(WebCore::GStreamerQuirkBcmNexus::isHardwareAccelerated):
* Source/WebCore/platform/gstreamer/GStreamerQuirkBcmNexus.h: Added.
* Source/WebCore/platform/gstreamer/GStreamerQuirkBroadcom.cpp: Added.
(WebCore::GStreamerQuirkBroadcom::GStreamerQuirkBroadcom):
(WebCore::GStreamerQuirkBroadcom::configureElement):
(WebCore::GStreamerQuirkBroadcom::isHardwareAccelerated):
* Source/WebCore/platform/gstreamer/GStreamerQuirkBroadcom.h: Added.
* Source/WebCore/platform/gstreamer/GStreamerQuirkRealtek.cpp: Added.
(WebCore::GStreamerQuirkRealtek::GStreamerQuirkRealtek):
(WebCore::GStreamerQuirkRealtek::createWebAudioSink):
(WebCore::GStreamerQuirkRealtek::configureElement):
(WebCore::GStreamerQuirkRealtek::isHardwareAccelerated):
* Source/WebCore/platform/gstreamer/GStreamerQuirkRealtek.h: Added.
* Source/WebCore/platform/gstreamer/GStreamerQuirkWesteros.cpp: Added.
(WebCore::GStreamerQuirkWesteros::GStreamerQuirkWesteros):
(WebCore::GStreamerQuirkWesteros::configureElement):
(WebCore::GStreamerQuirkWesteros::isHardwareAccelerated):
* Source/WebCore/platform/gstreamer/GStreamerQuirkWesteros.h: Added.
* Source/WebCore/platform/gstreamer/GStreamerQuirks.cpp: Added.
(WebCore::GStreamerQuirksManager::singleton):
(WebCore::GStreamerQuirksManager::GStreamerQuirksManager):
(WebCore::GStreamerQuirksManager::isEnabled const):
(WebCore::GStreamerQuirksManager::createWebAudioSink):
(WebCore::GStreamerQuirksManager::createHolePunchVideoSink):
(WebCore::GStreamerQuirksManager::setHolePunchVideoRectangle):
(WebCore::GStreamerQuirksManager::configureElement):
(WebCore::GStreamerQuirksManager::isHardwareAccelerated const):
(WebCore::GStreamerQuirksManager::supportsVideoHolePunchRendering const):
(WebCore::GStreamerQuirksManager::audioVideoDecoderFactoryListType const):
(WebCore::GStreamerQuirksManager::disallowedWebAudioDecoders const):
* Source/WebCore/platform/gstreamer/GStreamerQuirks.h: Added.
(WebCore::GStreamerQuirk::isPlatformSupported const):
(WebCore::GStreamerQuirk::createWebAudioSink):
(WebCore::GStreamerQuirk::configureElement):
(WebCore::GStreamerQuirk::isHardwareAccelerated):
(WebCore::GStreamerQuirk::audioVideoDecoderFactoryListType const):
(WebCore::GStreamerQuirk::disallowedWebAudioDecoders const):
(WebCore::GStreamerHolePunchQuirk::createHolePunchVideoSink):
(WebCore::GStreamerHolePunchQuirk::setHolePunchVideoRectangle):
* Source/cmake/OptionsWPE.cmake:

Canonical link: https://commits.webkit.org/276080@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