Skip to content

Commit af120ed

Browse files
committed
Logs the cameras that are detected
1 parent 500522d commit af120ed

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

IrProCapture/Camera/Components/Capture.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ class Capture: NSObject, AVCaptureVideoDataOutputSampleBufferDelegate {
5353
// Find our USB Camera device
5454
let discoverySession = AVCaptureDevice.DiscoverySession(deviceTypes: [.external], mediaType: .video, position: .unspecified)
5555
let devices = discoverySession.devices
56+
// print all the devices to debug log
57+
print("Found the following cameras:")
58+
for device in devices {
59+
print("\t\(device.modelID)")
60+
}
61+
5662
guard let videoCaptureDevice = devices.filter({ $0.modelID == "UVC Camera VendorID_3034 ProductID_22576" }).first else {
5763
throw IrProError.noDevicesFound
5864
}

0 commit comments

Comments
 (0)