Make GDK pixbuf optional, by compiling videosink only if it is present.
authorRichard Boulton <richard@tartarus.org>
Fri, 12 May 2000 07:15:03 +0000 (07:15 +0000)
committerRichard Boulton <richard@tartarus.org>
Fri, 12 May 2000 07:15:03 +0000 (07:15 +0000)
Original commit message from CVS:
Make GDK pixbuf optional, by compiling videosink only if it is present.
Make documentation generated successfully even if libghttp isn't present
(by skipping the ghttpsrc stuff).

acconfig.h
config.h.in
configure.in
docs/gst/Makefile.am
docs/gst/gstreamer-decl.txt
docs/gst/gstreamer.hierarchy
docs/gst/gstreamer.types.in [moved from docs/gst/gstreamer.types with 95% similarity]
docs/gst/tmpl/gsthttpsrc.sgml
docs/gst/tmpl/gstreamer-unused.sgml

index 2668ca6..922bf00 100644 (file)
@@ -2,6 +2,7 @@
 #undef PLUGINS_SRCDIR
 #undef PLUGINS_USE_SRCDIR
 
+#undef HAVE_GDK_PIXBUF
 #undef HAVE_LIBGHTTP
 #undef HAVE_LIBMMX
 #undef HAVE_XAUDIO
index 9fadf3b..0417a8e 100644 (file)
@@ -10,6 +10,7 @@
 #undef PLUGINS_SRCDIR
 #undef PLUGINS_USE_SRCDIR
 
+#undef HAVE_GDK_PIXBUF
 #undef HAVE_LIBGHTTP
 #undef HAVE_LIBMMX
 #undef HAVE_XAUDIO
index c495b73..42fcb00 100644 (file)
@@ -63,34 +63,43 @@ XML_CFLAGS=`xml-config --cflags`
 AC_SUBST(XML_LIBS)
 AC_SUBST(XML_CFLAGS)
 
-dnl Check for libgdb-pixbuf
+
+dnl Next, check for the optional libraries:
+dnl =======================================
+
+dnl Check for libgdk-pixbuf
 AC_PATH_PROG(GDK_PIXBUF_CONFIG, gdk-pixbuf-config, no)
 if test x$GDK_PIXBUF_CONFIG = xno; then
-  AC_MSG_ERROR(Couldn't find gdk-pixbuf-config)
+  AC_MSG_WARN(Couldn't find gdk-pixbuf-config)
+  GDK_PIXBUF_LIBS=
+  GDK_PIXBUF_CFLAGS=
+  HAVE_GDK_PIXBUF=no
+else
+  GDK_PIXBUF_LIBS=`gdk-pixbuf-config --libs`
+  GDK_PIXBUF_CFLAGS=`gdk-pixbuf-config --cflags`
+  HAVE_GDK_PIXBUF=yes
 fi
-GDK_PIXBUF_LIBS=`gdk-pixbuf-config --libs`
-GDK_PIXBUF_CFLAGS=`gdk-pixbuf-config --cflags`
 AC_SUBST(GDK_PIXBUF_LIBS)
 AC_SUBST(GDK_PIXBUF_CFLAGS)
 
 
-dnl Next, check for the optional libraries:
-dnl =======================================
-
 dnl Check for gtk
 AM_PATH_GTK(1.2.0)
 
 dnl Check for libghttp
 AC_CHECK_LIB(ghttp, ghttp_request_new,
   [GHTTP_LIBS="-lghttp"
+   GST_HTTPSRC_GET_TYPE="gst_httpsrc_get_type"
    HAVE_LIBGHTTP=yes
   ],
   [AC_MSG_WARN(Cannot find libghttp: can't build gsthttpsrc)
    GHTTP_LIBS=
+   GST_HTTPSRC_GET_TYPE=
    HAVE_LIBGHTTP=no
   ],
   $LIBS)
 AC_SUBST(GHTTP_LIBS)
+AC_SUBST(GST_HTTPSRC_GET_TYPE)
 
 dnl Check for atomic.h
 dnl Note: use AC_CHECK_HEADER not AC_CHECK_HEADERS, because the latter
@@ -172,6 +181,15 @@ dnl ######################################################################
 dnl # Check command line parameters, and set shell variables accordingly #
 dnl ######################################################################
 
+AC_ARG_ENABLE(gdk-pixbuf,
+[  --enable-gdk-pixbuf          use gdk pixbuf, if available],
+[case "${enableval}" in
+  yes) USE_GDK_PIXBUF=$HAVE_GDK_PIXBUF ;;
+  no)  USE_GDK_PIXBUF=no ;;
+  *) AC_MSG_ERROR(bad value ${enableval} for --enable-gdk-pixbuf) ;;
+esac], 
+[USE_GDK_PIXBUF=$HAVE_GDK_PIXBUF]) dnl Default value
+
 AC_ARG_ENABLE(libghttp,
 [  --enable-libghttp            use the ghttp library, if available],
 [case "${enableval}" in
@@ -234,6 +252,10 @@ dnl ################################################
 
 dnl These should be "USE_*" instead of "HAVE_*", but some packages expect
 dnl HAVE_ and it is likely to be easier to stick with the old name
+if test "x$USE_GDK_PIXBUF" = xyes; then
+  AC_DEFINE(HAVE_GDK_PIXBUF)
+fi
+
 if test "x$USE_LIBGHTTP" = xyes; then
   AC_DEFINE(HAVE_LIBGHTTP)
 fi
@@ -265,6 +287,7 @@ dnl #############################
 
 dnl These should be "USE_*" instead of "HAVE_*", but some packages expect
 dnl HAVE_ and it is likely to be easier to stick with the old name
+AM_CONDITIONAL(HAVE_GDK_PIXBUF, test "x$USE_GDK_PIXBUF" = "xyes")
 AM_CONDITIONAL(HAVE_LIBGHTTP,   test "x$USE_LIBGHTTP" = "xyes")
 AM_CONDITIONAL(HAVE_LIBMMX,     test "x$USE_LIBMMX" = "xyes")
 AM_CONDITIONAL(HAVE_ATOMIC_H,   test "x$USE_ATOMIC_H" = "xyes")
@@ -346,6 +369,7 @@ editor/Makefile
 tools/Makefile
 docs/Makefile
 docs/gst/Makefile
+docs/gst/gstreamer.types
 stamp.h
 gstreamer-config
 gstreamer.spec])
