FFmpeg
Data Structures | Macros | Functions | Variables
fbdev_dec.c File Reference
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <time.h>
#include <linux/fb.h>
#include "libavutil/file_open.h"
#include "libavutil/internal.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
#include "libavutil/pixdesc.h"
#include "libavformat/demux.h"
#include "libavformat/internal.h"
#include "avdevice.h"
#include "fbdev_common.h"

Go to the source code of this file.

Data Structures

struct  FBDevContext
 

Macros

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

Functions

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)
 
static int fbdev_get_device_list (AVFormatContext *s, AVDeviceInfoList *device_list)
 

Variables

static const AVOption options []
 
static const AVClass fbdev_class
 
const FFInputFormat 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_dec.c.

Macro Definition Documentation

◆ OFFSET

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

Definition at line 221 of file fbdev_dec.c.

◆ DEC

#define DEC   AV_OPT_FLAG_DECODING_PARAM

Definition at line 222 of file fbdev_dec.c.

Function Documentation

◆ fbdev_read_header()

static av_cold int fbdev_read_header ( AVFormatContext avctx)
static

Definition at line 66 of file fbdev_dec.c.

◆ fbdev_read_packet()

static int fbdev_read_packet ( AVFormatContext avctx,
AVPacket pkt 
)
static

Definition at line 152 of file fbdev_dec.c.

◆ fbdev_read_close()

static av_cold int fbdev_read_close ( AVFormatContext avctx)
static

Definition at line 206 of file fbdev_dec.c.

◆ fbdev_get_device_list()

static int fbdev_get_device_list ( AVFormatContext s,
AVDeviceInfoList device_list 
)
static

Definition at line 216 of file fbdev_dec.c.

Variable Documentation

◆ options

const AVOption options[]
static
Initial value:
= {
{ "framerate","", OFFSET(framerate_q), AV_OPT_TYPE_VIDEO_RATE, {.str = "25"}, 0, INT_MAX, DEC },
{ NULL },
}

Definition at line 223 of file fbdev_dec.c.

◆ fbdev_class

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

Definition at line 228 of file fbdev_dec.c.

◆ ff_fbdev_demuxer

const FFInputFormat ff_fbdev_demuxer
Initial value:
= {
.p.name = "fbdev",
.p.long_name = NULL_IF_CONFIG_SMALL("Linux framebuffer"),
.p.flags = AVFMT_NOFILE,
.p.priv_class = &fbdev_class,
.priv_data_size = sizeof(FBDevContext),
.get_device_list = fbdev_get_device_list,
}

Definition at line 236 of file fbdev_dec.c.

AV_OPT_TYPE_VIDEO_RATE
@ AV_OPT_TYPE_VIDEO_RATE
offset must point to AVRational
Definition: opt.h:248
fbdev_class
static const AVClass fbdev_class
Definition: fbdev_dec.c:228
read_close
static av_cold int read_close(AVFormatContext *ctx)
Definition: libcdio.c:143
read_packet
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_read_callback.c:42
fbdev_get_device_list
static int fbdev_get_device_list(AVFormatContext *s, AVDeviceInfoList *device_list)
Definition: fbdev_dec.c:216
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
read_header
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:550
NULL
#define NULL
Definition: coverity.c:32
fbdev_read_close
static av_cold int fbdev_read_close(AVFormatContext *avctx)
Definition: fbdev_dec.c:206
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:237
AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT
@ AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT
Definition: log.h:41
OFFSET
#define OFFSET(x)
Definition: fbdev_dec.c:221
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:94
DEC
#define DEC
Definition: fbdev_dec.c:222
AVFMT_NOFILE
#define AVFMT_NOFILE
Demuxer will use avio_open, no opened file should be provided by the caller.
Definition: avformat.h:468
FBDevContext
Definition: fbdev_dec.c:49
fbdev_read_packet
static int fbdev_read_packet(AVFormatContext *avctx, AVPacket *pkt)
Definition: fbdev_dec.c:152
fbdev_read_header
static av_cold int fbdev_read_header(AVFormatContext *avctx)
Definition: fbdev_dec.c:66
options
static const AVOption options[]
Definition: fbdev_dec.c:223