尝试解决basler掉线识别不到

1600-900
Jeffrey_Li 2 years ago
parent e775e1a5b9
commit 02edff48f1

@ -24,10 +24,10 @@ void CaptureThreadBasler::process(void)
bool last_result = false; bool last_result = false;
try try
{ {
CSampleConfigurationEventHandler CfgEvent; CSampleConfigurationEventHandler *CfgEvent=NULL;
CfgEvent.channel_ = Local_Num; CfgEvent = new CSampleConfigurationEventHandler;
//pDev_->RegisterConfiguration(&CfgEvent, Pylon::RegistrationMode_Append, Pylon::Cleanup_None); CfgEvent->channel_ = Local_Num;
pDev_->RegisterConfiguration(&CfgEvent, Pylon::RegistrationMode_Append, Pylon::Cleanup_Delete); pDev_->RegisterConfiguration(CfgEvent, Pylon::RegistrationMode_Append, Pylon::Cleanup_None);
CSampleImageEventHandler ImageEvent; CSampleImageEventHandler ImageEvent;
ImageEvent.p_image_queue_ = p_image_queue; ImageEvent.p_image_queue_ = p_image_queue;
@ -143,7 +143,7 @@ void CaptureThreadBasler::process(void)
pDev_->StopGrabbing(); pDev_->StopGrabbing();
pDev_->Close(); pDev_->Close();
pDev_->GrabCameraEvents = false; pDev_->GrabCameraEvents = false;
pDev_->DeregisterConfiguration(&CfgEvent); pDev_->DeregisterConfiguration(CfgEvent);
pDev_->DeregisterImageEventHandler(&ImageEvent); pDev_->DeregisterImageEventHandler(&ImageEvent);
#ifndef USB_BASLER_NEW_FW #ifndef USB_BASLER_NEW_FW
pDev_->DeregisterCameraEventHandler(&BurstEvent, "EventFrameBurstStartData"); pDev_->DeregisterCameraEventHandler(&BurstEvent, "EventFrameBurstStartData");

Loading…
Cancel
Save