GST Video overlay
Nicolas Dufresne
nicolas at ndufresne.ca
Mon Oct 31 18:07:56 UTC 2022
Le samedi 29 octobre 2022 à 16:20 +0100, yPhil via gstreamer-devel a écrit :
> Hi,
>
>
> I'm trying to get a video to display in a Gtk.Box() that I put in a
> paned container.
>
> I'm passing the window handle - I'm getting it from the widget in the
> realize callback - to the player class:
>
> def __on_sync_message(self, bus: Gst.Bus, message: Gst.Message) ->
> None:
> if message.get_structure().get_name() == "prepare-window-handle":
> image_sink = message.src
> image_sink.set_property("force-aspect-ratio", True)
> image_sink.set_window_handle(self.__xid)
>
> But that creates an overlay that covers the *whole* window
>
> Is there a way to avoid the creation of the overlay ?
To compose a video with Gtk, the only option is to use the widget provided by
the gtksink/gtkglsink elements. Due to GTK3 doing software render, be aware that
the final render will be done in software.
There is also some effort to get GTK4 support, I'll leave to the others the task
of explaining, as I have never used it myself (other then through an already
written application).
>
> There seems to be a way to explicitly create a videosink then wait for a
> buffer signal to somehow direct the playbin to it, then get a Gtk
> container to display it "directly" and I'd really like to know how to do
> that.
>
> But if the overlay is mandatory, and maybe it is (my app needs to be
> able to display the video in - real - full screen so it probably is)
> then how can I prevent it to cover the whole window (not just the paned
> container, the other widgets as well)?
>
> I hope I'm making sense, thank you for you patience.
>
>
> Phil
>
More information about the gstreamer-devel
mailing list