[gst-devel] Newbie questions: specialised source and sink plugins or not? etc

Thomas Vander Stichele thomas at apestaart.org
Wed Jul 28 05:10:03 CEST 2004


Hi,

> I'm looking again at gstreamer, hoping that it will be ideal for
> rejuvenating sound support in a GUI application program which currently
> uses SGI's (old but open source) dmSDK. I've been given lots of AIFF
> files which the program should play. The obvious approach seemed to be
> to use gstreamer's afsrc plugin, but gst-inspect shows no indication
> that it has a seek capability (yet?) - and I need this. I found it easy
> to make and test a (seeking) 'filesrc | mad | alsasink' pipeline. I
> wonder whether specialised source and sink plugins (e.g. afsrc, afsink)
> are preferred, or are not preferred, over the use of a general source
> plugin (filesrc) followed by a filter decoder (e.g. mad). Should there
> really be audiofile decoder and encoder plugins instead of afsrc and
> afsink? Is there ever a case where specialised source and sink plugins
> are imperative? Why did the author(s) of afsrc/afsink not choose to
> write 'afdec' and 'afenc' instead?

It was pretty simple - audiofile only has (maybe that changed) an API
where you specify what file to open.  Ie, it didn't provide a stream
interface.  I would have prefered to have made afdec and afenc instead
:)

> I don't understand seeking in general; I can see how e.g. a file source
> plugin can be made to seek - except that in my example pipeline above I
> found it necessary to make 'mad' seek (backwards and forwards), as I
> couldn't make filesrc seek (in bytes) - gst_element_seek(filesrc, ...)
> keeps returning false. (In any case, I wish eventually to seek in time,
> and for that I need to command the decoder to seek.) When I command
> 'mad' to seek, is a message passed back along the pipeline from 'mad' to
> command filesrc to seek?

Someone else will have to help you because I can't remember specifics,
but filesrc seeking definately works.

> By the way, something I don't find in the Application Development Manual
> (0.8.3.3); what does a '*parse' plugin do? (I understand the general
> computer science meaning of the word, but what does it mean in a
> multimedia pipeline context?) Is it simply a (programmable?) recogniser
> for certain (specified) waveforms?

It sort of depends :) You could say that a parse plugin doesn't change
the data, but is able to set correct caps on its src pad, or reframe
buffers so that they match the stream's inherent buffer size.  For
example, I think mpegparse reframes to one buffer per mpeg frame. 
vorbisparse makes sure streamheader caps are set correctly on the src
pad.  And so on...

Thomas


Dave/Dina : future TV today ! - http://www.davedina.org/
<-*- thomas (dot) apestaart (dot) org -*->
I used to play with toy guns and knives with my daddy
He never taught me how to kill
<-*- thomas (at) apestaart (dot) org -*->
URGent, best radio on the net - 24/7 ! - http://urgent.fm/






More information about the gstreamer-devel mailing list