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

Go to the source code of this file.

Data Structures

struct  FBDevContext
 

Macros

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

Functions

static av_cold int fbdev_write_header (AVFormatContext *h)
 
static int fbdev_write_packet (AVFormatContext *h, AVPacket *pkt)
 
static av_cold int fbdev_write_trailer (AVFormatContext *h)
 
static int fbdev_get_device_list (AVFormatContext *s, AVDeviceInfoList *device_list)
 

Variables

static const AVOption options []
 
static const AVClass fbdev_class
 
const FFOutputFormat ff_fbdev_muxer
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 194 of file fbdev_enc.c.

◆ ENC

#define ENC   AV_OPT_FLAG_ENCODING_PARAM

Definition at line 195 of file fbdev_enc.c.

Function Documentation

◆ fbdev_write_header()

static av_cold int fbdev_write_header ( AVFormatContext h)
static

Definition at line 45 of file fbdev_enc.c.

◆ fbdev_write_packet()

static int fbdev_write_packet ( AVFormatContext h,
AVPacket pkt 
)
static

Definition at line 102 of file fbdev_enc.c.

◆ fbdev_write_trailer()

static av_cold int fbdev_write_trailer ( AVFormatContext h)
static

Definition at line 181 of file fbdev_enc.c.

◆ fbdev_get_device_list()

static int fbdev_get_device_list ( AVFormatContext s,
AVDeviceInfoList device_list 
)
static

Definition at line 189 of file fbdev_enc.c.

Variable Documentation

◆ options

const AVOption options[]
static
Initial value:
= {
{ "xoffset", "set x coordinate of top left corner", OFFSET(xoffset), AV_OPT_TYPE_INT, {.i64 = 0}, INT_MIN, INT_MAX, ENC },
{ "yoffset", "set y coordinate of top left corner", OFFSET(yoffset), AV_OPT_TYPE_INT, {.i64 = 0}, INT_MIN, INT_MAX, ENC },
{ NULL }
}

Definition at line 196 of file fbdev_enc.c.

◆ fbdev_class

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

Definition at line 202 of file fbdev_enc.c.

◆ ff_fbdev_muxer

const FFOutputFormat ff_fbdev_muxer
Initial value:
= {
.p.name = "fbdev",
.p.long_name = NULL_IF_CONFIG_SMALL("Linux framebuffer"),
.priv_data_size = sizeof(FBDevContext),
.p.audio_codec = AV_CODEC_ID_NONE,
.p.video_codec = AV_CODEC_ID_RAWVIDEO,
.write_header = fbdev_write_header,
.write_packet = fbdev_write_packet,
.write_trailer = fbdev_write_trailer,
.get_device_list = fbdev_get_device_list,
.p.priv_class = &fbdev_class,
}

Definition at line 210 of file fbdev_enc.c.

AVFMT_VARIABLE_FPS
#define AVFMT_VARIABLE_FPS
Format allows variable fps.
Definition: avformat.h:482
AVFMT_NOTIMESTAMPS
#define AVFMT_NOTIMESTAMPS
Format does not need / have any timestamps.
Definition: avformat.h:479
ENC
#define ENC
Definition: fbdev_enc.c:195
AV_CODEC_ID_RAWVIDEO
@ AV_CODEC_ID_RAWVIDEO
Definition: codec_id.h:65
fbdev_write_packet
static int fbdev_write_packet(AVFormatContext *h, AVPacket *pkt)
Definition: fbdev_enc.c:102
fbdev_write_trailer
static av_cold int fbdev_write_trailer(AVFormatContext *h)
Definition: fbdev_enc.c:181
fbdev_get_device_list
static int fbdev_get_device_list(AVFormatContext *s, AVDeviceInfoList *device_list)
Definition: fbdev_enc.c:189
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
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:237
AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT
@ AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT
Definition: log.h:40
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:106
AVFMT_NOFILE
#define AVFMT_NOFILE
Demuxer will use avio_open, no opened file should be provided by the caller.
Definition: avformat.h:468
OFFSET
#define OFFSET(x)
Definition: fbdev_enc.c:194
AV_CODEC_ID_NONE
@ AV_CODEC_ID_NONE
Definition: codec_id.h:50
fbdev_write_header
static av_cold int fbdev_write_header(AVFormatContext *h)
Definition: fbdev_enc.c:45
FBDevContext
Definition: fbdev_dec.c:49
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:235
options
static const AVOption options[]
Definition: fbdev_enc.c:196
fbdev_class
static const AVClass fbdev_class
Definition: fbdev_enc.c:202