add really hacky workaround for apple nv12 fcc detection

This commit is contained in:
l1npengtul
2022-11-25 02:48:33 +09:00
parent 5638f0c77a
commit 5996b44fe8
+3 -1
View File
@@ -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)?),
}