[cscore] Use MFVideoFormat_L8 for Gray on Windows (#4701)

This commit is contained in:
Peter Johnson
2022-11-23 22:15:56 -08:00
committed by GitHub
parent 2bca43779e
commit 9f0a8b930f

View File

@@ -467,8 +467,7 @@ LRESULT UsbCameraImpl::PumpMain(HWND hwnd, UINT uiMsg, WPARAM wParam,
static cs::VideoMode::PixelFormat GetFromGUID(const GUID& guid) {
// Compare GUID to one of the supported ones
if (IsEqualGUID(guid, MFVideoFormat_NV12)) {
// GrayScale
if (IsEqualGUID(guid, MFVideoFormat_L8)) {
return cs::VideoMode::PixelFormat::kGray;
} else if (IsEqualGUID(guid, MFVideoFormat_YUY2)) {
return cs::VideoMode::PixelFormat::kYUYV;