FFmpeg  1.2.4
Data Structures | Macros | Typedefs | Functions | Variables
iec61883.c File Reference

libiec61883 interface More...

#include <sys/poll.h>
#include <libraw1394/raw1394.h>
#include <libavc1394/avc1394.h>
#include <libavc1394/rom1394.h>
#include <libiec61883/iec61883.h>
#include "libavformat/dv.h"
#include "libavformat/mpegts.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

Typedefs

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

Functions

static int iec61883_callback (unsigned char *data, int length, int complete, void *callback_data)
static voidiec61883_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
AVInputFormat ff_iec61883_demuxer

Detailed Description

libiec61883 interface

Definition in file iec61883.c.

Macro Definition Documentation

#define IEC61883_AUTO   0

Definition at line 43 of file iec61883.c.

Referenced by iec61883_read_header().

#define IEC61883_DV   1

Definition at line 44 of file iec61883.c.

Referenced by iec61883_read_header().

#define IEC61883_HDV   2

Definition at line 45 of file iec61883.c.

Referenced by iec61883_close(), and iec61883_read_header().

#define MOTDCT_SPEC_ID   0x00005068

Definition at line 42 of file iec61883.c.

Referenced by iec61883_read_header().

#define THREADS   HAVE_PTHREADS

Definition at line 36 of file iec61883.c.

Typedef Documentation

typedef struct DVPacket DVPacket

For DV, one packet corresponds exactly to one frame.

For HDV, these are MPEG2 transport stream packets. The queue is implemented as linked list.

Function Documentation

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

Definition at line 98 of file iec61883.c.

Referenced by iec61883_read_header().

static int iec61883_close ( AVFormatContext context)
static

Definition at line 436 of file iec61883.c.

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

Definition at line 186 of file iec61883.c.

Referenced by iec61883_read_header().

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

Definition at line 212 of file iec61883.c.

Referenced by iec61883_read_header().

static int iec61883_read_header ( AVFormatContext context)
static

Definition at line 233 of file iec61883.c.

static int iec61883_read_packet ( AVFormatContext context,
AVPacket pkt 
)
static

Try to parse frames from queue

Definition at line 407 of file iec61883.c.

static void* iec61883_receive_task ( void opaque)
static

Definition at line 149 of file iec61883.c.

Referenced by iec61883_read_header(), and iec61883_read_packet().

Variable Documentation

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

Definition at line 488 of file iec61883.c.

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

Definition at line 481 of file iec61883.c.

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, "dvtype" },
{ "auto", "auto detect DV/HDV", 0, AV_OPT_TYPE_CONST, {.i64 = IEC61883_AUTO}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "dvtype" },
{ "dv", "force device being treated as DV device", 0, AV_OPT_TYPE_CONST, {.i64 = IEC61883_DV}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "dvtype" },
{ "hdv" , "force device being treated as HDV device", 0, AV_OPT_TYPE_CONST, {.i64 = IEC61883_HDV}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "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 471 of file iec61883.c.