-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make it a library #61
Comments
Which part exactly do you want as a library? This tool is pretty much just glue between |
I'd be happy with shared glue code, especially if it gets support for GNOME and KDE. |
So the API would take in a region spec and output....what? Encoded video? |
What do you mean by region spec? Regarding the output, I'll be using raw RGBA frames for my project but it could be configurable. |
I see. Region spec being what part of the screen to capture. The primary reason that wl-screenrec is efficient is it never actually touches the raw textures, it uses dmabuf to just pass around handles to GPU memory. If you want CPU surfaces then there is little overlap in what wl-screenrec does and what you want it seems? |
I'll be using the GPU for rendering, is there an easy way to get Vulkan or wgpu texture handles for frames? |
For sure, but that decreases overlap with this project even more. To get it into wgpu/vulkan memory, all you have to do is allocate a surface with the right format (the Linux dmabuf Wayland protocol gives you the format), then export it as an EGLImage, get the fd, then pass it to the the screencopy protocol. Happy to help you out with this, altho don't think there is any code we can share .... |
Going to go ahead and close the issue--best of luck and I hope this is at least useful example code! |
Libwayshot looks great but doesn't seem to implement anything related to DMA-BUF. I guess wgpu is a blocker too for doing direct GPU texture passing: gfx-rs/wgpu#2320 Could I manually do Vulkan magic with say Thanks! |
Yes, you should be able to to manually do this per-wgpu backend you want to support |
I'd really like to use it as a library in a project I'm working on. XCap doesn't seem like it's good for streams and I can't find any other recently updated Rust libraries, which work for any kind of Wayland. I can try making a nice documentated API for you to publish onto crates.io.
The text was updated successfully, but these errors were encountered: