[gst-devel] why is 'islast' parameter in "new-decoded-pad" signal on decodebin/decodebin2 deprecated?

Michael Smith msmith at xiph.org
Thu Mar 18 04:50:01 CET 2010


On Mon, Mar 15, 2010 at 10:25 PM, Alberto Vigata <alberto at nelalabs.com> wrote:
> Hello gstreamer devs,
>
> I was playing around with decodebin and decodebin2 and the docs say
> that the 'islast' parameter is now deprecated. The prototype for the
> "new-decoded-pad" singal handler is as follows:
>
> void                user_function                      (GstDecodeBin *bin,
>                                                        GstPad       *pad,
>                                                        gboolean      islast,
>                                                        gpointer
> user_data)
>
> The docs state that islast is deprecated for both decodebin and
> decodebin2. Certainly, there is the need of knowing when no more pads
> are going to become available so I'm assuming there is now a
> new/better way to get that information outside the "new-decoded-pad"
> signal. Which one is it?

The main reason for deprecating that is that it isn't reliable - you
have to implement your code as if this might never be called with it
set to true anyway. As such, there's not so much use in having it at
all.

This is because for some formats (including very common ones like
mpeg-{ps,ts}), new streams can actually start at any arbitrary time -
there's no way to know if there might be more pads added in the
future.

Mike




More information about the gstreamer-devel mailing list