Pick up new cameras as they are plugged in
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- linux, rust
- Ambito
- audio-video-rtc, operating-systems
Direzione di ricerca
Start in main, where v4l::context::enum_devices currently scans cameras only during startup. Read the Tokio setup and the existing Device::new flow, then implement the requested background scan of /dev/v4l/by-id/ using Device::with_path. Done means newly plugged-in cameras are detected without restarting, while stable paths preserve camera settings when devices are unplugged and reconnected.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The following code is present in main:
// available_camera_paths is only updated at initial start, however, this could be better changed to run when a camera is plugged in or removed.
for node in v4l::context::enum_devices() {
let mut device = Device::new(node.index())?;
let Ok(modes) = CameraMode::fetch_all(&device) else {
continue;
};
let initial_mode = *modes.first().ok_or("Error Creating a CameraThreadHandle: Failed to initialize camera as no valid Camera operating modes were provided by video4linux. (Check the camera as this was an OS-level issue!)")?;
// If can't query or create a stream, then it can't be displayed.
if H264CameraReader::new(&mut device, initial_mode).is_ok() {
available_camera_paths.push(node.path().to_path_buf());
}
This means that new video capture devices won't be detected if they're plugged in, making testing rather difficult.
We should make it such that a background thread refreshes the available cameras when a new one is plugged in. However, we're already using Tokio here, so we could use an async task instead!
Either way, the cameras should update for ease of use (and to prevent having to restart the backend at comp!)
Edit:
A quick implementation checklist:
- Add a new background thread/task to scan
/dev/v4l/by-id/for new entries - Initialize devices via
Device::with_path- Right now, we just use
Device::new, which uses indices. That won't work for competition -- if cameras unplug, we'll lose the settings for that camera alongside its assigned index!!
- Right now, we just use
- Lingua principale
- Rust
- Stelle
- 1
- Fork
- 3
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Non abbiamo ancora controllato i file di configurazione di questo progetto. Parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Sooner-Rover-Team/RoverGUI
-
Look into stylesAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 55/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
-
good first issue
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
-
Add `biome` formatterApertadevops frontend good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 48/100
Tutte le issue di Sooner-Rover-Team/RoverGUI
Issue simili
-
`sysknife history --help` says --since takes ISO-8601, and the parser refuses offsets and bare datesApertabug easy good first issue help wanted
Difficoltà 1/5 1-3 ore Idoneità per principianti 94/100
lacs-project/sysknife#519 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
-
area:breg bug criticality:p3 triage:needs-implementation
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
registrystack/registry-stack#1699 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 1/5 1-3 ore Idoneità per principianti 84/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
lbjlaq/Antigravity-Manager#3539 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno