From 3fdfd54b023b1eedd85adf3d16e5667311b49b2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 12 Mar 2020 15:16:44 +0200 Subject: [PATCH] gdkpixbufoverlay: Use GST_VIDEO_OVERLAY_COMPOSITION_BLEND_FORMATS for the supported formats We don't do any blending by ourselves since a while now. Note that this is a regression in "supported" formats: previously ARGB64 was supported, for example, but in practice it caused blending to not take place at all. --- ext/gdk_pixbuf/gstgdkpixbufoverlay.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/ext/gdk_pixbuf/gstgdkpixbufoverlay.c b/ext/gdk_pixbuf/gstgdkpixbufoverlay.c index 8981d9603b..98b2f7fb76 100644 --- a/ext/gdk_pixbuf/gstgdkpixbufoverlay.c +++ b/ext/gdk_pixbuf/gstgdkpixbufoverlay.c @@ -93,13 +93,6 @@ enum PROP_ALPHA }; -#define VIDEO_FORMATS "{ RGBx, RGB, BGR, BGRx, xRGB, xBGR, " \ - "RGBA, BGRA, ARGB, ABGR, I420, YV12, AYUV, YUY2, UYVY, " \ - "v308, v210, v216, Y41B, Y42B, Y444, YVYU, NV12, NV21, UYVP, " \ - "RGB16, BGR16, RGB15, BGR15, UYVP, A420, YUV9, YVU9, " \ - "IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, " \ - "GRAY8, GRAY16_BE, GRAY16_LE }" - /* FIXME 2.0: change to absolute positioning */ #define DEFAULT_POSITIONING_MODE \ GST_GDK_PIXBUF_POSITIONING_PIXELS_RELATIVE_TO_EDGES @@ -107,13 +100,15 @@ enum static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (VIDEO_FORMATS)) + GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE + (GST_VIDEO_OVERLAY_COMPOSITION_BLEND_FORMATS)) ); static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, - GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (VIDEO_FORMATS)) + GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE + (GST_VIDEO_OVERLAY_COMPOSITION_BLEND_FORMATS)) ); G_DEFINE_TYPE (GstGdkPixbufOverlay, gst_gdk_pixbuf_overlay,