FFmpeg
Data Structures | Macros | Enumerations | Functions | Variables
decklink_common.h File Reference
#include <DeckLinkAPIVersion.h>
#include "libavutil/mem.h"
#include "libavcodec/packet_internal.h"
#include "libavfilter/ccfifo.h"
#include "libavutil/thread.h"
#include "decklink_common_c.h"

Go to the source code of this file.

Data Structures

struct  DecklinkPacketQueue
 
struct  decklink_ctx
 

Macros

#define IID_IDeckLinkProfileAttributes   IID_IDeckLinkAttributes
 
#define IDeckLinkProfileAttributes   IDeckLinkAttributes
 
#define IDeckLinkInput_v14_2_1   IDeckLinkInput
 
#define IDeckLinkInputCallback_v14_2_1   IDeckLinkInputCallback
 
#define IDeckLinkMemoryAllocator_v14_2_1   IDeckLinkMemoryAllocator
 
#define IDeckLinkOutput_v14_2_1   IDeckLinkOutput
 
#define IDeckLinkVideoFrame_v14_2_1   IDeckLinkVideoFrame
 
#define IDeckLinkVideoInputFrame_v14_2_1   IDeckLinkVideoInputFrame
 
#define IDeckLinkVideoOutputCallback_v14_2_1   IDeckLinkVideoOutputCallback
 
#define IID_IDeckLinkInput_v14_2_1   IID_IDeckLinkInput
 
#define IID_IDeckLinkInputCallback_v14_2_1   IID_IDeckLinkInputCallback
 
#define IID_IDeckLinkMemoryAllocator_v14_2_1   IID_IDeckLinkMemoryAllocator
 
#define IID_IDeckLinkOutput_v14_2_1   IID_IDeckLinkOutput
 
#define IID_IDeckLinkVideoFrame_v14_2_1   IID_IDeckLinkVideoFrame
 
#define IID_IDeckLinkVideoInputFrame_v14_2_1   IID_IDeckLinkVideoInputFrame
 
#define IID_IDeckLinkVideoOutputCallback_v14_2_1   IID_IDeckLinkVideoOutputCallback
 
#define DECKLINK_BOOL   bool
 
#define DECKLINK_STR   const char *
 
#define DECKLINK_STRDUP   av_strdup
 
#define DECKLINK_FREE(s)   free((void *) s)
 

Enumerations

enum  decklink_direction_t { DIRECTION_IN, DIRECTION_OUT }
 

Functions

static bool DECKLINK_IsEqualIID (const REFIID &riid1, const REFIID &riid2)
 
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 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)
 
void ff_decklink_cleanup (AVFormatContext *avctx)
 
int ff_decklink_init_device (AVFormatContext *avctx, const char *name)
 
void ff_decklink_packet_queue_init (AVFormatContext *avctx, DecklinkPacketQueue *q, int64_t queue_size)
 
void ff_decklink_packet_queue_flush (DecklinkPacketQueue *q)
 
void ff_decklink_packet_queue_end (DecklinkPacketQueue *q)
 
unsigned long long ff_decklink_packet_queue_size (DecklinkPacketQueue *q)
 
int ff_decklink_packet_queue_put (DecklinkPacketQueue *q, AVPacket *pkt)
 
int ff_decklink_packet_queue_get (DecklinkPacketQueue *q, AVPacket *pkt, int block)
 
int64_t ff_decklink_packet_queue_peekpts (DecklinkPacketQueue *q)
 

Variables

static const BMDPixelFormat decklink_raw_format_map []
 
static const BMDAudioConnection decklink_audio_connection_map []
 
static const BMDVideoConnection decklink_video_connection_map []
 
static const BMDTimecodeFormat decklink_timecode_format_map []
 
static const BMDLinkConfiguration decklink_link_conf_map []
 

Macro Definition Documentation

◆ IID_IDeckLinkProfileAttributes

#define IID_IDeckLinkProfileAttributes   IID_IDeckLinkAttributes

Definition at line 28 of file decklink_common.h.

◆ IDeckLinkProfileAttributes

#define IDeckLinkProfileAttributes   IDeckLinkAttributes

Definition at line 29 of file decklink_common.h.

◆ IDeckLinkInput_v14_2_1

#define IDeckLinkInput_v14_2_1   IDeckLinkInput

Definition at line 33 of file decklink_common.h.

◆ IDeckLinkInputCallback_v14_2_1

#define IDeckLinkInputCallback_v14_2_1   IDeckLinkInputCallback

Definition at line 34 of file decklink_common.h.

◆ IDeckLinkMemoryAllocator_v14_2_1

