aboutsummaryrefslogtreecommitdiff
path: root/video.c
diff options
context:
space:
mode:
Diffstat (limited to 'video.c')
-rw-r--r--video.c54
1 files changed, 0 insertions, 54 deletions
diff --git a/video.c b/video.c
index e99ba66..4b40ebd 100644
--- a/video.c
+++ b/video.c
@@ -188,50 +188,6 @@ int video_queue_buf_cap(struct instance *i, int index)
CAP_PLANES);
}
-int video_queue_buf_cap_dmabuf(struct instance *i, int index,
- struct drm_buffer *b)
-{
- struct video *vid = &i->video;
- struct v4l2_buffer buf;
- struct v4l2_plane planes[2];
- int ret;
-
- if (index >= vid->cap_buf_cnt) {
- err("Tried to queue a non exisiting buffer");
- return -1;
- }
-
- memzero(buf);
- memset(planes, 0, sizeof(planes));
- buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
- buf.memory = V4L2_MEMORY_DMABUF;
- buf.index = index;
- buf.length = CAP_PLANES;
- buf.m.planes = planes;
-
- buf.m.planes[0].m.fd = b->dbuf_fd;
-
- buf.m.planes[0].bytesused = vid->cap_buf_size[0];
- buf.m.planes[1].bytesused = vid->cap_buf_size[1];
-
- buf.m.planes[0].data_offset = 0;
- buf.m.planes[1].data_offset = 0;
-
- buf.m.planes[0].length = vid->cap_buf_size[0];
-
- ret = ioctl(vid->fd, VIDIOC_QBUF, &buf);
- if (ret) {
- err("Failed to queue buffer (index=%d) on CAPTURE (%s)",
- buf.index, strerror(errno));
- return -1;
- }
-
- dbg(" Queued buffer on %s queue with index %d",
- dbg_type[1], buf.index);
-
- return 0;
-}
-
static int video_dequeue_buf(struct instance *i, struct v4l2_buffer *buf)
{
struct video *vid = &i->video;
@@ -350,15 +306,6 @@ int video_stop(struct instance *i)
struct v4l2_decoder_cmd dec;
int ret;
-#if 0
- memzero(dec);
- dec.cmd = V4L2_DEC_CMD_STOP;
- ret = ioctl(vid->fd, VIDIOC_DECODER_CMD, &dec);
- if (ret < 0) {
- err("DECODER_CMD failed (%s)", strerror(errno));
- return -1;
- }
-#endif
ret = video_stream(i, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,
VIDIOC_STREAMOFF);
if (ret < 0)
@@ -616,4 +563,3 @@ int video_setup_output(struct instance *i, unsigned long codec,
return 0;
}
-