I want to synchronize a stereo camera for either stills or video. The goal is the smallest possible delay between GPIO trigger input and camera shutter actuation (so that stereo is possibly in sync) so I guess a good way to go would be to get as close to metal as possible - doing it all in C by modifying raspistill and raspivid applications.
I was already able to compile whole userland (= both raspistill and raspivid together) by following this post - I can alter the code and it compiles correctly again. However, I need to get the GPIO input into the C code - I guess WiringPi might be one of the easier working options. I see there are CMakeLists.txt files at various level of userland (root or raspicam folders). I do not know how these cmake files work, but I guess I need to add WiringPi into one of them so that the library is then included when compiler needs it. Could anyone help me how to do this?
I think I can write the C code but I just need to be able to compile both WiringPi and raspistill/raspivid together into a single binary.
Thanks for help in advance!