Unable to fill buffer from GstPushSrc-style plugin when interacting with gstmfxenc_h264 #173
Edit: I'm running into this on Windows 10. Intel Core i7-6700K
This relates to
Specifically, looking at the map flags, WRITE is not an option. I do not understand how I am to optimally interact with a GstBuffer from a GstPushSrc-derived type, then. If you look at the GstPushSrc documentation here: https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/GstPushSrc.html, there is a .fill() function you may implement. It gets passed to it a GstBuffer which is to be written to, and that buffer is then used by the downstream encoder. I wish to fill it with NV12 data coming directly off my webcam.
If, however, I am connecting my GstPushSrc class to an mfx h264 encoder and wish to interact with the buffer like this:
I cannot as the GST_MAP_WRITE fails. And it fails because of error_unsupported_map in the code I referenced above. In the "standard", off-the-shelf h264 encoder provided as part of the gstreamer plugin collection, the above code works for me. It fails with the Intel plugins. This is presumably because of the fact this is video memory? However, I know in Intel's OpenCL, for example, I'm able to map buffers and write to them from code operating on the CPU (shared memory between the two on-board chips, if I recall).
How can I optimally interact with this GstBuffer from my fill function with these plugins?
Furthermore, if this writability isn't supported, I'm confused by the code here:
I notice the following code:
It looks as though within gst_video_meta_map_mfx_surface there is the following code too:
So it appears as though there is some kind of functionality that allows for writing, and for mapping with the write flag.
@kwende well observed, write mapping is not supported here. Did you try GST_MAP_READWRITE in your code?