waylandsink: stack the video subsurface into another subsurface that covers the whole...
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>
Tue, 1 Jul 2014 08:43:20 +0000 (11:43 +0300)
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.com>
Sat, 11 Oct 2014 12:57:14 +0000 (14:57 +0200)
commit5b1c5dbf995cefa2f090522b802c3a24d639e7de
tree3e462c8371c8671817024428f416a37fa209f959
parentee7968dd4a6a575b8b42b833937e158bba834402
waylandsink: stack the video subsurface into another subsurface that covers the whole render rectangle

The main reason behind this is that when the video caps change and the video
subsurface needs to resize and change position, the wl_subsurface.set_position
call needs a commit in its parent in order to take effect. Previously,
the parent was the application's surface, over which there is no control.
Now, the parent is inside the sink, so we can commit it and change size smoothly.

As a side effect, this also allows the sink to draw its black borders on
its own, without the need for the application to do that. And another side
effect is that this can now allow resizing the sink when it is in top-level
mode and have it respect the aspect ratio.
ext/wayland/gstwaylandsink.c
ext/wayland/wlbuffer.c
ext/wayland/wlbuffer.h
ext/wayland/wlvideoformat.h
ext/wayland/wlwindow.c
ext/wayland/wlwindow.h