Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Linux support #12

Open
OutOfTheVoid opened this issue Apr 22, 2024 · 7 comments
Open

Linux support #12

OutOfTheVoid opened this issue Apr 22, 2024 · 7 comments
Labels
audio Related to audio capture. content-enumeration Related to enumerating capturable content enhancement New feature or request gpu-apis Related to gpu API usage and support. platform-linux platform-specific-feature Related to a platform-specific extension video Rekated to video capture

Comments

@OutOfTheVoid
Copy link
Contributor

We'd like to support Linux, but there is a significant amount of work to be done to enable this.

Roughly speaking, we need to:

  • Identify the right screen/window capture APIs for Linux
  • Identify the right audio capture API(s) for Linux
  • Determine the right GPU API(s) to expose for native frame delivery
  • Implement existing extensions for Linux
  • Determine what system-specific extension would be helpful for linux

For the time being, let's begin by investigating these questions, and then we'll create issues for the various steps of implementation, to be completed in order:

  • Enumerating capturable content and basic frame capture
  • Frame to bitmap extension
  • Linux GPU API support and frame to texture conversion
  • Linux audio capture
  • Linux-specific features
@OutOfTheVoid OutOfTheVoid added enhancement New feature or request audio Related to audio capture. video Rekated to video capture content-enumeration Related to enumerating capturable content platform-specific-feature Related to a platform-specific extension platform-linux gpu-apis Related to gpu API usage and support. labels Apr 22, 2024
@OutOfTheVoid
Copy link
Contributor Author

Just as a primer for any work done here, a couple of things I've found looking into this

Generally, we'd want to support both X11 and Wayland, which means interfacing with X11 and PipeWire respectively. Here are some related examples:

X11 Window Capture
Pipewire video capture - this is for camera video, but the interface seems to be generic in a way where window/screen capture is straightforward

And rust crates for interfacing with each:

x11rb
pipewire

@qzd1989
Copy link

qzd1989 commented Jul 8, 2024

my opinion is adapting android is more urgent than linux for developers?

@OutOfTheVoid
Copy link
Contributor Author

my opinion is adapting android is more urgent than linux for developers?

If you'd like to open a ticket for android support, we can plan and track development there. I don't necessarily have time to devote to adding a new platform, but you're welcome to contribute 😃.

@qzd1989
Copy link

qzd1989 commented Jul 11, 2024

my opinion is adapting android is more urgent than linux for developers?

If you'd like to open a ticket for android support, we can plan and track development there. I don't necessarily have time to devote to adding a new platform, but you're welcome to contribute 😃.

haha, I'm newbie of RUST, I still need to learn for a long time, but I'd like to do sth what I can do for contribution when I have ability. :)

@MAlba124
Copy link

I have implemented wayland capture for scap, and I can port it over here if it is desired.

@OutOfTheVoid
Copy link
Contributor Author

@MAlba124 if you'd like to take that on, by all means! I've taken a look at scap's implementation and it seems reasonable.

One difficulty is the way that content is enumerated and selected. The interface shouldn't be different just on Linux/Wayland.

@MAlba124
Copy link

One difficulty is the way that content is enumerated and selected. The interface shouldn't be different just on Linux/Wayland.

There's no way to get a list of all available sources, so selection is done by and API call that triggers a user interaction in the DE/WM where the source can be selected. So i guess a call to CapturableContent::new() would have to trigger that interaction?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
audio Related to audio capture. content-enumeration Related to enumerating capturable content enhancement New feature or request gpu-apis Related to gpu API usage and support. platform-linux platform-specific-feature Related to a platform-specific extension video Rekated to video capture
Projects
None yet
Development

No branches or pull requests

3 participants