FFmpeg
Data Structures | Macros | Functions | Variables
iec61883.c File Reference
#include "config_components.h"
#include <poll.h>
#include <libraw1394/raw1394.h>
#include <libavc1394/avc1394.h>
#include <libavc1394/rom1394.h>
#include <libiec61883/iec61883.h>
#include "libavformat/demux.h"
#include "libavformat/dv.h"
#include "libavformat/mpegts.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "avdevice.h"

Go to the source code of this file.

Data Structures

struct  DVPacket
 For DV, one packet corresponds exactly to one frame. More...
 
struct  iec61883_data
 

Macros

#define THREADS   HAVE_PTHREADS
 
#define MOTDCT_SPEC_ID   0x00005068
 
#define IEC61883_AUTO   0
 
#define IEC61883_DV   1
 
#define IEC61883_HDV   2
 

Functions

static int iec61883_callback (unsigned char *data, int length, int complete, void *callback_data)
 
static void * iec61883_receive_task (void *opaque)
 
static int iec61883_parse_queue_dv (struct iec61883_data *dv, AVPacket *pkt)
 
static int iec61883_parse_queue_hdv (struct iec61883_data *dv, AVPacket *pkt)
 
static int iec61883_read_header (AVFormatContext *context)
 
static int iec61883_read_packet (AVFormatContext *context, AVPacket *pkt)
 
static int iec61883_close (AVFormatContext *context)
 

Variables

static const AVOption options []
 
static const AVClass iec61883_class
 
const FFInputFormat ff_iec61883_demuxer
 

Detailed Description

libiec61883 interface

Definition in file iec61883.c.

Macro Definition Documentation

◆ THREADS

#define THREADS   HAVE_PTHREADS

Definition at line 40 of file iec61883.c.

◆ MOTDCT_SPEC_ID

#define MOTDCT_SPEC_ID   0x00005068

Definition at line 46 of file iec61883.c.

◆ IEC61883_AUTO

#define IEC61883_AUTO   0

Definition at line 47 of file iec61883.c.

◆ IEC61883_DV

#define IEC61883_DV   1

Definition at line 48 of file iec61883.c.

◆ IEC61883_HDV

#define IEC61883_HDV   2

Definition at line 49 of file iec61883.c.

Function Documentation

◆ iec61883_callback()

static int iec61883_callback ( unsigned char *  data,
int  length,
int  complete,
void *  callback_data 
)
static

Definition at line 102 of file iec61883.c.

Referenced by iec61883_read_header().

◆ iec61883_receive_task()

static void* iec61883_receive_task ( void *  opaque)
static

Definition at line 155 of file iec61883.c.

Referenced by iec61883_read_header(), and iec61883_read_packet().

◆ iec61883_parse_queue_dv()

static int iec61883_parse_queue_dv ( struct iec61883_data dv,
AVPacket pkt 
)
static

Definition at line 192 of file iec61883.c.

Referenced by iec61883_read_header().

◆ iec61883_parse_queue_hdv()

static int iec61883_parse_queue_hdv ( struct iec61883_data dv,
AVPacket pkt 
)
static

Definition at line 225 of file iec61883.c.

Referenced by iec61883_read_header().

◆ iec61883_read_header()

static int iec61883_read_header ( AVFormatContext context)
static

Definition at line 247 of file iec61883.c.

◆ iec61883_read_packet()

static int iec61883_read_packet ( AVFormatContext context,
AVPacket pkt 
)
static

Try to parse frames from queue

Definition at line 424 of file iec61883.c.

◆ iec61883_close()

static int iec61883_close ( AVFormatContext context)
static

Definition at line 453 of file iec61883.c.

Variable Documentation

◆ options

const AVOption options[]
static
Initial value:
= {
{ "dvtype", "override autodetection of DV/HDV", 0x42, AV_OPT_TYPE_INT, {.i64 = IEC61883_AUTO}, IEC61883_AUTO, IEC61883_HDV, AV_OPT_FLAG_DECODING_PARAM, .unit = "dvtype" },
{ "auto", "auto detect DV/HDV", 0, AV_OPT_TYPE_CONST, {.i64 = IEC61883_AUTO}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, .unit = "dvtype" },
{ "dv", "force device being treated as DV device", 0, AV_OPT_TYPE_CONST, {.i64 = IEC61883_DV}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, .unit = "dvtype" },
{ "hdv" , "force device being treated as HDV device", 0, AV_OPT_TYPE_CONST, {.i64 = IEC61883_HDV}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, .unit = "dvtype" },
{ "dvbuffer", "set queue buffer size (in packets)", 0x42, AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM },
{ "dvguid", "select one of multiple DV devices by its GUID", 0x42, AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, AV_OPT_FLAG_DECODING_PARAM },
{ NULL },
}

Definition at line 489 of file iec61883.c.

◆ iec61883_class

const AVClass iec61883_class
static
Initial value:
= {
.class_name = "iec61883 indev",
.item_name = av_default_item_name,
.option = options,
}

Definition at line 499 of file iec61883.c.

◆ ff_iec61883_demuxer

const FFInputFormat ff_iec61883_demuxer
Initial value:
= {
.p.name = "iec61883",
.p.long_name = NULL_IF_CONFIG_SMALL("libiec61883 (new DV1394) A/V input device"),
.p.flags = AVFMT_NOFILE,
.p.priv_class = &iec61883_class,
.priv_data_size = sizeof(struct iec61883_data),
.read_packet = iec61883_read_packet,
.read_close = iec61883_close,
}

Definition at line 507 of file iec61883.c.

iec61883_data
Definition: iec61883.c:62
IEC61883_HDV
#define IEC61883_HDV
Definition: iec61883.c:49
IEC61883_AUTO
#define IEC61883_AUTO
Definition: iec61883.c:47
IEC61883_DV
#define IEC61883_DV
Definition: iec61883.c:48
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
read_header
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:540
NULL
#define NULL
Definition: coverity.c:32
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:237
AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT
@ AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT
Definition: log.h:41
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:94
iec61883_close
static int iec61883_close(AVFormatContext *context)
Definition: iec61883.c:453
AVFMT_NOFILE
#define AVFMT_NOFILE
Demuxer will use avio_open, no opened file should be provided by the caller.
Definition: avformat.h:468
options
static const AVOption options[]
Definition: iec61883.c:489
iec61883_read_packet
static int iec61883_read_packet(AVFormatContext *context, AVPacket *pkt)
Definition: iec61883.c:424
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition: opt.h:259
AV_OPT_FLAG_DECODING_PARAM
#define AV_OPT_FLAG_DECODING_PARAM
A generic parameter which can be set by the user for demuxing or decoding.
Definition: opt.h:356
AV_OPT_TYPE_STRING
@ AV_OPT_TYPE_STRING
Underlying C type is a uint8_t* that is either NULL or points to a C string allocated with the av_mal...
Definition: opt.h:276
iec61883_class
static const AVClass iec61883_class
Definition: iec61883.c:499
iec61883_read_header
static int iec61883_read_header(AVFormatContext *context)
Definition: iec61883.c:247
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
Definition: opt.h:299