index 50000b5..9ca32f3 100644 (file)
@@ -12,6 +12,8 @@ DOC_SOURCE_DIR=$(top_srcdir)/gst
 CFLAGS = $(GLIB_CFLAGS) $(GTK_CFLAGS) -I$(top_srcdir)
 LDFLAGS = $(GLIB_LIBS) $(GTK_LIBS) $(top_srcdir)/gst/libgst.la $(top_srcdir)/gst/elements/libgstelements.la
 
+EXTRA_DIST=gstreamer.types.in
+
 HTML_DIR=$(datadir)/gstreamer/gst/html
 
 TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
@@ -85,7 +87,7 @@ sgml/gstreamer-doc.bottom: $(tmpl_sources)
 gstreamer-decl.txt:
        $(MAKE) scan
 
-scanobj:
+scanobj: $(srcdir)/$(DOC_MODULE).types
        env CC="$(LIBTOOL) --mode=link $(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
                gtkdoc-scanobj --module=$(DOC_MODULE) \
                --types=$(srcdir)/$(DOC_MODULE).types
index ce2f17a..ca4a6d4 100644 (file)
@@ -359,64 +359,6 @@ GstBuffer *buffer
 <RETURNS>void  </RETURNS>
 GstBuffer *buffer,GstMeta *meta
 </FUNCTION>
-<TYPEDEF>
-<NAME>GstClockTime</NAME>
-typedef guint64 GstClockTime;
-</TYPEDEF>
-<TYPEDEF>
-<NAME>GstClockTimeDiff</NAME>
-typedef gint64 GstClockTimeDiff;
-</TYPEDEF>
-<MACRO>
-<NAME>GST_CLOCK_DIFF</NAME>
-#define GST_CLOCK_DIFF(s, e) (GstClockTimeDiff)((s)-(e))
-</MACRO>
-<STRUCT>
-<NAME>GstClock</NAME>
-</STRUCT>
-<STRUCT>
-<NAME>GstClock</NAME>
-struct GstClock {
-  gchar *name;
-  GstClockTime start_time;
-  GstClockTime current_time;
-  GstClockTimeDiff adjust;
-  gboolean locking;
-  GList *sinkobjects;
-  GMutex *sinkmutex;
-  GMutex *lock;
-};
-</STRUCT>
-<FUNCTION>
-<NAME>gst_clock_new</NAME>
-<RETURNS>GstClock  *</RETURNS>
-gchar *name
-</FUNCTION>
-<FUNCTION>
-<NAME>gst_clock_get_system</NAME>
-<RETURNS>GstClock  *</RETURNS>
-void
-</FUNCTION>
-<FUNCTION>
-<NAME>gst_clock_register</NAME>
-<RETURNS>void  </RETURNS>
-GstClock *clock, GstObject *obj
-</FUNCTION>
-<FUNCTION>
-<NAME>gst_clock_set</NAME>
-<RETURNS>void  </RETURNS>
-GstClock *clock, GstClockTime time
-</FUNCTION>
-<FUNCTION>
-<NAME>gst_clock_reset</NAME>
-<RETURNS>void  </RETURNS>
-GstClock *clock
-</FUNCTION>
-<FUNCTION>
-<NAME>gst_clock_wait</NAME>
-<RETURNS>void  </RETURNS>
-GstClock *clock, GstClockTime time, GstObject *obj
-</FUNCTION>
 <MACRO>
 <NAME>GST_TYPE_CONNECTION</NAME>
 #define GST_TYPE_CONNECTION \
