summaryrefslogtreecommitdiffstats
path: root/video/out/vo_xv.c
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2013-12-25 17:06:32 +0100
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2013-12-25 17:07:51 +0100
commit7d553a4c26e3add66d636bcde6b74fb48cfceabf (patch)
treefb5a71c079d85a4bbaaa101bf097faf14ecf0975 /video/out/vo_xv.c
parentf691d8f7b65f93c08fb93505a05187cc232273b0 (diff)
downloadmpv-7d553a4c26e3add66d636bcde6b74fb48cfceabf.tar.bz2
mpv-7d553a4c26e3add66d636bcde6b74fb48cfceabf.tar.xz
vo_x11/vo_xv: fix build when using --disable-xext
Diffstat (limited to 'video/out/vo_xv.c')
-rw-r--r--video/out/vo_xv.c14
1 files changed, 7 insertions, 7 deletions
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 <sys/ipc.h>
#include <sys/shm.h>
#include <X11/extensions/XShm.h>
@@ -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) {