Full-motion zero-copy screen capture in Weston

Marius Vlad marius.vlad at collabora.com
Tue May 28 17:04:45 UTC 2024


On Tue, May 28, 2024 at 03:53:23PM +0000, Hoosier, Matt wrote:
> Hi Marius,
Hi,
> 
> Okay, I guess that answers the bit about needing to screen-scrape to get content into Pipewire now.
> 
> But I'm still a little unclear about a couple things, if I were to try to build on this PW backend as a starting point:
> 
> First, it looks to me like when you use the PW backend to Weston, that
> becomes your display. That is, rendering directly targets it. I was
> hoping for a way to get it to broadcast the very same framebuffer(s)
> that are getting scanned out for the current frame by the DRM
> backend.
With https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/341
the PipeWire output can mirror out the native DRM one. It aims at having
a way to configure VNC, RDP and PipeWire to screen-share the output. 
> 
> Second, I'm don't see the path to getting this to leverage the
> DRM_MODE_CONNECTOR_WRITEBACK hardware (like the weston_screen_recorder
> does).  I think that any layering would be forced to
> be offloaded to the GPU ahead of time. Maybe I missed some implication
> of what you were pointing out here?
No sorry, I haven't really implied that, just pointed that out there's
some work for PipeWire gaining dmabuf. 

Screen-sharing an output is done
with multiple backends, and configuring Weston front-end is it with 
https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/341.

> 
> > -----Original Message-----
> > From: Marius Vlad <marius.vlad at collabora.com>
> > Sent: Saturday, May 25, 2024 6:12 AM
> > To: Hoosier, Matt <Matt.Hoosier at garmin.com>
> > Cc: wayland-devel at lists.freedesktop.org
> > Subject: Re: Full-motion zero-copy screen capture in Weston
> > 
> > On Fri, May 24, 2024 at 09:43:58PM +0000, Hoosier, Matt wrote:
> > > Hi,
> > >
> > > I'm interested in finding or contributing some mechanism to get sort of the
> > same effect as a cross between:
> > >
> > >
> > >   *
> > > weston_output_capture's support for using the
> > > DRM_MODE_CONNECTOR_WRITEBACK connectors, and
> > >
> > >   *
> > > the streamed orientation of weston_screen_recorder, and
> > >
> > >   *
> > > no forced reliance on the GPU to pre-blend the 2D scene – whatever
> > > plane blending would otherwise have occurred must still occur when the
> > > screen recording mechanism is active
> > >
> > > The desktop environments' compositors implement the XDG screencast
> > portal. If I read things correctly, that one deposits the stream of dmabuf frame
> > fds into the Pipewire stream indicated by the user invoking the D-Bus
> > Screencast API.
> > >
> > > That doesn't really seem like a starter for doing this in Weston.
> > > There was conversation back in 2019 about trying to add zero-copy
> > > dmabuf support in Weston's own Pipewire integration, but I think that
> > > didn't happen?
> > https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/1366
> > >
> > > Alternately, I see that the remoting plugin on today's main branch supports
> > GStreamer dmabuf allocators. Does this mean that I could build something
> > using a virtual weston_output in the drm-backend?
> > >
> > > Cheers,
> > > Matt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20240528/231bbbaa/attachment.sig>


More information about the wayland-devel mailing list