FFmpeg
Data Structures | Macros | Functions | Variables
libdc1394.c File Reference
#include <dc1394/dc1394.h>
#include "libavutil/imgutils.h"
#include "libavutil/internal.h"
#include "libavutil/log.h"
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
#include "libavutil/pixdesc.h"
#include "libavformat/avformat.h"
#include "libavformat/internal.h"

Go to the source code of this file.

Data Structures

struct  dc1394_data
 
struct  dc1394_frame_format
 
struct  dc1394_frame_rate
 

Macros

#define OFFSET(x)   offsetof(dc1394_data, x)
 
#define DEC   AV_OPT_FLAG_DECODING_PARAM
 

Functions

static int dc1394_read_common (AVFormatContext *c, const struct dc1394_frame_format **select_fmt, const struct dc1394_frame_rate **select_fps)
 
static int dc1394_read_header (AVFormatContext *c)
 
static int dc1394_read_packet (AVFormatContext *c, AVPacket *pkt)
 
static int dc1394_close (AVFormatContext *context)
 

Variables

static const struct dc1394_frame_format dc1394_frame_formats []
 
static const struct dc1394_frame_rate dc1394_frame_rates []
 
static const AVOption options []
 
static const AVClass libdc1394_class
 
const AVInputFormat ff_libdc1394_demuxer
 

Macro Definition Documentation

◆ OFFSET

#define OFFSET (   x)    offsetof(dc1394_data, x)

Definition at line 79 of file libdc1394.c.

◆ DEC

#define DEC   AV_OPT_FLAG_DECODING_PARAM

Definition at line 80 of file libdc1394.c.

Function Documentation

◆ dc1394_read_common()

static int dc1394_read_common ( AVFormatContext c,
const struct dc1394_frame_format **  select_fmt,
const struct dc1394_frame_rate **  select_fps 
)
inlinestatic

Definition at line 97 of file libdc1394.c.

Referenced by dc1394_read_header().

◆ dc1394_read_header()

static int dc1394_read_header ( AVFormatContext c)
static

Definition at line 167 of file libdc1394.c.

◆ dc1394_read_packet()

static int dc1394_read_packet ( AVFormatContext c,
AVPacket pkt 
)
static

Definition at line 253 of file libdc1394.c.

◆ dc1394_close()

static int dc1394_close ( AVFormatContext context)
static

Definition at line 279 of file libdc1394.c.

Variable Documentation

◆ dc1394_frame_formats

const struct dc1394_frame_format dc1394_frame_formats[]
static
Initial value:
= {
{ 320, 240, AV_PIX_FMT_UYVY422, DC1394_VIDEO_MODE_320x240_YUV422 },
{ 640, 480, AV_PIX_FMT_GRAY8, DC1394_VIDEO_MODE_640x480_MONO8 },
{ 640, 480, AV_PIX_FMT_UYYVYY411, DC1394_VIDEO_MODE_640x480_YUV411 },
{ 640, 480, AV_PIX_FMT_UYVY422, DC1394_VIDEO_MODE_640x480_YUV422 },
{ 0, 0, 0, 0 }
}

Referenced by dc1394_read_common().

◆ dc1394_frame_rates

const struct dc1394_frame_rate dc1394_frame_rates[]
static
Initial value:
= {
{ 1875, DC1394_FRAMERATE_1_875 },
{ 3750, DC1394_FRAMERATE_3_75 },
{ 7500, DC1394_FRAMERATE_7_5 },
{ 15000, DC1394_FRAMERATE_15 },
{ 30000, DC1394_FRAMERATE_30 },
{ 60000, DC1394_FRAMERATE_60 },
{120000, DC1394_FRAMERATE_120 },
{240000, DC1394_FRAMERATE_240 },
{ 0, 0 }
}

Referenced by dc1394_read_common().

◆ options

const AVOption options[]
static
Initial value:
= {
{ "video_size", "A string describing frame size, such as 640x480 or hd720.", OFFSET(video_size), AV_OPT_TYPE_STRING, {.str = "qvga"}, 0, 0, DEC },
{ "pixel_format", "", OFFSET(pixel_format), AV_OPT_TYPE_STRING, {.str = "uyvy422"}, 0, 0, DEC },
{ "framerate", "", OFFSET(framerate), AV_OPT_TYPE_STRING, {.str = "ntsc"}, 0, 0, DEC },
{ NULL },
}

Definition at line 81 of file libdc1394.c.

◆ libdc1394_class

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

Definition at line 88 of file libdc1394.c.

◆ ff_libdc1394_demuxer

const AVInputFormat ff_libdc1394_demuxer
Initial value:
= {
.name = "libdc1394",
.long_name = NULL_IF_CONFIG_SMALL("dc1394 v.2 A/V grab"),
.priv_data_size = sizeof(struct dc1394_data),
.read_packet = dc1394_read_packet,
.read_close = dc1394_close,
.flags = AVFMT_NOFILE,
.priv_class = &libdc1394_class,
}

Definition at line 291 of file libdc1394.c.

DEC
#define DEC
Definition: libdc1394.c:80
framerate
int framerate
Definition: h264_levels.c:65
dc1394_data
Definition: libdc1394.c:36
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
read_header
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:527
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:235
AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT
@ AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT
Definition: log.h:41
AV_PIX_FMT_GRAY8
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
Definition: pixfmt.h:74
dc1394_read_header
static int dc1394_read_header(AVFormatContext *c)
Definition: libdc1394.c:167
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:117
dc1394_close
static int dc1394_close(AVFormatContext *context)
Definition: libdc1394.c:279
AVFMT_NOFILE
#define AVFMT_NOFILE
Demuxer will use avio_open, no opened file should be provided by the caller.
Definition: avformat.h:464
libdc1394_class
static const AVClass libdc1394_class
Definition: libdc1394.c:88
AV_PIX_FMT_UYVY422
@ AV_PIX_FMT_UYVY422
packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1
Definition: pixfmt.h:81
dc1394_read_packet
static int dc1394_read_packet(AVFormatContext *c, AVPacket *pkt)
Definition: libdc1394.c:253
options
static const AVOption options[]
Definition: libdc1394.c:81
OFFSET
#define OFFSET(x)
Definition: libdc1394.c:79
AV_OPT_TYPE_STRING
@ AV_OPT_TYPE_STRING
Definition: opt.h:228
AV_PIX_FMT_UYYVYY411
@ AV_PIX_FMT_UYYVYY411
packed YUV 4:1:1, 12bpp, Cb Y0 Y1 Cr Y2 Y3
Definition: pixfmt.h:82