spice, dmabuf, egl and streaming

Frediano Ziglio fziglio at redhat.com
Mon Jul 18 10:35:10 UTC 2016


> Hi Frediano,
> 
> On 06/30/16 at 10:39am, Frediano Ziglio wrote:
> > Hi,
> >   I'm a member of spice team (http://www.spice-space.org/) in RedHat.
> > We are using GStreamer to handle streaming of video remotely using
> > different
> > compression coders (H264, MJPEG, VP8).
> > 
> > We are facing a new challenge, streaming frames from 3d card!
> > Of course we want it faster as possible. Some graphics cards implements
> > compression so we would like to use this feature if present and potentially
> > not extracting the texture from the graphics card. This is not always
> > possible
> > (libraries not installed, not supported by card, etc) so we need also a
> > fallback.
> > Potentially we can start with an EGL texture which can be easily converted
> > to
> > a dmabuf if needed. Note however that not all dmabuf supports mmap which
> > seems
> > the way gst_dmabuf_allocator_new allocator works so potentially EGL texture
> > is
> > better.
> > There is a current experimental patch which is using gstreamer vaapi
> > library
> > but extract the raw image from the texture. Looking at vaapi seems that you
> > can convert a dmabuf to a VASurfaceID to avoid the memory copy but seems
> > not used by gstreamer vaapi. I saw there is a
> > gst_vaapi_surface_new_from_egl_image
> > but I don't understand how to make the code call it.
> 
> Right now gstreamer-vaapi can import dmabuf into a VASurface to encode them.
> I
> have tested it with v4l2src, but I would be very happy to know if it works
> with other dmabuf sources.
> 

I'm quite new to gstreamer. Can you point me on some information how to
do it? At the moment we receive dma buffers from another software (Qemu).
More appropriately they are DRM primes which implements dma buffers.

How to push them to a pipeline ? Can I use appsrc ?

> In the case of EGL, it was supported only for pushing decoded buffers to
> downstream, nonetheless right now is dead code [1]. We have to re-enable it
> and adapt it to GstGLMemory interfaces.
> 
> 1. https://bugzilla.gnome.org/show_bug.cgi?id=767203
> 
> vmjl

Frediano


More information about the gstreamer-devel mailing list