<html dir="ltr"><head></head><body style="text-align:left; direction:ltr;"><div>Le vendredi 22 mai 2020 à 14:09 +0200, Peter Maersk-Moller a écrit :</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div dir="ltr"><div>Hi</div><div><br></div><div>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.</div><div><br></div><div>And can it be made to work with CLI version of gst-launch-1.0 ?<br></div><div><br></div><div>I have checked the ximagesink, the xvimagesink and the glimagesink, but they do not have a window id parameter.</div><div><br></div><div>Google search on subject for GStreamer, but maybe I am looking for the wrong keywords.</div></div></blockquote><div><br></div><div>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.</div><div><br></div><div><br></div><pre>import gi</pre><pre>gi.require_versions({"Gst": "1.0", "GstVideo": "1.0"})</pre><pre>from gi.repository import Gst, GstVideo</pre><pre>import time</pre><pre><br></pre><pre><br></pre><pre>Gst.init(None)</pre><pre>p = Gst.parse_launch("videotestsrc ! ximagesink name=sink")</pre><pre>s = p.get_by_name("sink")</pre><pre><br></pre><pre>GstVideo.VideoOverlay.set_window_handle(s, 0x1000022)</pre><pre>p.set_state(Gst.State.PLAYING)</pre><pre>time.sleep(10)</pre><pre>p.set_state(Gst.State.NULL)</pre></body></html>