jossef / edsdk-wrapper

EOS Digital SDK C# Wrapper
Apache License 2.0
41 stars 16 forks source link

Thread Error when called TakePhoto #5

Open CyberDreamer opened 8 years ago

CyberDreamer commented 8 years ago

Hello!

I used your wrapper with Canon EOS 7D in WPF Application. I successfully used LiveView functions, but i have a strange problem with TakePhoto function. If i do as in your Example (call TakePhoto in button click handler) than all OK. But in my App i used some functions after, like this:

CameraHandler.TakePhoto(); UpdateState(); etc...

In this case TakePhoto suspend in limitless loop somewhere in STAThread as far as I understand. How i should use this function?

manit77 commented 8 years ago

TakePhoto when called does not finish immediately. The camera is busy creating a file then writing to the disk or memory buffer. So you can't make any calls until the camera is finished with those events.

here is the sequence:

TakePhoto ObjectEventState DirectoryItemCreated Download

after download is complete then you can update the state.