24 #ifndef AVCODEC_V4L2_M2M_H
25 #define AVCODEC_V4L2_M2M_H
30 #include <linux/videodev2.h>
35 #define container_of(ptr, type, member) ({ \
36 const __typeof__(((type *)0)->member ) *__mptr = (ptr); \
37 (type *)((char *)__mptr - offsetof(type,member) );})
39 #define V4L_M2M_DEFAULT_OPTS \
40 { "num_output_buffers", "Number of buffers in the output context",\
41 OFFSET(num_output_buffers), AV_OPT_TYPE_INT, { .i64 = 16 }, 6, INT_MAX, FLAGS }
Libavcodec external API header.
A reference to a data buffer.
Describe the class of an AVClass context structure.
main external API structure.
This structure describes decoded (raw) audio or video data.
This structure stores compressed data.
AVBufferRef * context_ref
int ff_v4l2_m2m_codec_reinit(V4L2m2mContext *ctx)
Reinitializes the V4L2m2mContext when the driver cannot continue processing with the capture paramete...
int ff_v4l2_m2m_create_context(V4L2m2mPriv *priv, V4L2m2mContext **s)
Allocate a new context and references for a V4L2 M2M instance.
int ff_v4l2_m2m_codec_init(V4L2m2mPriv *priv)
Probes the video nodes looking for the required codec capabilities.
int ff_v4l2_m2m_codec_end(V4L2m2mPriv *priv)
Releases all the codec resources if all AVBufferRefs have been returned to the ctx.
int ff_v4l2_m2m_codec_full_reinit(V4L2m2mContext *ctx)
Reinitializes the V4L2m2mContext when the driver cannot continue processing with the any of the curre...