From ba9bf26f4b91087b5c69711d7746784f466aefa7 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Thu, 17 Mar 2016 23:47:48 +0530 Subject: [PATCH] libvisual: Factor out endian-order RGB formats MSVC seems to ignore preprocessor conditionals inside static pad templates. Also remove unnecessary quotes inside caps strings. --- ext/libvisual/visual.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ext/libvisual/visual.c b/ext/libvisual/visual.c index 926ac95..2ed94f0 100644 --- a/ext/libvisual/visual.c +++ b/ext/libvisual/visual.c @@ -30,16 +30,16 @@ GST_DEBUG_CATEGORY_EXTERN (libvisual_debug); /* amounf of samples before we can feed libvisual */ #define VISUAL_SAMPLES 512 -static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src", - GST_PAD_SRC, - GST_PAD_ALWAYS, - GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (" { " #if G_BYTE_ORDER == G_BIG_ENDIAN - "\"xRGB\", " "\"RGB\", " +#define RGB_ORDER_CAPS "xRGB, RGB" #else - "\"BGRx\", " "\"BGR\", " +#define RGB_ORDER_CAPS "BGRx, BGR" #endif - "\"RGB16\" } ")) + +static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src", + GST_PAD_SRC, + GST_PAD_ALWAYS, + GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (" { " RGB_ORDER_CAPS ", RGB16 } ")) ); static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink", -- 2.7.4