Go to the documentation of this file.
24 #ifndef AVCODEC_V4L2_BUFFERS_H
25 #define AVCODEC_V4L2_BUFFERS_H
27 #include <stdatomic.h>
28 #include <linux/videodev2.h>
60 struct v4l2_buffer
buf;
61 struct v4l2_plane
planes[VIDEO_MAX_PLANES];
131 #endif // AVCODEC_V4L2_BUFFERS_H
int ff_v4l2_buffer_initialize(V4L2Buffer *avbuf, int index)
Initializes a V4L2Buffer.
This structure describes decoded (raw) audio or video data.
int ff_v4l2_buffer_avframe_to_buf(const AVFrame *frame, V4L2Buffer *out)
Extracts the data from an AVFrame to a V4L2Buffer.
int ff_v4l2_buffer_enqueue(V4L2Buffer *avbuf)
Enqueues a V4L2Buffer.
struct V4L2Context * context
V4L2Buffer (wrapper for v4l2_buffer management)
int ff_v4l2_buffer_buf_to_avpkt(AVPacket *pkt, V4L2Buffer *buf)
Extracts the data from a V4L2Buffer to an AVPacket.
AVBufferRef * context_ref
atomic_uint context_refcount
struct v4l2_plane planes[VIDEO_MAX_PLANES]
int ff_v4l2_buffer_avpkt_to_buf(const AVPacket *pkt, V4L2Buffer *out)
Extracts the data from an AVPacket to a V4L2Buffer.
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
A reference to a data buffer.
This structure stores compressed data.
int ff_v4l2_buffer_buf_to_avframe(AVFrame *frame, V4L2Buffer *buf)
Extracts the data from a V4L2Buffer to an AVFrame.
enum V4L2Buffer_status status