Can GStreamer plugin perform DMA copy
junyan.he at hotmail.com
Mon May 31 13:31:17 UTC 2021
That depends on what you want to do. If the buffers you push to
downstream will not be changed, then you can just add ref to the
Gstbuffer and no need to copy it. If they will be changed/written, you
need to do the copy. The GstAllocator has a mem_copy function to let
you provide your own memcpy function for GstMemory. It will be called
when the GstBuffer really needs a copy.
On Mon, 2021-05-31 at 06:58 -0500, ChrisLiuv via gstreamer-devel wrote:
> Currently I have constructed a custom element that separate one video
> to 2 video.
> For example, one 800x1200 video separate to two 800x600 video.
> I use memcpy method to copy video data to 2 new GstBuffer and then
> push it
> to src pad.
> So it costs much more cpu usage.
> I further check the tee element, which also branch a new pipeline, a
> GstBuffer and low cpu usage.
> But I could not find what I want, it seems using gst_pad_push_list(),
> didn't find out where it copies the data.
> Could someone give any example or reference for the DMA copy?
> Many thanks.
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
More information about the gstreamer-devel