[gst-devel] Gstreamer's memory mgmt

Stefan Kost ensonic at hora-obscura.de
Sun Apr 26 16:19:04 CEST 2009


Sitanshu Nanavati schrieb:
> All,
>  
> I am interested in knowing how mem mgmt is done in Gstreamer. 
> Particularly, does each element use the same buffer or copy the data
> process and give it to output.  Didn't find much details on web.

You'll find them in the API docs (if you know where to look). There are
different schemes for different needs. The basic principle is
gst_buffer_new/gst_buffer_new_and_alloc, which will create a new buffer that the
element can fill and send out. Then there is gst_buffer_create_sub(), which is
used by parsers/demuxers/depayloaders a lot and refs a subregion of an existing
buffer (no copy). Finally there is gst_pad_alloc_buffer() which is used by e.g.
decoders to obtains a suitable buffer from a downstream element. The downstream
element can recycle the buffers to avoid the reallocations.

Stefan

>  
> thanks,
> -S
> 
> 
> ------------------------------------------------------------------------
> 
> ------------------------------------------------------------------------------
> Stay on top of everything new and different, both inside and 
> around Java (TM) technology - register by April 22, and save
> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
> 300 plus technical and hands-on sessions. Register today. 
> Use priority code J9JMT32. http://p.sf.net/sfu/p
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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