Skip to content

Commit

Permalink
Remove the legacy X11 screen grabber
Browse files Browse the repository at this point in the history
The XCB screen grabber is a drop-in replacement and not under GPL.
  • Loading branch information
DonDiego committed Jul 29, 2016
1 parent 8495d84 commit 4fef648
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 662 deletions.
1 change: 1 addition & 0 deletions Changelog
Expand Up @@ -61,6 +61,7 @@ version <next>:
- Duck TrueMotion 2.0 Real Time decoder
- Intel QSV video scaling and deinterlacing filter
- OpenH264 decoder wrapper
- Removed the legacy X11 screen grabber, use XCB instead


version 11:
Expand Down
1 change: 0 additions & 1 deletion LICENSE
Expand Up @@ -13,7 +13,6 @@ configure to activate them. In this case, Libav's license changes to GPL v2+.

Specifically, the GPL parts of Libav are

- the X11 grabber in libavdevice/x11grab.c
- the texi2pod.pl tool
- the following filters in libavfilter:
- vf_blackframe.c
Expand Down
13 changes: 2 additions & 11 deletions configure
Expand Up @@ -227,7 +227,6 @@ External library support:
--enable-libxcb-xfixes X11 mouse rendering [auto]
--enable-libxvid MPEG-4 ASP video encoding
--enable-openssl crypto
--enable-x11grab X11 grabbing through xlib (legacy, use xcb instead)
--enable-zlib compression [autodetect]
The following libraries provide various hardware acceleration features:
Expand Down Expand Up @@ -1242,7 +1241,6 @@ EXTERNAL_LIBRARY_GPL_LIST="
libx265
libxavs
libxvid
x11grab
"

EXTERNAL_LIBRARY_NONFREE_LIST="
Expand Down Expand Up @@ -2369,7 +2367,6 @@ sndio_outdev_deps="sndio_h"
v4l2_indev_deps_any="linux_videodev2_h sys_videoio_h"
vfwcap_indev_deps="capCreateCaptureWindow vfwcap_defines"
vfwcap_indev_extralibs="-lavicap32"
x11grab_indev_deps="x11grab"
x11grab_xcb_indev_deps="libxcb"

# protocols
Expand Down Expand Up @@ -4752,10 +4749,10 @@ fi

check_lib X11/Xlib.h XOpenDisplay -lX11 && enable xlib

if enabled libxcb || enabled x11grab && ! disabled libxcb; then
if enabled libxcb; then
check_pkg_config xcb-shape xcb/shape.h xcb_shape_rectangles || {
enabled libxcb && die "ERROR: libxcb not found";
} && disable x11grab && enable libxcb
} && enable libxcb

disabled libxcb_shm ||
check_pkg_config xcb-shm xcb/shm.h xcb_shm_attach || {
Expand All @@ -4771,12 +4768,6 @@ if enabled libxcb || enabled x11grab && ! disabled libxcb; then
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

enabled vaapi &&
check_code cc "va/va.h" "vaCreateSurfaces(0, 0, 0, 0, 0, 0, 0, 0)" ||
disable vaapi
Expand Down
1 change: 0 additions & 1 deletion libavdevice/Makefile
Expand Up @@ -23,7 +23,6 @@ OBJS-$(CONFIG_SNDIO_INDEV) += sndio_dec.o sndio.o
OBJS-$(CONFIG_SNDIO_OUTDEV) += sndio_enc.o sndio.o
OBJS-$(CONFIG_V4L2_INDEV) += v4l2.o
OBJS-$(CONFIG_VFWCAP_INDEV) += vfwcap.o
OBJS-$(CONFIG_X11GRAB_INDEV) += x11grab.o
OBJS-$(CONFIG_X11GRAB_XCB_INDEV) += xcbgrab.o

# external libraries
Expand Down
1 change: 0 additions & 1 deletion libavdevice/alldevices.c
Expand Up @@ -58,7 +58,6 @@ void avdevice_register_all(void)
REGISTER_INOUTDEV(SNDIO, sndio);
REGISTER_INDEV (V4L2, v4l2);
REGISTER_INDEV (VFWCAP, vfwcap);
REGISTER_INDEV (X11GRAB, x11grab);
REGISTER_INDEV (X11GRAB_XCB, x11grab_xcb);

/* external libraries */
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/avdevice.h
Expand Up @@ -36,7 +36,7 @@
* (de)muxers in libavdevice are of the AVFMT_NOFILE type (they use their own
* I/O functions). The filename passed to avformat_open_input() often does not
* refer to an actually existing file, but has some special device-specific
* meaning - e.g. for x11grab it is the display name.
* meaning - e.g. for x11grab_xcb it is the display name.
*
* To use libavdevice, simply call avdevice_register_all() to register all
* compiled muxers and demuxers. They all use standard libavformat API.
Expand Down

0 comments on commit 4fef648

Please sign in to comment.