ximagesrc: avoid blocking wait for X events
authorJakub Adam <jakub.adam@collabora.com>
Fri, 10 Dec 2021 15:08:27 +0000 (16:08 +0100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 10 Dec 2021 20:43:09 +0000 (20:43 +0000)
commit6d67b43352d01a586b48c100e6c3aa3a72b0d382
tree0913a9034d45b9ad31c72e5d13e629beb115eb87
parentf509578de5dd1f39bf5eed717f91be85c6a5f85b
ximagesrc: avoid blocking wait for X events

XNextEvent() blocks indefinitely in absence of X11 events, which can
prevent the pipeline from stopping.

This can cause problems when ximagesrc is used in "remote desktop"
scenarios and the GStreamer application itself, through which the user
is viewing and controlling the machine, is the only source of input
events.

Replace the call with non-blocking XCheckTypedEvent().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1438>
subprojects/gst-plugins-good/sys/ximage/gstximagesrc.c