Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FailedToFulfill #194

Open
vaqxai opened this issue Dec 24, 2024 · 0 comments
Open

FailedToFulfill #194

vaqxai opened this issue Dec 24, 2024 · 0 comments

Comments

@vaqxai
Copy link

vaqxai commented Dec 24, 2024

I'm trying to fetch one of the webcams available on my device, a usb webcam. Camera with index 0 works okay (laptop webcam) but the attached USB webcam which here shows up as index 5 (/dev/video5) doesn't seem to work. (Nor do the other devices which in other software either show up also as laptop webcam (index 1) or show a black image (2-4)

[2024-12-24T10:46:00Z INFO  magisterka] CI: [CameraInfo { human_name: "Integrated Camera: Integrated C", description: "Video4Linux Device @ /dev/video0", misc: "", index: Index(0) }, CameraInfo { human_name: "Integrated Camera: Integrated C", description: "Video4Linux Device @ /dev/video1", misc: "", index: Index(1) }, CameraInfo { human_name: "Integrated Camera: Integrated I", description: "Video4Linux Device @ /dev/video2", misc: "", index: Index(2) }, CameraInfo { human_name: "Integrated Camera: Integrated I", description: "Video4Linux Device @ /dev/video3", misc: "", index: Index(3) }, CameraInfo { human_name: "GENERAL WEBCAM: GENERAL WEBCAM", description: "Video4Linux Device @ /dev/video4", misc: "", index: Index(4) }, CameraInfo { human_name: "GENERAL WEBCAM: GENERAL WEBCAM", description: "Video4Linux Device @ /dev/video5", misc: "", index: Index(5) }]
[2024-12-24T10:46:00Z INFO  magisterka::webcam] IDX: Index(5)
thread 'main' panicked at src/main.rs:35:58:
called `Result::unwrap()` on an `Err` value: Could not get device property CameraFormat: Failed to Fufill
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
// in main.rs (line that causes the error - unwrap)
Self {
    webcam_handle: WebcamHandle::new(ci.index()).unwrap()
}
        
// in webcam.rs (the root cause, line with Camera::new)
pub fn new(idx: &CameraIndex) -> Result<Self> {

    info!("IDX: {:?}", idx);

    let reqfmt =
        RequestedFormat::new::<RgbFormat>(
            RequestedFormatType::AbsoluteHighestFrameRate
        );
    let mut cam = Camera::new(idx.clone(), reqfmt)?;

    info!("CAM: {:?}", cam.info());

    cam.open_stream()?;

    Ok(WebcamHandle {
        cam
    })
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant