From a01a4f3aa02b20388725dc2e7abd1365295672f0 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sun, 18 Feb 2007 18:05:02 +0100 Subject: Add VIDIOC_G_ENC_INDEX ioctl From: Hans Verkuil The VIDIOC_G_ENC_INDEX ioctl can obtain the MPEG index from an MPEG encoder. Signed-off-by: Hans Verkuil --- linux/drivers/media/video/videodev.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'linux/drivers/media/video/videodev.c') diff --git a/linux/drivers/media/video/videodev.c b/linux/drivers/media/video/videodev.c index 707757237..5ce381c9c 100644 --- a/linux/drivers/media/video/videodev.c +++ b/linux/drivers/media/video/videodev.c @@ -1366,6 +1366,18 @@ static int __video_do_ioctl(struct inode *inode, struct file *file, ret=vfd->vidioc_s_jpegcomp(file, fh, p); break; } + case VIDIOC_G_ENC_INDEX: + { + struct v4l2_enc_idx *p=arg; + + if (!vfd->vidioc_g_enc_index) + break; + ret=vfd->vidioc_g_enc_index(file, fh, p); + if (!ret) + dbgarg (cmd, "entries=%d, entries_cap=%d\n", + p->entries,p->entries_cap); + break; + } case VIDIOC_G_PARM: { struct v4l2_streamparm *p=arg; -- cgit v1.2.3 From d4626bcafa116dabbff5b8aef4a4043f4e25b2d2 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sun, 18 Feb 2007 18:56:22 +0100 Subject: Add VIDIOC_TRY_ENCODER_CMD and VIDIOC_ENCODER_CMD ioctls. From: Hans Verkuil Add support for starting, stopping, pausing and resuming an MPEG (or similar compressed stream) encoder. Signed-off-by: Hans Verkuil --- linux/drivers/media/video/videodev.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'linux/drivers/media/video/videodev.c') diff --git a/linux/drivers/media/video/videodev.c b/linux/drivers/media/video/videodev.c index 5ce381c9c..3a09a0808 100644 --- a/linux/drivers/media/video/videodev.c +++ b/linux/drivers/media/video/videodev.c @@ -1378,6 +1378,30 @@ static int __video_do_ioctl(struct inode *inode, struct file *file, p->entries,p->entries_cap); break; } + case VIDIOC_ENCODER_CMD: + { + struct v4l2_encoder_cmd *p=arg; + + if (!vfd->vidioc_encoder_cmd) + break; + ret=vfd->vidioc_encoder_cmd(file, fh, p); + if (!ret) + dbgarg (cmd, "cmd=%d, flags=%d\n", + p->cmd,p->flags); + break; + } + case VIDIOC_TRY_ENCODER_CMD: + { + struct v4l2_encoder_cmd *p=arg; + + if (!vfd->vidioc_try_encoder_cmd) + break; + ret=vfd->vidioc_try_encoder_cmd(file, fh, p); + if (!ret) + dbgarg (cmd, "cmd=%d, flags=%d\n", + p->cmd,p->flags); + break; + } case VIDIOC_G_PARM: { struct v4l2_streamparm *p=arg; -- cgit v1.2.3