FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
decklink_dec.cpp File Reference
#include "libavformat/internal.h"
#include <DeckLinkAPI.h>
#include "config.h"
#include "libavformat/avformat.h"
#include "libavutil/avassert.h"
#include "libavutil/avutil.h"
#include "libavutil/common.h"
#include "libavutil/imgutils.h"
#include "libavutil/time.h"
#include "libavutil/mathematics.h"
#include "libavutil/reverse.h"
#include "avdevice.h"
#include "decklink_common.h"
#include "decklink_dec.h"

Go to the source code of this file.

Data Structures

struct  VANCLineNumber
 
class  decklink_input_callback
 

Macros

#define MAX_WIDTH_VANC   1920
 

Functions

static int get_vanc_line_idx (BMDDisplayMode mode)
 
static void clear_parity_bits (uint16_t *buf, int len)
 
static int check_vanc_parity_checksum (uint16_t *buf, int len, uint16_t checksum)
 
static void extract_luma_from_v210 (uint16_t *dst, const uint8_t *src, int width)
 
static uint8_t calc_parity_and_line_offset (int line)
 
static void fill_data_unit_head (int line, uint8_t *tgt)
 
static uint8_tteletext_data_unit_from_op47_vbi_packet (int line, uint16_t *py, uint8_t *tgt)
 
static int linemask_matches (int line, int64_t mask)
 
static uint8_tteletext_data_unit_from_op47_data (uint16_t *py, uint16_t *pend, uint8_t *tgt, int64_t wanted_lines)
 
static uint8_tteletext_data_unit_from_ancillary_packet (uint16_t *py, uint16_t *pend, uint8_t *tgt, int64_t wanted_lines, int allow_multipacket)
 
uint8_tvanc_to_cc (AVFormatContext *avctx, uint16_t *buf, size_t words, unsigned &cc_count)
 
uint8_tget_metadata (AVFormatContext *avctx, uint16_t *buf, size_t width, uint8_t *tgt, size_t tgt_size, AVPacket *pkt)
 
static void avpacket_queue_init (AVFormatContext *avctx, AVPacketQueue *q)
 
static void avpacket_queue_flush (AVPacketQueue *q)
 
static void avpacket_queue_end (AVPacketQueue *q)
 
static unsigned long long avpacket_queue_size (AVPacketQueue *q)
 
static int avpacket_queue_put (AVPacketQueue *q, AVPacket *pkt)
 
static int avpacket_queue_get (AVPacketQueue *q, AVPacket *pkt, int block)
 
static int64_t get_pkt_pts (IDeckLinkVideoInputFrame *videoFrame, IDeckLinkAudioInputPacket *audioFrame, int64_t wallclock, DecklinkPtsSource pts_src, AVRational time_base, int64_t *initial_pts)
 
static HRESULT decklink_start_input (AVFormatContext *avctx)
 
av_cold int ff_decklink_read_close (AVFormatContext *avctx)
 
av_cold int ff_decklink_read_header (AVFormatContext *avctx)
 
int ff_decklink_read_packet (AVFormatContext *avctx, AVPacket *pkt)
 
int ff_decklink_list_input_devices (AVFormatContext *avctx, struct AVDeviceInfoList *device_list)
 

Variables

static VANCLineNumber vanc_line_numbers []
 

Macro Definition Documentation

#define MAX_WIDTH_VANC   1920

Definition at line 51 of file decklink_dec.cpp.

Referenced by decklink_input_callback::VideoInputFrameArrived().

Function Documentation

static int get_vanc_line_idx ( BMDDisplayMode  mode)
static

Definition at line 99 of file decklink_dec.cpp.

Referenced by decklink_input_callback::VideoInputFrameArrived().

static void clear_parity_bits ( uint16_t *  buf,
int  len 
)
inlinestatic

Definition at line 110 of file decklink_dec.cpp.

Referenced by get_metadata().

static int check_vanc_parity_checksum ( uint16_t *  buf,
int  len,
uint16_t  checksum 
)
static

Definition at line 116 of file decklink_dec.cpp.

Referenced by get_metadata().

static void extract_luma_from_v210 ( uint16_t *  dst,
const uint8_t src,
int  width 
)
static

Definition at line 139 of file decklink_dec.cpp.

Referenced by decklink_input_callback::VideoInputFrameArrived().

