AugmendTech / CrabGrab

🦀 🖥️ 🦀
Apache License 2.0
147 stars 8 forks source link

Linux support #12

Open OutOfTheVoid opened 4 months ago

OutOfTheVoid commented 4 months ago

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:

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:

OutOfTheVoid commented 4 months ago

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 commented 1 month ago

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

OutOfTheVoid commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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

OutOfTheVoid commented 1 month ago

@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 commented 1 month ago

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?