diff --git a/src/CvSourceImpl.cpp b/src/CvSourceImpl.cpp index 0ed34d03e8..559b223624 100644 --- a/src/CvSourceImpl.cpp +++ b/src/CvSourceImpl.cpp @@ -232,7 +232,7 @@ CS_Source CreateCvSource(llvm::StringRef name, const VideoMode& mode, source->Start(); // causes a property event notifier.NotifySource(name, handle, CS_SOURCE_CONNECTED); notifier.NotifySource(name, handle, CS_SOURCE_VIDEOMODES_UPDATED); - notifier.NotifySource(name, handle, CS_SOURCE_VIDEOMODE_CHANGED); + notifier.NotifySourceVideoMode(*source, mode); return handle; } diff --git a/src/UsbCameraImpl.cpp b/src/UsbCameraImpl.cpp index 2bb02c7c78..172f6d1a0d 100644 --- a/src/UsbCameraImpl.cpp +++ b/src/UsbCameraImpl.cpp @@ -628,8 +628,7 @@ CS_StatusValue UsbCameraImpl::DeviceCmdSetMode( DeviceConnect(); } if (wasStreaming) DeviceStreamOn(); - Notifier::GetInstance().NotifySource(*this, - CS_SOURCE_VIDEOMODE_CHANGED); + Notifier::GetInstance().NotifySourceVideoMode(*this, newMode); lock.lock(); } else if (newMode.fps != m_mode.fps) { m_mode = newMode; @@ -639,8 +638,7 @@ CS_StatusValue UsbCameraImpl::DeviceCmdSetMode( if (wasStreaming) DeviceStreamOff(); DeviceSetFPS(); if (wasStreaming) DeviceStreamOn(); - Notifier::GetInstance().NotifySource(*this, - CS_SOURCE_VIDEOMODE_CHANGED); + Notifier::GetInstance().NotifySourceVideoMode(*this, newMode); lock.lock(); } @@ -873,7 +871,7 @@ void UsbCameraImpl::DeviceCacheMode() { if (formatChanged) DeviceSetMode(); if (fpsChanged) DeviceSetFPS(); - Notifier::GetInstance().NotifySource(*this, CS_SOURCE_VIDEOMODE_CHANGED); + Notifier::GetInstance().NotifySourceVideoMode(*this, m_mode); } void UsbCameraImpl::DeviceCacheProperty(