diff --git a/video/out/vo_x11.c b/video/out/vo_x11.c index 35ca4cda0e..b7bd64b0a5 100644 --- a/video/out/vo_x11.c +++ b/video/out/vo_x11.c @@ -157,7 +157,7 @@ static int find_depth_from_visuals(struct vo *vo, Visual ** visual_return) static void getMyXImage(struct priv *p, int foo) { struct vo *vo = p->vo; -#if HAVE_SHM +#if HAVE_SHM && HAVE_XEXT if (vo->x11->display_is_local && XShmQueryExtension(vo->x11->display)) { p->Shmem_Flag = 1; vo->x11->ShmCompletionEvent = XShmGetEventBase(vo->x11->display) @@ -221,7 +221,7 @@ shmemerror: memset(p->myximage[foo]->data, 0, p->myximage[foo]->bytes_per_line * p->image_height); p->ImageData[foo] = p->myximage[foo]->data; -#if HAVE_SHM +#if HAVE_SHM && HAVE_XEXT } #endif } @@ -229,7 +229,7 @@ shmemerror: static void freeMyXImage(struct priv *p, int foo) { struct vo *vo = p->vo; -#if HAVE_SHM +#if HAVE_SHM && HAVE_XEXT if (p->Shmem_Flag) { XShmDetach(vo->x11->display, &p->Shminfo[foo]); XDestroyImage(p->myximage[foo]); @@ -397,7 +397,7 @@ static void Display_Image(struct priv *p, XImage *myximage) XImage *x_image = p->myximage[p->current_buf]; -#if HAVE_SHM +#if HAVE_SHM && HAVE_XEXT if (p->Shmem_Flag) { XShmPutImage(vo->x11->display, vo->x11->window, vo->x11->vo_gc, x_image, 0, 0, p->dst.x0, p->dst.y0, p->dst_w, p->dst_h, @@ -443,7 +443,7 @@ static mp_image_t *get_screenshot(struct vo *vo) static void wait_for_completion(struct vo *vo, int max_outstanding) { -#if HAVE_SHM +#if HAVE_SHM && HAVE_XEXT struct priv *ctx = vo->priv; struct vo_x11_state *x11 = vo->x11; if (ctx->Shmem_Flag) { diff --git a/video/out/vo_xv.c b/video/out/vo_xv.c index 7cd63fe965..ff5cfdbcd3 100644 --- a/video/out/vo_xv.c +++ b/video/out/vo_xv.c @@ -33,7 +33,7 @@ #include "config.h" -#if HAVE_SHM +#if HAVE_SHM && HAVE_XEXT #include #include #include @@ -91,7 +91,7 @@ struct xvctx { struct mp_rect dst_rect; uint32_t max_width, max_height; // zero means: not set int Shmem_Flag; -#if HAVE_SHM +#if HAVE_SHM && HAVE_XEXT XShmSegmentInfo Shminfo[2]; int Shm_Warned_Slow; #endif @@ -490,7 +490,7 @@ static bool allocate_xvimage(struct vo *vo, int foo) struct vo_x11_state *x11 = vo->x11; // align it for faster OSD rendering (draw_bmp.c swscale usage) int aligned_w = FFALIGN(ctx->image_width, 32); -#if HAVE_SHM +#if HAVE_SHM && HAVE_XEXT if (x11->display_is_local && XShmQueryExtension(x11->display)) { ctx->Shmem_Flag = 1; x11->ShmCompletionEvent = XShmGetEventBase(x11->display) @@ -544,7 +544,7 @@ static bool allocate_xvimage(struct vo *vo, int foo) static void deallocate_xvimage(struct vo *vo, int foo) { struct xvctx *ctx = vo->priv; -#if HAVE_SHM +#if HAVE_SHM && HAVE_XEXT if (ctx->Shmem_Flag) { XShmDetach(vo->x11->display, &ctx->Shminfo[foo]); shmdt(ctx->Shminfo[foo].shmaddr); @@ -557,7 +557,7 @@ static void deallocate_xvimage(struct vo *vo, int foo) XFree(ctx->xvimage[foo]); ctx->xvimage[foo] = NULL; -#if HAVE_SHM +#if HAVE_SHM && HAVE_XEXT ctx->Shminfo[foo] = (XShmSegmentInfo){0}; #endif @@ -573,7 +573,7 @@ static inline void put_xvimage(struct vo *vo, XvImage *xvi) struct mp_rect *dst = &ctx->dst_rect; int dw = dst->x1 - dst->x0, dh = dst->y1 - dst->y0; int sw = src->x1 - src->x0, sh = src->y1 - src->y0; -#if HAVE_SHM +#if HAVE_SHM && HAVE_XEXT if (ctx->Shmem_Flag) { XvShmPutImage(x11->display, ctx->xv_port, x11->window, x11->vo_gc, xvi, src->x0, src->y0, sw, sh, @@ -627,7 +627,7 @@ static void draw_osd(struct vo *vo, struct osd_state *osd) static void wait_for_completion(struct vo *vo, int max_outstanding) { -#if HAVE_SHM +#if HAVE_SHM && HAVE_XEXT struct xvctx *ctx = vo->priv; struct vo_x11_state *x11 = vo->x11; if (ctx->Shmem_Flag) {