joshdoe / gst-plugins-vision

GStreamer plugins related to the field of machine vision
Other
133 stars 50 forks source link

Compiling gentl fails on Linux #71

Closed danielmeer closed 2 years ago

danielmeer commented 3 years ago

This issue got introduced in commit "gentlsrc: use GEV buffer timestamps if available for unix reference time" (765662aa825454336b4708550d9b8787b6bfaf62).

Compiling on Linux fails because the file gstgentlsrc.c includes the header Windows.h (which is not available on Linux). I am not sure this header is even used inside that C file.

Removing the include doesn't solve the issue, because the new file _get_unixns.h implements the function get_unix_ns() for Windows only. It fails during complile time because there is no type LARGE_INTEGER. But it will also fail during runtime because it accesses the Windows kernel.

joshdoe commented 2 years ago

This has been fixed, gentlsrc can be compiled on Linux now. Fixed via #ifdef and adding a Linux implementation of get_unix_ns(). Note however that this plugin needs more work to make it generic, as is it won't work at all on Linux because it will look for the Windows location of the CTI file.

joshdoe commented 2 years ago

Also note I had to rebase a few commits back and force push, sorry, but it had to be done. I think you are one of the few that pulled after the hashes changed.