static uint8_t calc_parity_and_line_offset ( int  line)
static

Definition at line 150 of file decklink_dec.cpp.

Referenced by fill_data_unit_head().

static void fill_data_unit_head ( int  line,
uint8_t tgt 
)
static

Definition at line 160 of file decklink_dec.cpp.

Referenced by teletext_data_unit_from_op47_vbi_packet().

static uint8_t* teletext_data_unit_from_op47_vbi_packet ( int  line,
uint16_t *  py,
uint8_t tgt 
)
static

Definition at line 201 of file decklink_dec.cpp.

Referenced by teletext_data_unit_from_op47_data().

static int linemask_matches ( int  line,
int64_t  mask 
)
static

Definition at line 219 of file decklink_dec.cpp.

Referenced by teletext_data_unit_from_op47_data().

static uint8_t* teletext_data_unit_from_op47_data ( uint16_t *  py,
uint16_t *  pend,
uint8_t tgt,
int64_t  wanted_lines 
)
static

Definition at line 229 of file decklink_dec.cpp.

Referenced by teletext_data_unit_from_ancillary_packet().

static uint8_t* teletext_data_unit_from_ancillary_packet ( uint16_t *  py,
uint16_t *  pend,
uint8_t tgt,
int64_t  wanted_lines,
int  allow_multipacket 
)
static

Definition at line 246 of file decklink_dec.cpp.

Referenced by get_metadata().

uint8_t* vanc_to_cc ( AVFormatContext avctx,
uint16_t *  buf,
size_t  words,
unsigned &  cc_count 
)

Definition at line 265 of file decklink_dec.cpp.

Referenced by get_metadata().

uint8_t* get_metadata ( AVFormatContext avctx,
uint16_t *  buf,
size_t  width,
uint8_t tgt,
size_t  tgt_size,
AVPacket pkt 
)

Definition at line 355 of file decklink_dec.cpp.

Referenced by decklink_input_callback::VideoInputFrameArrived().

static void avpacket_queue_init ( AVFormatContext avctx,
AVPacketQueue q 
)
static

Definition at line 408 of file decklink_dec.cpp.

Referenced by ff_decklink_read_header().

static void avpacket_queue_flush ( AVPacketQueue q)
static

Definition at line 418 of file decklink_dec.cpp.

Referenced by avpacket_queue_end().

static void avpacket_queue_end ( AVPacketQueue q)
static

Definition at line 435 of file decklink_dec.cpp.

Referenced by ff_decklink_read_close().

static unsigned long long avpacket_queue_size ( AVPacketQueue q)
static
static int avpacket_queue_put ( AVPacketQueue q,
AVPacket pkt 
)
static

Definition at line 451 of file decklink_dec.cpp.

Referenced by decklink_input_callback::VideoInputFrameArrived().

static int avpacket_queue_get ( AVPacketQueue q,
AVPacket pkt,
int  block 
)
static

Definition at line 492 of file decklink_dec.cpp.

Referenced by ff_decklink_read_packet().

static int64_t get_pkt_pts ( IDeckLinkVideoInputFrame *  videoFrame,
IDeckLinkAudioInputPacket *  audioFrame,
int64_t  wallclock,
DecklinkPtsSource  pts_src,
AVRational  time_base,
int64_t *  initial_pts 
)
static

Definition at line 583 of file decklink_dec.cpp.

Referenced by decklink_input_callback::VideoInputFrameArrived().

static HRESULT decklink_start_input ( AVFormatContext avctx)
static

Definition at line 800 of file decklink_dec.cpp.

Referenced by ff_decklink_read_header().

av_cold int ff_decklink_read_close ( AVFormatContext avctx)

Definition at line 812 of file decklink_dec.cpp.

av_cold int ff_decklink_read_header ( AVFormatContext avctx)

Definition at line 831 of file decklink_dec.cpp.

int ff_decklink_read_packet ( AVFormatContext avctx,
AVPacket pkt 
)

Definition at line 1057 of file decklink_dec.cpp.

int ff_decklink_list_input_devices ( AVFormatContext avctx,
struct AVDeviceInfoList device_list 
)

Definition at line 1067 of file decklink_dec.cpp.

Variable Documentation

VANCLineNumber vanc_line_numbers[]
static

Definition at line 66 of file decklink_dec.cpp.