[gst-embedded] How to reduce gstreamer library size &startuptime
PBVM47 at motorola.com
Fri Feb 29 01:24:21 PST 2008
>> Another suggestion is that:
>> Because your app is used for specified embedded device, some code
>> optimization can be introduced.
>> For example, try to use gst_pad_alloc_buffer() insteand of
>> gst_buffer_new() to transfer data buffer between elements which can
>> prevent from alloc new buffer frequently.
> could you elaborate ?
> or did you mean gst_buffer_new_and_alloc() ?
> A call to gst_pad_alloc_buffer() is done when the element knows on
> which source pad it is going to push the data. This allows the peer
> element to provide special "hardware" buffers for the calling element
> to work on, thus reducing the number of memcpys required in the
>this can also work if you're doing a gst_buffer_new(), and not a
gst_buffer_new_and_alloc(), I don't really see a difference here...
>the data you're providing to downstream element doesn't have to be
memcpy'd, it can be a pointer to a buffer of data in your element.
It is just an example for optimization, I do not mean that you must
replace by it. Whether or not using it depends on your implementation.
Purple Labs S.A.
More information about the Gstreamer-embedded