fi
])
+dnl check for XShm
+translit(dnm, m, l) AM_CONDITIONAL(USE_XSHM, true)
+GST_CHECK_FEATURE(XSHM, [X11 Shared Memory], ximage, [
+ AC_CHECK_HEADER(X11/extensions/XShm.h,
+ HAVE_XSHM=yes, HAVE_XSHM=no)
+])
+
dnl Next, check for the optional libraries:
dnl These are all libraries used in building plug-ins
dnl ================================================
sys/v4l2/Makefile
sys/vcd/Makefile
sys/xvideo/Makefile
+sys/ximage/Makefile
sys/glsink/Makefile
ext/Makefile
ext/a52dec/Makefile
ximage->size = (ximagesink->xcontext->bpp / 8) * ximage->width * ximage->height;
-#ifdef USE_SHM
+#ifdef HAVE_XSHM
if (ximagesink->xcontext->use_xshm)
{
ximage->ximage = XShmCreateImage (ximagesink->xcontext->disp,
ximage->width * (ximagesink->xcontext->bpp / 8));
GST_DEBUG ("ximagesink creating an image without XShm");
-#endif /* USE_SHM */
+#endif /* HAVE_XSHM */
if (ximage->ximage)
{
g_mutex_lock (ximagesink->x_lock);
-#ifdef USE_SHM
+#ifdef HAVE_XSHM
if (ximagesink->xcontext->use_xshm)
{
if (ximage->SHMInfo.shmaddr)
#else
if (ximage->ximage)
XDestroyImage(ximage->ximage);
-#endif /* USE_SHM */
+#endif /* HAVE_XSHM */
g_mutex_unlock (ximagesink->x_lock);
x = MAX (0, (attr.width - ximage->width) / 2);
y = MAX (0, (attr.height - ximage->height) / 2);
-#ifdef USE_SHM
+#ifdef HAVE_XSHM
if (ximagesink->xcontext->use_xshm)
{
XShmPutImage (ximagesink->xcontext->disp, ximagesink->xwindow->win,
XPutImage (ximagesink->xcontext->disp, ximagesink->xwindow->win,
ximagesink->xwindow->gc, ximage->ximage,
0, 0, x, y, ximage->width, ximage->height);
-#endif /* USE_SHM */
+#endif /* HAVE_XSHM */
XSync(ximagesink->xcontext->disp, FALSE);
xcontext->endianness = (ImageByteOrder (xcontext->disp) == LSBFirst) ? G_LITTLE_ENDIAN:G_BIG_ENDIAN;
-#ifdef USE_SHM
+#ifdef HAVE_XSHM
/* Search for XShm extension support */
if (XQueryExtension (xcontext->disp, "MIT-SHM", &i, &i, &i))
{
xcontext->use_xshm = FALSE;
GST_DEBUG ("ximagesink is not using XShm extension");
}
-#endif /* USE_SHM */
+#endif /* HAVE_XSHM */
if (xcontext->endianness == G_LITTLE_ENDIAN && xcontext->depth == 24) {
xcontext->endianness = G_BIG_ENDIAN;