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

Sebastian Dröge sebastian at centricular.com
Sat May 4 10:47:03 UTC 2019


Hi Ben,

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: 
> https://github.com/intel/gstreamer-media-SDK/issues/173. 
> 
> 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:
  https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/tree/master/sys/msdk

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...
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/20190504/e8c52454/attachment-0001.sig>


More information about the gstreamer-devel mailing list