[gst-devel] patch adder plugin

Andy Wingo wingo at pobox.com
Tue Apr 2 08:57:05 CEST 2002

On Fri, 22 Mar 2002, Jim Thornton wrote:

> This is an attempt to handle EOS.  I have no idea what the best way to do 
> this is, but I picked this up from another loop function and it seems to 
> do the trick.  Without this we loop forever...

Actually, the adder is designed to put out zeroes if nothing is
connected to it on the sink side. It's a feature of sorts; think of the
case where you want it to act like a mixing bus.

However, I do see where you would want this behavior in an adder, I
think it should be implemented as a property, say 'eos-behavior'. One
behavior would be the current way of doing things, another would be to
pass along eos when any of its 'feeders' emits eos, and another would be
only to emit eos when the last feeder does so, as your patch appears to

So, if you would like to get this patch into adder's source, I think you
need to implement the 'eos-behavior' property. For that reason, I'm
going to hold off on committing this one.



> +++ gstadder.c  Fri Mar 22 14:01:41 2002
> @@ -384,7 +384,12 @@
>        zero_out[i] = 0;
>      /* get data from all of the sinks */
> -    inputs = adder->input_channels;
> +    if (adder->input_channels == NULL) {
> +      gst_pad_event_default(adder->srcpad, gst_event_new 
> +      break;
> +    } else {
> +      inputs = adder->input_channels;
> +    }
>      GST_DEBUG (0, "starting to cycle through channels\n");
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

More information about the gstreamer-devel mailing list