Thank you Tim,<div><br></div><div>playbin2 is what i want to use eventually.</div><div><br></div><div>I just wanted to learn more about decodebin2.</div><div>I think i might have a working solution now. </div><div>(see attached zip file for C src, uses Clutter-Gst, Linux)</div>
<div><br></div><div>Anything in the src i might be doing wrong?</div><div><br></div><div>Side Note: When playing S3M, XM, MOD's, the Visualizer doesnt always work.</div><div>Well, "goom" seems to work... but "monoscope" does not! :( Why is this? maybe it Failed to convert samples? :(</div>
<div><br></div><div>Thanks again for your help,</div><div>Izzy.</div><div><br></div><div><br><br><div class="gmail_quote">On Wed, Mar 21, 2012 at 2:43 AM, Tim-Philipp Müller <span dir="ltr"><<a href="mailto:t.i.m@zen.co.uk">t.i.m@zen.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, 2012-03-20 at 21:33 -0700, Izzy Softy wrote:<br>
<br>
Hello,<br>
<div class="im"><br>
> Problem:<br>
> - I want to automatically detect if a DecodeBin has Audio and Video.<br>
> - If just Audio, then Tee DecodeBin's Src0 pad to create a VideoSink<br>
> for GOOM (or other Visualizers)<br>
> and Tee DecodeBin's Src0 pad for AlsaSink (or whatever)<br>
><br>
><br>
> Tried:<br>
> - g_signal_connect( decoder, "new-decoded-pad",<br>
> G_CALLBACK( on_decoder_pad_added ), NULL );<br>
> - on_decoder_pad_added(...) is only aware of One pad at a time. is<br>
> there no way to check for audio/video?<br>
<br>
</div>Indeed, you only get one pad at a time from (uri)decodebin(2).<br>
<br>
First of all, are you aware of playbin2 ? It looks like you're trying to<br>
re-implement what it does already, namely show visualisations if there's<br>
no video. If you're writing a playback application of some sort, you<br>
probably want to use playbin2.<br>
<br>
To answer your question, you can "block" the new pads you get notified<br>
about by (uri)decodebin(2), and decide what to do with them (link<br>
+unblock or just unblock+leave unlinked) once you've seen all pads (you<br>
get a "no-more-pads" signal).<br>
<br>
Cheers<br>
-Tim<br>
<br>
<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div><br></div>