Q: HowTo: Detect video/audio DecodeBin's before linking Pads?

Izzy Softy izzysoft2000 at gmail.com
Fri Mar 23 00:01:56 PDT 2012

Thank you Tim,

playbin2 is what i want to use eventually.

I just wanted to learn more about decodebin2.
I think i might have a working solution now.
(see attached zip file for C src, uses Clutter-Gst, Linux)

Anything in the src i might be doing wrong?

Side Note:   When playing  S3M, XM, MOD's, the Visualizer doesnt always
Well, "goom" seems to work... but "monoscope" does not! :(  Why is this?
 maybe it Failed to convert samples? :(

Thanks again for your help,

On Wed, Mar 21, 2012 at 2:43 AM, Tim-Philipp Müller <t.i.m at zen.co.uk> wrote:

> On Tue, 2012-03-20 at 21:33 -0700, Izzy Softy wrote:
> Hello,
> > Problem:
> >  - I want to automatically detect if a DecodeBin has Audio and Video.
> >  - If just Audio, then Tee DecodeBin's Src0 pad to create a VideoSink
> > for GOOM (or other Visualizers)
> >    and Tee DecodeBin's Src0 pad for AlsaSink (or whatever)
> >
> >
> > Tried:
> >   - g_signal_connect( decoder, "new-decoded-pad",
> > G_CALLBACK( on_decoder_pad_added ), NULL );
> >   - on_decoder_pad_added(...) is only aware of One pad at a time. is
> > there no way to check for audio/video?
> Indeed, you only get one pad at a time from (uri)decodebin(2).
> First of all, are you aware of playbin2 ? It looks like you're trying to
> re-implement what it does already, namely show visualisations if there's
> no video. If you're writing a playback application of some sort, you
> probably want to use playbin2.
> To answer your question, you can "block" the new pads you get notified
> about by (uri)decodebin(2), and decide what to do with them (link
> +unblock or just unblock+leave unlinked) once you've seen all pads (you
> get a "no-more-pads" signal).
>  Cheers
>  -Tim
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20120323/424ecfcc/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clutter_player.c.zip
Type: application/zip
Size: 3603 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20120323/424ecfcc/attachment.zip>

More information about the gstreamer-devel mailing list