Skip to content
Permalink
Browse files
REGRESSION(r249428): [GStreamer] VP9 video rendered green
https://bugs.webkit.org/show_bug.cgi?id=201422
<rdar://problem/55945741>

Patch by Philippe Normand <philn@igalia.com> on 2019-10-30
Reviewed by Carlos Garcia Campos.

Enable the texture upload GStreamer meta code path. Until
GStreamer 1.16.2 this workaround is needed to fix VP9 (vp9dec)
rendering.

Original patch by: Chris Lord <clord@igalia.com>

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::createVideoSinkGL):

Canonical link: https://commits.webkit.org/216974@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251772 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
philn authored and webkit-commit-queue committed Oct 30, 2019
1 parent 66735bf commit 78bb3c507f818287031f6afb989e5764efeaa8ff
Showing with 30 additions and 1 deletion.
  1. +17 −0 Source/WebCore/ChangeLog
  2. +13 −1 Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp
@@ -1,3 +1,20 @@
2019-10-30 Philippe Normand <philn@igalia.com>

REGRESSION(r249428): [GStreamer] VP9 video rendered green
https://bugs.webkit.org/show_bug.cgi?id=201422
<rdar://problem/55945741>

Reviewed by Carlos Garcia Campos.

Enable the texture upload GStreamer meta code path. Until
GStreamer 1.16.2 this workaround is needed to fix VP9 (vp9dec)
rendering.

Original patch by: Chris Lord <clord@igalia.com>

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::createVideoSinkGL):

2019-10-30 Carlos Garcia Campos <cgarcia@igalia.com>

ImageDecoders: use a thread safe data buffer for Cairo backing store
@@ -1201,7 +1201,19 @@ GstElement* MediaPlayerPrivateGStreamerBase::createVideoSinkGL()
gst_bin_add_many(GST_BIN(videoSink), upload, colorconvert, appsink, nullptr);

GRefPtr<GstCaps> caps = adoptGRef(gst_caps_from_string("video/x-raw, format = (string) " GST_GL_CAPS_FORMAT));
gst_caps_set_features(caps.get(), 0, gst_caps_features_new(GST_CAPS_FEATURE_MEMORY_GL_MEMORY, nullptr));
GstCapsFeatures* features = gst_caps_features_new(GST_CAPS_FEATURE_MEMORY_GL_MEMORY, nullptr);

// Workaround until we can depend on GStreamer 1.16.2.
// https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/commit/8d32de090554cf29fe359f83aa46000ba658a693
// Adding the texture upload meta here allows glupload to add video meta to
// the buffers, without needing the patch above. However this specific caps
// feature is going to be removed from GStreamer so it is considered a
// short-term workaround.
// See also https://bugs.webkit.org/show_bug.cgi?id=201422
if (!webkitGstCheckVersion(1, 16, 2))
gst_caps_features_add(features, GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META);

gst_caps_set_features(caps.get(), 0, features);
g_object_set(appsink, "caps", caps.get(), nullptr);

result &= gst_element_link_many(upload, colorconvert, appsink, nullptr);

0 comments on commit 78bb3c5

Please sign in to comment.