From f7bace76aad6e2ad98baeef7b35689cd5665acfd Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Sun, 17 Sep 2000 14:06:18 +0000 Subject: [PATCH] Added check for vorbis. Original commit message from CVS: Added check for vorbis. Really compile with Xv extension if the library is found. Changed the disksrc so that is goes to the PAUSE state if eof. --- acconfig.h | 1 + configure.in | 11 ++++++++--- gst/elements/gstdisksrc.c | 3 +-- gst/gstbin.c | 2 +- plugins/elements/gstdisksrc.c | 3 +-- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/acconfig.h b/acconfig.h index 1cf61760cc..666aa9fceb 100644 --- a/acconfig.h +++ b/acconfig.h @@ -8,6 +8,7 @@ #undef HAVE_GDK_PIXBUF #undef HAVE_LIBGHTTP #undef HAVE_LIBMMX +#undef HAVE_LIBXV #undef HAVE_XAUDIO #undef HAVE_CSSAUTH #undef HAVE_VORBIS diff --git a/configure.in b/configure.in index 6362d0952b..6db44e59c8 100644 --- a/configure.in +++ b/configure.in @@ -200,7 +200,10 @@ AC_SUBST(X_EXTRA_LIBS) AC_SUBST(X_LIBS) xvsave_LIBS=${LIBS} -AC_CHECK_LIB(Xv, XvQueryExtension, HAVE_LIBXV=yes, HAVE_LIBXV=no, $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS) +AC_CHECK_LIB(Xv, XvQueryExtension, +HAVE_LIBXV=yes +AC_DEFINE(HAVE_LIBXV), +HAVE_LIBXV=no, $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS) LIBS=${xvsave_LIBS} dnl Check for xaudio @@ -236,8 +239,10 @@ fi dnl check for libvorbis AC_MSG_CHECKING(Vorbis library) -AC_MSG_RESULT(... check not implemented !! FIXME) -HAVE_VORBIS="no" +AC_CHECK_LIB(vorbis, ogg_sync_init, +HAVE_VORBIS=yes +AC_DEFINE(HAVE_VORBIS), +HAVE_VORBIS=no, ) dnl check for gtkdoc AC_CHECK_PROG(HAVE_GTK_DOC, gtkdoc-mkdb, true, false) diff --git a/gst/elements/gstdisksrc.c b/gst/elements/gstdisksrc.c index ae614ec2e9..ea77836e61 100644 --- a/gst/elements/gstdisksrc.c +++ b/gst/elements/gstdisksrc.c @@ -221,8 +221,7 @@ void gst_disksrc_push(GstSrc *src) { else if (readbytes == 0) { gst_src_signal_eos(GST_SRC(disksrc)); gst_buffer_unref(buf); - gst_disksrc_close_file(disksrc); - GST_STATE(src) = GST_STATE_NULL; + GST_STATE(src) = GST_STATE_PAUSED; return; } diff --git a/gst/gstbin.c b/gst/gstbin.c index 657fb60c79..3f1a1a062b 100644 --- a/gst/gstbin.c +++ b/gst/gstbin.c @@ -441,7 +441,7 @@ static int gst_bin_loopfunc_wrapper(int argc,char *argv[]) { DEBUG("** gst_bin_loopfunc_wrapper(): element is chain-based, calling in infinite loop\n"); if (GST_IS_SRC(element)) { //while (1) { - while (GST_STATE(element) != GST_STATE_NULL) { + while (GST_STATE(element) == GST_STATE_PLAYING) { DEBUG("** gst_bin_loopfunc_wrapper(): calling push function of source\n"); gst_src_push(GST_SRC(element)); } diff --git a/plugins/elements/gstdisksrc.c b/plugins/elements/gstdisksrc.c index ae614ec2e9..ea77836e61 100644 --- a/plugins/elements/gstdisksrc.c +++ b/plugins/elements/gstdisksrc.c @@ -221,8 +221,7 @@ void gst_disksrc_push(GstSrc *src) { else if (readbytes == 0) { gst_src_signal_eos(GST_SRC(disksrc)); gst_buffer_unref(buf); - gst_disksrc_close_file(disksrc); - GST_STATE(src) = GST_STATE_NULL; + GST_STATE(src) = GST_STATE_PAUSED; return; }