<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 31 Mar 2021, at 7:20 am, James <<a href="mailto:jam@tigger.ws" class="">jam@tigger.ws</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 24px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 24px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 24px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">On 30 Mar 2021, at 10:23 pm, gotsring <<a href="mailto:gotsring@live.com" class="">gotsring@live.com</a>> wrote:<br class=""><br class="">In this case, I don't think you need to iterate over all the elements<br class="">manually. You're just trying to grab references to the xvimagesink, correct?<br class="">If so, use gst_bin_get_by_name(), which returns a reference to the element<br class="">in question (or NULL). You can name your elements in gst_parse_launch to<br class="">make them easier to find.<br class=""><br class="">Something like:<br class="">// Name the xvimagesinks in the parse string (just add "name=custom_name")<br class="">char cmdline[1024];<br class="">snprintf(<br class=""> cmdline, 1024,<br class=""> "v4l2src device=%s ! tee name=t "<br class=""> "t. ! queue ! videoscale ! video/x-raw,width=768,height=576 ! "<br class=""> "videoconvert ! xvimagesink name=sink1 force-aspect-ratio=false "<br class=""> "t. ! queue ! videoscale ! video/x-raw,width=768,height=576 ! "<br class=""> "videoconvert ! xvimagesink name=sink2 force-aspect-ratio=false",<br class=""> argv[1]<br class="">);<br class="">pipeline = gst_parse_launch(cmdline, NULL);<br class=""><br class="">// Get references to the xvimagesink elements, we called them sink1 and<br class="">sink2<br class="">GstElement* sink1 = gst_bin_get_by_name(GST_BIN(pipeline), "sink1");<br class="">GstElement* sink2 = gst_bin_get_by_name(GST_BIN(pipeline), "sink2");<br class=""></blockquote><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 24px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 24px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Thank you lots</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 24px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""></div></blockquote></div><br class=""><div class="">I want to re-parent a window.</div><div class="">The only gooled results I can find are old and use depreciated apis.</div><div class=""><br class=""></div><div class="">I tried</div><div class=""><br class=""></div><div class=""><div class=""> GstVideoOverlay* ov1 = (GstVideoOverlay*) sink1;</div><div class=""> GstVideoOverlay* ov2 = (GstVideoOverlay*) sink2;</div><div class=""><br class=""></div><div class=""> gst_video_overlay_set_window_handle (ov1, (guintptr) preview1Wid);</div><div class=""><br class=""></div></div><div class="">based on</div><div class=""><br class=""></div><div class=""><a href="https://gstreamer.freedesktop.org/documentation/video/gstvideooverlay.html?gi-language=c#gst_video_overlay_set_window_handle" class="">https://gstreamer.freedesktop.org/documentation/video/gstvideooverlay.html?gi-language=c#gst_video_overlay_set_window_handle</a></div><div class=""><br class=""></div><div class="">but was rewarded with</div><div class=""><br class=""></div><div class=""><div class="">gcc myalt.c -o myalt `pkg-config --cflags --libs gstreamer-1.0`</div><div class="">/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /tmp/ccT1P5wY.o: in function `main':</div><div class="">myalt.c:(.text+0x316): undefined reference to `gst_video_overlay_set_window_handle'</div><div class="">collect2: error: ld returned 1 exit status</div><div class="">make: *** [Makefile:9: myalt] Error 1</div></div><div class=""><br class=""></div><div class="">Anybody please</div><div class="">James</div></body></html>