Commit graph

10 commits

Author SHA1 Message Date
George Kiagiadakis
51a2c694ad 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.
2014-06-17 13:51:24 +02:00
George Kiagiadakis
4b2d76873d waylandsink/waylandpool: remove useless munmap call
This data pointer is part of a bigger mmap'ed region,
it has not been returned from mmap itself.
2014-06-17 13:51:24 +02:00
George Kiagiadakis
a67b08cdd0 waylandsink/waylandpool: ref the display instead of the sink to avoid cyclic references
The reference to the sink is not really needed anyway in waylandpool,
what matters basically is that the display is active as long as the
pool is active, so we really want to reference the display object
instead of the sink.
2014-06-17 13:51:23 +02:00
George Kiagiadakis
ac9503ed65 waylandsink: cleanup header includes 2014-06-17 13:51:22 +02:00
George Kiagiadakis
d1480124a7 waylandsink/waylandpool: refactor code
* make use of GstBufferPool::start/stop functions to allocate/deallocate memory
* get rid of struct shm_pool and do all operations cleanly inside WaylandBufferPool
* store a GstVideoInfo during configuration instead of the width & height
  and use the stride from the video info instead of hardcoding its value
2014-06-17 13:51:21 +02:00
George Kiagiadakis
1e45b1480c waylandsink: move struct shm_pool and its related functions to waylandpool.c
And also make the instance of this struct to be owned by the buffer
pool instead of the element, for the sake of isolation
2014-06-17 13:51:21 +02:00
George Kiagiadakis
4208ae6203 waylandsink: remove unused variables 2014-06-17 13:51:21 +02:00
George Kiagiadakis
eb8ab3732e waylandsink: tidy up the header files 2014-06-17 13:51:20 +02:00
Tim-Philipp Müller
9e1b75fda3 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-04 00:09:59 +00:00
Sreerenj Balachandran
c803ca4af5 wayland: More fixes based on wayland-0.95.0 and gstreamer-1.0 apis
- bump wayland version to 0.95.0 which will lead to stable 1.0 release
- avoid memcopy and use propose_allocation for GstBufferPool allocation
- using WaylandBufferPool
- shm: Allocate shm buffers through new wl_shm_pool interface
  (the shm buffer allocation is a two step process now: first
  allocate a wl_shm_pool, then allocate a buffer from the pool)

https://bugzilla.gnome.org/show_bug.cgi?id=681453
2012-08-21 10:24:45 +01:00