vaapisink: listen to window size changes on X11.
authorHolger Kaelberer <hk@getslash.de>
Tue, 5 Nov 2013 13:01:11 +0000 (14:01 +0100)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Wed, 30 Jul 2014 13:46:14 +0000 (15:46 +0200)
commit4b61cc3cd71dcb7671faf43636010fd3b58404fb
tree19bed829c401f5fe91a0c98984a769ada70a0545
parent528f486513d406c45f1e30436f391f726bbb3b3d
vaapisink: listen to window size changes on X11.

Allow dynamic changes to the window, e.g. performed by the user, and
make sure to refresh its contents, while preserving aspect ratio.

In practice, Expose and ConfigureNotify events are tracked in X11
display mode by default. This occurs in a separte event thread, and
this is similar to what xvimagesink does. Any of those events will
trigger a reconfiguration of the window "soft" size, subsequently
the render-rect when necessary, and finally _expose() the result.

The default of handle_events=true can be changed programatically via
gst_x_overlay_handle_events().

Thanks to Fabrice Bellet for rebasing the patch.

https://bugzilla.gnome.org/show_bug.cgi?id=711478

[dropped XInitThreads(), cleaned up the code a little]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
gst/vaapi/gstvaapisink.c
gst/vaapi/gstvaapisink.h