waylandsink: Handle wl_buffer::release and don't reuse buffers that are not released
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>
Fri, 7 Mar 2014 14:16:30 +0000 (16:16 +0200)
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.com>
Tue, 17 Jun 2014 11:51:24 +0000 (13:51 +0200)
commit51a2c694ad8dc56c5c8fb4c2f11ab7982eb54023
tree82acd946c1b45d38e14fc1165cb8227b93db0f3c
parent4b2d76873d5c21a91fa4258201072a6d255ef292
waylandsink: Handle wl_buffer::release and don't reuse buffers that are not released

This is achieved by adding an extra reference on the buffers, which does
not allow them to return to the pool. When they are released, this reference
is dropped.

The rest complexity of this patch (hash table, mutex, flag, explicit release calls)
merely exists to allow a safe, guaranteed and deadlock-free destruction sequence.
See the added comment on gstwaylandsink.c for details.
ext/wayland/gstwaylandsink.c
ext/wayland/waylandpool.c
ext/wayland/waylandpool.h