How to consume VAAPI VASurface in appsink

Víctor Jáquez vjaquez at igalia.com
Thu Aug 9 15:07:27 UTC 2018


On Wed, 08 Aug 2018 at 23:41, Galoppo, Nico wrote:
> I have constructed a pipeline for decoding compressed video, with an appsink
> element at the end. The decoding pipeline is using GPU hardware decoding
> through libva/gst-vaapi. I am pulling samples in the appsink "new-sample"
> signal callback, and have confirmed that the caps include
> "video/x-raw(VASurface)".

-> "video/x-raw(memory:VASurface)"

> 
> My intent is to display (and potentially process) the framebuffer contained by
> the VASurface. Can I somehow get access to the VASurface through the GstBuffer
> contained in the GstSample? If so, then I could get to a DRM prime handle for
> GL/CL interop.

The VASurface is in a buffer's meta. But the meta's structure is not
available. You might look at the element's source and copy the structure and
extract it.

Nonetheless, if you want the DRM prime handle, I guess there's a direct way to
do it, after the vaapipostproc set the caps feature
"video/x-raw(memory:DMABuf)", then you get the dmabuf fd with
gst_dmabuf_memory_get_fd()

https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-dmabuf.html

vmjl

> 
> Thanks,
> 
> Nico
> 

> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



More information about the gstreamer-devel mailing list