Dynamic pipelines: how to remove sinks?

Tim-Philipp Müller t.i.m at zen.co.uk
Sun Dec 30 15:26:36 PST 2012

On Sun, 2012-12-30 at 17:16 -0600, Tal Liron wrote:


> But ... what about network sinks? I currently support a udpsink (with an 
> rtpL15pay). Would there be any harm in unlinking it and removing it 
> while there's still something in its buffers?
> I don't care about data loss here, I just want to avoid memory leaks, 
> assertion failures, or other crashes. I'm assuming the sink elements 
> know how to destroy themselves properly and release their resources, ... 
> well, I'm hoping. ;)

It should not matter. If there's a leak or warning or crash, that's a
bug that needs to be fixed. But I would expect udpsink to be fairly
well-tested and robust in this respect.

Setting the sink to NULL state from a running pipeline is quite normal
when an application shuts down a pipeline. Whether you unlink upstream
before that or not should not make a difference in this case.

> I have another related question about the Vala binding. The example has 
> this code:
> There doesn't seem to be a Vala equivalent, but this is how I guessed it:
> PadProbeReturn on_event(Pad pad, PadProbeInfo info) {
>   var e = (Event) info.data;
>   if (e.type == EventType.EOS) { ...

var e = info.get_event(info);

should do the trick. We had to add accessor functions for
GstPadProbeInfo for bindings, see:


These should be available in all 1.x releases, even 1.0.0.


More information about the gstreamer-devel mailing list