Hi Is there a way to make a gstreamer video sink display video in another application using the X11 Window id as identifier pretty much the same way mplayer is using its '-wid' parameter to send video to another applications window/frame like a Tk frame. I think SDL can do it too, but probably only on X11 platforms. And can it be made to work with CLI version of gst-launch-1.0 ? I have checked the ximagesink, the xvimagesink and the glimagesink, but they do not have a window id parameter. Google search on subject for GStreamer, but maybe I am looking for the wrong keywords. Thanks in advance. Peter Maersk-Moller _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Yes, this is possible, but only if you
write code by using the GstVideoOverlay interface.
On X11, the Window is passed to the gst_video_overlay_set_window_handle(). Of course, if there is a specific video sink for your toolkit integration, you should try using that first though. Cheers -Matt On 22/5/20 10:09 pm, Peter Maersk-Moller wrote:
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel signature.asc (499 bytes) Download Attachment |
In reply to this post by Peter Maersk-Moller-2
Le vendredi 22 mai 2020 à 14:09 +0200, Peter Maersk-Moller a écrit :
It is not possible from gst-launch-1.0, here's a python example, though I'm not sure what is needed to make sure foreign window render will work. import gi gi.require_versions({"Gst": "1.0", "GstVideo": "1.0"}) from gi.repository import Gst, GstVideo import time Gst.init(None) p = Gst.parse_launch("videotestsrc ! ximagesink name=sink") s = p.get_by_name("sink") GstVideo.VideoOverlay.set_window_handle(s, 0x1000022) p.set_state(Gst.State.PLAYING) time.sleep(10) p.set_state(Gst.State.NULL) _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |