From 5dac64b20adf8d41b060d6aa0b32ea7709efd3a2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Sat, 25 Dec 2010 16:44:03 +0000 Subject: [PATCH] tiger: move #if #else bits outside of macro Some compilers/preprocessors don't like if/else/endif preprocessor directives in the middle of macros. --- ext/kate/gstkatetiger.c | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/ext/kate/gstkatetiger.c b/ext/kate/gstkatetiger.c index 2869297..c6f1988 100644 --- a/ext/kate/gstkatetiger.c +++ b/ext/kate/gstkatetiger.c @@ -131,30 +131,26 @@ static GstStaticPadTemplate kate_sink_factory = GST_STATIC_CAPS ("subtitle/x-kate; application/x-kate") ); -static GstStaticPadTemplate video_sink_factory = - GST_STATIC_PAD_TEMPLATE ("video_sink", - GST_PAD_SINK, - GST_PAD_ALWAYS, #if G_BYTE_ORDER == G_LITTLE_ENDIAN - GST_STATIC_CAPS (GST_VIDEO_CAPS_xRGB ", endianness = (int) 1234" ";" - GST_VIDEO_CAPS_BGRx ", endianness = (int)4321") +#define TIGER_VIDEO_CAPS \ + GST_VIDEO_CAPS_xRGB ", endianness = (int)1234; " \ + GST_VIDEO_CAPS_BGRx ", endianness = (int)4321" #else - GST_STATIC_CAPS (GST_VIDEO_CAPS_xRGB ", endianness = (int) 4321" ";" - GST_VIDEO_CAPS_BGRx ", endianness = (int)1234") +#define TIGER_VIDEO_CAPS \ + GST_VIDEO_CAPS_BGRx ", endianness = (int)4321; " \ + GST_VIDEO_CAPS_xRGB ", endianness = (int)1234" #endif - ); + +static GstStaticPadTemplate video_sink_factory = +GST_STATIC_PAD_TEMPLATE ("video_sink", + GST_PAD_SINK, + GST_PAD_ALWAYS, + GST_STATIC_CAPS (TIGER_VIDEO_CAPS)); static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, -#if G_BYTE_ORDER == G_LITTLE_ENDIAN - GST_STATIC_CAPS (GST_VIDEO_CAPS_xRGB ", endianness = (int) 1234" ";" - GST_VIDEO_CAPS_BGRx ", endianness = (int)4321") -#else - GST_STATIC_CAPS (GST_VIDEO_CAPS_xRGB ", endianness = (int) 4321" ";" - GST_VIDEO_CAPS_BGRx ", endianness = (int)1234") -#endif - ); + GST_STATIC_CAPS (TIGER_VIDEO_CAPS)); GST_BOILERPLATE (GstKateTiger, gst_kate_tiger, GstElement, GST_TYPE_ELEMENT); -- 2.7.4