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

Sebastian Dröge sebastian at centricular.com
Mon Apr 29 06:29:48 UTC 2019


On Sun, 2019-04-28 at 10:23 -0500, Ben Rush wrote:
> 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: 
> 
> https://github.com/GStreamer/gst-plugins-bad/blob/master/gst/frei0r/gstfrei0rsrc.c  (between lines 96 to
> 106)
> https://gitlab.collabora.com/gkiagia/gst-plugins-bad/blob/8cdfb13658a069cf8c45a3265bf865849d3dc8e9/ext/neon/gstneonhttpsrc.c  (between lines 955 to
> 995)
> 
> 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. 

Can you provide a standalone testcase for this so we have an idea what
your code is doing exactly and a way to reproduce it?

As you say yourself, it's rather useless to have a non-writable buffer
inside fill() and that definitely shouldn't happen.

-- 
Sebastian Dröge, Centricular Ltd · https://www.centricular.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190429/3cfaeaaf/attachment.sig>


More information about the gstreamer-devel mailing list