Commit graph

9 commits

Author SHA1 Message Date
George Kiagiadakis
0badc1f5fb waylandsink/wldisplay: verify that all the required interfaces have been found on the compositor
This allows waylandsink to fail gracefully before going to READY
in case one of the required interfaces does not exist. Not all
interfaces are necessary for all modes of operation, but it is
better imho to fail before going to READY if at least one feature
is not supported, than to fail and/or crash at some later point.

In the future we may want to relax this restriction and allow certain
interfaces not to be present under certain circumstances, for example
if there is an alternative similar interface available (for instance,
xdg_shell instead of wl_shell), but for now let's require them all.
Weston supports them all, which is enough for us now. Other compositors
should really implement them if they don't already. I don't like the
idea of supporting many different compositors with different sets of
interfaces implemented. wl_subcompositor, wl_shm and wl_scaler are
really essential for having a nice video sink. Enough said.
2014-06-17 13:51:30 +02:00
George Kiagiadakis
07f671fcaf waylandsink: create and maintain the subsurface inside the sink
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.
2014-06-17 13:51:27 +02:00
George Kiagiadakis
a543aef5ee waylandsink: Update wl_scaler to version 2 2014-06-17 13:51:26 +02:00
George Kiagiadakis
ec18fe8965 waylandsink/wldisplay: bind to the latest available wl_compositor version 2014-06-17 13:51:26 +02:00
George Kiagiadakis
086ac4ee81 waylandsink: Use wl_scaler/wl_viewport to scale the surface in the compositor/hardware 2014-06-17 13:51:25 +02:00
George Kiagiadakis
26ce7f2344 waylandsink: handle the list of supported formats properly
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.
2014-06-17 13:51:23 +02:00
George Kiagiadakis
350d919719 waylandsink: apply the same debug category to all the subobjects 2014-06-17 13:51:22 +02:00
George Kiagiadakis
ac9503ed65 waylandsink: cleanup header includes 2014-06-17 13:51:22 +02:00
George Kiagiadakis
e600a323b7 waylandsink: process display events in a separate thread
This also moves the display-related code into a new GstWlDisplay class,
which takes care of the new thread
2014-06-17 13:51:20 +02:00