@@ -1825,6 +1767,64 @@ GtkObject *object,guchar *argname
 <RETURNS>xmlDocPtr  </RETURNS>
 GstElement *element
 </FUNCTION>
+<TYPEDEF>
+<NAME>GstClockTime</NAME>
+typedef guint64 GstClockTime;
+</TYPEDEF>
+<TYPEDEF>
+<NAME>GstClockTimeDiff</NAME>
+typedef gint64 GstClockTimeDiff;
+</TYPEDEF>
+<MACRO>
+<NAME>GST_CLOCK_DIFF</NAME>
+#define GST_CLOCK_DIFF(s, e) (GstClockTimeDiff)((s)-(e))
+</MACRO>
+<STRUCT>
+<NAME>GstClock</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GstClock</NAME>
+struct GstClock {
+  gchar *name;
+  GstClockTime start_time;
+  GstClockTime current_time;
+  GstClockTimeDiff adjust;
+  gboolean locking;
+  GList *sinkobjects;
+  GMutex *sinkmutex;
+  GMutex *lock;
+};
+</STRUCT>
+<FUNCTION>
+<NAME>gst_clock_new</NAME>
+<RETURNS>GstClock  *</RETURNS>
+gchar *name
+</FUNCTION>
+<FUNCTION>
+<NAME>gst_clock_get_system</NAME>
+<RETURNS>GstClock  *</RETURNS>
+void
+</FUNCTION>
+<FUNCTION>
+<NAME>gst_clock_register</NAME>
+<RETURNS>void  </RETURNS>
+GstClock *clock, GstObject *obj
+</FUNCTION>
+<FUNCTION>
+<NAME>gst_clock_set</NAME>
+<RETURNS>void  </RETURNS>
+GstClock *clock, GstClockTime time
+</FUNCTION>
+<FUNCTION>
+<NAME>gst_clock_reset</NAME>
+<RETURNS>void  </RETURNS>
+GstClock *clock
+</FUNCTION>
+<FUNCTION>
+<NAME>gst_clock_wait</NAME>
+<RETURNS>void  </RETURNS>
+GstClock *clock, GstClockTime time, GstObject *obj
+</FUNCTION>
 <MACRO>
 <NAME>GST_TYPE_ASYNCDISKSRC</NAME>
 #define GST_TYPE_ASYNCDISKSRC \
index 9f67b2d..9ff9ac8 100644 (file)
@@ -1,7 +1,4 @@
 GtkObject
-  GtkWidget
-    GtkRange
-    GtkContainer
   GstObject
     GstElement
       GstBin
@@ -18,7 +15,6 @@ GtkObject
         GstFakeSrc
         GstDiskSrc
         GstAsyncDiskSrc
-        GstHttpSrc
         GstFdSrc
         GstAudioSrc
         GstSineSrc
similarity index 95%
rename from docs/gst/gstreamer.types
rename to docs/gst/gstreamer.types.in
index 22d98ea..bc65a1d 100644 (file)
@@ -17,7 +17,7 @@ gst_fakesink_get_type
 
 gst_disksrc_get_type
 gst_asyncdisksrc_get_type
-gst_httpsrc_get_type
+@GST_HTTPSRC_GET_TYPE@
 gst_fdsrc_get_type
 gst_audiosrc_get_type
 gst_sinesrc_get_type
index f1c74b8..2ba4a00 100644 (file)
@@ -14,14 +14,3 @@ Reads data from a URL.
 
 </para>
 
-<!-- ##### ARG GstHttpSrc:location ##### -->
-<para>
-Specify the location of the file. The location must be a fully qualified URL.
-</para>
-
-<!-- ##### ARG GstHttpSrc:bytesperread ##### -->
-<para>
-Specify how many bytes to read at a time.
-
-</para>
-
index ad4dac8..24320c0 100644 (file)
 </para>
 
 
+<!-- ##### ARG GstHttpSrc:bytesperread ##### -->
+<para>
+Specify how many bytes to read at a time.
+
+</para>
+
+
 <!-- ##### STRUCT GstBinClass ##### -->
 <para>
 
@@ -1488,6 +1495,12 @@ GstElement
 
 @klass: 
 
+<!-- ##### ARG GstHttpSrc:location ##### -->
+<para>
+Specify the location of the file. The location must be a fully qualified URL.
+</para>
+
+
 <!-- ##### MACRO GST_IS_AUDIOSINK ##### -->
 <para>