albfan / miraclecast

Connect external monitors to your system via Wifi-Display specification also known as Miracast
Other
3.84k stars 413 forks source link

gstplayer broken on wayland #183

Open albfan opened 7 years ago

albfan commented 7 years ago

https://github.com/albfan/miraclecast/blob/master/res/gstplayer#L171 https://github.com/albfan/miraclecast/blob/master/res/gstplayer#L184

$ gstplayer
Traceback (most recent call last):
  File "/usr/local/bin/gstplayer", line 229, in <module>
    p.run()
  File "/usr/local/bin/gstplayer", line 179, in run
    self.xid = self.drawingarea.get_property('window').get_xid()
AttributeError: 'GdkWaylandWindow' object has no attribute 'get_xid'
albfan commented 7 years ago

By now it can be workaround with:

$ GDK_BACKEND=x11 gstplayer

but there must be a proper fix, so I will keep this open

albfan commented 7 years ago

xid is the id for x11 so makes sense there's no such thing on Wayland.

Here are examples for same funcionality with new api:

https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/tests/examples/gtk

gstsink should work with wayland (changing whatever neccesary)

albfan commented 7 years ago

Meanwhile migration to Wayland is done adding this to init scripts (see #89)

if [ -n "$DISPLAY" -a -z "$SSH_CLIENT" ]; then
    xhost +si:localuser:root
fi

should work