summaryrefslogtreecommitdiffstats
path: root/video/out/vo_xv.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-04-21 07:30:03 +0200
committerwm4 <wm4@nowhere>2017-04-21 07:30:03 +0200
commit927afa311d4a89b022305508acbf4e7325fe3928 (patch)
tree4c6aafa3fb81e67fffdfd991f9cf96693e6f3fda /video/out/vo_xv.c
parent4d1eab6e552681ef961ce48af74f6795e7077fc6 (diff)
downloadmpv-927afa311d4a89b022305508acbf4e7325fe3928.tar.bz2
mpv-927afa311d4a89b022305508acbf4e7325fe3928.tar.xz
build: make various x11 protocol extension libs mandatory
Reduces the ifdeffery, which is good and will avoid silent breakages, or weird behavior if a lib is omitted. Also reorder the x11_common.c include statements.
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 cbc64433ee..a866266f89 100644
--- a/video/out/vo_xv.c
+++ b/video/out/vo_xv.c
@@ -30,7 +30,7 @@
#include "config.h"
-#if HAVE_SHM && HAVE_XEXT
+#if HAVE_SHM
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
@@ -93,7 +93,7 @@ struct xvctx {
GC f_gc; // used to paint background
GC vo_gc; // used to paint video
int Shmem_Flag;
-#if HAVE_SHM && HAVE_XEXT
+#if HAVE_SHM
XShmSegmentInfo Shminfo[MAX_BUFFERS];
int Shm_Warned_Slow;
#endif
@@ -537,7 +537,7 @@ static bool allocate_xvimage(struct vo *vo, int foo)
int aligned_w = FFALIGN(ctx->image_width, 32);
// round up the height to next chroma boundary too
int aligned_h = FFALIGN(ctx->image_height, 2);
-#if HAVE_SHM && HAVE_XEXT
+#if HAVE_SHM
if (x11->display_is_local && XShmQueryExtension(x11->display)) {
ctx->Shmem_Flag = 1;
x11->ShmCompletionEvent = XShmGetEventBase(x11->display)
@@ -599,7 +599,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 && HAVE_XEXT
+#if HAVE_SHM
if (ctx->Shmem_Flag) {
XShmDetach(vo->x11->display, &ctx->Shminfo[foo]);
shmdt(ctx->Shminfo[foo].shmaddr);
@@ -612,7 +612,7 @@ static void deallocate_xvimage(struct vo *vo, int foo)
XFree(ctx->xvimage[foo]);
ctx->xvimage[foo] = NULL;
-#if HAVE_SHM && HAVE_XEXT
+#if HAVE_SHM
ctx->Shminfo[foo] = (XShmSegmentInfo){0};
#endif
@@ -628,7 +628,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 && HAVE_XEXT
+#if HAVE_SHM
if (ctx->Shmem_Flag) {
XvShmPutImage(x11->display, ctx->xv_port, x11->window, ctx->vo_gc, xvi,
src->x0, src->y0, sw, sh,
@@ -672,7 +672,7 @@ static struct mp_image get_xv_buffer(struct vo *vo, int buf_index)
static void wait_for_completion(struct vo *vo, int max_outstanding)
{
-#if HAVE_SHM && HAVE_XEXT
+#if HAVE_SHM
struct xvctx *ctx = vo->priv;
struct vo_x11_state *x11 = vo->x11;
if (ctx->Shmem_Flag) {