[webkit-changes] [WebKit/WebKit] ba826d: [GStreamer] Video frame converter uses the wrong g...

Carlos Garcia Campos noreply at github.com
Wed Feb 12 07:53:36 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ba826db2307bf3f96accb418889ee5bcf83aac78
      https://github.com/WebKit/WebKit/commit/ba826db2307bf3f96accb418889ee5bcf83aac78
  Author: Carlos Garcia Campos <cgarcia at igalia.com>
  Date:   2025-02-12 (Wed, 12 Feb 2025)

  Changed paths:
    M LayoutTests/platform/gtk/imported/w3c/web-platform-tests/webcodecs/videoFrame-canvasImageSource-expected.txt
    R LayoutTests/platform/wpe/media/media-source/media-source-paint-to-canvas-expected.txt
    M Source/WebCore/platform/graphics/gstreamer/GStreamerVideoFrameConverter.cpp
    M Source/WebCore/platform/graphics/gstreamer/GStreamerVideoFrameConverter.h
    M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
    M Source/WebCore/platform/graphics/gstreamer/VideoEncoderGStreamer.cpp

  Log Message:
  -----------
  [GStreamer] Video frame converter uses the wrong gl context
https://bugs.webkit.org/show_bug.cgi?id=287241

Reviewed by Philippe Normand.

For some reason the gl context set on the sink element is not propagated
to others, so set it in the pipeline instead. The converter also fails
if the decoder is producing gl memory ax external EOS texture, because
the gldownload element can't handle that. So, instead of downloaing and
then converting, we now convert using glcolorconvert and then download,
since glcolorconvert will produce a normal texture. But glcolorconvert
can't handle system memory, so we now use a different pipeline depending
on the input caps, using previous pipeline for system memory. This patch
also removes the sample download in videoFrameForCurrentTime() and
GStreamerInternalVideoEncoder::encode since that's already handled by
the converter later when needed. The pipeline is now also released when
not used after 30 seconds.

* LayoutTests/platform/gtk/imported/w3c/web-platform-tests/webcodecs/videoFrame-canvasImageSource-expected.txt:
* LayoutTests/platform/wpe/media/media-source/media-source-paint-to-canvas-expected.txt: Removed.
* Source/WebCore/platform/graphics/gstreamer/GStreamerVideoFrameConverter.cpp:
(WebCore::GStreamerVideoFrameConverter::Pipeline::Pipeline):
(WebCore::GStreamerVideoFrameConverter::Pipeline::run):
(WebCore::GStreamerVideoFrameConverter::singleton):
(WebCore::GStreamerVideoFrameConverter::GStreamerVideoFrameConverter):
(WebCore::GStreamerVideoFrameConverter::ensurePipeline):
(WebCore::GStreamerVideoFrameConverter::convert):
(WebCore::GStreamerVideoFrameConverter::releaseUnusedSystemMemoryPipelineTimerFired):
(WebCore::GStreamerVideoFrameConverter::releaseUnusedGLMemoryPipelineTimerFired):
(WebCore::GStreamerVideoFrameConverter::releaseUnusedDMABufMemoryPipelineTimerFired):
* Source/WebCore/platform/graphics/gstreamer/GStreamerVideoFrameConverter.h:
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::videoFrameForCurrentTime):
* Source/WebCore/platform/graphics/gstreamer/VideoEncoderGStreamer.cpp:
(WebCore::GStreamerInternalVideoEncoder::encode):

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