wpewebkit: add patch to fix video playback on the ccimx8x
The i.MX8X video decoder requires a specific NXP video converter, otherwise videos will appear with several glitches. This patch adds said plugin in the WPE webkit's internal gstreamer pipeline. https://jira.digi.com/browse/DEL-7311 https://jira.digi.com/browse/DEL-7339 Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
This commit is contained in:
parent
b13339839e
commit
3a3ca20ec2
|
|
@ -0,0 +1,42 @@
|
||||||
|
From: Gabriel Valcazar <gabriel.valcazar@digi.com>
|
||||||
|
Date: Wed, 21 Oct 2020 17:14:43 +0200
|
||||||
|
Subject: [PATCH] Use imxvideoconvert_g2d plugin in gstreamer pipeline
|
||||||
|
|
||||||
|
This element is necessary to view videos correctly on the i.MX8X
|
||||||
|
|
||||||
|
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
|
||||||
|
---
|
||||||
|
.../platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp | 8 +++++---
|
||||||
|
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp
|
||||||
|
index 8d8f3822..3e047ebb 100644
|
||||||
|
--- a/Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp
|
||||||
|
+++ b/Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp
|
||||||
|
@@ -93,11 +93,13 @@ static void webKitGLVideoSinkConstructed(GObject* object)
|
||||||
|
ASSERT(sink->priv->appSink);
|
||||||
|
g_object_set(sink->priv->appSink.get(), "enable-last-sample", FALSE, "emit-signals", TRUE, "max-buffers", 1, nullptr);
|
||||||
|
|
||||||
|
+ GstElement* imxconvert = gst_element_factory_make("imxvideoconvert_g2d", nullptr);
|
||||||
|
+ GstElement* queue = gst_element_factory_make("queue", nullptr);
|
||||||
|
GstElement* upload = gst_element_factory_make("glupload", nullptr);
|
||||||
|
GstElement* colorconvert = gst_element_factory_make("glcolorconvert", nullptr);
|
||||||
|
ASSERT(upload);
|
||||||
|
ASSERT(colorconvert);
|
||||||
|
- gst_bin_add_many(GST_BIN_CAST(sink), upload, colorconvert, sink->priv->appSink.get(), nullptr);
|
||||||
|
+ gst_bin_add_many(GST_BIN_CAST(sink), imxconvert, queue, upload, colorconvert, sink->priv->appSink.get(), nullptr);
|
||||||
|
|
||||||
|
// Workaround until we can depend on GStreamer 1.16.2.
|
||||||
|
// https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/commit/8d32de090554cf29fe359f83aa46000ba658a693
|
||||||
|
@@ -121,9 +123,9 @@ static void webKitGLVideoSinkConstructed(GObject* object)
|
||||||
|
gst_caps_set_features(caps.get(), 0, gst_caps_features_new(GST_CAPS_FEATURE_MEMORY_GL_MEMORY, nullptr));
|
||||||
|
g_object_set(sink->priv->appSink.get(), "caps", caps.get(), nullptr);
|
||||||
|
|
||||||
|
- gst_element_link_many(upload, colorconvert, sink->priv->appSink.get(), nullptr);
|
||||||
|
+ gst_element_link_many(imxconvert, queue, upload, colorconvert, sink->priv->appSink.get(), nullptr);
|
||||||
|
|
||||||
|
- GRefPtr<GstPad> pad = adoptGRef(gst_element_get_static_pad(upload, "sink"));
|
||||||
|
+ GRefPtr<GstPad> pad = adoptGRef(gst_element_get_static_pad(imxconvert, "sink"));
|
||||||
|
gst_element_add_pad(GST_ELEMENT_CAST(sink), gst_ghost_pad_new("sink", pad.get()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
# Copyright 2020, Digi International Inc.
|
||||||
|
|
||||||
|
FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
|
||||||
|
|
||||||
|
SRC_URI_append_ccimx8x = " file://0001-Use-imxvideoconvert_g2d-plugin-in-gstreamer-pipeline.patch"
|
||||||
Loading…
Reference in New Issue