gldownloadelement: fix build with msvc
authorMatthew Waters <matthew@centricular.com>
Mon, 4 Jun 2018 12:32:03 +0000 (22:32 +1000)
committerMatthew Waters <matthew@centricular.com>
Wed, 6 Jun 2018 13:36:08 +0000 (23:36 +1000)
msvc doesn't like #ifdef inside macro expansion

ext/gl/gstgldownloadelement.c

index 826e983..aefc289 100644 (file)
@@ -54,14 +54,18 @@ static gboolean gst_gl_download_element_decide_allocation (GstBaseTransform *
     trans, GstQuery * query);
 static void gst_gl_download_element_finalize (GObject * object);
 
+#if GST_GL_HAVE_PLATFORM_EGL && GST_GL_HAVE_DMABUF
+#define EXTRA_CAPS_TEMPLATE "video/x-raw(" GST_CAPS_FEATURE_MEMORY_DMABUF "); "
+#else
+#define EXTRA_CAPS_TEMPLATE
+#endif
+
 static GstStaticPadTemplate gst_gl_download_element_src_pad_template =
     GST_STATIC_PAD_TEMPLATE ("src",
     GST_PAD_SRC,
     GST_PAD_ALWAYS,
     GST_STATIC_CAPS (
-#if GST_GL_HAVE_PLATFORM_EGL && GST_GL_HAVE_DMABUF
-        "video/x-raw(" GST_CAPS_FEATURE_MEMORY_DMABUF "); "
-#endif
+        EXTRA_CAPS_TEMPLATE
         "video/x-raw; video/x-raw(memory:GLMemory)"));
 
 static GstStaticPadTemplate gst_gl_download_element_sink_pad_template =