FFmpeg
Data Fields
V4L2Context Struct Reference

#include <v4l2_context.h>

Data Fields

const char * name
 context name. More...
 
enum v4l2_buf_type type
 Type of this buffer context. More...
 
enum AVPixelFormat av_pix_fmt
 AVPixelFormat corresponding to this buffer context. More...
 
enum AVCodecID av_codec_id
 AVCodecID corresponding to this buffer context. More...
 
struct v4l2_format format
 Format returned by the driver after initializing the buffer context. More...
 
int width
 Width and height of the frames it produces (in case of a capture context, e.g. More...
 
int height
 
AVRational sample_aspect_ratio
 
V4L2Bufferbuffers
 Indexed array of V4L2Buffers. More...
 
int num_buffers
 Readonly after init. More...
 
int streamon
 Whether the stream has been started (VIDIOC_STREAMON has been sent). More...
 
int done
 Either no more buffers available or an unrecoverable error was notified by the V4L2 kernel driver: once set the context has to be exited. More...
 
AVClassclass
 
int fd
 

Detailed Description

Definition at line 37 of file v4l2_context.h.

Field Documentation

◆ name

const char* V4L2Context::name

◆ type

enum v4l2_buf_type V4L2Context::type

Type of this buffer context.

See V4L2_BUF_TYPE_VIDEO_* in videodev2.h Readonly after init.

Definition at line 48 of file v4l2_context.h.

Referenced by buf_to_m2mctx(), v4l2_free_buffer(), and v4l2_try_start().

◆ av_pix_fmt

enum AVPixelFormat V4L2Context::av_pix_fmt

AVPixelFormat corresponding to this buffer context.

AV_PIX_FMT_NONE means this is an encoded stream.

Definition at line 54 of file v4l2_context.h.

Referenced by v4l2_buffer_buf_to_swframe(), v4l2_decode_init(), v4l2_encode_init(), and v4l2_try_start().

◆ av_codec_id

enum AVCodecID V4L2Context::av_codec_id

AVCodecID corresponding to this buffer context.

AV_CODEC_ID_RAWVIDEO means this is a raw stream and av_pix_fmt must be set to a valid value.

Definition at line 60 of file v4l2_context.h.

Referenced by v4l2_decode_init(), and v4l2_encode_init().

◆ format

struct v4l2_format V4L2Context::format

Format returned by the driver after initializing the buffer context.

Readonly after init.

Definition at line 66 of file v4l2_context.h.

Referenced by v4l2_buffer_buf_to_swframe(), v4l2_get_color_primaries(), v4l2_get_color_range(), v4l2_get_color_space(), v4l2_get_color_trc(), and v4l2_try_start().

◆ width

int V4L2Context::width

Width and height of the frames it produces (in case of a capture context, e.g.

when decoding) or accepts (in case of an output context, e.g. when encoding).

Definition at line 72 of file v4l2_context.h.

Referenced by ff_v4l2_buffer_buf_to_avframe(), v4l2_decode_init(), v4l2_encode_init(), and v4l2_try_start().

◆ height

int V4L2Context::height

◆ sample_aspect_ratio

AVRational V4L2Context::sample_aspect_ratio

Definition at line 73 of file v4l2_context.h.

Referenced by ff_v4l2_buffer_buf_to_avframe().

◆ buffers

V4L2Buffer* V4L2Context::buffers

Indexed array of V4L2Buffers.

Definition at line 78 of file v4l2_context.h.

Referenced by v4l2_try_start().

◆ num_buffers

int V4L2Context::num_buffers

Readonly after init.

Definition at line 83 of file v4l2_context.h.

Referenced by ff_v4l2_m2m_create_context().

◆ streamon

int V4L2Context::streamon

Whether the stream has been started (VIDIOC_STREAMON has been sent).

Definition at line 88 of file v4l2_context.h.

Referenced by v4l2_free_buffer(), v4l2_receive_packet(), and v4l2_try_start().

◆ done

int V4L2Context::done

Either no more buffers available or an unrecoverable error was notified by the V4L2 kernel driver: once set the context has to be exited.

Definition at line 94 of file v4l2_context.h.

◆ class

AVClass* V4L2Context::class

Definition at line 28 of file v4l2enc.c.

◆ fd

int V4L2Context::fd

Definition at line 29 of file v4l2enc.c.


The documentation for this struct was generated from the following files: