X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavdevice%2Fdecklink_common.h;h=6e032956a8e9a7e92af4fbd4ef3b0392c22036ff;hb=3b56fa85e8f50db83b54518ae31ebdb3f6b0cc39;hp=921818ba416aa63b588a75d98439f2a2df898736;hpb=e645d7a6d452df83cedcbb1d6708429ceea156da;p=ffmpeg diff --git a/libavdevice/decklink_common.h b/libavdevice/decklink_common.h index 921818ba416..6e032956a8e 100644 --- a/libavdevice/decklink_common.h +++ b/libavdevice/decklink_common.h @@ -75,7 +75,7 @@ class decklink_output_callback; class decklink_input_callback; typedef struct AVPacketQueue { - AVPacketList *first_pkt, *last_pkt; + PacketList *first_pkt, *last_pkt; int nb_packets; unsigned long long size; int abort_request; @@ -115,18 +115,19 @@ struct decklink_ctx { /* Status */ int playback_started; - int capture_started; int64_t last_pts; unsigned long frameCount; unsigned int dropped; AVStream *audio_st; AVStream *video_st; + AVStream *klv_st; AVStream *teletext_st; uint16_t cdp_sequence_num; /* Options */ int list_devices; int list_formats; + int enable_klv; int64_t teletext_lines; double preroll; int duplex_mode; @@ -149,20 +150,19 @@ struct decklink_ctx { int channels; int audio_depth; + unsigned long tc_seen; // used with option wait_for_tc }; typedef enum { DIRECTION_IN, DIRECTION_OUT} decklink_direction_t; -#ifdef _WIN32 -#if BLACKMAGIC_DECKLINK_API_VERSION < 0x0a040000 -typedef unsigned long buffercount_type; -#else -typedef unsigned int buffercount_type; -#endif -IDeckLinkIterator *CreateDeckLinkIteratorInstance(void); -#else -typedef uint32_t buffercount_type; -#endif +static const BMDPixelFormat decklink_raw_format_map[] = { + (BMDPixelFormat)0, + bmdFormat8BitYUV, + bmdFormat10BitYUV, + bmdFormat8BitARGB, + bmdFormat8BitBGRA, + bmdFormat10BitRGB, +}; static const BMDAudioConnection decklink_audio_connection_map[] = { (BMDAudioConnection)0, @@ -193,11 +193,16 @@ static const BMDTimecodeFormat decklink_timecode_format_map[] = { bmdTimecodeVITC, bmdTimecodeVITCField2, bmdTimecodeSerial, +#if BLACKMAGIC_DECKLINK_API_VERSION >= 0x0b000000 + bmdTimecodeRP188HighFrameRate, +#else + (BMDTimecodeFormat)0, +#endif }; int ff_decklink_set_configs(AVFormatContext *avctx, decklink_direction_t direction); -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, int num = 0); -int ff_decklink_set_format(AVFormatContext *avctx, decklink_direction_t direction, int num); +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); +int ff_decklink_set_format(AVFormatContext *avctx, decklink_direction_t direction); int ff_decklink_list_devices(AVFormatContext *avctx, struct AVDeviceInfoList *device_list, int show_inputs, int show_outputs); void ff_decklink_list_devices_legacy(AVFormatContext *avctx, int show_inputs, int show_outputs); int ff_decklink_list_formats(AVFormatContext *avctx, decklink_direction_t direction = DIRECTION_OUT);