How to use "gst_element_link_filtered" correctly?

Victor henri nadaeck at hotmail.com
Tue Nov 4 05:13:31 PST 2014


Hello

I have a question regarding the use of "gst_element_link_filtered" in my pipeline.
My app display harmonics of the sound either from the mic, or from a sound file.

If microphone is the source, pipeline looks like this :

alsasrc, equalizer, equalizer2, equalizer3, audioconvert1, BP_BRfilter, audioconvert2, spectrum, flacenc, autoaudiosink

If an audio file is the source, I use a playbin whose sink is a pipeline like this :

audioconvert1, equalizer, equalizer2, equalizer3, audioconvert1, audiochebband, audioconvert2, spectrum, flacenc, autoaudiosink

I have seen in the example that spectrum should be linked that way :

caps = gst_caps_new_simple ("audio/x-raw", "rate", G_TYPE_INT, AUDIOFREQ, NULL);  (or "audio/x-raw-int" in gst-0.10)

  if (!gst_element_link (src, audioconvert) ||
      !gst_element_link_filtered (audioconvert, spectrum, caps) ||
      !gst_element_link (spectrum, sink)) {
    fprintf (stderr, "can't link elements\n");
    exit (1);
  }
  gst_caps_unref (caps);

But in my case, "gst_element_link_many" works. 'gst_element_link_filtered" seems unnecessary. Where should I put it to be correct? After each Audioconvert element?

In the example of equalizer, a single capsfilter element is created and put between src and equalizer-spectrum-sink.

Actually, if I put it or not, it works exactly the same. But since I have a problem of high ratio backgroung noise/sound after porting from gst-0.10 to gst-1.0, I want to see if I can improve something here.

Thank you

Victor
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20141104/ed479d4d/attachment.html>


More information about the gstreamer-devel mailing list