diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2007-02-18 18:05:02 +0100 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2007-02-18 18:05:02 +0100 |
commit | a01a4f3aa02b20388725dc2e7abd1365295672f0 (patch) | |
tree | 34cff3554736faf923bc3fe3dc1615856bcc1531 /linux/drivers/media | |
parent | d9a2475c496d017cf05081a0bca4de90e2ea1623 (diff) | |
download | mediapointer-dvb-s2-a01a4f3aa02b20388725dc2e7abd1365295672f0.tar.gz mediapointer-dvb-s2-a01a4f3aa02b20388725dc2e7abd1365295672f0.tar.bz2 |
Add VIDIOC_G_ENC_INDEX ioctl
From: Hans Verkuil <hverkuil@xs4all.nl>
The VIDIOC_G_ENC_INDEX ioctl can obtain the MPEG index from an MPEG
encoder.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/video/v4l2-common.c | 9 | ||||
-rw-r--r-- | linux/drivers/media/video/videodev.c | 12 |
2 files changed, 18 insertions, 3 deletions
diff --git a/linux/drivers/media/video/v4l2-common.c b/linux/drivers/media/video/v4l2-common.c index 2053112d7..758ab7ad0 100644 --- a/linux/drivers/media/video/v4l2-common.c +++ b/linux/drivers/media/video/v4l2-common.c @@ -393,13 +393,16 @@ static const char *v4l2_ioctls[] = { [_IOC_NR(VIDIOC_ENUMAUDOUT)] = "VIDIOC_ENUMAUDOUT", [_IOC_NR(VIDIOC_G_PRIORITY)] = "VIDIOC_G_PRIORITY", [_IOC_NR(VIDIOC_S_PRIORITY)] = "VIDIOC_S_PRIORITY", -#if 1 /*KEEP*/ [_IOC_NR(VIDIOC_G_SLICED_VBI_CAP)] = "VIDIOC_G_SLICED_VBI_CAP", -#endif [_IOC_NR(VIDIOC_LOG_STATUS)] = "VIDIOC_LOG_STATUS", [_IOC_NR(VIDIOC_G_EXT_CTRLS)] = "VIDIOC_G_EXT_CTRLS", [_IOC_NR(VIDIOC_S_EXT_CTRLS)] = "VIDIOC_S_EXT_CTRLS", - [_IOC_NR(VIDIOC_TRY_EXT_CTRLS)] = "VIDIOC_TRY_EXT_CTRLS" + [_IOC_NR(VIDIOC_TRY_EXT_CTRLS)] = "VIDIOC_TRY_EXT_CTRLS", +#if 1 /*KEEP*/ + [_IOC_NR(VIDIOC_ENUM_FRAMESIZES)] = "VIDIOC_ENUM_FRAMESIZES", + [_IOC_NR(VIDIOC_ENUM_FRAMEINTERVALS)] = "VIDIOC_ENUM_FRAMEINTERVALS", + [_IOC_NR(VIDIOC_G_ENC_INDEX)] = "VIDIOC_G_ENC_INDEX" +#endif }; #define V4L2_IOCTLS ARRAY_SIZE(v4l2_ioctls) 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; |