libavdevice/fbdev.c File Reference

Linux framebuffer input device, inspired by code from fbgrab.c by Gunnar Monell. More...

#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/time.h>
#include <sys/mman.h>
#include <time.h>
#include <linux/fb.h>
#include "libavutil/log.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
#include "libavutil/pixdesc.h"
#include "avdevice.h"
#include "libavformat/internal.h"

Go to the source code of this file.

Data Structures

struct  rgb_pixfmt_map_entry
struct  FBDevContext

Defines

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

Functions

static enum PixelFormat get_pixfmt_from_fb_varinfo (struct fb_var_screeninfo *varinfo)
static av_cold int fbdev_read_header (AVFormatContext *avctx)
static int fbdev_read_packet (AVFormatContext *avctx, AVPacket *pkt)
static av_cold int fbdev_read_close (AVFormatContext *avctx)

Variables

static struct rgb_pixfmt_map_entry rgb_pixfmt_map []
static const AVOption options []
static const AVClass fbdev_class
AVInputFormat ff_fbdev_demuxer


Detailed Description

Linux framebuffer input device, inspired by code from fbgrab.c by Gunnar Monell.

See also:
http://linux-fbdev.sourceforge.net/

Definition in file fbdev.c.


Define Documentation

#define DEC   AV_OPT_FLAG_DECODING_PARAM

Definition at line 248 of file fbdev.c.

#define OFFSET (  )     offsetof(FBDevContext, x)

Definition at line 247 of file fbdev.c.


Function Documentation

static av_cold int fbdev_read_close ( AVFormatContext avctx  )  [static]

Definition at line 237 of file fbdev.c.

static av_cold int fbdev_read_header ( AVFormatContext avctx  )  [static]

Definition at line 98 of file fbdev.c.

static int fbdev_read_packet ( AVFormatContext avctx,
AVPacket pkt 
) [static]

Definition at line 184 of file fbdev.c.

static enum PixelFormat get_pixfmt_from_fb_varinfo ( struct fb_var_screeninfo *  varinfo  )  [static]

Definition at line 64 of file fbdev.c.

Referenced by fbdev_read_header().


Variable Documentation

const AVClass fbdev_class [static]

Initial value:

 {
    .class_name = "fbdev indev",
    .item_name  = av_default_item_name,
    .option     = options,
    .version    = LIBAVUTIL_VERSION_INT,
}

Definition at line 254 of file fbdev.c.

Initial value:

 {
    .name           = "fbdev",
    .long_name      = NULL_IF_CONFIG_SMALL("Linux framebuffer"),
    .priv_data_size = sizeof(FBDevContext),
    .read_header    = fbdev_read_header,
    .read_packet    = fbdev_read_packet,
    .read_close     = fbdev_read_close,
    .flags          = AVFMT_NOFILE,
    .priv_class     = &fbdev_class,
}

Definition at line 261 of file fbdev.c.

const AVOption options[] [static]

Initial value:

 {
    { "framerate","", OFFSET(framerate), AV_OPT_TYPE_STRING, {.str = "25"}, 0, 0, DEC },
    { NULL },
}

Definition at line 249 of file fbdev.c.

Initial value:

 {
    
    {  32,       0,           8,          16,           24,   PIX_FMT_RGBA  },
    {  32,      16,           8,           0,           24,   PIX_FMT_BGRA  },
    {  32,       8,          16,          24,            0,   PIX_FMT_ARGB  },
    {  32,       3,           2,           8,            0,   PIX_FMT_ABGR  },
    {  24,       0,           8,          16,            0,   PIX_FMT_RGB24 },
    {  24,      16,           8,           0,            0,   PIX_FMT_BGR24 },
}

Definition at line 54 of file fbdev.c.


Generated on Fri Oct 26 02:48:00 2012 for FFmpeg by  doxygen 1.5.8