EDSDK callbacks not working

左心房为你撑大大i 提交于 2019-12-11 04:24:25

问题


I have a working command line application, using EDSDK v2.13.

However, when I register callbacks, there is a burst of property events then nothing.

I have remedied this a loop like this:

while(!_kbhit())
{
  EdsOpenSession(camera);
  Sleep(10);
  EdsCloseSession(camera);
}

This seems horribly kludgy. Is the SDK broken, or am I missing something?


回答1:


If you're using the EDSDK on Windows, you have to have a Windows message loop in your main thread, otherwise callbacks won't happen. (This is because the EDSDK uses the obsolete COM STA threading model instead of real threads.)




回答2:


Canons EDSDK is stuck in the 90s, terrible to use. And after a few days of playing with it, it seems much less sophisticated than Nikons.

These companies should implement an http based API on all their cameras like Sony is doing.



来源:https://stackoverflow.com/questions/16839640/edsdk-callbacks-not-working

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!