1 /*****************************************************************************
2 * vlc_decklink.h: Decklink Common includes
3 *****************************************************************************
4 * Copyright (C) 2018 LTN Global Communications
6 * Authors: Devin Heitmueller <dheitmueller@ltnglobal.com>
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU Lesser General Public License as published by
10 * the Free Software Foundation; either version 2.1 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this program; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
21 *****************************************************************************/
23 #ifndef VLC_DECKLINK_H
24 #define VLC_DECKLINK_H 1
28 * This file defines Decklink portability macros and other functions
31 #include <DeckLinkAPI.h>
33 /* Portability code to deal with differences how the Blackmagic SDK
34 handles strings on various platforms */
36 #error FIXME: Win32 is known to not work for decklink.
37 #elif defined(__APPLE__)
38 #include <vlc_common.h>
39 #include <vlc_charset.h>
40 typedef CFStringRef decklink_str_t
;
41 #define DECKLINK_STRDUP(s) FromCFString(s, kCFStringEncodingUTF8)
42 #define DECKLINK_FREE(s) CFRelease(s)
44 typedef const char* decklink_str_t
;
45 #define DECKLINK_STRDUP strdup
46 #define DECKLINK_FREE(s) free((void *) s)
49 #endif /* VLC_DECKLINK_H */