- Posts: 2
- Joined: Sat Jul 14, 2018 8:08 am
- Real Name: Pere Calpe
Have a look at the code samples in the Examples directory for full cross-platform samples. In addition the ClosedCaptions and DeviceConfigure samples have a similar codebase, differing only by platform specific code.
A few pointers from cross-platform development:
- If you are using Visual Studio, by default the MIDL compiler is configured to output header as DeckLinkAPI_h.h, change this to output DeckLinkAPI.h
- Use _WIN32, __APPLE__ and __linux__ pragmas for platform specific code
- Win32 variant needs to call CoInitialize/CoUninitialize for COM
- Include <stdint.h> in Win32 variant to use uint32_t, int64_t, etc
- Win32 headers uses BOOL, macOS/Linux use C++ bool. Keep this in mind when calling functions that output boolean such as GetFlags().
- For strings, Win32 uses BSTR, Linux: const char*, macOS: CFStringRef. In the DeviceConfigure sample, platform.h includes helper functions to convert to std::string
Kind Regards
Cameron