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

Failing to create camera with EINVAL in mmap #9

Open
porglezomp opened this issue Jan 21, 2017 · 2 comments
Open

Failing to create camera with EINVAL in mmap #9

porglezomp opened this issue Jan 21, 2017 · 2 comments

Comments

@porglezomp
Copy link

porglezomp commented Jan 21, 2017

I'm trying to use a PS Eye with a Raspberry pi, and when I try to run the example script in the docs, the mmap returns an OS Error (EINVAL). The exact code adapted for acceptable framerates, resolutions, etc. is:

extern crate rscam;

use rscam::{Camera, Config};

fn main() {
    let mut camera = Camera::new("/dev/video0").unwrap();

    camera.start(&Config {
        interval: (1, 30),
        resolution: (320, 240),
        format: b"RGB3",
        ..Default::default()
    }).unwrap();

    for i in 0..10 {
        let frame = camera.capture().unwrap();
    }
}
@joelgallant
Copy link
Contributor

@porglezomp I know this is an old issue, but I just ran into #18, which seems like the same issue. Did you ever find a resolution to this?

@eifert
Copy link

eifert commented Dec 17, 2020

Got it! See #31

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

3 participants