From fbefd9c66623b3f6e967aa52c6de270dbd368011 Mon Sep 17 00:00:00 2001 From: Peter Kjellerstedt Date: Mon, 31 Aug 2009 18:10:11 +0200 Subject: [PATCH] effectv: Fix compilation with gcc 3 Recent changes in gst-plugins-good/gst/effectv prevents it from being compiled with gcc 3. The problem is that the new code uses preprocessor conditionals within a macro call which does not work with older versions of gcc. Fixes bug #593688. --- gst/effectv/gstaging.c | 22 ++++++++++------------ gst/effectv/gstedge.c | 22 ++++++++++------------ gst/effectv/gstop.c | 22 ++++++++++------------ gst/effectv/gstradioac.c | 18 ++++++++---------- gst/effectv/gstrev.c | 22 ++++++++++------------ gst/effectv/gstshagadelic.c | 18 ++++++++---------- gst/effectv/gstvertigo.c | 22 ++++++++++------------ 7 files changed, 66 insertions(+), 80 deletions(-) diff --git a/gst/effectv/gstaging.c b/gst/effectv/gstaging.c index 96c312f91c..5facd314be 100644 --- a/gst/effectv/gstaging.c +++ b/gst/effectv/gstaging.c @@ -68,26 +68,24 @@ enum #define DEFAULT_PITS TRUE #define DEFAULT_DUSTS TRUE +#if G_BYTE_ORDER == G_LITTLE_ENDIAN +#define CAPS_STR GST_VIDEO_CAPS_BGRx ";" GST_VIDEO_CAPS_RGBx +#else +#define CAPS_STR GST_VIDEO_CAPS_xRGB ";" GST_VIDEO_CAPS_xBGR +#endif + static GstStaticPadTemplate gst_agingtv_src_template = - GST_STATIC_PAD_TEMPLATE ("src", +GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, -#if G_BYTE_ORDER == G_LITTLE_ENDIAN - GST_STATIC_CAPS (GST_VIDEO_CAPS_BGRx ";" GST_VIDEO_CAPS_RGBx) -#else - GST_STATIC_CAPS (GST_VIDEO_CAPS_xRGB ";" GST_VIDEO_CAPS_xBGR) -#endif + GST_STATIC_CAPS (CAPS_STR) ); static GstStaticPadTemplate gst_agingtv_sink_template = - GST_STATIC_PAD_TEMPLATE ("sink", +GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, -#if G_BYTE_ORDER == G_LITTLE_ENDIAN - GST_STATIC_CAPS (GST_VIDEO_CAPS_BGRx ";" GST_VIDEO_CAPS_RGBx) -#else - GST_STATIC_CAPS (GST_VIDEO_CAPS_xRGB ";" GST_VIDEO_CAPS_xBGR) -#endif + GST_STATIC_CAPS (CAPS_STR) ); GST_BOILERPLATE (GstAgingTV, gst_agingtv, GstVideoFilter, diff --git a/gst/effectv/gstedge.c b/gst/effectv/gstedge.c index 15f440997c..00e46292cd 100644 --- a/gst/effectv/gstedge.c +++ b/gst/effectv/gstedge.c @@ -50,26 +50,24 @@ GST_BOILERPLATE (GstEdgeTV, gst_edgetv, GstVideoFilter, GST_TYPE_VIDEO_FILTER); +#if G_BYTE_ORDER == G_LITTLE_ENDIAN +#define CAPS_STR GST_VIDEO_CAPS_BGRx ";" GST_VIDEO_CAPS_RGBx +#else +#define CAPS_STR GST_VIDEO_CAPS_xBGR ";" GST_VIDEO_CAPS_xRGB +#endif + static GstStaticPadTemplate gst_edgetv_src_template = - GST_STATIC_PAD_TEMPLATE ("src", +GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, -#if G_BYTE_ORDER == G_LITTLE_ENDIAN - GST_STATIC_CAPS (GST_VIDEO_CAPS_BGRx ";" GST_VIDEO_CAPS_RGBx) -#else - GST_STATIC_CAPS (GST_VIDEO_CAPS_xBGR ";" GST_VIDEO_CAPS_xRGB) -#endif + GST_STATIC_CAPS (CAPS_STR) ); static GstStaticPadTemplate gst_edgetv_sink_template = - GST_STATIC_PAD_TEMPLATE ("sink", +GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, -#if G_BYTE_ORDER == G_LITTLE_ENDIAN - GST_STATIC_CAPS (GST_VIDEO_CAPS_BGRx ";" GST_VIDEO_CAPS_RGBx) -#else - GST_STATIC_CAPS (GST_VIDEO_CAPS_xBGR ";" GST_VIDEO_CAPS_xRGB) -#endif + GST_STATIC_CAPS (CAPS_STR) ); static gboolean diff --git a/gst/effectv/gstop.c b/gst/effectv/gstop.c index 465eb955b9..b371ba7642 100644 --- a/gst/effectv/gstop.c +++ b/gst/effectv/gstop.c @@ -97,26 +97,24 @@ static guint32 palette[256]; GST_BOILERPLATE (GstOpTV, gst_optv, GstVideoFilter, GST_TYPE_VIDEO_FILTER); +#if G_BYTE_ORDER == G_LITTLE_ENDIAN +#define CAPS_STR GST_VIDEO_CAPS_BGRx ";" GST_VIDEO_CAPS_RGBx +#else +#define CAPS_STR GST_VIDEO_CAPS_xBGR ";" GST_VIDEO_CAPS_xRGB +#endif + static GstStaticPadTemplate gst_optv_src_template = - GST_STATIC_PAD_TEMPLATE ("src", +GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, -#if G_BYTE_ORDER == G_LITTLE_ENDIAN - GST_STATIC_CAPS (GST_VIDEO_CAPS_BGRx "; " GST_VIDEO_CAPS_RGBx) -#else - GST_STATIC_CAPS (GST_VIDEO_CAPS_xBGR "; " GST_VIDEO_CAPS_xRGB) -#endif + GST_STATIC_CAPS (CAPS_STR) ); static GstStaticPadTemplate gst_optv_sink_template = - GST_STATIC_PAD_TEMPLATE ("sink", +GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, -#if G_BYTE_ORDER == G_LITTLE_ENDIAN - GST_STATIC_CAPS (GST_VIDEO_CAPS_BGRx "; " GST_VIDEO_CAPS_RGBx) -#else - GST_STATIC_CAPS (GST_VIDEO_CAPS_xBGR "; " GST_VIDEO_CAPS_xRGB) -#endif + GST_STATIC_CAPS (CAPS_STR) ); static void diff --git a/gst/effectv/gstradioac.c b/gst/effectv/gstradioac.c index 76bdb98c27..7d954a8574 100644 --- a/gst/effectv/gstradioac.c +++ b/gst/effectv/gstradioac.c @@ -138,26 +138,24 @@ static guint32 palettes[COLORS * PATTERN]; GST_BOILERPLATE (GstRadioacTV, gst_radioactv, GstVideoFilter, GST_TYPE_VIDEO_FILTER); +#if G_BYTE_ORDER == G_LITTLE_ENDIAN +#define CAPS_STR GST_VIDEO_CAPS_RGBx +#else +#define CAPS_STR GST_VIDEO_CAPS_xBGR +#endif + static GstStaticPadTemplate gst_radioactv_src_template = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, -#if G_BYTE_ORDER == G_LITTLE_ENDIAN - GST_STATIC_CAPS (GST_VIDEO_CAPS_RGBx) -#else - GST_STATIC_CAPS (GST_VIDEO_CAPS_xBGR) -#endif + GST_STATIC_CAPS (CAPS_STR) ); static GstStaticPadTemplate gst_radioactv_sink_template = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, -#if G_BYTE_ORDER == G_LITTLE_ENDIAN - GST_STATIC_CAPS (GST_VIDEO_CAPS_RGBx) -#else - GST_STATIC_CAPS (GST_VIDEO_CAPS_xBGR) -#endif + GST_STATIC_CAPS (CAPS_STR) ); static void diff --git a/gst/effectv/gstrev.c b/gst/effectv/gstrev.c index ca7945cd36..bd0bd9ae33 100644 --- a/gst/effectv/gstrev.c +++ b/gst/effectv/gstrev.c @@ -78,26 +78,24 @@ enum GST_BOILERPLATE (GstRevTV, gst_revtv, GstVideoFilter, GST_TYPE_VIDEO_FILTER); +#if G_BYTE_ORDER == G_LITTLE_ENDIAN +#define CAPS_STR GST_VIDEO_CAPS_BGRx ";" GST_VIDEO_CAPS_RGBx +#else +#define CAPS_STR GST_VIDEO_CAPS_xBGR ";" GST_VIDEO_CAPS_xRGB +#endif + static GstStaticPadTemplate gst_revtv_src_template = - GST_STATIC_PAD_TEMPLATE ("src", +GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, -#if G_BYTE_ORDER == G_LITTLE_ENDIAN - GST_STATIC_CAPS (GST_VIDEO_CAPS_BGRx ";" GST_VIDEO_CAPS_RGBx) -#else - GST_STATIC_CAPS (GST_VIDEO_CAPS_xBGR ";" GST_VIDEO_CAPS_xRGB) -#endif + GST_STATIC_CAPS (CAPS_STR) ); static GstStaticPadTemplate gst_revtv_sink_template = - GST_STATIC_PAD_TEMPLATE ("sink", +GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, -#if G_BYTE_ORDER == G_LITTLE_ENDIAN - GST_STATIC_CAPS (GST_VIDEO_CAPS_BGRx ";" GST_VIDEO_CAPS_RGBx) -#else - GST_STATIC_CAPS (GST_VIDEO_CAPS_xBGR ";" GST_VIDEO_CAPS_xRGB) -#endif + GST_STATIC_CAPS (CAPS_STR) ); static gboolean diff --git a/gst/effectv/gstshagadelic.c b/gst/effectv/gstshagadelic.c index 661df6baf6..008da64255 100644 --- a/gst/effectv/gstshagadelic.c +++ b/gst/effectv/gstshagadelic.c @@ -56,26 +56,24 @@ GST_BOILERPLATE (GstShagadelicTV, gst_shagadelictv, GstVideoFilter, static void gst_shagadelic_initialize (GstShagadelicTV * filter); +#if G_BYTE_ORDER == G_LITTLE_ENDIAN +#define CAPS_STR GST_VIDEO_CAPS_BGRx +#else +#define CAPS_STR GST_VIDEO_CAPS_xRGB +#endif + static GstStaticPadTemplate gst_shagadelictv_src_template = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, -#if G_BYTE_ORDER == G_LITTLE_ENDIAN - GST_STATIC_CAPS (GST_VIDEO_CAPS_BGRx) -#else - GST_STATIC_CAPS (GST_VIDEO_CAPS_xRGB) -#endif + GST_STATIC_CAPS (CAPS_STR) ); static GstStaticPadTemplate gst_shagadelictv_sink_template = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, -#if G_BYTE_ORDER == G_LITTLE_ENDIAN - GST_STATIC_CAPS (GST_VIDEO_CAPS_BGRx) -#else - GST_STATIC_CAPS (GST_VIDEO_CAPS_xRGB) -#endif + GST_STATIC_CAPS (CAPS_STR) ); static gboolean diff --git a/gst/effectv/gstvertigo.c b/gst/effectv/gstvertigo.c index 2ddce9a809..40620a5c04 100644 --- a/gst/effectv/gstvertigo.c +++ b/gst/effectv/gstvertigo.c @@ -56,26 +56,24 @@ enum PROP_ZOOM_SPEED }; +#if G_BYTE_ORDER == G_LITTLE_ENDIAN +#define CAPS_STR GST_VIDEO_CAPS_RGBx ";" GST_VIDEO_CAPS_BGRx +#else +#define CAPS_STR GST_VIDEO_CAPS_xRGB ";" GST_VIDEO_CAPS_xBGR +#endif + static GstStaticPadTemplate gst_vertigotv_src_template = - GST_STATIC_PAD_TEMPLATE ("src", +GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, -#if G_BYTE_ORDER == G_LITTLE_ENDIAN - GST_STATIC_CAPS (GST_VIDEO_CAPS_RGBx ";" GST_VIDEO_CAPS_BGRx) -#else - GST_STATIC_CAPS (GST_VIDEO_CAPS_xRGB ";" GST_VIDEO_CAPS_xBGR) -#endif + GST_STATIC_CAPS (CAPS_STR) ); static GstStaticPadTemplate gst_vertigotv_sink_template = - GST_STATIC_PAD_TEMPLATE ("sink", +GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, -#if G_BYTE_ORDER == G_LITTLE_ENDIAN - GST_STATIC_CAPS (GST_VIDEO_CAPS_RGBx ";" GST_VIDEO_CAPS_BGRx) -#else - GST_STATIC_CAPS (GST_VIDEO_CAPS_xRGB ";" GST_VIDEO_CAPS_xBGR) -#endif + GST_STATIC_CAPS (CAPS_STR) ); static gboolean