Commit a38a1d51 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'a6674d2e'

* commit 'a6674d2e':
  xcbgrab: XCB-based screen capture

Conflicts:
	Changelog
	configure
	libavdevice/Makefile
	libavdevice/alldevices.c
	libavdevice/version.h
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents a050cf0c a6674d2e
......@@ -8,6 +8,7 @@ version <next>:
- CAST128 symmetric block cipher, ECB mode
- STL subtitle demuxer and decoder
- libutvideo YUV 4:2:2 10bit support
- XCB-based screen-grabber
version 2.4:
- Icecast protocol
......
......@@ -251,6 +251,9 @@ External library support:
--enable-libx264 enable H.264 encoding via x264 [no]
--enable-libx265 enable HEVC encoding via x265 [no]
--enable-libxavs enable AVS encoding via xavs [no]
--enable-libxcb enable X11 grabbing using XCB [no]
--enable-libxcb-shm enable X11 grabbing shm communication [auto]
--enable-libxcb-xfixes enable X11 grabbing mouse rendering [auto]
--enable-libxvid enable Xvid encoding via xvidcore,
native MPEG-4/Xvid encoder exists [no]
--enable-libzmq enable message passing via libzmq [no]
......@@ -262,7 +265,7 @@ External library support:
--enable-opengl enable OpenGL rendering [no]
--enable-openssl enable openssl [no]
--disable-sdl disable sdl [autodetect]
--enable-x11grab enable X11 grabbing [no]
--enable-x11grab enable X11 grabbing (legacy) [no]
--disable-xlib disable xlib [autodetect]
--disable-zlib disable zlib [autodetect]
......@@ -1381,6 +1384,9 @@ EXTERNAL_LIBRARY_LIST="
libx264
libx265
libxavs
libxcb
libxcb_shm
libxcb_xfixes
libxvid
libzmq
libzvbi
......@@ -2495,6 +2501,7 @@ vfwcap_indev_extralibs="-lavicap32"
xv_outdev_deps="X11_extensions_Xvlib_h XvGetPortAttribute"
xv_outdev_extralibs="-lXv -lX11 -lXext"
x11grab_indev_deps="x11grab"
x11grab_xcb_indev_deps="libxcb"
# protocols
bluray_protocol_deps="libbluray"
......@@ -5015,10 +5022,30 @@ fi
enabled xlib &&
check_lib X11/Xlib.h XOpenDisplay -lX11 || disable xlib
enabled x11grab &&
require Xext X11/extensions/XShm.h XShmCreateImage -lXext &&
require Xfixes X11/extensions/Xfixes.h XFixesGetCursorImage -lXfixes &&
{ enabled xlib || die "ERROR: Xlib not found"; }
if enabled libxcb || enabled x11grab && ! disabled libxcb; then
check_pkg_config xcb-event xcb/xcb.h xcb_connect || {
enabled libxcb && die "ERROR: libxcb not found";
} && disable x11grab && enable libxcb
disabled libxcb_shm ||
check_pkg_config xcb-shm xcb/shm.h xcb_shm_attach || {
enabled libxcb_shm && die "ERROR: libxcb_shm not found";
} && check_header sys/shm.h && enable libxcb_shm
disabled libxcb_xfixes ||
check_pkg_config xcb-xfixes xcb/xfixes.h xcb_xfixes_get_cursor_image || {
enabled libxcb_xfixes && die "ERROR: libxcb_xfixes not found";
} && enable libxcb_xfixes
add_cflags "$xcb_event_cflags $xcb_shm_cflags $xcb_xfixes_cflags"
add_extralibs "$xcb_event_libs $xcb_shm_libs $xcb_xfixes_libs"
fi
if enabled x11grab; then
enabled xlib || die "ERROR: Xlib not found"
require Xext X11/extensions/XShm.h XShmCreateImage -lXext
require Xfixes X11/extensions/Xfixes.h XFixesGetCursorImage -lXfixes
fi
check_func_headers "windows.h" CreateDIBSection "$gdigrab_indev_extralibs"
......
......@@ -47,6 +47,7 @@ OBJS-$(CONFIG_V4L2_OUTDEV) += v4l2enc.o v4l2-common.o
OBJS-$(CONFIG_V4L_INDEV) += v4l.o
OBJS-$(CONFIG_VFWCAP_INDEV) += vfwcap.o
OBJS-$(CONFIG_X11GRAB_INDEV) += x11grab.o
OBJS-$(CONFIG_X11GRAB_XCB_INDEV) += xcbgrab.o
OBJS-$(CONFIG_XV_OUTDEV) += xv.o
# external libraries
......
......@@ -69,6 +69,7 @@ void avdevice_register_all(void)
// REGISTER_INDEV (V4L, v4l
REGISTER_INDEV (VFWCAP, vfwcap);
REGISTER_INDEV (X11GRAB, x11grab);
REGISTER_INDEV (X11GRAB_XCB, x11grab_xcb);
REGISTER_OUTDEV (XV, xv);
/* external libraries */
......
......@@ -28,7 +28,7 @@
#include "libavutil/version.h"
#define LIBAVDEVICE_VERSION_MAJOR 56
#define LIBAVDEVICE_VERSION_MINOR 1
#define LIBAVDEVICE_VERSION_MINOR 2
#define LIBAVDEVICE_VERSION_MICRO 100
#define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment