Dynamic pipelines: how to remove sinks?
Tal Liron
tal.liron at gmail.com
Sun Dec 30 15:16:51 PST 2012
Thanks, Tim! I have a followup question.
On 12/30/2012 04:53 PM, Tim-Philipp Müller wrote:
> What's the context here? What kind of sink is it? Perhaps it's enough
> to just unlink it, then set it to NULL state and remove it from the
> pipeline? Draining is only required if you need to make sure that e.g.
> muxers finalize headers and everything gets written to disk properly etc.
Ah, I see what you mean here. Draining *should* only matter if I'm using
file sinks.
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. ;)
I have another related question about the Vala binding. The example has
this code:
if (GST_EVENT_TYPE (GST_PAD_PROBE_INFO_DATA (info)) != GST_EVENT_EOS)
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) { ...
Am I right?
More information about the gstreamer-devel
mailing list