summaryrefslogtreecommitdiff
path: root/ext/wayland/wldisplay.h
Commit message (Collapse)AuthorAgeFilesLines
* waylandsink: take into account the case where a pool may be destroyed ↵George Kiagiadakis2014-10-111-0/+2
| | | | | | | | | | | | together with GstWlDisplay There are two cases covered here: 1) The GstWlDisplay forces the release of the last buffer and the pool gets destroyed in this context, which means it unregisters all the other buffers from the GstWlDisplay as well and the display->buffers hash table gets corrupted because it is iterating. 2) The pool and its buffers get destroyed concurrently from another thread while GstWlDisplay is finalizing and many things get corrupted.
* waylandsink: remove the ugly gst_wl_display_stop() now that this mechanism ↵George Kiagiadakis2014-10-111-1/+0
| | | | | | | | | | | | | | is not needed anymore Because we no longer have a custom buffer pool that holds a reference to the display, there is no way for a cyclic reference to happen like before, so we no longer need to explicitly call a function from the display to release the wl_buffers. However, the general mechanism of registering buffers to the display and forcibly releasing them when the display is destroyed is still needed to avoid potential memory leaks. The comment in wlbuffer.c is updated to reflect the current situation.
* waylandsink: rework the mechanism for keeping buffers out of the pool until ↵George Kiagiadakis2014-10-111-0/+7
| | | | | | | | | | | | | | | | | | wl_buffer::release This also removes the GstWlMeta and adds a wrapper class for wl_buffer which is saved in the GstBuffer qdata instead of being a GstMeta. The motivation behind this is mainly to allow attaching wl_buffers on GstBuffers that have not been allocated inside the GstWaylandBufferPool, so that if for example an upstream element is sending us a buffer from a different pool, which however does not need to be copied to a buffer from our pool because it may be a hardware buffer (hello dmabuf!), we can create a wl_buffer directly from it and first, attach it on it so that we don't have to re-create a wl_buffer every time the same GstBuffer arrives and second, force the whole mechanism for keeping the buffer out of the pool until there is a wl_buffer::release on that foreign GstBuffer.
* waylandsink: create and maintain the subsurface inside the sinkGeorge Kiagiadakis2014-06-171-0/+1
| | | | | | | | | | | | | | | | | This means that the given surface in set_window_handle can now be the window's top-level surface on top of which waylandsink creates its own subsurface for rendering the video. This has many advantages: * We can maintain aspect ratio by overlaying the subsurface in the center of the given area and fill the parent surface's area black in case we need to draw borders (instead of adding another subsurface inside the subsurface given from the application, so, less subsurfaces) * We can more easily support toolkits without subsurfaces (see gtk) * We can get properly use gst_video_overlay_set_render_rectangle as our api to set the video area size from the application and therefore remove gst_wayland_video_set_surface_size.
* waylandsink: add G_BEGIN/END_DECLS on all headers for consistencyGeorge Kiagiadakis2014-06-171-0/+4
|
* waylandsink: Use wl_scaler/wl_viewport to scale the surface in the ↵George Kiagiadakis2014-06-171-0/+2
| | | | compositor/hardware
* waylandsink: handle the list of supported formats properlyGeorge Kiagiadakis2014-06-171-1/+1
| | | | | enum wl_shm_format is not a flags enum, as it may have been in the past, so multiple formats cannot be stored in a bitfield. Use an array instead.
* waylandsink: process display events in a separate threadGeorge Kiagiadakis2014-06-171-0/+69
This also moves the display-related code into a new GstWlDisplay class, which takes care of the new thread