+typedef struct V4L2m2mPriv {
+ AVClass *class;
+
+ V4L2m2mContext *context;
+ AVBufferRef *context_ref;
+
+ int num_output_buffers;
+ int num_capture_buffers;
+} V4L2m2mPriv;
+
+/**
+ * Allocate a new context and references for a V4L2 M2M instance.
+ *
+ * @param[in] ctx The V4L2m2mPriv instantiated by the encoder/decoder.
+ * @param[out] ctx The V4L2m2mContext.
+ *
+ * @returns 0 in success, a negative error code otherwise.
+ */
+int ff_v4l2_m2m_create_context(V4L2m2mPriv *priv, V4L2m2mContext **s);
+
+