[MOVED FROM BAD 48/68] colorspace: fix build with current git of gst-plugins-base
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Tue, 2 Nov 2010 16:54:59 +0000 (16:54 +0000)
committerWim Taymans <wim.taymans@collabora.co.uk>
Wed, 15 Jun 2011 14:12:55 +0000 (16:12 +0200)
ifdef tests don't work so well if we define them in the code
above in case they aren't defined.

gst/colorspace/gstcolorspace.c

index e39814a..ec6631c 100644 (file)
@@ -46,12 +46,14 @@ GST_DEBUG_CATEGORY (colorspace_debug);
 #define GST_CAT_DEFAULT colorspace_debug
 GST_DEBUG_CATEGORY (colorspace_performance);
 
-#ifndef GST_VIDEO_CAPS_RGB8_PALETTED
-#define GST_VIDEO_CAPS_RGB8_PALETTED \
+#ifdef GST_VIDEO_CAPS_RGB8_PALETTED
+#define VIDEO_CAPS_RGB8_PALETTED \
   "video/x-raw-rgb, bpp = (int)8, depth = (int)8, "                     \
       "width = "GST_VIDEO_SIZE_RANGE" , "                               \
       "height = " GST_VIDEO_SIZE_RANGE ", "                             \
-      "framerate = "GST_VIDEO_FPS_RANGE
+      "framerate = "GST_VIDEO_FPS_RANGE "; "
+#else
+#define VIDEO_CAPS_RGB8_PALETTED        /* no-op */
 #endif
 
 #define CSP_VIDEO_CAPS                                         \
@@ -72,7 +74,7 @@ GST_DEBUG_CATEGORY (colorspace_performance);
   GST_VIDEO_CAPS_BGR_16";"                                             \
   GST_VIDEO_CAPS_RGB_15";"                                             \
   GST_VIDEO_CAPS_BGR_15";"                                             \
-  GST_VIDEO_CAPS_RGB8_PALETTED";"                                       \
+  VIDEO_CAPS_RGB8_PALETTED                                              \
   GST_VIDEO_CAPS_GRAY8";"                                              \
   GST_VIDEO_CAPS_GRAY16("BIG_ENDIAN")";"                               \
   GST_VIDEO_CAPS_GRAY16("LITTLE_ENDIAN")";"