FFmpeg
Data Structures | Functions | Variables
v4l2enc.c File Reference
#include "libavutil/imgutils.h"
#include "libavutil/pixdesc.h"
#include "libavformat/avformat.h"
#include "libavformat/mux.h"
#include "v4l2-common.h"

Go to the source code of this file.

Data Structures

struct  V4L2Context
 

Functions

static av_cold int write_header (AVFormatContext *s1)
 
static int write_packet (AVFormatContext *s1, AVPacket *pkt)
 
static int write_trailer (AVFormatContext *s1)
 

Variables

static const AVClass v4l2_class
 
const FFOutputFormat ff_v4l2_muxer
 

Function Documentation

◆ write_header()

static av_cold int write_header ( AVFormatContext s1)
static

Definition at line 32 of file v4l2enc.c.

◆ write_packet()

static int write_packet ( AVFormatContext s1,
AVPacket pkt 
)
static

Definition at line 93 of file v4l2enc.c.

◆ write_trailer()

static int write_trailer ( AVFormatContext s1)
static

Definition at line 101 of file v4l2enc.c.

Referenced by segment_end().

Variable Documentation

◆ v4l2_class

const AVClass v4l2_class
static
Initial value:
= {
.class_name = "V4L2 outdev",
.item_name = av_default_item_name,
}

Definition at line 108 of file v4l2enc.c.

◆ ff_v4l2_muxer

const FFOutputFormat ff_v4l2_muxer
Initial value:
= {
.p.name = "video4linux2,v4l2",
.p.long_name = NULL_IF_CONFIG_SMALL("Video4Linux2 output device"),
.priv_data_size = sizeof(V4L2Context),
.p.audio_codec = AV_CODEC_ID_NONE,
.p.video_codec = AV_CODEC_ID_RAWVIDEO,
.write_header = write_header,
.write_packet = write_packet,
.write_trailer = write_trailer,
.p.flags = AVFMT_NOFILE,
.p.priv_class = &v4l2_class,
}

Definition at line 115 of file v4l2enc.c.

v4l2_class
static const AVClass v4l2_class
Definition: v4l2enc.c:108
AV_CODEC_ID_RAWVIDEO
@ AV_CODEC_ID_RAWVIDEO
Definition: codec_id.h:65
write_header
static av_cold int write_header(AVFormatContext *s1)
Definition: v4l2enc.c:32
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
V4L2Context
Definition: v4l2_context.h:37
write_trailer
static int write_trailer(AVFormatContext *s1)
Definition: v4l2enc.c:101
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:94
AVFMT_NOFILE
#define AVFMT_NOFILE
Demuxer will use avio_open, no opened file should be provided by the caller.
Definition: avformat.h:468
AV_CODEC_ID_NONE
@ AV_CODEC_ID_NONE
Definition: codec_id.h:50
write_packet
static int write_packet(AVFormatContext *s1, AVPacket *pkt)
Definition: v4l2enc.c:93