23 #ifndef AVDEVICE_DECKLINK_COMMON_H
24 #define AVDEVICE_DECKLINK_COMMON_H
26 #include <DeckLinkAPIVersion.h>
27 #if BLACKMAGIC_DECKLINK_API_VERSION < 0x0b000000
28 #define IID_IDeckLinkProfileAttributes IID_IDeckLinkAttributes
29 #define IDeckLinkProfileAttributes IDeckLinkAttributes
38 #include "libklvanc/vanc.h"
42 #define DECKLINK_BOOL BOOL
44 #define DECKLINK_BOOL bool
51 int l = WideCharToMultiByte(CP_UTF8, 0,
w, -1, 0, 0, 0, 0);
54 WideCharToMultiByte(CP_UTF8, 0,
w, -1,
s, l, 0, 0);
57 #define DECKLINK_STR OLECHAR *
58 #define DECKLINK_STRDUP dup_wchar_to_utf8
59 #define DECKLINK_FREE(s) SysFreeString(s)
60 #elif defined(__APPLE__)
61 static char *dup_cfstring_to_utf8(CFStringRef
w)
64 CFStringGetCString(
w,
s, 255, kCFStringEncodingUTF8);
67 #define DECKLINK_STR const __CFString *
68 #define DECKLINK_STRDUP dup_cfstring_to_utf8
69 #define DECKLINK_FREE(s) CFRelease(s)
71 #define DECKLINK_STR const char *
72 #define DECKLINK_STRDUP av_strdup
74 #define DECKLINK_FREE(s) free((void *) s)
96 IDeckLinkConfiguration *
cfg;
152 struct klvanc_context_s *vanc_ctx;
172 (BMDAudioConnection)0,
173 bmdAudioConnectionEmbedded,
174 bmdAudioConnectionAESEBU,
175 bmdAudioConnectionAnalog,
176 bmdAudioConnectionAnalogXLR,
177 bmdAudioConnectionAnalogRCA,
178 bmdAudioConnectionMicrophone,
182 (BMDVideoConnection)0,
183 bmdVideoConnectionSDI,
184 bmdVideoConnectionHDMI,
185 bmdVideoConnectionOpticalSDI,
186 bmdVideoConnectionComponent,
187 bmdVideoConnectionComposite,
188 bmdVideoConnectionSVideo,
192 (BMDTimecodeFormat)0,
193 bmdTimecodeRP188VITC1,
194 bmdTimecodeRP188VITC2,
198 bmdTimecodeVITCField2,
200 #
if BLACKMAGIC_DECKLINK_API_VERSION >= 0x0b000000
201 bmdTimecodeRP188HighFrameRate,
203 (BMDTimecodeFormat)0,
208 (BMDLinkConfiguration)0,
209 bmdLinkConfigurationSingleLink,
210 bmdLinkConfigurationDualLink,
211 bmdLinkConfigurationQuadLink
214 #if BLACKMAGIC_DECKLINK_API_VERSION >= 0x0b000000
215 static const BMDProfileID decklink_profile_id_map[] = {
217 bmdProfileTwoSubDevicesHalfDuplex,
218 bmdProfileOneSubDeviceFullDuplex,
219 bmdProfileOneSubDeviceHalfDuplex,
220 bmdProfileTwoSubDevicesFullDuplex,
221 bmdProfileFourSubDevicesHalfDuplex,