Why is GstBuffer not writable in the _fill method of GstPushSrc?

Ben Rush ben at ben-rush.net
Sun Apr 28 04:56:00 UTC 2019


When implementing a GstPushSrc-derived class, I set the fill method to my
own method. This fill method gets passed to it a GstBuffer that,
presumably, is to be filled by the method. However, if I call

GstMapInfo info;
gst_buffer_map(buffer, &info, GST_MAP_WRITE);

The data property of the info object is null. I can't copy data to a null
pointer. I've been able to successfully use GstVideoFrame
and gst_video_frame_map and write data to the video frame. So why can't I
directly write to the buffer that's passed?

As it turns out I'm reading data from a camera in YUV420, and don't want to
incur any penalty for copying buffers around. I want to be able to just
copy the frame data directly onto my buffer object.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190427/8e5d3c2d/attachment.html>


More information about the gstreamer-devel mailing list