Gstreamer spider

hello all,

i use gstreamer for an audio player i’ve written, though i must
confess i don’t fully understand it - and the documentation i can find
online is not always terribly helpful.
for some reason i don’t seem to have the “spider” plugin… i’m
running ubuntu 10.4, and have installed all of the plugin packages
(base, good, bad, and ugly,) through the package manager, but
gst-inspect shows no spider plugin.
at the moment i’m using the “mad” plugin, which only allows for mp3
playback. when i try to use spider as a decoder, like this:

decoder = Gst::ElementFactory.make(“spider”, “foo”)

i get an error “…:in `add’: Gst::Element expected”

any ideas how i can install the spider plugin?

as a side question… anyone know of other sound libraries for ruby
that are as functional as gstreamer, but perhaps better documented?

thanks -

jk

2011/2/21 J. K. [email protected]:

playback. when i try to use spider as a decoder, like this:
thanks -
Locate bottlenecks in serial and parallel code that limit performance.
Best Open Source Mac Front-Ends 2023


ruby-gnome2-devel-en mailing list
[email protected]
ruby-gnome2-devel-en List Signup and Options

Hi.

I do not see spider in the plugins list :
http://gstreamer.freedesktop.org/documentation/plugins.html .
You can use playbin2.


Vincent C.

AFAIR spider was used in 0.8 series, it does not exist any more. Try
decodebin, playbin or playbin2

m.

hi, me again…

so if my understanding is right, playbin2 is a pipeline in and of
itself. i’ve tried modifying my code like this:

#########
@pipeline = Gst::ElementFactory.make(“playbin2”)
@pipeline.uri= @atBatURI
audiosink = Gst::ElementFactory.make(“autoaudiosink”)
@pipeline.add(audiosink)
… (truncated)
@pipeline.play
#########

this doesn’t throw any errors, but also doesn’t play the file! i’m
cleary doing something wrong here… i don’t program in C, so i’m
having a bit of a hard time with the documentation - seems i need to use
the #element_set_state function, to set the state to PLAYING, rather
than calling @pipeline.play - but i’m not having any luck… can anyone
set me straight here?

thanks again…

jk

[email protected] wrote in post #982983:

AFAIR spider was used in 0.8 series, it does not exist any more. Try
decodebin, playbin or playbin2

m.

hi,
thanks for the feedback - seems like playbin2 should be my answer, but
now this code:

filesrc = Gst::ElementFactory.make(“filesrc”)
filesrc.location = @atBatURI
decoder = Gst::ElementFactory.make(“playbin2”)
audiosink = Gst::ElementFactory.make(“autoaudiosink”)
@pipeline.add(filesrc, decoder, audiosink)
filesrc >> decoder >> audiosink

with @atBatURI being something like “file:///home/folder/track.mp3”,
gives me this error:

undefined method `>>’ for nil:NilClass

not sure if i’m getting nil for the filesource or the decoder… the
‘mad’ decoder that i was using doesn’t use URI’s, and i had to change
some code earlier upstream to make the filesource a URI location - maybe
i mucked it there. going to keep fiddling with it and see if i come up
with the answer - but if there’s something obvious that i’m missing i’d
appreciate it if someone could point it out to me!

edit…

as i’m reading the playbin2 page more, it looks as though i have to
set the uri property of the playbin, rather than just defining the
filesource as a URI address - is this true, and if so any ideas how i do
so?

thanks again for the help -

j

problem solved…

it was the audiosink that was causing my latest problems. using
playbin2 as the pipeline, without defining any other audiosink works
perfectly with #.play .

thanks once more for the links and advice.

-jk