edsdkliveview

live view problems using Canon EDSDK,


My program uses canon EDSDK 2.15, and my camera model is EOS100D.

The program starts live view then takes photos when user click a button. It takes photos well most of time, but sometimes live view doesn't work. There is not any error message that camera doesn't connect to program as well. Just transparent rectangle places instead of live view. Of course taking photo function does nothing.

I found the case that if two programs using the camera are running at same time, the late executed program does not catch the camera. But it is not the case. The problem occurs when single program is running.

Does anyone have any idea of this problem?


Solution

  • You have to be careful when taking photos while the live view is running. It usually results in problems when EdsDownloadEvfImage and TakePicture is called at the same time. In fact, you shouldn't call two commands that communicate with the camera at the same time at all. (except getting properties, they seem to be mirrored)

    And secondly, while the camera is busy taking a photo, the live view does not have any images (how could it, the sensor is taking a photo). So when calling EdsDownloadEvfImage you should check if the return value is EDS_ERR_OBJECT_NOTREADY and if so, wait for a bit and try again.

    About running two programs: A camera can only be consumed once at a time. That's a reasonable limitation that you'll have to live with.