[gst-devel] Play audio from a memory buffer?

Tim-Philipp Müller t.i.m at zen.co.uk
Tue Jan 4 15:55:09 CET 2011


On Tue, 2011-01-04 at 04:35 -0800, bcg wrote:

Hi,

> This should almost be an FAQ but it's not in there so here goes:
> 
> I have a pipeline thus:
> 
> file-source ->  decodebin -> audioresample -> converter -> audio_output
> 
> Using location (or fd if I change file_source to a fdsrc) I can happily play
> most audio I throw at it (including mp3s) providing its in a file. What I
> would like to do is play from a memory location with the mp3 data already in
> it.
> 
> I am assuming I would need to use a fakesrc with a callback to get my data
> into the pipeline - I've tried lots of variations on this and gotten
> nowhere. 
> 
> Can I just replace the file-source with the fakesrc, load the data and go
> (if this is possible couple someone provide an example)? Or do I have to
> worry about queues and caps? If so, can someone provide an example? Will
> decodebin suffice or will I have to be more specific?

Use appsrc.

Cheers
 -Tim






More information about the gstreamer-devel mailing list