Using the FlyCapture SDK in Multi Threaded applications

Last Revision Date: 6/5/2015

This article does not apply to FlyCapture 2.6 or later. For versions previous to FlyCapture 2.6, the image grabbing threads need to stop the camera before exiting. 

Any thread which grabs an image must stop the camera before the thread exits, or subsequent image grabs or camera control attempts may cause serious application errors. When an image is grabbed, the owner of that buffer becomes that thread. When that thread exits, the driver is shut down. Attempts to access the camera after that point can cause errors.

By stopping the camera, the buffers are released and no errors occur. We recommend starting the camera at the beginning of the grabbing thread and stopping the camera at the end of the grabbing thread. The camera context does not need to be destroyed, but the camera needs to be stopped.

The function name depends on the version of FlyCapture:

    • FlyCapture1—flycaptureStop
    • FlyCapture2—StopCapture
相关文章