From 1c6911d307112a626fc3376c91f795fd848d84c7 Mon Sep 17 00:00:00 2001 From: Richard Boulton Date: Fri, 12 May 2000 07:15:03 +0000 Subject: [PATCH] Make GDK pixbuf optional, by compiling videosink only if it is present. 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 | 1 + config.h.in | 1 + configure.in | 38 ++++++-- docs/gst/Makefile.am | 4 +- docs/gst/gstreamer-decl.txt | 116 +++++++++++------------ docs/gst/gstreamer.hierarchy | 4 - docs/gst/{gstreamer.types => gstreamer.types.in} | 2 +- docs/gst/tmpl/gsthttpsrc.sgml | 11 --- docs/gst/tmpl/gstreamer-unused.sgml | 13 +++ 9 files changed, 108 insertions(+), 82 deletions(-) rename docs/gst/{gstreamer.types => gstreamer.types.in} (95%) diff --git a/acconfig.h b/acconfig.h index 2668ca6..922bf00 100644 --- a/acconfig.h +++ b/acconfig.h @@ -2,6 +2,7 @@ #undef PLUGINS_SRCDIR #undef PLUGINS_USE_SRCDIR +#undef HAVE_GDK_PIXBUF #undef HAVE_LIBGHTTP #undef HAVE_LIBMMX #undef HAVE_XAUDIO diff --git a/config.h.in b/config.h.in index 9fadf3b..0417a8e 100644 --- a/config.h.in +++ b/config.h.in @@ -10,6 +10,7 @@ #undef PLUGINS_SRCDIR #undef PLUGINS_USE_SRCDIR +#undef HAVE_GDK_PIXBUF #undef HAVE_LIBGHTTP #undef HAVE_LIBMMX #undef HAVE_XAUDIO diff --git a/configure.in b/configure.in index c495b73..42fcb00 100644 --- a/configure.in +++ b/configure.in @@ -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]) diff --git a/docs/gst/Makefile.am b/docs/gst/Makefile.am index 50000b5..9ca32f3 100644 --- a/docs/gst/Makefile.am +++ b/docs/gst/Makefile.am @@ -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 diff --git a/docs/gst/gstreamer-decl.txt b/docs/gst/gstreamer-decl.txt index ce2f17a..ca4a6d4 100644 --- a/docs/gst/gstreamer-decl.txt +++ b/docs/gst/gstreamer-decl.txt @@ -359,64 +359,6 @@ GstBuffer *buffer void GstBuffer *buffer,GstMeta *meta - -GstClockTime -typedef guint64 GstClockTime; - - -GstClockTimeDiff -typedef gint64 GstClockTimeDiff; - - -GST_CLOCK_DIFF -#define GST_CLOCK_DIFF(s, e) (GstClockTimeDiff)((s)-(e)) - - -GstClock - - -GstClock -struct GstClock { - gchar *name; - GstClockTime start_time; - GstClockTime current_time; - GstClockTimeDiff adjust; - gboolean locking; - GList *sinkobjects; - GMutex *sinkmutex; - GMutex *lock; -}; - - -gst_clock_new -GstClock * -gchar *name - - -gst_clock_get_system -GstClock * -void - - -gst_clock_register -void -GstClock *clock, GstObject *obj - - -gst_clock_set -void -GstClock *clock, GstClockTime time - - -gst_clock_reset -void -GstClock *clock - - -gst_clock_wait -void -GstClock *clock, GstClockTime time, GstObject *obj - GST_TYPE_CONNECTION #define GST_TYPE_CONNECTION \ @@ -1825,6 +1767,64 @@ GtkObject *object,guchar *argname xmlDocPtr GstElement *element + +GstClockTime +typedef guint64 GstClockTime; + + +GstClockTimeDiff +typedef gint64 GstClockTimeDiff; + + +GST_CLOCK_DIFF +#define GST_CLOCK_DIFF(s, e) (GstClockTimeDiff)((s)-(e)) + + +GstClock + + +GstClock +struct GstClock { + gchar *name; + GstClockTime start_time; + GstClockTime current_time; + GstClockTimeDiff adjust; + gboolean locking; + GList *sinkobjects; + GMutex *sinkmutex; + GMutex *lock; +}; + + +gst_clock_new +GstClock * +gchar *name + + +gst_clock_get_system +GstClock * +void + + +gst_clock_register +void +GstClock *clock, GstObject *obj + + +gst_clock_set +void +GstClock *clock, GstClockTime time + + +gst_clock_reset +void +GstClock *clock + + +gst_clock_wait +void +GstClock *clock, GstClockTime time, GstObject *obj + GST_TYPE_ASYNCDISKSRC #define GST_TYPE_ASYNCDISKSRC \ diff --git a/docs/gst/gstreamer.hierarchy b/docs/gst/gstreamer.hierarchy index 9f67b2d..9ff9ac8 100644 --- a/docs/gst/gstreamer.hierarchy +++ b/docs/gst/gstreamer.hierarchy @@ -1,7 +1,4 @@ GtkObject - GtkWidget - GtkRange - GtkContainer GstObject GstElement GstBin @@ -18,7 +15,6 @@ GtkObject GstFakeSrc GstDiskSrc GstAsyncDiskSrc - GstHttpSrc GstFdSrc GstAudioSrc GstSineSrc diff --git a/docs/gst/gstreamer.types b/docs/gst/gstreamer.types.in similarity index 95% rename from docs/gst/gstreamer.types rename to docs/gst/gstreamer.types.in index 22d98ea..bc65a1d 100644 --- a/docs/gst/gstreamer.types +++ b/docs/gst/gstreamer.types.in @@ -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 diff --git a/docs/gst/tmpl/gsthttpsrc.sgml b/docs/gst/tmpl/gsthttpsrc.sgml index f1c74b8..2ba4a00 100644 --- a/docs/gst/tmpl/gsthttpsrc.sgml +++ b/docs/gst/tmpl/gsthttpsrc.sgml @@ -14,14 +14,3 @@ Reads data from a URL. - - -Specify the location of the file. The location must be a fully qualified URL. - - - - -Specify how many bytes to read at a time. - - - diff --git a/docs/gst/tmpl/gstreamer-unused.sgml b/docs/gst/tmpl/gstreamer-unused.sgml index ad4dac8..24320c0 100644 --- a/docs/gst/tmpl/gstreamer-unused.sgml +++ b/docs/gst/tmpl/gstreamer-unused.sgml @@ -72,6 +72,13 @@ + + +Specify how many bytes to read at a time. + + + + @@ -1488,6 +1495,12 @@ GstElement @klass: + + +Specify the location of the file. The location must be a fully qualified URL. + + + -- 2.7.4