Questions regarding threadshare's ts-udpsink

Hi all,

to enhance the performance of my (working) application I’m trying to replace the standard GStreamer elements with their threadshare counterparts (namely udpsrc and udpsink). Unfortunately, I’m running into a few issues that I would like to clarifiy/solve:

  • From what I’ve seen in my tests the ts-udpsink element will always try to use an IPv4 and an IPv6 socket, e.g. it doesn’t seem to be possible to disable IPv6 (which would be unnecessary in my application). Is this correct?

  • The ts-udpsink element seems to never close its socket. I would expect the socket to be closed when the pipeline is set to GST_STATE_NULL (and also unrefed) but I still see the ports open when running netcat, is this intentional? Do I have to take care of that myself? I’m not passing a socket object, I let the ts-udpsink element allocate the socket.

I’m on Linux and my application is written in C. Can anybody with experience using these plugins point me in the right direction?

Edit1: Forgot to mention I’m experiencing this with a build from the main branch revision db2ef187f3c6d96491ae36a824b34a88af386e33 (Mon Dec 1 18:16:03 2025 +0200).

Edit2: Sorry, I was confusing myself, actually both phenomenons are related to ts-udpsink

I was able to answer the first question myself: Yes the ts-udpsink element always uses two sockets, one for IPv4 and one for IPv6. This behaviour is not configurable.

Just in case someone ever comes across this: I also had a look into the second question and came to the conclusion that this is most probably not the intended behaviour.

I filed merge requests addressing both issues: