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
40 #include "libklvanc/vanc.h"
44 #define DECKLINK_BOOL BOOL
46 #define DECKLINK_BOOL bool
53 int l = WideCharToMultiByte(CP_UTF8, 0,
w, -1, 0, 0, 0, 0);
56 WideCharToMultiByte(CP_UTF8, 0,
w, -1,
s, l, 0, 0);
59 #define DECKLINK_STR OLECHAR *
60 #define DECKLINK_STRDUP dup_wchar_to_utf8
61 #define DECKLINK_FREE(s) SysFreeString(s)
62 #elif defined(__APPLE__)
63 static char *dup_cfstring_to_utf8(CFStringRef
w)
66 CFStringGetCString(
w,
s, 255, kCFStringEncodingUTF8);
69 #define DECKLINK_STR const __CFString *
70 #define DECKLINK_STRDUP dup_cfstring_to_utf8
71 #define DECKLINK_FREE(s) CFRelease(s)
73 #define DECKLINK_STR const char *
74 #define DECKLINK_STRDUP av_strdup
76 #define DECKLINK_FREE(s) free((void *) s)
98 IDeckLinkConfiguration *
cfg;
161 struct klvanc_context_s *vanc_ctx;
181 (BMDAudioConnection)0,
182 bmdAudioConnectionEmbedded,
183 bmdAudioConnectionAESEBU,
184 bmdAudioConnectionAnalog,
185 bmdAudioConnectionAnalogXLR,
186 bmdAudioConnectionAnalogRCA,
187 bmdAudioConnectionMicrophone,
191 (BMDVideoConnection)0,
192 bmdVideoConnectionSDI,
193 bmdVideoConnectionHDMI,
194 bmdVideoConnectionOpticalSDI,
195 bmdVideoConnectionComponent,
196 bmdVideoConnectionComposite,
197 bmdVideoConnectionSVideo,
201 (BMDTimecodeFormat)0,
202 bmdTimecodeRP188VITC1,
203 bmdTimecodeRP188VITC2,
207 bmdTimecodeVITCField2,
209 #
if BLACKMAGIC_DECKLINK_API_VERSION >= 0x0b000000
210 bmdTimecodeRP188HighFrameRate,
212 (BMDTimecodeFormat)0,
217 (BMDLinkConfiguration)0,
218 bmdLinkConfigurationSingleLink,
219 bmdLinkConfigurationDualLink,
220 bmdLinkConfigurationQuadLink
223 #if BLACKMAGIC_DECKLINK_API_VERSION >= 0x0b000000
224 static const BMDProfileID decklink_profile_id_map[] = {
226 bmdProfileTwoSubDevicesHalfDuplex,
227 bmdProfileOneSubDeviceFullDuplex,
228 bmdProfileOneSubDeviceHalfDuplex,
229 bmdProfileTwoSubDevicesFullDuplex,
230 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
DecklinkSignalLossAction signal_loss_action
BMDTimecodeFormat tc_format
BMDPixelFormat raw_format
CCFifo cc_fifo
closed captions