fourcc wip
This commit is contained in:
parent
0ff8d2b1fb
commit
e74fa87103
|
@ -28,15 +28,15 @@ fn main() -> anyhow::Result<()> {
|
||||||
|
|
||||||
const WIDTH: usize = 288;
|
const WIDTH: usize = 288;
|
||||||
const HEIGHT: usize = 384;
|
const HEIGHT: usize = 384;
|
||||||
|
let fourcc_repr = [
|
||||||
|
b'Y', // | 0b10000000
|
||||||
|
b'1', b'6', b' ',
|
||||||
|
];
|
||||||
|
let fourcc = v4l::format::FourCC { repr: fourcc_repr };
|
||||||
let mut out = v4l::Device::with_path(output)?;
|
let mut out = v4l::Device::with_path(output)?;
|
||||||
// To find the fourcc code, use v4l2-ctl --list-formats-out /dev/video0
|
// To find the fourcc code, use v4l2-ctl --list-formats-out /dev/video0
|
||||||
// (or read the source :)
|
// (or read the source :)
|
||||||
let format = v4l::Format::new(
|
let format = v4l::Format::new(WIDTH as u32, HEIGHT as u32, fourcc);
|
||||||
WIDTH as u32,
|
|
||||||
HEIGHT as u32,
|
|
||||||
v4l::format::FourCC::new(b"Y16 "),
|
|
||||||
);
|
|
||||||
Output::set_format(&out, &format)?;
|
Output::set_format(&out, &format)?;
|
||||||
|
|
||||||
// Setup Capture
|
// Setup Capture
|
||||||
|
|
Loading…
Reference in New Issue
Block a user