From 26b3955aba00b448d09c525fdd3502d30b83fd5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 10 Dec 2017 22:27:31 +0000 Subject: [PATCH] gl: use #ifdef HAVE_* instead of #if HAVE_FOO --- ext/gl/gstglfiltershader.c | 4 ++-- ext/gl/gstopengl.c | 16 ++++++---------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/ext/gl/gstglfiltershader.c b/ext/gl/gstglfiltershader.c index df5040fea7..39646c0249 100644 --- a/ext/gl/gstglfiltershader.c +++ b/ext/gl/gstglfiltershader.c @@ -59,7 +59,7 @@ #include #include "gstglfiltershader.h" -#if HAVE_GRAPHENE +#ifdef HAVE_GRAPHENE #include #endif @@ -360,7 +360,7 @@ _set_uniform (GQuark field_id, const GValue * value, gpointer user_data) } else if (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_FLOAT)) { gst_gl_shader_set_uniform_1f (shader, field_name, g_value_get_float (value)); -#if HAVE_GRAPHENE +#ifdef HAVE_GRAPHENE } else if (G_TYPE_CHECK_VALUE_TYPE ((value), GRAPHENE_TYPE_VEC2)) { graphene_vec2_t *vec2 = g_value_get_boxed (value); float x = graphene_vec2_get_x (vec2); diff --git a/ext/gl/gstopengl.c b/ext/gl/gstopengl.c index 75f8d33321..93a1473a92 100644 --- a/ext/gl/gstopengl.c +++ b/ext/gl/gstopengl.c @@ -65,15 +65,13 @@ #include "gstgltestsrc.h" #include "gstgldeinterlace.h" -#if HAVE_GRAPHENE +#ifdef HAVE_GRAPHENE #include "gstgltransformation.h" #include "gstglvideoflip.h" #endif -#if HAVE_JPEG -#if HAVE_PNG +#if defined(HAVE_JPEG) && defined(HAVE_PNG) #include "gstgloverlay.h" -#endif /* HAVE_PNG */ -#endif /* HAVE_JPEG */ +#endif #if GST_GL_HAVE_OPENGL #include "gstglfilterglass.h" @@ -171,7 +169,7 @@ plugin_init (GstPlugin * plugin) GST_RANK_NONE, GST_TYPE_GL_FILTER_CUBE)) { return FALSE; } -#if HAVE_GRAPHENE +#ifdef HAVE_GRAPHENE if (!gst_element_register (plugin, "gltransformation", GST_RANK_NONE, GST_TYPE_GL_TRANSFORMATION)) { return FALSE; @@ -236,14 +234,12 @@ plugin_init (GstPlugin * plugin) GST_RANK_NONE, GST_TYPE_GL_DEINTERLACE)) { return FALSE; } -#if HAVE_JPEG -#if HAVE_PNG +#if defined(HAVE_JPEG) && defined(HAVE_PNG) if (!gst_element_register (plugin, "gloverlay", GST_RANK_NONE, gst_gl_overlay_get_type ())) { return FALSE; } -#endif /* HAVE_PNG */ -#endif /* HAVE_JPEG */ +#endif #if GST_GL_HAVE_OPENGL if (!gst_element_register (plugin, "glfilterglass", GST_RANK_NONE, GST_TYPE_GL_FILTER_GLASS)) {