I am using Wayland/Weston with GTK and trying to write a Python script to display video on the screen. I have a GTK window with a grid and I just add the widget below to the grid. Video is very choppy. It looks much smoother if I play it from Linux command line using gst-launch-1.0.
Here is my code for the widget: class VideoWidget(Gtk.Frame) def __init__(self) super().__init__() Gst.init(None) Gst.init_check(None) self.player = Gst.ElementFactory.make("playbin") self.connect('realize', self.on_realize) self.player.set_property("uri", "https://www.radiantmediaplayer.com/media/big-buck-bunny-360p.mp4") def on_realize(self, widget): self.gtksink = Gst.ElementFactory.make("gtksink") self.player.set_property("video-sink", self.gtksink) self.add(self.gtksink.props.widget) self.show_all() self.player.set_state(Gst.State.PLAYING) I saw mentions of "waylandsink" that can be used instead of "gtksink", but I couldn't figure out how to use it, since I don't know how to get Gtk.Widget from "waylandsink". I can get it to display in its own window, but I need to be able to control where it goes on the screen. Does anyone have any examples of how to use "waylandsink" with GTK? I don't have XWayland on my box. Any other suggestions on how to make playback less choppy? Thank you, Irene.
_______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel