[gst-devel] Question on how to use GstBuffer?

Clark, Rob rob at ti.com
Sat Jan 9 10:54:43 CET 2010


yes, there are a handful of examples of this..  look for example, in v4l2bufferpool..  xvimagesink, etc..

basically the principle is to subclass GstBuffer, provide your own finalize function that revives the buffer and returns it to your pool of buffers.


(random thought:  really, it's a pattern seen in enough gst elements, that perhaps it would be nice to see a generic GstBufferPool class..)


BR,
-R

On Jan 7, 2010, at 8:56 PM, Chen, Weian wrote:

Hi All,

In my current element, I will create and new a GstBuffer (which means to use g_malloc to allocate buffer) in the _chain() function for each frame.

My question is: Can I allocate several buffers (ring buffers) ahead of time, then I can re-use them and don’t need to allocate buffer for each call of _chain, if yes, how?

Thanks in advanced.

Weian
------------------------------------------------------------------------------
This SF.Net<http://SF.Net> email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev _______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.sourceforge.net<mailto:gstreamer-devel at lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20100109/b1d66142/attachment.htm>


More information about the gstreamer-devel mailing list