#define IDeckLinkMemoryAllocator_v14_2_1   IDeckLinkMemoryAllocator

Definition at line 35 of file decklink_common.h.

◆ IDeckLinkOutput_v14_2_1

#define IDeckLinkOutput_v14_2_1   IDeckLinkOutput

Definition at line 36 of file decklink_common.h.

◆ IDeckLinkVideoFrame_v14_2_1

#define IDeckLinkVideoFrame_v14_2_1   IDeckLinkVideoFrame

Definition at line 37 of file decklink_common.h.

◆ IDeckLinkVideoInputFrame_v14_2_1

#define IDeckLinkVideoInputFrame_v14_2_1   IDeckLinkVideoInputFrame

Definition at line 38 of file decklink_common.h.

◆ IDeckLinkVideoOutputCallback_v14_2_1

#define IDeckLinkVideoOutputCallback_v14_2_1   IDeckLinkVideoOutputCallback

Definition at line 39 of file decklink_common.h.

◆ IID_IDeckLinkInput_v14_2_1

#define IID_IDeckLinkInput_v14_2_1   IID_IDeckLinkInput

Definition at line 40 of file decklink_common.h.

◆ IID_IDeckLinkInputCallback_v14_2_1

#define IID_IDeckLinkInputCallback_v14_2_1   IID_IDeckLinkInputCallback

Definition at line 41 of file decklink_common.h.

◆ IID_IDeckLinkMemoryAllocator_v14_2_1

#define IID_IDeckLinkMemoryAllocator_v14_2_1   IID_IDeckLinkMemoryAllocator

Definition at line 42 of file decklink_common.h.

◆ IID_IDeckLinkOutput_v14_2_1

#define IID_IDeckLinkOutput_v14_2_1   IID_IDeckLinkOutput

Definition at line 43 of file decklink_common.h.

◆ IID_IDeckLinkVideoFrame_v14_2_1

#define IID_IDeckLinkVideoFrame_v14_2_1   IID_IDeckLinkVideoFrame

Definition at line 44 of file decklink_common.h.

◆ IID_IDeckLinkVideoInputFrame_v14_2_1

#define IID_IDeckLinkVideoInputFrame_v14_2_1   IID_IDeckLinkVideoInputFrame

Definition at line 45 of file decklink_common.h.

◆ IID_IDeckLinkVideoOutputCallback_v14_2_1

#define IID_IDeckLinkVideoOutputCallback_v14_2_1   IID_IDeckLinkVideoOutputCallback

Definition at line 46 of file decklink_common.h.

◆ DECKLINK_BOOL

#define DECKLINK_BOOL   bool

Definition at line 63 of file decklink_common.h.

◆ DECKLINK_STR

#define DECKLINK_STR   const char *

Definition at line 90 of file decklink_common.h.

◆ DECKLINK_STRDUP

#define DECKLINK_STRDUP   av_strdup

Definition at line 91 of file decklink_common.h.

◆ DECKLINK_FREE

#define DECKLINK_FREE (   s)    free((void *) s)

Definition at line 93 of file decklink_common.h.

Enumeration Type Documentation

◆ decklink_direction_t

Enumerator
DIRECTION_IN 
DIRECTION_OUT 

Definition at line 196 of file decklink_common.h.

Function Documentation

◆ DECKLINK_IsEqualIID()

static bool DECKLINK_IsEqualIID ( const REFIID &  riid1,
const REFIID &  riid2 
)
inlinestatic

◆ ff_decklink_set_configs()

int ff_decklink_set_configs ( AVFormatContext avctx,
decklink_direction_t  direction 
)

Definition at line 169 of file decklink_common.cpp.

Referenced by decklink_setup_video(), and ff_decklink_read_header().

◆ ff_decklink_set_format() [1/2]

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 
)

◆ ff_decklink_set_format() [2/2]

int ff_decklink_set_format ( AVFormatContext avctx,
decklink_direction_t  direction 
)

Definition at line 394 of file decklink_common.cpp.

◆ ff_decklink_list_devices()

int ff_decklink_list_devices ( AVFormatContext avctx,
struct AVDeviceInfoList device_list,
int  show_inputs,
int  show_outputs 
)

◆ ff_decklink_list_devices_legacy()

void ff_decklink_list_devices_legacy ( AVFormatContext avctx,
int  show_inputs,
int  show_outputs 
)

Definition at line 581 of file decklink_common.cpp.

Referenced by ff_decklink_read_header(), and ff_decklink_write_header().

◆ ff_decklink_list_formats()

