[gtk/media-caps] media: Be more specific in our caps
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/media-caps] media: Be more specific in our caps
- Date: Tue, 5 Jan 2021 14:28:49 +0000 (UTC)
commit 532b8c71a81702ec336f7ff0a78f3679e83f1efb
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Jan 5 09:21:01 2021 -0500
media: Be more specific in our caps
We can only handle 2D textures, so tell gstreamer
about that.
modules/media/gtkgstsink.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/modules/media/gtkgstsink.c b/modules/media/gtkgstsink.c
index 43a83713e0..1fb6719ee4 100644
--- a/modules/media/gtkgstsink.c
+++ b/modules/media/gtkgstsink.c
@@ -49,13 +49,18 @@ GST_DEBUG_CATEGORY (gtk_debug_gst_sink);
#define FORMATS "{ BGRA, ARGB, RGBA, ABGR, RGB, BGR }"
#define NOGL_CAPS GST_VIDEO_CAPS_MAKE (FORMATS)
-#define GL_CAPS GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, "RGBA")
static GstStaticPadTemplate gtk_gst_sink_template =
GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
- GST_STATIC_CAPS (GL_CAPS "; " NOGL_CAPS)
+ GST_STATIC_CAPS ("video/x-raw(" GST_CAPS_FEATURE_MEMORY_GL_MEMORY "), "
+ "format = (string) RGBA, "
+ "width = " GST_VIDEO_SIZE_RANGE ", "
+ "height = " GST_VIDEO_SIZE_RANGE ", "
+ "framerate = " GST_VIDEO_FPS_RANGE ", "
+ "texture-target = (string) 2D"
+ "; " NOGL_CAPS)
);
G_DEFINE_TYPE_WITH_CODE (GtkGstSink, gtk_gst_sink,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]