After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 325213 - decodebin new-decoded-pad doesn't signal last pad
decodebin new-decoded-pad doesn't signal last pad
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
0.10.0
Other Linux
: Normal normal
: 0.10.11
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-12-29 11:33 UTC by Akos Maroy
Modified: 2008-05-26 11:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
sample code demonstrating the problem (2.40 KB, text/plain)
2005-12-29 11:35 UTC, Akos Maroy
Details

Description Akos Maroy 2005-12-29 11:33:28 UTC
The callback for the new-decoded-pad signal for the decodebin has the following signature:

static void
cb_newpad (GstElement *decodebin,
           GstPad     *pad,
           gboolean    last,
           gpointer    data);

and the last parameter should signal if this is the last pad to be created by the decode bin. unfortunately for me this is always FALSE, even on simple scenarios like decoding mp3 or ogg vorbis.
Comment 1 Akos Maroy 2005-12-29 11:35:30 UTC
Created attachment 56505 [details]
sample code demonstrating the problem

this is a sample code based on the decodebing sample code from the gstreamer manual at http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/section-components-decodebin.html
it prints the value of the last parameter in the decodebin new pad callback.

I tried with mp3 and ogg vorbis files, and even though there's only one pad created (naturally) for these, the value of last is 0.

one would expect the value to be non-zero.
Comment 2 Edward Hervey 2006-01-07 18:05:04 UTC
This is a problem with the way decodebin works currently.
Let's take id3demux as an example, it as a source pad template which is of availability 'Sometimes'. When decodebin sees that, it will currently assume they're might be more src pads to be created on that element... and therefore won't set last to TRUE (although there won't be any other pads afterwards).
Comment 3 Julien MOUTTE 2006-03-05 21:21:59 UTC
you have to use the no-more-pads signal.

This boolean is useless currently. Keep the bug open for Wim when he will redesign decodebin/playbin for 0.10.
Comment 4 Wim Taymans 2007-03-06 08:40:09 UTC
Edward, is this fixed in decodebin2?
Comment 5 Edward Hervey 2008-05-26 11:02:12 UTC
This is fixed in decodebin2, since there's internally the notion of groups (of queues/decoders/pads).

When a group is exposed, the last pad exposed will always trigger the signal with 'last' set to True.

Closing bug, use decodebin2 instead.