feat: Add streaming support (#125)

This adds:
- [x] Keyboard and mouse handling on the frontend
- [x] Video and audio streaming from the backend to the frontend
- [x] Input server that works with Websockets

Update - 17/11
- [ ] Master docker container to run this
- [ ] Steam runtime
- [ ] Entrypoint.sh

---------

Co-authored-by: Kristian Ollikainen <14197772+DatCaptainHorse@users.noreply.github.com>
Co-authored-by: Kristian Ollikainen <DatCaptainHorse@users.noreply.github.com>
This commit is contained in:
Wanjohi
2024-12-08 14:54:56 +03:00
committed by GitHub
parent 5eb21eeadb
commit 379db1c87b
137 changed files with 12737 additions and 5234 deletions

View File

@@ -0,0 +1,41 @@
pub struct DeviceArgs {
/// GPU vendor (e.g. "intel")
pub gpu_vendor: String,
/// GPU name (e.g. "a770")
pub gpu_name: String,
/// GPU index, if multiple same GPUs are present
pub gpu_index: u32,
/// GPU card/render path, sets card explicitly from such path
pub gpu_card_path: String,
}
impl DeviceArgs {
pub fn from_matches(matches: &clap::ArgMatches) -> Self {
Self {
gpu_vendor: matches
.get_one::<String>("gpu-vendor")
.unwrap_or(&"".to_string())
.clone(),
gpu_name: matches
.get_one::<String>("gpu-name")
.unwrap_or(&"".to_string())
.clone(),
gpu_index: matches
.get_one::<String>("gpu-index")
.unwrap()
.parse::<u32>()
.unwrap(),
gpu_card_path: matches
.get_one::<String>("gpu-card-path")
.unwrap_or(&"".to_string())
.clone(),
}
}
pub fn debug_print(&self) {
println!("DeviceArgs:");
println!("> gpu_vendor: {}", self.gpu_vendor);
println!("> gpu_name: {}", self.gpu_name);
println!("> gpu_index: {}", self.gpu_index);
println!("> gpu_card_path: {}", self.gpu_card_path);
}
}