Libav
Data Structures | Macros | Functions | Variables
vfwcap.c File Reference
#include "libavformat/avformat.h"
#include "libavformat/internal.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
#include <windows.h>
#include <vfw.h>

Go to the source code of this file.

Data Structures

struct  vfw_ctx
 

Macros

#define HWND_MESSAGE   ((HWND) -3)
 
#define dstruct(pctx, sname, var, type)   av_log(pctx, AV_LOG_DEBUG, #var":\t%"type"\n", sname->var)
 
#define OFFSET(x)   offsetof(struct vfw_ctx, x)
 
#define DEC   AV_OPT_FLAG_DECODING_PARAM
 

Functions

static enum AVPixelFormat vfw_pixfmt (DWORD biCompression, WORD biBitCount)
 
static enum AVCodecID vfw_codecid (DWORD biCompression)
 
static void dump_captureparms (AVFormatContext *s, CAPTUREPARMS *cparms)
 
static void dump_videohdr (AVFormatContext *s, VIDEOHDR *vhdr)
 
static void dump_bih (AVFormatContext *s, BITMAPINFOHEADER *bih)
 
static int shall_we_drop (AVFormatContext *s)
 
static LRESULT CALLBACK videostream_cb (HWND hwnd, LPVIDEOHDR vdhdr)
 
static int vfw_read_close (AVFormatContext *s)
 
static int vfw_read_header (AVFormatContext *s)
 
static int vfw_read_packet (AVFormatContext *s, AVPacket *pkt)
 

Variables

static const AVOption options []
 
static const AVClass vfw_class
 
AVInputFormat ff_vfwcap_demuxer
 

Macro Definition Documentation

#define HWND_MESSAGE   ((HWND) -3)

Definition at line 32 of file vfwcap.c.

Referenced by vfw_read_header().

#define dstruct (   pctx,
  sname,
  var,
  type 
)    av_log(pctx, AV_LOG_DEBUG, #var":\t%"type"\n", sname->var)

Definition at line 87 of file vfwcap.c.

Referenced by dump_bih(), dump_captureparms(), and dump_videohdr().

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

Definition at line 455 of file vfwcap.c.

#define DEC   AV_OPT_FLAG_DECODING_PARAM

Definition at line 456 of file vfwcap.c.

Function Documentation

static enum AVPixelFormat vfw_pixfmt ( DWORD  biCompression,
WORD  biBitCount 
)
static

Definition at line 47 of file vfwcap.c.

Referenced by vfw_read_header().

static enum AVCodecID vfw_codecid ( DWORD  biCompression)
static

Definition at line 75 of file vfwcap.c.

Referenced by vfw_read_header().

static void dump_captureparms ( AVFormatContext s,
CAPTUREPARMS *  cparms 
)
static

Definition at line 90 of file vfwcap.c.

Referenced by vfw_read_header().

static void dump_videohdr ( AVFormatContext s,
VIDEOHDR *  vhdr 
)
static

Definition at line 119 of file vfwcap.c.

Referenced by videostream_cb().

static void dump_bih ( AVFormatContext s,
BITMAPINFOHEADER *  bih 
)
static

Definition at line 136 of file vfwcap.c.

Referenced by vfw_read_header().

static int shall_we_drop ( AVFormatContext s)
static

Definition at line 154 of file vfwcap.c.

Referenced by videostream_cb().

static LRESULT CALLBACK videostream_cb ( HWND  hwnd,
LPVIDEOHDR  vdhdr 
)
static

Definition at line 170 of file vfwcap.c.

Referenced by vfw_read_header().

static int vfw_read_close ( AVFormatContext s)
static

Definition at line 212 of file vfwcap.c.

Referenced by vfw_read_header().

static int vfw_read_header ( AVFormatContext s)
static

Definition at line 238 of file vfwcap.c.

static int vfw_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 426 of file vfwcap.c.

Variable Documentation

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 = NULL}, 0, 0, DEC },
{ "framerate", "", OFFSET(framerate), AV_OPT_TYPE_STRING, {.str = "ntsc"}, 0, 0, DEC },
{ NULL },
}
char * video_size
String describing video size, set by a private option.
Definition: v4l2.c:78
NULL
Definition: eval.c:55
#define OFFSET(x)
Definition: vfwcap.c:455
char * framerate
Set by a private option.
Definition: v4l2.c:82
#define DEC
Definition: vfwcap.c:456

Definition at line 457 of file vfwcap.c.

const AVClass vfw_class
static
Initial value:
= {
.class_name = "VFW indev",
.item_name = av_default_item_name,
.option = options,
}
LIBAVUTIL_VERSION_INT
Definition: eval.c:55
static const AVOption options[]
Definition: vfwcap.c:457
av_default_item_name
Return the context name.
Definition: dnxhdenc.c:52

Definition at line 463 of file vfwcap.c.

AVInputFormat ff_vfwcap_demuxer
Initial value:
= {
.name = "vfwcap",
.long_name = NULL_IF_CONFIG_SMALL("VfW video capture"),
.priv_data_size = sizeof(struct vfw_ctx),
.read_packet = vfw_read_packet,
.read_close = vfw_read_close,
.flags = AVFMT_NOFILE,
.priv_class = &vfw_class,
}
static int vfw_read_close(AVFormatContext *s)
Definition: vfwcap.c:212
static const AVClass vfw_class
Definition: vfwcap.c:463
#define AVFMT_NOFILE
Demuxer will use avio_open, no opened file should be provided by the caller.
Definition: avformat.h:409
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:150
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:544
static int vfw_read_header(AVFormatContext *s)
Definition: vfwcap.c:238
static int vfw_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: vfwcap.c:426
Definition: vfwcap.c:35

Definition at line 470 of file vfwcap.c.