From 5996b44fe8f15d068c5950c8a7160e179530f511 Mon Sep 17 00:00:00 2001 From: l1npengtul Date: Fri, 25 Nov 2022 02:48:33 +0900 Subject: [PATCH] add really hacky workaround for apple nv12 fcc detection --- nokhwa-bindings-macos/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nokhwa-bindings-macos/src/lib.rs b/nokhwa-bindings-macos/src/lib.rs index 55da154..aadf598 100644 --- a/nokhwa-bindings-macos/src/lib.rs +++ b/nokhwa-bindings-macos/src/lib.rs @@ -373,7 +373,8 @@ mod internal { kCMVideoCodecType_JPEG | kCMVideoCodecType_JPEG_OpenDML => Some(FrameFormat::MJPEG), kCMPixelFormat_8IndexedGray_WhiteIsZero => Some(FrameFormat::GRAY), kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange - | kCVPixelFormatType_420YpCbCr8BiPlanarFullRange => Some(FrameFormat::NV12), + | kCVPixelFormatType_420YpCbCr8BiPlanarFullRange + | 875704438 => Some(FrameFormat::NV12), kCMPixelFormat_24RGB => Some(FrameFormat::RAWRGB), _ => None, } @@ -923,6 +924,7 @@ mod internal { "Not Found".to_string(), )), } + ƒ } CameraIndex::String(id) => Ok(AVCaptureDevice::from_id(id, None)?), }