diff --git a/cscore/src/main/native/linux/UsbCameraImpl.cpp b/cscore/src/main/native/linux/UsbCameraImpl.cpp index 7dcc24a363..b50b6d934b 100644 --- a/cscore/src/main/native/linux/UsbCameraImpl.cpp +++ b/cscore/src/main/native/linux/UsbCameraImpl.cpp @@ -595,7 +595,7 @@ void UsbCameraImpl::DeviceConnect() { } if (m_connectVerbose) { - SINFO("Connecting to USB camera on {}", m_path); + SINFO("Attempting to connect to USB camera on {}", m_path); } // Try to open the device @@ -606,6 +606,10 @@ void UsbCameraImpl::DeviceConnect() { } m_fd = fd; + if (m_connectVerbose) { + SINFO("Connected to USB camera on {}", m_path); + } + // Get capabilities SDEBUG3("getting capabilities"); struct v4l2_capability vcap; diff --git a/cscore/src/main/native/objcpp/UsbCameraImplObjc.mm b/cscore/src/main/native/objcpp/UsbCameraImplObjc.mm index ac644f29ee..b01df6341b 100644 --- a/cscore/src/main/native/objcpp/UsbCameraImplObjc.mm +++ b/cscore/src/main/native/objcpp/UsbCameraImplObjc.mm @@ -554,7 +554,7 @@ static cs::VideoMode::PixelFormat FourCCToPixelFormat(FourCharCode fourcc) { } std::string pathStr = [self.path UTF8String]; - OBJCINFO("Connecting to USB camera on {}", pathStr); + OBJCINFO("Attempting to connect to USB camera on {}", pathStr); self.videoDevice = [AVCaptureDevice deviceWithUniqueID:self.path]; if (self.videoDevice == nil) { @@ -594,6 +594,8 @@ static cs::VideoMode::PixelFormat FourCCToPixelFormat(FourCharCode fourcc) { goto err; } + OBJCINFO("Connected to USB camera on {}", pathStr); + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sessionRuntimeError:) diff --git a/cscore/src/main/native/windows/UsbCameraImpl.cpp b/cscore/src/main/native/windows/UsbCameraImpl.cpp index f3be4296b9..cde8c2556b 100644 --- a/cscore/src/main/native/windows/UsbCameraImpl.cpp +++ b/cscore/src/main/native/windows/UsbCameraImpl.cpp @@ -499,7 +499,7 @@ bool UsbCameraImpl::DeviceConnect() { } if (m_connectVerbose) { - SINFO("Connecting to USB camera on {}", m_path); + SINFO("Attempting to connect to USB camera on {}", m_path); } SDEBUG3("opening device"); @@ -526,6 +526,10 @@ bool UsbCameraImpl::DeviceConnect() { return false; } + if (m_connectVerbose) { + SINFO("Connected to USB camera on {}", m_path); + } + CS_Status st = 0; auto devices = EnumerateUsbCameras(&st); diff --git a/cscore/src/test/java/edu/wpi/first/cscore/UsbCameraTest.java b/cscore/src/test/java/edu/wpi/first/cscore/UsbCameraTest.java index 05e1aa6584..395f7dfc03 100644 --- a/cscore/src/test/java/edu/wpi/first/cscore/UsbCameraTest.java +++ b/cscore/src/test/java/edu/wpi/first/cscore/UsbCameraTest.java @@ -32,7 +32,7 @@ class UsbCameraTest { assertTimeoutPreemptively( Duration.ofSeconds(5), - () -> assertTrue(result.get().contains("Connecting to USB camera on "))); + () -> assertTrue(result.get().contains("Attempting to connect to USB camera on "))); } }