From 5d86e2f5d3ba5e53610393a2105b5e495a56a625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gilbert=20R=C3=B6hrbein?= Date: Mon, 9 Jan 2023 00:25:06 +0100 Subject: [PATCH] compiles again --- nokhwa-core/src/frame_format.rs | 52 ++++++--------------------------- nokhwa-core/src/types.rs | 2 ++ 2 files changed, 11 insertions(+), 43 deletions(-) diff --git a/nokhwa-core/src/frame_format.rs b/nokhwa-core/src/frame_format.rs index 6b5a27d..32b4777 100644 --- a/nokhwa-core/src/frame_format.rs +++ b/nokhwa-core/src/frame_format.rs @@ -11,50 +11,16 @@ use std::str::FromStr; #[derive(Copy, Clone, Debug, Hash, Ord, PartialOrd, Eq, PartialEq)] #[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))] pub enum FrameFormat { - // Compressed Formats - H265, - H264, - H263, - AVC1, - MPEG1, - MPEG2, - MPEG4, + /// - YUYV is a mathematical color space. You can read more [here.](https://en.wikipedia.org/wiki/YCbCr) + YUYV, + /// - NV12 is same as above. Note that a partial compression (e.g. [16, 235] may be coerced to [0, 255]. + NV12, + /// - MJPEG is a motion-jpeg compressed frame, it allows for high frame rates. MJPEG, - XVid, - VP8, - VP9, - - // YCbCr formats - - // -> 422 16 BPP - Yuv422, - Uyv422, - - // 420 - Nv12, - Nv21, - Yv12, - Imc2, - Imc4, - - // UV - UV8, - - // Grayscale Formats - Luma8, - Luma8I, - Luma10, - Luma10B, - Luma12, - Luma12I, - Luma16, - - // Depth Formats - Z16, - - // RGB Formats - Rgb8, - // Bayer + /// - GRAY is a grayscale image format, usually for specialized cameras such as IR Cameras. + GRAY, + /// - RAWRGB is a Raw RGB888 format. + RAWRGB, } impl Display for FrameFormat { diff --git a/nokhwa-core/src/types.rs b/nokhwa-core/src/types.rs index e86661f..5722bdb 100644 --- a/nokhwa-core/src/types.rs +++ b/nokhwa-core/src/types.rs @@ -8,6 +8,8 @@ use std::{ str::FromStr, }; +pub use crate::frame_format::*; + /// Tells the init function what camera format to pick. /// - `AbsoluteHighestResolution`: Pick the highest [`Resolution`], then pick the highest frame rate of those provided. /// - `AbsoluteHighestFrameRate`: Pick the highest frame rate, then the highest [`Resolution`].