尝试解决basler掉线识别不到

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

@ -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");

Loading…
Cancel
Save