[gst-embedded] How to reduce gstreamer library size &startuptime

Benoit Fouet benoit.fouet at purplelabs.com
Fri Feb 29 01:21:13 PST 2008


Hi,

Zhang Yanlong-PBVM47 wrote:
>  
>   
>> 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 system.
>
>   

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.

-- 
Benoit Fouet
Purple Labs S.A.
www.purplelabs.com




More information about the Gstreamer-embedded mailing list