[gst-devel] Play audio filled in buffer

Stefan Kost ensonic at hora-obscura.de
Wed Jul 9 20:23:26 CEST 2008


Akbar Basha schrieb:
> Hi,
> 
> I would like to play the buffer , which is filled with any audio file data.
> Does gstreamer provides any mechanism to play.

if you have the whole bufer in memory, use a fakesrc with signal-handoffs=TRUE 
and connect to handoff signal. In the handoff signal you put the pointer to your 
data into the GST_BUFFER_DATA, set the correct GST_BUFFER_SIZE and clear 
GST_BUFFER_MALLOC_DATA (if it was previously set g_free() the previous content).

You should used a capsfilter after fakesrc and set the format of your sample on 
the capsfilter caps.

Its sort of a hack, but works fine.

Stefan

> 
> Thanks in advance.
> 
> Regards,
> Akbar
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
> Studies have shown that voting for your favorite open source project,
> along with a healthy diet, reduces your potential for chronic lameness
> and boredom. Vote Now at http://www.sourceforge.net/community/cca08
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel





More information about the gstreamer-devel mailing list