[gst-devel] playbin: get sample rate and channels in current stream

Alfred E. Heggestad aeh at db.org
Fri Sep 1 11:25:33 CEST 2006


hi

I started using gstreamer yesterday in my streaming application,
and was really impressed with gstreamer; it was really easy for
me the make a small sample test program and get mp3/ogg streaming
playing within a couple of hours. The design is also amazing ;)


so I have now using the elements "playbin" as source and "fakesink"
and sink, the latter with my custom "handoff" callback function to
manipulate received PCM data. it works greatly.


now, what I am not able to understand is how can I get the samplerate
and number of channels for the current stream??? I was able to get
the type and caps from the "stream-info" propertly, but not samplerate..
if you can give me some hints of how to get samplerate and channels
I would be very grateful.


gstreamer version is 0.10.6 from Ubuntu


Note: my test program for reference: http://aeh.db.org/pub/test.c




/alfred




More information about the gstreamer-devel mailing list