Expand description
Check if a camera is available, request access to it and open a PipeWire remote stream.
Examples
use ashpd::desktop::camera::CameraProxy;
pub async fn run() -> ashpd::Result<()> {
let connection = zbus::Connection::session().await?;
let proxy = CameraProxy::new(&connection).await?;
if proxy.is_camera_present().await? {
proxy.access_camera().await?;
let remote_fd = proxy.open_pipe_wire_remote().await?;
// pass the remote fd to GStreamer for example
}
Ok(())
}
Structs
The interface lets sandboxed applications access camera devices, such as web cams.