FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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

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

Definition at line 313 of file libndi_newtek_dec.c.

#define DEC   AV_OPT_FLAG_DECODING_PARAM

Definition at line 314 of file libndi_newtek_dec.c.

Function Documentation

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().

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().

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().

static int ndi_read_header ( AVFormatContext avctx)
static

Definition at line 139 of file libndi_newtek_dec.c.

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().

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().

static int ndi_read_packet ( AVFormatContext avctx,
AVPacket pkt 
)
static

Definition at line 258 of file libndi_newtek_dec.c.

static int ndi_read_close ( AVFormatContext avctx)
static

Definition at line 300 of file libndi_newtek_dec.c.

Variable Documentation

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.

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:86
static const AVOption options[]
av_default_item_name

Definition at line 323 of file libndi_newtek_dec.c.

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:179
static int ndi_read_close(AVFormatContext *avctx)
static const AVClass libndi_newtek_demuxer_class
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:528
#define AVFMT_NOFILE
Demuxer will use avio_open, no opened file should be provided by the caller.
Definition: avformat.h:478

Definition at line 331 of file libndi_newtek_dec.c.