AVFoundation CaptureDevice and Mac virtual cameras

Hello,

on Mac OS, is it possible to see a virtual Camera, such as OBS (https://obsproject.com) as a CaptureDevice?

I see that, for example, Google Chrome can use this camera, but using AVCaptureDevice.DiscoverySession I am unable to see it.

Am I doing wrong?

    var deviceTypes: [AVCaptureDevice.DeviceType] = [.builtInMicrophone, .builtInWideAngleCamera]

    #if os(OSX)
    deviceTypes.append(.externalUnknown)
    #else
    deviceTypes.append(contentsOf: [.builtInDualCamera, .builtInDualWideCamera, .builtInTelephotoCamera, .builtInTripleCamera, .builtInTrueDepthCamera, .builtInUltraWideCamera])
    #endif

    let discoverySession = AVCaptureDevice.DiscoverySession(deviceTypes: deviceTypes,
        mediaType: nil, position: .unspecified)

    result = discoverySession.devices.map { device in
        device.localizedName
    }

Enable "Disable Library Validation" under Hardened Runtime / Sign&Caps

AVFoundation CaptureDevice and Mac virtual cameras
 
 
Q