From ede0635d45342f6e06aa213350ce006c2dcb6628 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Mon, 31 Jan 2011 13:44:45 +0000 Subject: [PATCH] deinterlace: simplify template caps We can merge all the YUV variants into one single structure. --- gst/deinterlace/gstdeinterlace.c | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/gst/deinterlace/gstdeinterlace.c b/gst/deinterlace/gstdeinterlace.c index 1ad960e87d..300f23e7fd 100644 --- a/gst/deinterlace/gstdeinterlace.c +++ b/gst/deinterlace/gstdeinterlace.c @@ -160,34 +160,24 @@ gst_deinterlace_modes_get_type (void) return deinterlace_modes_type; } +#define DEINTERLACE_CAPS \ + GST_VIDEO_CAPS_YUV ("{ AYUV, Y444, YUY2, YVYU, UYVY, Y42B, I420, YV12, Y41B }") ";" \ + GST_VIDEO_CAPS_ARGB ";" GST_VIDEO_CAPS_ABGR ";" \ + GST_VIDEO_CAPS_RGBA ";" GST_VIDEO_CAPS_BGRA ";" \ + GST_VIDEO_CAPS_xRGB ";" GST_VIDEO_CAPS_xBGR ";" \ + GST_VIDEO_CAPS_RGBx ";" GST_VIDEO_CAPS_BGRx ";" \ + GST_VIDEO_CAPS_RGB ";" GST_VIDEO_CAPS_BGR + static GstStaticPadTemplate src_templ = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, - GST_STATIC_CAPS (GST_VIDEO_CAPS_YUV ("AYUV") ";" GST_VIDEO_CAPS_YUV ("Y444") - ";" GST_VIDEO_CAPS_YUV ("YUY2") ";" GST_VIDEO_CAPS_YUV ("YVYU") ";" - GST_VIDEO_CAPS_YUV ("UYVY") ";" - GST_VIDEO_CAPS_YUV ("Y42B") ";" GST_VIDEO_CAPS_YUV ("I420") ";" - GST_VIDEO_CAPS_YUV ("YV12") ";" GST_VIDEO_CAPS_YUV ("Y41B") ";" - GST_VIDEO_CAPS_ARGB ";" GST_VIDEO_CAPS_ABGR ";" - GST_VIDEO_CAPS_RGBA ";" GST_VIDEO_CAPS_BGRA ";" - GST_VIDEO_CAPS_xRGB ";" GST_VIDEO_CAPS_xBGR ";" - GST_VIDEO_CAPS_RGBx ";" GST_VIDEO_CAPS_BGRx ";" - GST_VIDEO_CAPS_RGB ";" GST_VIDEO_CAPS_BGR) + GST_STATIC_CAPS (DEINTERLACE_CAPS) ); static GstStaticPadTemplate sink_templ = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_STATIC_CAPS (GST_VIDEO_CAPS_YUV ("AYUV") ";" GST_VIDEO_CAPS_YUV ("Y444") - ";" GST_VIDEO_CAPS_YUV ("YUY2") ";" GST_VIDEO_CAPS_YUV ("YVYU") ";" - GST_VIDEO_CAPS_YUV ("UYVY") ";" - GST_VIDEO_CAPS_YUV ("Y42B") ";" GST_VIDEO_CAPS_YUV ("I420") ";" - GST_VIDEO_CAPS_YUV ("YV12") ";" GST_VIDEO_CAPS_YUV ("Y41B") ";" - GST_VIDEO_CAPS_ARGB ";" GST_VIDEO_CAPS_ABGR ";" - GST_VIDEO_CAPS_RGBA ";" GST_VIDEO_CAPS_BGRA ";" - GST_VIDEO_CAPS_xRGB ";" GST_VIDEO_CAPS_xBGR ";" - GST_VIDEO_CAPS_RGBx ";" GST_VIDEO_CAPS_BGRx ";" - GST_VIDEO_CAPS_RGB ";" GST_VIDEO_CAPS_BGR) + GST_STATIC_CAPS (DEINTERLACE_CAPS) ); static void gst_deinterlace_finalize (GObject * self);