<div dir="ltr">Just to be clear, I'm seeing examples of others doing what I want to do. That is, write directly to the GstBuffer as a GstPushSrc. Examples include: <br><br><a href="https://github.com/GStreamer/gst-plugins-bad/blob/master/gst/frei0r/gstfrei0rsrc.c" target="_blank">https://github.com/GStreamer/gst-plugins-bad/blob/master/gst/frei0r/gstfrei0rsrc.c</a> (between lines 96 to 106)<br><a href="https://gitlab.collabora.com/gkiagia/gst-plugins-bad/blob/8cdfb13658a069cf8c45a3265bf865849d3dc8e9/ext/neon/gstneonhttpsrc.c" target="_blank">https://gitlab.collabora.com/gkiagia/gst-plugins-bad/blob/8cdfb13658a069cf8c45a3265bf865849d3dc8e9/ext/neon/gstneonhttpsrc.c</a> (between lines 955 to 995)<br><br>Among others. So, I don't feel like what I'm doing is strange or out of the ordinary. It's just that the map function call fails (returns false) and gives me a null buffer to write to when I try to open it with GST_MAP_WRITE. It succeeds when I try to open it with GST_MAP_READ, but that makes no sense when I'm trying to WRITE to the buffer. <br> <br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Apr 27, 2019 at 11:56 PM Ben Rush <<a href="mailto:ben@ben-rush.net" target="_blank">ben@ben-rush.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">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 <br><div><br></div><div><span style="white-space:pre-wrap"> </span>GstMapInfo info;</div><div><span style="white-space:pre-wrap"> </span>gst_buffer_map(buffer, &info, GST_MAP_WRITE);</div><div><br></div><div>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? <br><br>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. </div></div></div></div></div>
</blockquote></div>