}
/* Query capabilities of the device */
-static int vidioc_querycap(struct file *file, void *priv,
+static int mfc_dec_querycap(struct file *file, void *priv,
struct v4l2_capability *cap)
{
strncpy(cap->driver, "MFC", sizeof(cap->driver) - 1);
return -EINVAL;
}
-static int vidioc_enum_fmt_vid_cap_mplane(struct file *file, void *pirv,
+static int mfc_dec_enum_fmt_vid_cap_mplane(struct file *file, void *pirv,
struct v4l2_fmtdesc *f)
{
struct mfc_dev *dev = video_drvdata(file);
return __mfc_dec_enum_fmt(dev, f, MFC_FMT_FRAME);
}
-static int vidioc_enum_fmt_vid_out_mplane(struct file *file, void *prov,
+static int mfc_dec_enum_fmt_vid_out_mplane(struct file *file, void *prov,
struct v4l2_fmtdesc *f)
{
struct mfc_dev *dev = video_drvdata(file);
}
/* Get format */
-static int vidioc_g_fmt_vid_cap_mplane(struct file *file, void *priv,
+static int mfc_dec_g_fmt_vid_cap_mplane(struct file *file, void *priv,
struct v4l2_format *f)
{
struct mfc_ctx *ctx = fh_to_mfc_ctx(file->private_data);
return 0;
}
-static int vidioc_g_fmt_vid_out_mplane(struct file *file, void *priv,
+static int mfc_dec_g_fmt_vid_out_mplane(struct file *file, void *priv,
struct v4l2_format *f)
{
struct mfc_ctx *ctx = fh_to_mfc_ctx(file->private_data);
}
/* Try format */
-static int vidioc_try_fmt(struct file *file, void *priv, struct v4l2_format *f)
+static int mfc_dec_try_fmt(struct file *file, void *priv, struct v4l2_format *f)
{
struct mfc_ctx *ctx = fh_to_mfc_ctx(file->private_data);
struct mfc_fmt *fmt;
}
/* Set format */
-static int vidioc_s_fmt_vid_cap_mplane(struct file *file, void *priv,
+static int mfc_dec_s_fmt_vid_cap_mplane(struct file *file, void *priv,
struct v4l2_format *f)
{
struct mfc_ctx *ctx = fh_to_mfc_ctx(file->private_data);
return 0;
}
-static int vidioc_s_fmt_vid_out_mplane(struct file *file, void *priv,
+static int mfc_dec_s_fmt_vid_out_mplane(struct file *file, void *priv,
struct v4l2_format *f)
{
struct mfc_dev *dev = video_drvdata(file);
}
/* Reqeust buffers */
-static int vidioc_reqbufs(struct file *file, void *priv,
+static int mfc_dec_reqbufs(struct file *file, void *priv,
struct v4l2_requestbuffers *reqbufs)
{
struct mfc_dev *dev = video_drvdata(file);
}
/* Query buffer */
-static int vidioc_querybuf(struct file *file, void *priv,
+static int mfc_dec_querybuf(struct file *file, void *priv,
struct v4l2_buffer *buf)
{
struct mfc_ctx *ctx = fh_to_mfc_ctx(file->private_data);
}
/* Queue a buffer */
-static int vidioc_qbuf(struct file *file, void *priv, struct v4l2_buffer *buf)
+static int mfc_dec_qbuf(struct file *file, void *priv, struct v4l2_buffer *buf)
{
struct mfc_ctx *ctx = fh_to_mfc_ctx(file->private_data);
int ret = -EINVAL;
}
/* Dequeue a buffer */
-static int vidioc_dqbuf(struct file *file, void *priv, struct v4l2_buffer *buf)
+static int mfc_dec_dqbuf(struct file *file, void *priv, struct v4l2_buffer *buf)
{
struct mfc_ctx *ctx = fh_to_mfc_ctx(file->private_data);
struct mfc_dec *dec = ctx->dec_priv;
}
/* Stream on */
-static int vidioc_streamon(struct file *file, void *priv,
+static int mfc_dec_streamon(struct file *file, void *priv,
enum v4l2_buf_type type)
{
struct mfc_ctx *ctx = fh_to_mfc_ctx(file->private_data);
}
/* Stream off, which equals to a pause */
-static int vidioc_streamoff(struct file *file, void *priv,
+static int mfc_dec_streamoff(struct file *file, void *priv,
enum v4l2_buf_type type)
{
struct mfc_ctx *ctx = fh_to_mfc_ctx(file->private_data);
}
/* Query a ctrl */
-static int vidioc_queryctrl(struct file *file, void *priv,
+static int mfc_dec_queryctrl(struct file *file, void *priv,
struct v4l2_queryctrl *qc)
{
struct v4l2_queryctrl *c;
}
/* Get a ctrl */
-static int vidioc_g_ctrl(struct file *file, void *priv,
+static int mfc_dec_g_ctrl(struct file *file, void *priv,
struct v4l2_control *ctrl)
{
struct mfc_ctx *ctx = fh_to_mfc_ctx(file->private_data);
}
/* Set a ctrl */
-static int vidioc_s_ctrl(struct file *file, void *priv,
+static int mfc_dec_s_ctrl(struct file *file, void *priv,
struct v4l2_control *ctrl)
{
struct mfc_dev *dev = video_drvdata(file);
}
/* Get cropping information */
-static int vidioc_g_crop(struct file *file, void *priv,
+static int mfc_dec_g_crop(struct file *file, void *priv,
struct v4l2_crop *cr)
{
struct mfc_ctx *ctx = fh_to_mfc_ctx(file->private_data);
return 0;
}
-static int vidioc_g_ext_ctrls(struct file *file, void *priv,
+static int mfc_dec_g_ext_ctrls(struct file *file, void *priv,
struct v4l2_ext_controls *f)
{
struct mfc_ctx *ctx = fh_to_mfc_ctx(file->private_data);
/* v4l2_ioctl_ops */
static const struct v4l2_ioctl_ops mfc_dec_ioctl_ops = {
- .vidioc_querycap = vidioc_querycap,
- .vidioc_enum_fmt_vid_cap_mplane = vidioc_enum_fmt_vid_cap_mplane,
- .vidioc_enum_fmt_vid_out_mplane = vidioc_enum_fmt_vid_out_mplane,
- .vidioc_g_fmt_vid_cap_mplane = vidioc_g_fmt_vid_cap_mplane,
- .vidioc_g_fmt_vid_out_mplane = vidioc_g_fmt_vid_out_mplane,
- .vidioc_try_fmt_vid_cap_mplane = vidioc_try_fmt,
- .vidioc_try_fmt_vid_out_mplane = vidioc_try_fmt,
- .vidioc_s_fmt_vid_cap_mplane = vidioc_s_fmt_vid_cap_mplane,
- .vidioc_s_fmt_vid_out_mplane = vidioc_s_fmt_vid_out_mplane,
- .vidioc_reqbufs = vidioc_reqbufs,
- .vidioc_querybuf = vidioc_querybuf,
- .vidioc_qbuf = vidioc_qbuf,
- .vidioc_dqbuf = vidioc_dqbuf,
- .vidioc_streamon = vidioc_streamon,
- .vidioc_streamoff = vidioc_streamoff,
- .vidioc_queryctrl = vidioc_queryctrl,
- .vidioc_g_ctrl = vidioc_g_ctrl,
- .vidioc_s_ctrl = vidioc_s_ctrl,
- .vidioc_g_crop = vidioc_g_crop,
- .vidioc_g_ext_ctrls = vidioc_g_ext_ctrls,
+ .vidioc_querycap = mfc_dec_querycap,
+ .vidioc_enum_fmt_vid_cap_mplane = mfc_dec_enum_fmt_vid_cap_mplane,
+ .vidioc_enum_fmt_vid_out_mplane = mfc_dec_enum_fmt_vid_out_mplane,
+ .vidioc_g_fmt_vid_cap_mplane = mfc_dec_g_fmt_vid_cap_mplane,
+ .vidioc_g_fmt_vid_out_mplane = mfc_dec_g_fmt_vid_out_mplane,
+ .vidioc_try_fmt_vid_cap_mplane = mfc_dec_try_fmt,
+ .vidioc_try_fmt_vid_out_mplane = mfc_dec_try_fmt,
+ .vidioc_s_fmt_vid_cap_mplane = mfc_dec_s_fmt_vid_cap_mplane,
+ .vidioc_s_fmt_vid_out_mplane = mfc_dec_s_fmt_vid_out_mplane,
+ .vidioc_reqbufs = mfc_dec_reqbufs,
+ .vidioc_querybuf = mfc_dec_querybuf,
+ .vidioc_qbuf = mfc_dec_qbuf,
+ .vidioc_dqbuf = mfc_dec_dqbuf,
+ .vidioc_streamon = mfc_dec_streamon,
+ .vidioc_streamoff = mfc_dec_streamoff,
+ .vidioc_queryctrl = mfc_dec_queryctrl,
+ .vidioc_g_ctrl = mfc_dec_g_ctrl,
+ .vidioc_s_ctrl = mfc_dec_s_ctrl,
+ .vidioc_g_crop = mfc_dec_g_crop,
+ .vidioc_g_ext_ctrls = mfc_dec_g_ext_ctrls,
};
const struct v4l2_ioctl_ops *mfc_get_dec_v4l2_ioctl_ops(void)
}
/* Query capabilities of the device */
-static int vidioc_querycap(struct file *file, void *priv,
+static int mfc_enc_querycap(struct file *file, void *priv,
struct v4l2_capability *cap)
{
strncpy(cap->driver, "MFC", sizeof(cap->driver) - 1);
return -EINVAL;
}
-static int vidioc_enum_fmt_vid_cap_mplane(struct file *file, void *pirv,
+static int mfc_enc_enum_fmt_vid_cap_mplane(struct file *file, void *pirv,
struct v4l2_fmtdesc *f)
{
struct mfc_dev *dev = video_drvdata(file);
return __mfc_enc_enum_fmt(dev, f, MFC_FMT_STREAM);
}
-static int vidioc_enum_fmt_vid_out_mplane(struct file *file, void *prov,
+static int mfc_enc_enum_fmt_vid_out_mplane(struct file *file, void *prov,
struct v4l2_fmtdesc *f)
{
struct mfc_dev *dev = video_drvdata(file);
return __mfc_enc_enum_fmt(dev, f, MFC_FMT_FRAME);
}
-static int vidioc_g_fmt(struct file *file, void *priv, struct v4l2_format *f)
+static int mfc_enc_g_fmt(struct file *file, void *priv, struct v4l2_format *f)
{
struct mfc_ctx *ctx = fh_to_mfc_ctx(file->private_data);
struct mfc_enc *enc = ctx->enc_priv;
return 0;
}
-static int vidioc_try_fmt(struct file *file, void *priv, struct v4l2_format *f)
+static int mfc_enc_try_fmt(struct file *file, void *priv, struct v4l2_format *f)
{
struct mfc_ctx *ctx = fh_to_mfc_ctx(file->private_data);
struct mfc_fmt *fmt;
return 0;
}
-static int vidioc_s_fmt_vid_cap_mplane(struct file *file, void *priv,
+static int mfc_enc_s_fmt_vid_cap_mplane(struct file *file, void *priv,
struct v4l2_format *f)
{
struct mfc_dev *dev = video_drvdata(file);
return 0;
}
-static int vidioc_s_fmt_vid_out_mplane(struct file *file, void *priv,
+static int mfc_enc_s_fmt_vid_out_mplane(struct file *file, void *priv,
struct v4l2_format *f)
{
struct mfc_ctx *ctx = fh_to_mfc_ctx(file->private_data);
return 0;
}
-static int vidioc_g_crop(struct file *file, void *fh, struct v4l2_crop *cr)
+static int mfc_enc_g_crop(struct file *file, void *fh, struct v4l2_crop *cr)
{
struct mfc_ctx *ctx = fh_to_mfc_ctx(file->private_data);
return 0;
}
-static int vidioc_s_crop(struct file *file, void *priv, const struct v4l2_crop *cr)
+static int mfc_enc_s_crop(struct file *file, void *priv, const struct v4l2_crop *cr)
{
struct mfc_ctx *ctx = fh_to_mfc_ctx(file->private_data);
return 0;
}
-static int vidioc_reqbufs(struct file *file, void *priv,
+static int mfc_enc_reqbufs(struct file *file, void *priv,
struct v4l2_requestbuffers *reqbufs)
{
struct mfc_ctx *ctx = fh_to_mfc_ctx(file->private_data);
return ret;
}
-static int vidioc_querybuf(struct file *file, void *priv,
+static int mfc_enc_querybuf(struct file *file, void *priv,
struct v4l2_buffer *buf)
{
struct mfc_ctx *ctx = fh_to_mfc_ctx(file->private_data);
}
/* Queue a buffer */
-static int vidioc_qbuf(struct file *file, void *priv, struct v4l2_buffer *buf)
+static int mfc_enc_qbuf(struct file *file, void *priv, struct v4l2_buffer *buf)
{
struct mfc_ctx *ctx = fh_to_mfc_ctx(file->private_data);
int i, ret = -EINVAL;
}
/* Dequeue a buffer */
-static int vidioc_dqbuf(struct file *file, void *priv, struct v4l2_buffer *buf)
+static int mfc_enc_dqbuf(struct file *file, void *priv, struct v4l2_buffer *buf)
{
struct mfc_ctx *ctx = fh_to_mfc_ctx(file->private_data);
int ret;
}
/* Stream on */
-static int vidioc_streamon(struct file *file, void *priv,
+static int mfc_enc_streamon(struct file *file, void *priv,
enum v4l2_buf_type type)
{
struct mfc_ctx *ctx = fh_to_mfc_ctx(file->private_data);
}
/* Stream off, which equals to a pause */
-static int vidioc_streamoff(struct file *file, void *priv,
+static int mfc_enc_streamoff(struct file *file, void *priv,
enum v4l2_buf_type type)
{
struct mfc_ctx *ctx = fh_to_mfc_ctx(file->private_data);
}
/* Query a ctrl */
-static int vidioc_queryctrl(struct file *file, void *priv,
+static int mfc_enc_queryctrl(struct file *file, void *priv,
struct v4l2_queryctrl *qc)
{
struct v4l2_queryctrl *c;
return ret;
}
-static int vidioc_g_ctrl(struct file *file, void *priv,
+static int mfc_enc_g_ctrl(struct file *file, void *priv,
struct v4l2_control *ctrl)
{
struct mfc_ctx *ctx = fh_to_mfc_ctx(file->private_data);
return ret;
}
-static int vidioc_s_ctrl(struct file *file, void *priv,
+static int mfc_enc_s_ctrl(struct file *file, void *priv,
struct v4l2_control *ctrl)
{
struct mfc_ctx *ctx = fh_to_mfc_ctx(file->private_data);
return ret;
}
-static int vidioc_g_ext_ctrls(struct file *file, void *priv,
+static int mfc_enc_g_ext_ctrls(struct file *file, void *priv,
struct v4l2_ext_controls *f)
{
struct mfc_ctx *ctx = fh_to_mfc_ctx(file->private_data);
return ret;
}
-static int vidioc_s_ext_ctrls(struct file *file, void *priv,
+static int mfc_enc_s_ext_ctrls(struct file *file, void *priv,
struct v4l2_ext_controls *f)
{
struct mfc_ctx *ctx = fh_to_mfc_ctx(file->private_data);
return ret;
}
-static int vidioc_try_ext_ctrls(struct file *file, void *priv,
+static int mfc_enc_try_ext_ctrls(struct file *file, void *priv,
struct v4l2_ext_controls *f)
{
struct mfc_ctx *ctx = fh_to_mfc_ctx(file->private_data);
}
static const struct v4l2_ioctl_ops mfc_enc_ioctl_ops = {
- .vidioc_querycap = vidioc_querycap,
- .vidioc_enum_fmt_vid_cap_mplane = vidioc_enum_fmt_vid_cap_mplane,
- .vidioc_enum_fmt_vid_out_mplane = vidioc_enum_fmt_vid_out_mplane,
- .vidioc_g_fmt_vid_cap_mplane = vidioc_g_fmt,
- .vidioc_g_fmt_vid_out_mplane = vidioc_g_fmt,
- .vidioc_try_fmt_vid_cap_mplane = vidioc_try_fmt,
- .vidioc_try_fmt_vid_out_mplane = vidioc_try_fmt,
- .vidioc_s_fmt_vid_cap_mplane = vidioc_s_fmt_vid_cap_mplane,
- .vidioc_s_fmt_vid_out_mplane = vidioc_s_fmt_vid_out_mplane,
- .vidioc_g_crop = vidioc_g_crop,
- .vidioc_s_crop = vidioc_s_crop,
- .vidioc_reqbufs = vidioc_reqbufs,
- .vidioc_querybuf = vidioc_querybuf,
- .vidioc_qbuf = vidioc_qbuf,
- .vidioc_dqbuf = vidioc_dqbuf,
- .vidioc_streamon = vidioc_streamon,
- .vidioc_streamoff = vidioc_streamoff,
- .vidioc_queryctrl = vidioc_queryctrl,
- .vidioc_g_ctrl = vidioc_g_ctrl,
- .vidioc_s_ctrl = vidioc_s_ctrl,
- .vidioc_g_ext_ctrls = vidioc_g_ext_ctrls,
- .vidioc_s_ext_ctrls = vidioc_s_ext_ctrls,
- .vidioc_try_ext_ctrls = vidioc_try_ext_ctrls,
+ .vidioc_querycap = mfc_enc_querycap,
+ .vidioc_enum_fmt_vid_cap_mplane = mfc_enc_enum_fmt_vid_cap_mplane,
+ .vidioc_enum_fmt_vid_out_mplane = mfc_enc_enum_fmt_vid_out_mplane,
+ .vidioc_g_fmt_vid_cap_mplane = mfc_enc_g_fmt,
+ .vidioc_g_fmt_vid_out_mplane = mfc_enc_g_fmt,
+ .vidioc_try_fmt_vid_cap_mplane = mfc_enc_try_fmt,
+ .vidioc_try_fmt_vid_out_mplane = mfc_enc_try_fmt,
+ .vidioc_s_fmt_vid_cap_mplane = mfc_enc_s_fmt_vid_cap_mplane,
+ .vidioc_s_fmt_vid_out_mplane = mfc_enc_s_fmt_vid_out_mplane,
+ .vidioc_g_crop = mfc_enc_g_crop,
+ .vidioc_s_crop = mfc_enc_s_crop,
+ .vidioc_reqbufs = mfc_enc_reqbufs,
+ .vidioc_querybuf = mfc_enc_querybuf,
+ .vidioc_qbuf = mfc_enc_qbuf,
+ .vidioc_dqbuf = mfc_enc_dqbuf,
+ .vidioc_streamon = mfc_enc_streamon,
+ .vidioc_streamoff = mfc_enc_streamoff,
+ .vidioc_queryctrl = mfc_enc_queryctrl,
+ .vidioc_g_ctrl = mfc_enc_g_ctrl,
+ .vidioc_s_ctrl = mfc_enc_s_ctrl,
+ .vidioc_g_ext_ctrls = mfc_enc_g_ext_ctrls,
+ .vidioc_s_ext_ctrls = mfc_enc_s_ext_ctrls,
+ .vidioc_try_ext_ctrls = mfc_enc_try_ext_ctrls,
};
const struct v4l2_ioctl_ops *mfc_get_enc_v4l2_ioctl_ops(void)