Why is GstBuffer not writable in the _fill method of GstPushSrc?
sebastian at centricular.com
Sat May 4 10:47:03 UTC 2019
On Fri, 2019-05-03 at 12:29 -0500, Ben Rush wrote:
> I apologize for not getting back to you sooner. I will try putting up
> some sample code for you in the near future. However, I have opened
> up the following issue on the Intel Media SDK gstreamer github repo
> that my be of interest to you:
> Essentially I'm using their x264 encoder. I don't know how it's
> working exactly, but when I request AYUV, I'm able to get a writable
> buffer (and yes, everything works). It looks as though the GstBuffer
> is writable, but allocated by the gstreamer pipeline itself. When I
> request NV12, which is supported by the x264 plugin as a media type
> from upstream elements, the Intel Media pipeline allocations memory
> for me. This is video memory. Now, it's possible that one could make
> the argument the memory isn't writeable from CPU code because it's on
> the video device, but I know in Intel's OpenCL drivers I'm able to
> get writable memory buffers since the GPU has a shared memory space
> with the CPU (the whole point of the Intel on-chip GPU). So, it
> should be possible. Why the code above appears to not work with it,
> I'm unsure.
That's nonetheless a bug in the MediaSDK plugin. It should not
unconditionally give you a useless buffer pool that requires special
mechanisms to do something with the buffers.
As an alternative you might want to try the MediaSDK plugin that is
part of the GStreamer plugin sets:
It shouldn't have the bug with the buffer pool and also is known to
work fine on Windows and Linux.
Sebastian Dröge, Centricular Ltd · https://www.centricular.com
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 963 bytes
Desc: This is a digitally signed message part
More information about the gstreamer-devel