From a300e7e9454f80e2b08ac8c27e6bc27c479af9b2 Mon Sep 17 00:00:00 2001 From: DeePingXian Date: Sun, 13 Aug 2023 16:40:38 +0800 Subject: [PATCH] Adding support for Streamlabs Desktop Virtual Webcam Streamlabs Desktop has the same issue in https://github.com/opencv/opencv/issues/19746. This fixes it using https://github.com/opencv/opencv/pull/23460 method. --- modules/videoio/src/cap_dshow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/videoio/src/cap_dshow.cpp b/modules/videoio/src/cap_dshow.cpp index d6b2b95545..21af06a147 100644 --- a/modules/videoio/src/cap_dshow.cpp +++ b/modules/videoio/src/cap_dshow.cpp @@ -2771,7 +2771,7 @@ int videoInput::start(int deviceID, videoDevice *VD){ if(customSize){ DebugPrintOut("SETUP: Default Format is set to %ix%i\n", currentWidth, currentHeight); - if (strcmp("OBS Virtual Camera", VD->nDeviceName) == 0) + if (strcmp("OBS Virtual Camera", VD->nDeviceName) == 0 || strcmp("Streamlabs Desktop Virtual Webcam", VD->nDeviceName) == 0) { // OBS Virtual Camera always returns S_OK on SetFormat(), even if it doesn't support // the actual format. So we have to choose a format that it supports manually, e.g. NV12.