24 #ifndef AVCODEC_V4L2_CONTEXT_H 25 #define AVCODEC_V4L2_CONTEXT_H 27 #include <stdatomic.h> 28 #include <linux/videodev2.h> 183 #endif // AVCODEC_V4L2_CONTEXT_H This structure describes decoded (raw) audio or video data.
const char * name
context name.
void ff_v4l2_context_release(V4L2Context *ctx)
Releases a V4L2Context.
int ff_v4l2_context_dequeue_packet(V4L2Context *ctx, AVPacket *pkt)
Dequeues a buffer from a V4L2Context to an AVPacket.
int width
Width and height of the frames it produces (in case of a capture context, e.g.
int ff_v4l2_context_dequeue_frame(V4L2Context *ctx, AVFrame *f)
Dequeues a buffer from a V4L2Context to an AVFrame.
enum AVCodecID av_codec_id
AVCodecID corresponding to this buffer context.
int ff_v4l2_context_enqueue_frame(V4L2Context *ctx, const AVFrame *f)
Enqueues a buffer to a V4L2Context from an AVFrame.
int done
Either no more buffers available or an unrecoverable error was notified by the V4L2 kernel driver: on...
AVCodecID
Identify the syntax and semantics of the bitstream.
enum AVPixelFormat av_pix_fmt
AVPixelFormat corresponding to this buffer context.
reference-counted frame API
V4L2Buffer * buffers
Indexed array of V4L2Buffers.
int streamon
Whether the stream has been started (VIDIOC_STREAMON has been sent).
int ff_v4l2_context_set_format(V4L2Context *ctx)
Sets the V4L2Context format in the v4l2 driver.
int ff_v4l2_context_init(V4L2Context *ctx)
Initializes a V4L2Context.
int ff_v4l2_context_enqueue_packet(V4L2Context *ctx, const AVPacket *pkt)
Enqueues a buffer to a V4L2Context from an AVPacket.
struct v4l2_format format
Format returned by the driver after initializing the buffer context.
Libavcodec external API header.
int ff_v4l2_context_set_status(V4L2Context *ctx, uint32_t cmd)
Sets the status of a V4L2Context.
V4L2Buffer (wrapper for v4l2_buffer management)
refcounted data buffer API
int ff_v4l2_context_get_format(V4L2Context *ctx)
Queries the driver for a valid v4l2 format and copies it to the context.
int num_buffers
Readonly after init.
AVPixelFormat
Pixel format.
This structure stores compressed data.
enum v4l2_buf_type type
Type of this buffer context.