From: Boris Reisig <[email protected]> works with (--enable-libxcb-shape) and without (--disable-libxcb-shape) now.
Signed-off-by: Michael Niedermayer <[email protected]> Conflicts: configure --- configure | 11 +++++++++-- libavdevice/xcbgrab.c | 6 +++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 1723dee..763aaf6 100755 --- a/configure +++ b/configure @@ -214,6 +214,7 @@ External library support: --enable-libxcb enable X11 grabbing using XCB [auto] --enable-libxcb-shm enable X11 grabbing shm communication [auto] --enable-libxcb-xfixes enable X11 grabbing mouse rendering [auto] + --enable-libxcb-shape enable X11 grabbing shape rendering [auto] --enable-libxvid enable Xvid encoding via xvidcore, native MPEG-4/Xvid encoder exists [no] --enable-openssl enable openssl [no] @@ -1177,6 +1178,7 @@ EXTERNAL_LIBRARY_LIST=" libxavs libxcb libxcb_shm + libxcb_shape libxcb_xfixes libxvid openssl @@ -4312,8 +4314,13 @@ if enabled libxcb; then enabled libxcb_xfixes && die "ERROR: libxcb_xfixes not found"; } && enable libxcb_xfixes; } - add_cflags "$xcb_cflags $xcb_shm_cflags $xcb_xfixes_cflags" - add_extralibs "$xcb_libs $xcb_shm_libs $xcb_xfixes_libs" + disabled libxcb_shape || { + check_pkg_config xcb-shape xcb/shape.h xcb_shape_get_rectangles || { + enabled libxcb_shape && die "ERROR: libxcb_shape not found"; + } && enable libxcb_shape; } + + add_cflags "$xcb_cflags $xcb_shm_cflags $xcb_xfixes_cflags $xcb_shape_cflags" + add_extralibs "$xcb_libs $xcb_shm_libs $xcb_xfixes_libs $xcb_shape_libs" fi fi diff --git a/libavdevice/xcbgrab.c b/libavdevice/xcbgrab.c index 01ad744..715955b 100644 --- a/libavdevice/xcbgrab.c +++ b/libavdevice/xcbgrab.c @@ -33,6 +33,10 @@ #include <xcb/shm.h> #endif +#if CONFIG_LIBXCB_SHAPE +#include <xcb/shape.h> +#endif + #include "libavformat/avformat.h" #include "libavformat/internal.h" @@ -579,7 +583,7 @@ static void setup_window(AVFormatContext *s) XCB_COPY_FROM_PARENT, mask, values); -#if XCB_SHAPE_RECTANGLES +#if CONFIG_LIBXCB_SHAPE xcb_shape_rectangles(c->conn, XCB_SHAPE_SO_SUBTRACT, XCB_SHAPE_SK_BOUNDING, XCB_CLIP_ORDERING_UNSORTED, c->window, -- 1.7.10.4 _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
