meson: fix build when xrender or xrandr are not available

HAVE_XRENDER are defined to 1 or 0, not defined or undefined.
This commit is contained in:
Tim-Philipp Müller 2018-06-07 19:49:02 +01:00
parent d79bda3153
commit e31248dc28
3 changed files with 9 additions and 9 deletions

View file

@ -35,11 +35,11 @@
#include "gstvaapidisplay_x11_priv.h"
#include "gstvaapiwindow_x11.h"
#ifdef HAVE_XRANDR
#if HAVE_XRANDR
# include <X11/extensions/Xrandr.h>
#endif
#ifdef HAVE_XRENDER
#if HAVE_XRENDER
# include <X11/extensions/Xrender.h>
#endif
@ -114,11 +114,11 @@ check_extensions (GstVaapiDisplayX11 * display)
GstVaapiDisplayX11Private *const priv = display->priv;
int evt_base, err_base;
#ifdef HAVE_XRANDR
#if HAVE_XRANDR
priv->use_xrandr = XRRQueryExtension (priv->x11_display,
&evt_base, &err_base);
#endif
#ifdef HAVE_XRENDER
#if HAVE_XRENDER
priv->has_xrender = XRenderQueryExtension (priv->x11_display,
&evt_base, &err_base);
#endif
@ -260,7 +260,7 @@ gst_vaapi_display_x11_get_size_mm (GstVaapiDisplay * display,
width_mm = DisplayWidthMM (priv->x11_display, priv->x11_screen);
height_mm = DisplayHeightMM (priv->x11_display, priv->x11_screen);
#ifdef HAVE_XRANDR
#if HAVE_XRANDR
/* XXX: fix up physical size if the display is rotated */
if (priv->use_xrandr) {
XRRScreenConfiguration *xrr_config = NULL;

View file

@ -279,7 +279,7 @@ gst_vaapi_window_x11_destroy (GstVaapiWindow * window)
Display *const dpy = GST_VAAPI_OBJECT_NATIVE_DISPLAY (window);
const Window xid = GST_VAAPI_OBJECT_ID (window);
#ifdef HAVE_XRENDER
#if HAVE_XRENDER
GstVaapiWindowX11Private *const priv =
GST_VAAPI_WINDOW_X11_GET_PRIVATE (window);
if (priv->picture) {
@ -496,7 +496,7 @@ gst_vaapi_window_x11_render_pixmap_xrender (GstVaapiWindow * window,
GstVaapiPixmap * pixmap,
const GstVaapiRectangle * src_rect, const GstVaapiRectangle * dst_rect)
{
#ifdef HAVE_XRENDER
#if HAVE_XRENDER
GstVaapiWindowX11Private *const priv =
GST_VAAPI_WINDOW_X11_GET_PRIVATE (window);
Display *const dpy = GST_VAAPI_OBJECT_NATIVE_DISPLAY (window);

View file

@ -27,7 +27,7 @@
#include "gstvaapiwindow_priv.h"
#ifdef HAVE_XRENDER
#if HAVE_XRENDER
# include <X11/extensions/Xrender.h>
#endif
@ -49,7 +49,7 @@ struct _GstVaapiWindowX11Private
{
Atom atom_NET_WM_STATE;
Atom atom_NET_WM_STATE_FULLSCREEN;
#ifdef HAVE_XRENDER
#if HAVE_XRENDER
Picture picture;
#endif
guint is_mapped:1;