diff --git a/nokhwa-bindings-linux/src/lib.rs b/nokhwa-bindings-linux/src/lib.rs index 23647a6..2bd9c58 100644 --- a/nokhwa-bindings-linux/src/lib.rs +++ b/nokhwa-bindings-linux/src/lib.rs @@ -540,6 +540,7 @@ mod internal { FrameFormat::YUYV => FourCC::new(b"YUYV"), FrameFormat::GRAY => FourCC::new(b"GRAY"), FrameFormat::RAWRGB => FourCC::new(b"RGB3"), + FrameFormat::RAWBGR => FourCC::new(b"BGR3"), FrameFormat::NV12 => FourCC::new(b"NV12"), }; @@ -912,6 +913,7 @@ mod internal { "MJPG" => Some(FrameFormat::MJPEG), "GRAY" => Some(FrameFormat::GRAY), "RGB3" => Some(FrameFormat::RAWRGB), + "BGR3" => Some(FrameFormat::RAWBGR), "NV12" => Some(FrameFormat::NV12), _ => None, } @@ -923,6 +925,7 @@ mod internal { FrameFormat::YUYV => FourCC::new(b"YUYV"), FrameFormat::GRAY => FourCC::new(b"GRAY"), FrameFormat::RAWRGB => FourCC::new(b"RGB3"), + FrameFormat::RAWBGR => FourCC::new(b"BGR3"), FrameFormat::NV12 => FourCC::new(b"NV12"), } } diff --git a/nokhwa-bindings-macos/src/lib.rs b/nokhwa-bindings-macos/src/lib.rs index bd419bb..15b250b 100644 --- a/nokhwa-bindings-macos/src/lib.rs +++ b/nokhwa-bindings-macos/src/lib.rs @@ -2285,6 +2285,13 @@ mod internal { FrameFormat::GRAY => kCMPixelFormat_8IndexedGray_WhiteIsZero, FrameFormat::NV12 => kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange, FrameFormat::RAWRGB => kCMPixelFormat_24RGB, + FrameFormat::RAWBGR => { + return Err(NokhwaError::SetPropertyError { + property: "setVideoSettings".to_string(), + value: "set frame format".to_string(), + error: "Unsupported frame format BGR".to_string(), + }); + } }; let obj = CFNumber::from(cmpixelfmt as i32); let obj = obj.as_CFTypeRef() as *mut Object;