libavdevice/bktr.c File Reference

#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/time.h>
#include <signal.h>
#include <stdint.h>
#include <strings.h>
#include "avdevice.h"

Go to the source code of this file.

Data Structures

struct  VideoData

Defines

#define PAL   1
#define PALBDGHI   1
#define NTSC   2
#define NTSCM   2
#define SECAM   3
#define PALN   4
#define PALM   5
#define NTSCJ   6
#define PAL_HEIGHT   576
#define SECAM_HEIGHT   576
#define NTSC_HEIGHT   480
#define VIDEO_FORMAT   NTSC
#define OFFSET(x)   offsetof(VideoData, x)
#define DEC   AV_OPT_FLAG_DECODING_PARAM

Functions

static void catchsignal (int signal)
static av_cold int bktr_init (const char *video_device, int width, int height, int format, int *video_fd, int *tuner_fd, int idev, double frequency)
static void bktr_getframe (uint64_t per_frame)
static int grab_read_packet (AVFormatContext *s1, AVPacket *pkt)
static int grab_read_header (AVFormatContext *s1, AVFormatParameters *ap)
static int grab_read_close (AVFormatContext *s1)

Variables

static int bktr_dev []
uint8_t * video_buf
size_t video_buf_size
uint64_t last_frame_time
volatile sig_atomic_t nsignals
static const AVOption options []
static const AVClass bktr_class
AVInputFormat ff_bktr_demuxer


Define Documentation

#define DEC   AV_OPT_FLAG_DECODING_PARAM

Definition at line 345 of file bktr.c.

#define NTSC   2

Definition at line 66 of file bktr.c.

Referenced by bktr_init(), grab_read_header(), and opt_target().

#define NTSC_HEIGHT   480

Definition at line 76 of file bktr.c.

Referenced by bktr_init().

#define NTSCJ   6

Definition at line 71 of file bktr.c.

Referenced by bktr_init().

#define NTSCM   2

Definition at line 67 of file bktr.c.

#define OFFSET (  )     offsetof(VideoData, x)

Definition at line 344 of file bktr.c.

#define PAL   1

Definition at line 64 of file bktr.c.

Referenced by bktr_init(), grab_read_header(), and opt_target().

#define PAL_HEIGHT   576

Definition at line 74 of file bktr.c.

Referenced by bktr_init().

#define PALBDGHI   1

Definition at line 65 of file bktr.c.

#define PALM   5

Definition at line 70 of file bktr.c.

Referenced by bktr_init().

#define PALN   4

Definition at line 69 of file bktr.c.

Referenced by bktr_init().

#define SECAM   3

Definition at line 68 of file bktr.c.

Referenced by bktr_init(), and grab_read_header().

#define SECAM_HEIGHT   576

Definition at line 75 of file bktr.c.

Referenced by bktr_init().

#define VIDEO_FORMAT   NTSC

Definition at line 79 of file bktr.c.

Referenced by bktr_init().


Function Documentation

static void bktr_getframe ( uint64_t  per_frame  )  [static]

Definition at line 211 of file bktr.c.

Referenced by grab_read_packet().

static av_cold int bktr_init ( const char *  video_device,
int  width,
int  height,
int  format,
int *  video_fd,
int *  tuner_fd,
int  idev,
double  frequency 
) [static]

Definition at line 97 of file bktr.c.

Referenced by grab_read_header().

static void catchsignal ( int  signal  )  [static]

Definition at line 91 of file bktr.c.

Referenced by bktr_init().

static int grab_read_close ( AVFormatContext s1  )  [static]

Definition at line 326 of file bktr.c.

static int grab_read_header ( AVFormatContext s1,
AVFormatParameters ap 
) [static]

Definition at line 246 of file bktr.c.

static int grab_read_packet ( AVFormatContext s1,
AVPacket pkt 
) [static]

Definition at line 231 of file bktr.c.


Variable Documentation

const AVClass bktr_class [static]

Initial value:

 {
    .class_name = "BKTR grab interface",
    .item_name  = av_default_item_name,
    .option     = options,
    .version    = LIBAVUTIL_VERSION_INT,
}

Definition at line 359 of file bktr.c.

int bktr_dev[] [static]

Initial value:

 { METEOR_DEV0, METEOR_DEV1, METEOR_DEV2,
    METEOR_DEV3, METEOR_DEV_SVIDEO }

Definition at line 82 of file bktr.c.

Referenced by bktr_init().

Initial value:

Definition at line 366 of file bktr.c.

uint64_t last_frame_time

Definition at line 87 of file bktr.c.

Referenced by bktr_getframe(), and grab_read_header().

volatile sig_atomic_t nsignals

Definition at line 88 of file bktr.c.

Referenced by bktr_getframe(), catchsignal(), and grab_read_header().

const AVOption options[] [static]

Initial value:

 {
    { "standard", "", 0x42, FF_OPT_TYPE_INT, {.dbl = VIDEO_FORMAT}, PAL, NTSCJ, AV_OPT_FLAG_DECODING_PARAM, "standard" },
    { "PAL",      "", 0, FF_OPT_TYPE_CONST, {.dbl = PAL},   0, 0, AV_OPT_FLAG_DECODING_PARAM, "standard" },
    { "NTSC",     "", 0, FF_OPT_TYPE_CONST, {.dbl = NTSC},  0, 0, AV_OPT_FLAG_DECODING_PARAM, "standard" },
    { "SECAM",    "", 0, FF_OPT_TYPE_CONST, {.dbl = SECAM}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "standard" },
    { "PALN",     "", 0, FF_OPT_TYPE_CONST, {.dbl = PALN},  0, 0, AV_OPT_FLAG_DECODING_PARAM, "standard" },
    { "PALM",     "", 0, FF_OPT_TYPE_CONST, {.dbl = PALM},  0, 0, AV_OPT_FLAG_DECODING_PARAM, "standard" },
    { "NTSCJ",    "", 0, FF_OPT_TYPE_CONST, {.dbl = NTSCJ}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "standard" },
    { "video_size", "A string describing frame size, such as 640x480 or hd720.", OFFSET(video_size), FF_OPT_TYPE_STRING, {.str = "vga"}, 0, 0, DEC },
    { "framerate", "", OFFSET(framerate), FF_OPT_TYPE_STRING, {.str = NULL}, 0, 0, DEC },
    { NULL },
}

Definition at line 346 of file bktr.c.

uint8_t* video_buf

Definition at line 85 of file bktr.c.

Referenced by bktr_init(), grab_read_close(), and grab_read_packet().

Definition at line 86 of file bktr.c.

Referenced by bktr_init(), grab_read_close(), and grab_read_packet().


Generated on Fri Oct 26 02:38:19 2012 for FFmpeg by  doxygen 1.5.8