<div dir="ltr"><div>I've learnt the hard way that it's important to be aware of floating references with gstreamer. In a simple gjs script to run a playbin I was having problems with various symptoms, including the pipeline usually stalling or deadlocking or something, that I couldn't track down. Then on a different machine the symptoms included lots of errors about unreffing objects while the pipeline was still in PLAYING state. I added gst_object_ref_sink() where appropriate and all the problems went away. But I have to use ref_sink() in the Javascript too. If I miss out the second of these two lines, I get all the nasty symptoms back;</div><div><br></div><div><font face="monospace">    const playbin = Gst.ElementFactory.make("playbin", "play");<br>    playbin.ref_sink();<br></font></div><div><br></div>I think bindings are supposed to be able to work without explicit (user) calls to ref_sink() when they encounter '(transfer floating)' aren't they? So does gjs not support this (yet)? <div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 21 Sep 2020 at 16:55, Tony Houghton <<a href="mailto:h@realh.co.uk">h@realh.co.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I'm having some trouble using GStreamer with gjs. I wasn't sure whether it was supposed top be supported at all, because Javascript isn't mentioned in its <a href="https://gstreamer.freedesktop.org/bindings/" target="_blank">list of bindings</a>, and other bindings, like python, seem to need help from custom bindings instead of being able to rely on gi alone. But the API docs support Javascript, so it seems like gjs is intended to be supported.<div>-- <br></div></div></blockquote></div><div dir="ltr" class="gmail_signature"><div dir="ltr">TH<div><br></div></div></div></div></div>