oli-obk / camera_capture

Crate for capturing images from a webcam
51 stars 17 forks source link

Inaproriate ioctl for device - raspberry pi module 3 #23

Closed Jomy10 closed 10 months ago

Jomy10 commented 10 months ago

Steps to reproduce

fn main() {
    let cam = camera_capture::create(0).unwrap();
    let cam = cam
        .start().expect("Couldn't start");
    for _image in cam {
        println!("frame");
    }
    println!("done");
}
# On a raspberry pi with a camera module 3 connected
cargo run

Expected result

It should print out "frame".

Actual result

thread 'main' panicked at src/main.rs:25:18:
Couldn't start: Os { code: 25, kind: Uncategorized, message: "Inappropriate ioctl for device" }
oli-obk commented 10 months ago

I do not have a raspi or camera module 3. I won't be able to debug this.

The issue is likely in rscam, so you'll need to check out that crate https://github.com/loyd/rscam . There is some information about ioctl in the documentation, so maybe that can help you debug it.

Jomy10 commented 10 months ago

Gotcha, I'll look into it there, thanks! Will close the issue for now.