[gst-devel] attaching a listener to autoplugging code

Quan Nguyen friday_morning at yahoo.com
Mon Jan 12 10:54:02 CET 2004


Thanks.  I tried it, but I get the following error when I use gst_parse_launch:
 
CRITICAL **: file gstsearchfuncs.c: line 332 (gst_autoplug_sp): assertion `sinkcaps != NULL' failed

This is how I do the spider:
 
pipeline = gst_parse_launch ("filesrc name=my_filesrc ! spider ! identity name=my_listnener ! osssink", &error);

What am I doing wrong?  It looks like the spider can't figure out how to match a plugin with the identity element.

Ronald Bultje <rbultje at ronald.bitfreak.net> wrote:
Hi Quan,

On Fri, 2004-01-09 at 23:26, Quan Nguyen wrote:
> oops. I forgot to attach my question. My question is how can I
> attach a listener to the pipeline if I am using the autoplugging
> technique? I attached the listener as shown below, but I couldn't get
> any data to the listener. Somehow the audio still plays, so the
> autoplugging code works. It's just that the listener does not seem to
> even be present. Does anyone have any ideas? Thanks.

Assuming you use spider, you have the following pipeline (in gst-launch
syntax, you'll get the idea):

filesrc location=file ! spider ! osssink

The listener can simply be added to the pipeline like this:

filesrc location=file ! spider ! identity ! osssink

Then attach your signal callback to the identity object after reating
it, and you're done.

Ronald

-- 
Ronald Bultje 
Linux Video/Multimedia developer


---------------------------------
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20040112/51c20138/attachment.htm>


More information about the gstreamer-devel mailing list