-static int solo_enc_reqbufs(struct file *file, void *priv,
- struct v4l2_requestbuffers *req)
-{
- struct solo_enc_dev *solo_enc = video_drvdata(file);
-
- return videobuf_reqbufs(&solo_enc->vidq, req);
-}
-
-static int solo_enc_querybuf(struct file *file, void *priv,
- struct v4l2_buffer *buf)
-{
- struct solo_enc_dev *solo_enc = video_drvdata(file);
-
- return videobuf_querybuf(&solo_enc->vidq, buf);
-}
-
-static int solo_enc_qbuf(struct file *file, void *priv,
- struct v4l2_buffer *buf)
-{
- struct solo_enc_dev *solo_enc = video_drvdata(file);
-
- return videobuf_qbuf(&solo_enc->vidq, buf);
-}
-
-static int solo_enc_dqbuf(struct file *file, void *priv,
- struct v4l2_buffer *buf)
-{
- struct solo_enc_dev *solo_enc = video_drvdata(file);
- struct solo_videobuf *svb;
- int ret;
-
- /* Make sure the encoder is on */
- ret = solo_enc_on(solo_enc);
- if (ret)
- return ret;
-
- ret = videobuf_dqbuf(&solo_enc->vidq, buf, file->f_flags & O_NONBLOCK);
- if (ret)
- return ret;
-
- /* Copy over the flags */
- svb = (struct solo_videobuf *)solo_enc->vidq.bufs[buf->index];
- buf->flags |= svb->flags;
-
- return 0;
-}
-
-static int solo_enc_streamon(struct file *file, void *priv,
- enum v4l2_buf_type i)
-{
- struct solo_enc_dev *solo_enc = video_drvdata(file);
-
- if (i != V4L2_BUF_TYPE_VIDEO_CAPTURE)
- return -EINVAL;
-
- return videobuf_streamon(&solo_enc->vidq);
-}
-
-static int solo_enc_streamoff(struct file *file, void *priv,
- enum v4l2_buf_type i)
-{
- struct solo_enc_dev *solo_enc = video_drvdata(file);
- int ret;
-
- if (i != V4L2_BUF_TYPE_VIDEO_CAPTURE)
- return -EINVAL;
-
- ret = videobuf_streamoff(&solo_enc->vidq);
- if (!ret)
- solo_enc_off(solo_enc);
-
- return ret;
-}
-