Another approach to autoplugging

The autoplug API is interesting, but often impractical. It is static; it cannot deal with dynamic pipelines (insert ref here). What you often want is just an element to stick into a pipeline that will DWIM (Do What I Mean)(ref). Enter the spider.

The spider element is a generalized autoplugging element. At this point (April 2002), it's the best we've got; it can be inserted anywhere within a pipeline to perform caps conversion, if possible. Consider the following gst-launch line:

          $ gst-launch filesrc location=my.mp3 ! spider ! osssink
        

The spider will detect the type of the stream, autoplug it to the osssink's caps, and play the pipeline. It's neat.