From 02edff48f1e265b3b4a222876a5e1fe39b79d358 Mon Sep 17 00:00:00 2001 From: Jeffrey_Li <412100639@qq.com> Date: Mon, 12 Jun 2023 00:13:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=9D=E8=AF=95=E8=A7=A3=E5=86=B3basler?= =?UTF-8?q?=E6=8E=89=E7=BA=BF=E8=AF=86=E5=88=AB=E4=B8=8D=E5=88=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cigarette/CaptureThreadBasler.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Cigarette/CaptureThreadBasler.cpp b/Cigarette/CaptureThreadBasler.cpp index 4b2ffb3..01674ca 100644 --- a/Cigarette/CaptureThreadBasler.cpp +++ b/Cigarette/CaptureThreadBasler.cpp @@ -24,10 +24,10 @@ void CaptureThreadBasler::process(void) bool last_result = false; try { - CSampleConfigurationEventHandler CfgEvent; - CfgEvent.channel_ = Local_Num; - //pDev_->RegisterConfiguration(&CfgEvent, Pylon::RegistrationMode_Append, Pylon::Cleanup_None); - pDev_->RegisterConfiguration(&CfgEvent, Pylon::RegistrationMode_Append, Pylon::Cleanup_Delete); + CSampleConfigurationEventHandler *CfgEvent=NULL; + CfgEvent = new CSampleConfigurationEventHandler; + CfgEvent->channel_ = Local_Num; + pDev_->RegisterConfiguration(CfgEvent, Pylon::RegistrationMode_Append, Pylon::Cleanup_None); CSampleImageEventHandler ImageEvent; ImageEvent.p_image_queue_ = p_image_queue; @@ -143,7 +143,7 @@ void CaptureThreadBasler::process(void) pDev_->StopGrabbing(); pDev_->Close(); pDev_->GrabCameraEvents = false; - pDev_->DeregisterConfiguration(&CfgEvent); + pDev_->DeregisterConfiguration(CfgEvent); pDev_->DeregisterImageEventHandler(&ImageEvent); #ifndef USB_BASLER_NEW_FW pDev_->DeregisterCameraEventHandler(&BurstEvent, "EventFrameBurstStartData");