Avoid memcpy when passing buffers

Duncan Palmer dpalmer at digisoft.tv
Thu Dec 11 19:21:34 PST 2014

Are you using gstreamer-1.x? If so, gst_buffer_new_wrapped_full()
should do what you require.

On 12 December 2014 at 09:48, Ottavio Campana <o.campana at videotec.com> wrote:
> Hi,
> I am studying how to implement a source to wrap a very specific api for an embedded system.
> Let's say I have a frame grabber, a reseizer and an embedded DSP to perform compression. These devices have an userspace api to interact with them that is based on allocating some buffers that will be used to move the data between them.
> I am wrapping the source, I defined the create function that fills one of the allocated buffers and uses this buffer to fill a GstBuffer by doing a copy of the buffer. My question is: can I avoid copying the data? Can I pass in the GstBuffer the pointer of the buffer that I allocated with the proprietary api and have gstreamer not to free the buffer that will be reused by the api? If yes, how?
> Thank you for your help,
> Ottavio
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

More information about the gstreamer-devel mailing list