FFmpeg  4.0
Data Structures | Macros | Functions | Variables
libndi_newtek_dec.c File Reference
#include "libavformat/avformat.h"
#include "libavformat/internal.h"
#include "libavutil/opt.h"
#include "libavutil/imgutils.h"
#include "libndi_newtek_common.h"

Go to the source code of this file.

Data Structures

struct  NDIContext
 

Macros

#define OFFSET(x)   offsetof(struct NDIContext, x)
 
#define DEC   AV_OPT_FLAG_DECODING_PARAM
 

Functions

static int ndi_set_video_packet (AVFormatContext *avctx, NDIlib_video_frame_t *v, AVPacket *pkt)
 
static int ndi_set_audio_packet (AVFormatContext *avctx, NDIlib_audio_frame_t *a, AVPacket *pkt)
 
static int ndi_find_sources (AVFormatContext *avctx, const char *name, NDIlib_source_t *source_to_connect_to)
 
static int ndi_read_header (AVFormatContext *avctx)
 
static int ndi_create_video_stream (AVFormatContext *avctx, NDIlib_video_frame_t *v)
 
static int ndi_create_audio_stream (AVFormatContext *avctx, NDIlib_audio_frame_t *a)
 
static int ndi_read_packet (AVFormatContext *avctx, AVPacket *pkt)
 
static int ndi_read_close (AVFormatContext *avctx)
 

Variables

static const AVOption options []
 
static const AVClass libndi_newtek_demuxer_class
 
AVInputFormat ff_libndi_newtek_demuxer
 

Macro Definition Documentation

◆ OFFSET

#define OFFSET (   x)    offsetof(struct NDIContext, x)

Definition at line 313 of file libndi_newtek_dec.c.

◆ DEC

#define DEC   AV_OPT_FLAG_DECODING_PARAM

Definition at line 314 of file libndi_newtek_dec.c.

Function Documentation

◆ ndi_set_video_packet()

static int ndi_set_video_packet ( AVFormatContext avctx,
NDIlib_video_frame_t *  v,
AVPacket pkt 
)
static

Definition at line 45 of file libndi_newtek_dec.c.

Referenced by ndi_read_packet().

◆ ndi_set_audio_packet()

static int ndi_set_audio_packet ( AVFormatContext avctx,
NDIlib_audio_frame_t *  a,
AVPacket pkt 
)
static

Definition at line 68 of file libndi_newtek_dec.c.

Referenced by ndi_read_packet().

◆ ndi_find_sources()

static int ndi_find_sources ( AVFormatContext avctx,
const char *  name,
NDIlib_source_t *  source_to_connect_to 
)
static

Definition at line 95 of file libndi_newtek_dec.c.

Referenced by ndi_read_header().

◆ ndi_read_header()

static int ndi_read_header ( AVFormatContext avctx)
static

Definition at line 139 of file libndi_newtek_dec.c.

◆ ndi_create_video_stream()

static int ndi_create_video_stream ( AVFormatContext avctx,
NDIlib_video_frame_t *  v 
)
static

Definition at line 179 of file libndi_newtek_dec.c.

Referenced by ndi_read_packet().

◆ ndi_create_audio_stream()

static int ndi_create_audio_stream ( AVFormatContext avctx,
NDIlib_audio_frame_t *  a 
)
static

Definition at line 235 of file libndi_newtek_dec.c.

Referenced by ndi_read_packet().

◆ ndi_read_packet()

static int ndi_read_packet ( AVFormatContext avctx,
AVPacket pkt 
)
static

Definition at line 258 of file libndi_newtek_dec.c.

◆ ndi_read_close()

static int ndi_read_close ( AVFormatContext avctx)
static

Definition at line 300 of file libndi_newtek_dec.c.

Variable Documentation

◆ options

const AVOption options[]
static
Initial value:
= {
{ "find_sources", "Find available sources" , OFFSET(find_sources), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, DEC },
{ "wait_sources", "Time to wait until the number of online sources have changed" , OFFSET(wait_sources), AV_OPT_TYPE_DURATION, { .i64 = 1000000 }, 100000, 20000000, DEC },
{ "allow_video_fields", "When this flag is FALSE, all video that you receive will be progressive" , OFFSET(allow_video_fields), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, DEC },
{ NULL },
}
#define NULL
Definition: coverity.c:32
#define DEC
#define OFFSET(x)

Definition at line 316 of file libndi_newtek_dec.c.

◆ libndi_newtek_demuxer_class

const AVClass libndi_newtek_demuxer_class
static
Initial value:
= {
.class_name = "NDI demuxer",
.item_name = av_default_item_name,
.option = options,
}
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:191
static const AVOption options[]

Definition at line 323 of file libndi_newtek_dec.c.

◆ ff_libndi_newtek_demuxer

AVInputFormat ff_libndi_newtek_demuxer
Initial value:
= {
.name = "libndi_newtek",
.long_name = NULL_IF_CONFIG_SMALL("Network Device Interface (NDI) input using NewTek library"),
.flags = AVFMT_NOFILE,
.priv_data_size = sizeof(struct NDIContext),
.read_packet = ndi_read_packet,
.read_close = ndi_read_close,
}
static int ndi_read_packet(AVFormatContext *avctx, AVPacket *pkt)
static int ndi_read_header(AVFormatContext *avctx)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static int ndi_read_close(AVFormatContext *avctx)
static const AVClass libndi_newtek_demuxer_class
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:530
#define AVFMT_NOFILE
Demuxer will use avio_open, no opened file should be provided by the caller.
Definition: avformat.h:465

Definition at line 331 of file libndi_newtek_dec.c.