From aacf88ffa5a42299d6e910153b142f263a45d5d2 Mon Sep 17 00:00:00 2001 From: Stefan Sauer Date: Fri, 18 Nov 2011 08:08:18 +0100 Subject: [PATCH] [472/906] linpng: make libpng use conditional Disable 3 elements if we don't have libpng. --- gst/gl/Makefile.am | 16 ++++++++++------ gst/gl/gstopengl.c | 30 +++++++++++++++++------------- 2 files changed, 27 insertions(+), 19 deletions(-) diff --git a/gst/gl/Makefile.am b/gst/gl/Makefile.am index fc433030b7..f59c7551f9 100644 --- a/gst/gl/Makefile.am +++ b/gst/gl/Makefile.am @@ -7,8 +7,6 @@ AM_LIBS = $(GST_BASE_LIBS) # full opengl required if GL_IS_OPENGL OPENGL_SOURCES = \ - gstglbumper.c \ - gstglbumper.h \ gstglfiltershader.c \ gstglfiltershader.h \ gstglfilterblur.c \ @@ -27,16 +25,12 @@ OPENGL_SOURCES = \ gstglcolorscale.h \ gstgldeinterlace.c \ gstgldeinterlace.h \ - gstgldifferencematte.c \ - gstgldifferencematte.h \ - gstgloverlay.c \ gltestsrc.c \ gltestsrc.h \ gstgltestsrc.c \ gstgltestsrc.h \ gstglmosaic.c \ gstglmosaic.h \ - gstgloverlay.h \ effects/gstgleffectscurves.h \ effects/gstgleffectstretch.c \ effects/gstgleffecttunnel.c \ @@ -50,6 +44,16 @@ OPENGL_SOURCES = \ effects/gstgleffectsin.c \ effects/gstgleffectglow.c \ effects/gstgleffectxray.c + +if HAVE_PNG +OPENGL_SOURCES += \ + gstglbumper.c \ + gstglbumper.h \ + gstgldifferencematte.c \ + gstgldifferencematte.h \ + gstgloverlay.c \ + gstgloverlay.h +endif endif libgstopengl_la_SOURCES = \ diff --git a/gst/gl/gstopengl.c b/gst/gl/gstopengl.c index cd66544eae..2ad53bf911 100644 --- a/gst/gl/gstopengl.c +++ b/gst/gl/gstopengl.c @@ -118,19 +118,6 @@ plugin_init (GstPlugin * plugin) return FALSE; } - if (!gst_element_register (plugin, "gloverlay", - GST_RANK_NONE, gst_gl_overlay_get_type ())) { - return FALSE; - } - if (!gst_element_register (plugin, "gldifferencematte", - GST_RANK_NONE, gst_gl_differencematte_get_type ())) { - return FALSE; - } - if (!gst_element_register (plugin, "glbumper", - GST_RANK_NONE, gst_gl_bumper_get_type ())) { - return FALSE; - } - if (!gst_element_register (plugin, "glfilterblur", GST_RANK_NONE, gst_gl_filterblur_get_type ())) { return FALSE; @@ -175,10 +162,27 @@ plugin_init (GstPlugin * plugin) GST_RANK_NONE, GST_TYPE_GL_COLORSCALE)) { return FALSE; } + if (!gst_element_register (plugin, "glmosaic", GST_RANK_NONE, GST_TYPE_GL_MOSAIC)) { return FALSE; } +#ifdef HAVE_PNG + if (!gst_element_register (plugin, "gldifferencematte", + GST_RANK_NONE, gst_gl_differencematte_get_type ())) { + return FALSE; + } + + if (!gst_element_register (plugin, "glbumper", + GST_RANK_NONE, gst_gl_bumper_get_type ())) { + return FALSE; + } + + if (!gst_element_register (plugin, "gloverlay", + GST_RANK_NONE, gst_gl_overlay_get_type ())) { + return FALSE; + } +#endif #endif return TRUE;