summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2023-12-11 10:49:39 +0100
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2023-12-11 13:17:48 +0100
commit4f27b50c2e85a48f076d9f89c44d5d5992cc022e (patch)
treec62315218450ef25e685ff1de38931cc5341f684
parentfac9fb2174526c6d7233aad95fbe1e7428375098 (diff)
gtkglsink: template caps to only 2D & rectangle texture targets
Apparently external-oes is not supported by the plugin as texture target, while DMABuf uploading prefers it because it's zero copy. This patch enables DMABuf uploading and rendering by using either 2D or rectangle texture targets. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5795>
-rw-r--r--subprojects/gst-plugins-good/docs/gst_plugins_cache.json2
-rw-r--r--subprojects/gst-plugins-good/ext/gtk/gstgtkglsink.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/subprojects/gst-plugins-good/docs/gst_plugins_cache.json b/subprojects/gst-plugins-good/docs/gst_plugins_cache.json
index efd2772377..c68c3f2b39 100644
--- a/subprojects/gst-plugins-good/docs/gst_plugins_cache.json
+++ b/subprojects/gst-plugins-good/docs/gst_plugins_cache.json
@@ -7766,7 +7766,7 @@
"long-name": "Gtk GL Video Sink",
"pad-templates": {
"sink": {
- "caps": "video/x-raw(memory:GLMemory):\n format: RGBA\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n\nvideo/x-raw(memory:GLMemory, meta:GstVideoOverlayComposition):\n format: RGBA\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n",
+ "caps": "video/x-raw(memory:GLMemory):\n format: RGBA\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n texture-target: { (string)2D, (string)rectangle }\n\nvideo/x-raw(memory:GLMemory, meta:GstVideoOverlayComposition):\n format: RGBA\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n texture-target: { (string)2D, (string)rectangle }\n",
"direction": "sink",
"presence": "always"
}
diff --git a/subprojects/gst-plugins-good/ext/gtk/gstgtkglsink.c b/subprojects/gst-plugins-good/ext/gtk/gstgtkglsink.c
index 8c6605359a..c8511a3733 100644
--- a/subprojects/gst-plugins-good/ext/gtk/gstgtkglsink.c
+++ b/subprojects/gst-plugins-good/ext/gtk/gstgtkglsink.c
@@ -57,10 +57,12 @@ static GstStaticPadTemplate gst_gtk_gl_sink_template =
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES
- (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, "RGBA") "; "
+ (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, "RGBA")
+ ", texture-target = { 2D, rectangle }; "
GST_VIDEO_CAPS_MAKE_WITH_FEATURES
(GST_CAPS_FEATURE_MEMORY_GL_MEMORY ", "
- GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION, "RGBA")));
+ GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION, "RGBA")
+ ", texture-target = { 2D, rectangle }"));
#define gst_gtk_gl_sink_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstGtkGLSink, gst_gtk_gl_sink,