Canon (EDSDK) EOS SDK binding in java
Bindings are generated via maven plugin jnaerator and execute
jnaerator:generate
Bindings are manually modified and some methods removed (deprecated). Reason behind is class names are wrong for structures and a generated overloaded method is wrongly typed which fails compilation.
Bindings have been modified to ensure type-safe for most functions of library.
JNA has been chosen over BridJ as headers (*.h) are in C and to keep same technology with previous project.
Execution time between JNA and BridJ should not affect camera communications.
Mapping between Java and Native
Mode 'Directory' is used but 'Maven' or 'AutoGeneratedMaven' output same result.
If get:
org.anarres.cpp.InternalException: Bad token [Invalid65279@1,0]:"TOK65279"
Can solve with:
grep -rl $'\xEF\xBB\xBF' . | xargs perl -i -pe 's{\xEF\xBB\xBF}{}'
Headers file from Canon SDK have some bad encoding characters.