[gst-devel] xvideosink on Solaris

Brian Cameron Brian.Cameron at Sun.COM
Mon Jun 30 10:31:11 CEST 2003


Xvideosink on Solaris doesn't build because the Xv extension is not yet 
supported there.  I noticed that the sys/Xv code is already #ifdef'ed
with "#ifdef HAVE_XVIDEO", so there wasn't any need to change the code
to get things working.

I made the attached patch which changes only the toplevel configure.ac
and the sys/Makefile.am.  However, I'm not sure that this is really
the best way to get this working since I obviously am now forcing
xvideo to always build.  It might be better to check to make sure X
is present and build xvideosink only if it is?

Also, the ext/gdk_pixbuf plugin does not build with Gnome 2.0 since
it makes use of GdkPixbufFormat.  It might be nice if the configure
script did not build this plugin if you do not have the right version
of GTK+ installed.

Brian
-------------- next part --------------
Index: gst-plugins/configure.ac
===================================================================
RCS file: /cvsroot/gstreamer/gst-plugins/configure.ac,v
retrieving revision 1.271
diff -u -p -r1.271 configure.ac
--- gst-plugins/configure.ac	29 Jun 2003 19:44:52 -0000	1.271
+++ gst-plugins/configure.ac	30 Jun 2003 17:26:28 -0000
@@ -409,24 +409,20 @@ dnl FIXME: add check if this platform ca
 dnl        non-PIC libXv, if not then don not use Xv.
 dnl FIXME: perhaps warn user if they have a shared libXv since
 dnl        this is an error until XFree86 starts shipping one
-translit(dnm, m, l) AM_CONDITIONAL(USE_XVIDEO, true)
 
-GST_CHECK_FEATURE(XVIDEO, [X11 XVideo extensions], xvideosink, [
-  dnl use X_CFLAGS for check
-  save_FLAGS=$CFLAGS
-  CFLAGS=$X_CFLAGS
-
-  dnl check for PIC static lib
-  GST_CHECK_LIBHEADER(XVIDEO, Xv_pic, XvQueryExtension, $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS, X11/extensions/Xv.h, XVIDEO_LIBS="-lXv_pic -lXext")
-  if test x$HAVE_XVIDEO = xno; then
-    dnl PIC lib not found, check for regular lib
-    GST_CHECK_LIBHEADER(XVIDEO, Xv, XvQueryExtension, $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS, X11/extensions/Xv.h, XVIDEO_LIBS="-lXv -lXext")
-  fi
+AC_CHECK_LIB(Xv_pic, XvQueryExtension, HAVE_XVIDEO="yes", HAVE_XVIDEO="no", $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS)
+if test x$HAVE_XVIDEO = xyes; then
+  AC_DEFINE(HAVE_XVIDEO, 1, [Define if Xv extension is available])
+  XVIDEO_LIBS="-lXv_pic -lXext"
   AC_SUBST(XVIDEO_LIBS)
-
-  dnl restore CFLAGS
-  CFLAGS=$save_CFLAGS
-])
+else
+  AC_CHECK_LIB(Xv, XvQueryExtension, HAVE_XVIDEO="yes", HAVE_XVIDEO="no", $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS)
+  if test x$HAVE_XVIDEO = xyes; then
+    AC_DEFINE(HAVE_XVIDEO, 1, [Define if Xv extension is available])
+    XVIDEO_LIBS="-lXv -lXext"
+    AC_SUBST(XVIDEO_LIBS)
+  fi
+fi
 
 dnl Next, check for the optional libraries:
 dnl These are all libraries used in building plug-ins
Index: gst-plugins/sys/Makefile.am
===================================================================
RCS file: /cvsroot/gstreamer/gst-plugins/sys/Makefile.am,v
retrieving revision 1.15
diff -u -p -r1.15 Makefile.am
--- gst-plugins/sys/Makefile.am	25 Jun 2003 19:17:59 -0000	1.15
+++ gst-plugins/sys/Makefile.am	30 Jun 2003 17:26:28 -0000
@@ -34,11 +34,7 @@ else
 VCD_DIR=
 endif
 
-if USE_XVIDEO
 XVIDEO_DIR=xvideo
-else
-XVIDEO_DIR=
-endif
 
 if USE_CDROM
 CDROM_DIR=cdrom


More information about the gstreamer-devel mailing list