int ff_decklink_list_formats ( AVFormatContext avctx,
decklink_direction_t  direction = DIRECTION_OUT 
)

Definition at line 602 of file decklink_common.cpp.

Referenced by ff_decklink_read_header(), and ff_decklink_write_header().

◆ ff_decklink_cleanup()

void ff_decklink_cleanup ( AVFormatContext avctx)

◆ ff_decklink_init_device()

int ff_decklink_init_device ( AVFormatContext avctx,
const char *  name 
)

Definition at line 670 of file decklink_common.cpp.

Referenced by ff_decklink_read_header(), and ff_decklink_write_header().

◆ ff_decklink_packet_queue_init()

void ff_decklink_packet_queue_init ( AVFormatContext avctx,
DecklinkPacketQueue q,
int64_t  queue_size 
)

Definition at line 398 of file decklink_common.cpp.

Referenced by ff_decklink_read_header(), and ff_decklink_write_header().

◆ ff_decklink_packet_queue_flush()

void ff_decklink_packet_queue_flush ( DecklinkPacketQueue q)

Definition at line 407 of file decklink_common.cpp.

Referenced by ff_decklink_packet_queue_end().

◆ ff_decklink_packet_queue_end()

void ff_decklink_packet_queue_end ( DecklinkPacketQueue q)

Definition at line 420 of file decklink_common.cpp.

Referenced by ff_decklink_read_close(), and ff_decklink_write_trailer().

◆ ff_decklink_packet_queue_size()

unsigned long long ff_decklink_packet_queue_size ( DecklinkPacketQueue q)

◆ ff_decklink_packet_queue_put()

int ff_decklink_packet_queue_put ( DecklinkPacketQueue q,
AVPacket pkt 
)

◆ ff_decklink_packet_queue_get()

int ff_decklink_packet_queue_get ( DecklinkPacketQueue q,
AVPacket pkt,
int  block 
)

Definition at line 468 of file decklink_common.cpp.

Referenced by ff_decklink_read_packet().

◆ ff_decklink_packet_queue_peekpts()

int64_t ff_decklink_packet_queue_peekpts ( DecklinkPacketQueue q)

Definition at line 492 of file decklink_common.cpp.

Variable Documentation

◆ decklink_raw_format_map

const BMDPixelFormat decklink_raw_format_map[]
static
Initial value:
= {
(BMDPixelFormat)0,
bmdFormat8BitYUV,
bmdFormat10BitYUV,
bmdFormat8BitARGB,
bmdFormat8BitBGRA,
bmdFormat10BitRGB,
}

Definition at line 198 of file decklink_common.h.

Referenced by ff_decklink_read_header().

◆ decklink_audio_connection_map

const BMDAudioConnection decklink_audio_connection_map[]
static
Initial value:
= {
(BMDAudioConnection)0,
bmdAudioConnectionEmbedded,
bmdAudioConnectionAESEBU,
bmdAudioConnectionAnalog,
bmdAudioConnectionAnalogXLR,
bmdAudioConnectionAnalogRCA,
bmdAudioConnectionMicrophone,
}

Definition at line 207 of file decklink_common.h.

Referenced by ff_decklink_read_header().

◆ decklink_video_connection_map

const BMDVideoConnection decklink_video_connection_map[]
static
Initial value:
= {
(BMDVideoConnection)0,
bmdVideoConnectionSDI,
bmdVideoConnectionHDMI,
bmdVideoConnectionOpticalSDI,
bmdVideoConnectionComponent,
bmdVideoConnectionComposite,
bmdVideoConnectionSVideo,
}

Definition at line 217 of file decklink_common.h.

Referenced by ff_decklink_read_header().

◆ decklink_timecode_format_map

const BMDTimecodeFormat decklink_timecode_format_map[]
static
Initial value:
= {
(BMDTimecodeFormat)0,
bmdTimecodeRP188VITC1,
bmdTimecodeRP188VITC2,
bmdTimecodeRP188LTC,
bmdTimecodeRP188Any,
bmdTimecodeVITC,
bmdTimecodeVITCField2,
bmdTimecodeSerial,
(BMDTimecodeFormat)0,
}

Definition at line 227 of file decklink_common.h.

Referenced by ff_decklink_read_header().

◆ decklink_link_conf_map

const BMDLinkConfiguration decklink_link_conf_map[]
static
Initial value:
= {
(BMDLinkConfiguration)0,
bmdLinkConfigurationSingleLink,
bmdLinkConfigurationDualLink,
bmdLinkConfigurationQuadLink
}

Definition at line 243 of file decklink_common.h.

Referenced by ff_decklink_write_header().