stoth68000/libklvanc

Porting to Windows

Closed this issue · 6 comments

Hi,
This is more a question than an issue.
I tested the lib on Linux, and it's impressive. However, we need to use this lib in a Windows-10 based project. I wonder if there were previous attempts to port the lib, and if there are any limitations that would prevent us from doing it. I am aware that the Decklink stuff will need adaptation, but except that, are there any blockers?

Hello,

So there is no actual decklink code in the libklvanc library itself. The command line apps in the klvanc-tools project do use decklink, and that code wasn't written to be portable to Windows.

While we haven't tried to build it on WIndows, I don't believe there is anything in there that wouldn't work (it should all be pretty portable ANSI C99). There might be one reference to pthreads for a piece of non-essential functionality (a cache for statistics), which you can likely just #ifdef out.

If you do encounter specific issues, don't hesitate to let us know.

Devin

Thank you very much for the prompt answer.
Sure, I will give it a try and give you my feedback.
The answer will do for me, so it's up to you to close the issue or not

Regards,

Hi,
Some feedback regarding the compilation of the lib on Windows. As you assumed, it went pretty well for the core lib (/src folder), except few changes (see summary below). For the tools, as you mentioned I had to disable all the posix related stuff. For now, I just enabled the smpte12-2 test.
I have forked your project to experiment. I am using CMake in order to have a kind of unified build system:
https://github.com/mchibani-sfl/libklvanc/tree/add-cmake-support

Change summary:
core lib:

  • replace __builtin_parity by a temporary generic version (a very naive one)
  • disable all the VANC cache stuff
  • disable 'Restricted code path'

The work is very preliminary, but I am willing to share at least for the core lib part. However, I can not commit to the tools part, as they require much more work.
BR.
mchbibani

Great!

While I'm not massively interested in merging partial windows improvements into the tree, if they're not completely useful on their own (with the tools), It's good news to see that you've made solid progress.

If you do come up with a concrete PR that fully supports windows then we'd be happy to review.

Good luck, thanks again for the feedback.

Just to let you know that the project that uses the KLVanc lib will be ported to Linux soon. The work done on Windows was only to prototype. Thus, we do not plan to put more time into it.
Thanks again for your feedback.

That's great to hear, thanks.