Go to the documentation of this file.
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
39 #include "libklvanc/vanc.h"
43 #define DECKLINK_BOOL BOOL
45 #define DECKLINK_BOOL bool
52 int l = WideCharToMultiByte(CP_UTF8, 0,
w, -1, 0, 0, 0, 0);
55 WideCharToMultiByte(CP_UTF8, 0,
w, -1,
s, l, 0, 0);
58 #define DECKLINK_STR OLECHAR *
59 #define DECKLINK_STRDUP dup_wchar_to_utf8
60 #define DECKLINK_FREE(s) SysFreeString(s)
61 #elif defined(__APPLE__)
62 static char *dup_cfstring_to_utf8(CFStringRef
w)
65 CFStringGetCString(
w,
s, 255, kCFStringEncodingUTF8);
68 #define DECKLINK_STR const __CFString *
69 #define DECKLINK_STRDUP dup_cfstring_to_utf8
70 #define DECKLINK_FREE(s) CFRelease(s)
72 #define DECKLINK_STR const char *
73 #define DECKLINK_STRDUP av_strdup
75 #define DECKLINK_FREE(s) free((void *) s)
97 IDeckLinkConfiguration *
cfg;
159 struct klvanc_context_s *vanc_ctx;
179 (BMDAudioConnection)0,
180 bmdAudioConnectionEmbedded,
181 bmdAudioConnectionAESEBU,
182 bmdAudioConnectionAnalog,
183 bmdAudioConnectionAnalogXLR,
184 bmdAudioConnectionAnalogRCA,
185 bmdAudioConnectionMicrophone,
189 (BMDVideoConnection)0,
190 bmdVideoConnectionSDI,
191 bmdVideoConnectionHDMI,
192 bmdVideoConnectionOpticalSDI,
193 bmdVideoConnectionComponent,
194 bmdVideoConnectionComposite,
195 bmdVideoConnectionSVideo,
199 (BMDTimecodeFormat)0,
200 bmdTimecodeRP188VITC1,
201 bmdTimecodeRP188VITC2,
205 bmdTimecodeVITCField2,
207 #
if BLACKMAGIC_DECKLINK_API_VERSION >= 0x0b000000
208 bmdTimecodeRP188HighFrameRate,
210 (BMDTimecodeFormat)0,
215 (BMDLinkConfiguration)0,
216 bmdLinkConfigurationSingleLink,
217 bmdLinkConfigurationDualLink,
218 bmdLinkConfigurationQuadLink
221 #if BLACKMAGIC_DECKLINK_API_VERSION >= 0x0b000000
222 static const BMDProfileID decklink_profile_id_map[] = {
224 bmdProfileTwoSubDevicesHalfDuplex,
225 bmdProfileOneSubDeviceFullDuplex,
226 bmdProfileOneSubDeviceHalfDuplex,
227 bmdProfileTwoSubDevicesFullDuplex,
228 bmdProfileFourSubDevicesHalfDuplex,
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option name
int frames_buffer_available_spots
static const BMDPixelFormat decklink_raw_format_map[]
DecklinkPtsSource audio_pts_source
IDeckLinkProfileAttributes * attr
int ff_decklink_packet_queue_get(DecklinkPacketQueue *q, AVPacket *pkt, int block)
int ff_decklink_set_configs(AVFormatContext *avctx, decklink_direction_t direction)
DecklinkPacketQueue queue
decklink_output_callback * output_callback
static const BMDVideoConnection decklink_video_connection_map[]
static const BMDAudioConnection decklink_audio_connection_map[]
void ff_decklink_packet_queue_init(AVFormatContext *avctx, DecklinkPacketQueue *q, int64_t queue_size)
void ff_decklink_list_devices_legacy(AVFormatContext *avctx, int show_inputs, int show_outputs)
int ff_decklink_list_devices(AVFormatContext *avctx, struct AVDeviceInfoList *device_list, int show_inputs, int show_outputs)
static const BMDTimecodeFormat decklink_timecode_format_map[]
int ff_decklink_packet_queue_put(DecklinkPacketQueue *q, AVPacket *pkt)
DecklinkPacketQueue vanc_queue
IDeckLinkConfiguration * cfg
unsigned long long ff_decklink_packet_queue_size(DecklinkPacketQueue *q)
int64_t ff_decklink_packet_queue_peekpts(DecklinkPacketQueue *q)
static const BMDLinkConfiguration decklink_link_conf_map[]
BMDLinkConfiguration link
DecklinkPtsSource video_pts_source
static char * dup_wchar_to_utf8(wchar_t *w)
int ff_decklink_list_formats(AVFormatContext *avctx, decklink_direction_t direction=DIRECTION_OUT)
int ff_decklink_init_device(AVFormatContext *avctx, const char *name)
int ff_decklink_set_format(AVFormatContext *avctx, int width, int height, int tb_num, int tb_den, enum AVFieldOrder field_order, decklink_direction_t direction=DIRECTION_OUT)
void ff_decklink_packet_queue_flush(DecklinkPacketQueue *q)
#define IDeckLinkProfileAttributes
void ff_decklink_packet_queue_end(DecklinkPacketQueue *q)
BMDAudioConnection audio_input
uint16_t cdp_sequence_num
char * av_strdup(const char *s)
Duplicate a string.
void ff_decklink_cleanup(AVFormatContext *avctx)
BMDVideoConnection video_input
This structure stores compressed data.
The exact code depends on how similar the blocks are and how related they are to the block
BMDTimecodeFormat tc_format
BMDPixelFormat raw_format
CCFifo cc_fifo
closed captions