[Webkit-unassigned] [Bug 252581] [GStreamer][VP9] HFR Youtube playback stutters with vavp9dec
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Feb 21 10:39:47 PST 2023
https://bugs.webkit.org/show_bug.cgi?id=252581
--- Comment #10 from Philippe Normand <philn at igalia.com> ---
Naive patch for using the new API:
diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
index 364c699ca072..cfeaf295f7b8 100644
--- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
+++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
@@ -129,6 +129,7 @@
#include "TextureMapperPlatformLayerProxyDMABuf.h"
#include <gbm.h>
#include <gst/allocators/gstdmabuf.h>
+#include <gst/video/video-info-dma.h>
#endif // USE(TEXTURE_MAPPER_DMABUF)
#if USE(WPE_VIDEO_PLANE_DISPLAY_DMABUF)
@@ -2856,6 +2857,9 @@ void MediaPlayerPrivateGStreamer::createGSTPlayBin(const URL& url)
g_object_set(m_pipeline.get(), "audio-sink", m_audioSink.get(), "video-sink", createVideoSink(), nullptr);
+ auto* filter = makeGStreamerElement("vapostproc", nullptr);
+ //g_object_set(m_pipeline.get(), "video-filter", filter, nullptr);
+
if (m_shouldPreservePitch && !isMediaStream) {
if (auto* scale = makeGStreamerElement("scaletempo", nullptr))
g_object_set(m_pipeline.get(), "audio-filter", scale, nullptr);
@@ -3219,6 +3223,13 @@ void MediaPlayerPrivateGStreamer::pushDMABufToCompositor()
if (!proxy.isActive())
return;
+ GstVideoInfoDmaDrm dmaDrmInfo;
+ uint64_t modifier = 0;
+ if (gst_video_info_dma_drm_from_caps(&dmaDrmInfo, caps)) {
+ modifier = dmaDrmInfo.drm_modifier;
+ }
+ gst_printerrln("Modifier: %" G_GUINT64_FORMAT, modifier);
+
// Provide the DMABufObject with a relevant handle (memory address). When provided for the first time,
// the lambda will be invoked and all dmabuf data is filled in.
downcast<TextureMapperPlatformLayerProxyDMABuf>(proxy).pushDMABuf(
@@ -3256,7 +3267,7 @@ void MediaPlayerPrivateGStreamer::pushDMABufToCompositor()
gst_video_format_info_component(videoInfo.finfo, i, comp);
object.offset[i] = offset;
object.stride[i] = GST_VIDEO_INFO_PLANE_STRIDE(&videoInfo, i);
- object.modifier[i] = 0;
+ object.modifier[i] = modifier;
}
return WTFMove(object);
});
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230221/9df8982f/attachment-0001.htm>
More information about the webkit-unassigned
mailing list