diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2007-02-18 12:05:02 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-03-01 10:09:46 -0500 |
commit | db6eb5b334a0f095290b99096f68ff24ab6df1aa (patch) | |
tree | 234de6644e71d70f3544d32532d6aa026eb8ad75 /drivers | |
parent | 1d1370a48ca285ebe197ecd3197a8d5f161bc291 (diff) |
V4L/DVB (5270): Add VIDIOC_G_ENC_INDEX ioctl
The VIDIOC_G_ENC_INDEX ioctl can obtain the MPEG index from an MPEG
encoder.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/v4l2-common.c | 9 | ||||
-rw-r--r-- | drivers/media/video/videodev.c | 12 |
2 files changed, 18 insertions, 3 deletions
diff --git a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c index 3506cb667111..2fe97c4cb35c 100644 --- a/drivers/media/video/v4l2-common.c +++ b/drivers/media/video/v4l2-common.c | |||
@@ -366,13 +366,16 @@ static const char *v4l2_ioctls[] = { | |||
366 | [_IOC_NR(VIDIOC_ENUMAUDOUT)] = "VIDIOC_ENUMAUDOUT", | 366 | [_IOC_NR(VIDIOC_ENUMAUDOUT)] = "VIDIOC_ENUMAUDOUT", |
367 | [_IOC_NR(VIDIOC_G_PRIORITY)] = "VIDIOC_G_PRIORITY", | 367 | [_IOC_NR(VIDIOC_G_PRIORITY)] = "VIDIOC_G_PRIORITY", |
368 | [_IOC_NR(VIDIOC_S_PRIORITY)] = "VIDIOC_S_PRIORITY", | 368 | [_IOC_NR(VIDIOC_S_PRIORITY)] = "VIDIOC_S_PRIORITY", |
369 | #if 1 | ||
370 | [_IOC_NR(VIDIOC_G_SLICED_VBI_CAP)] = "VIDIOC_G_SLICED_VBI_CAP", | 369 | [_IOC_NR(VIDIOC_G_SLICED_VBI_CAP)] = "VIDIOC_G_SLICED_VBI_CAP", |
371 | #endif | ||
372 | [_IOC_NR(VIDIOC_LOG_STATUS)] = "VIDIOC_LOG_STATUS", | 370 | [_IOC_NR(VIDIOC_LOG_STATUS)] = "VIDIOC_LOG_STATUS", |
373 | [_IOC_NR(VIDIOC_G_EXT_CTRLS)] = "VIDIOC_G_EXT_CTRLS", | 371 | [_IOC_NR(VIDIOC_G_EXT_CTRLS)] = "VIDIOC_G_EXT_CTRLS", |
374 | [_IOC_NR(VIDIOC_S_EXT_CTRLS)] = "VIDIOC_S_EXT_CTRLS", | 372 | [_IOC_NR(VIDIOC_S_EXT_CTRLS)] = "VIDIOC_S_EXT_CTRLS", |
375 | [_IOC_NR(VIDIOC_TRY_EXT_CTRLS)] = "VIDIOC_TRY_EXT_CTRLS" | 373 | [_IOC_NR(VIDIOC_TRY_EXT_CTRLS)] = "VIDIOC_TRY_EXT_CTRLS", |
374 | #if 1 | ||
375 | [_IOC_NR(VIDIOC_ENUM_FRAMESIZES)] = "VIDIOC_ENUM_FRAMESIZES", | ||
376 | [_IOC_NR(VIDIOC_ENUM_FRAMEINTERVALS)] = "VIDIOC_ENUM_FRAMEINTERVALS", | ||
377 | [_IOC_NR(VIDIOC_G_ENC_INDEX)] = "VIDIOC_G_ENC_INDEX" | ||
378 | #endif | ||
376 | }; | 379 | }; |
377 | #define V4L2_IOCTLS ARRAY_SIZE(v4l2_ioctls) | 380 | #define V4L2_IOCTLS ARRAY_SIZE(v4l2_ioctls) |
378 | 381 | ||
diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c index dc9b1ef678aa..cd13e6108e5e 100644 --- a/drivers/media/video/videodev.c +++ b/drivers/media/video/videodev.c | |||
@@ -1342,6 +1342,18 @@ static int __video_do_ioctl(struct inode *inode, struct file *file, | |||
1342 | ret=vfd->vidioc_s_jpegcomp(file, fh, p); | 1342 | ret=vfd->vidioc_s_jpegcomp(file, fh, p); |
1343 | break; | 1343 | break; |
1344 | } | 1344 | } |
1345 | case VIDIOC_G_ENC_INDEX: | ||
1346 | { | ||
1347 | struct v4l2_enc_idx *p=arg; | ||
1348 | |||
1349 | if (!vfd->vidioc_g_enc_index) | ||
1350 | break; | ||
1351 | ret=vfd->vidioc_g_enc_index(file, fh, p); | ||
1352 | if (!ret) | ||
1353 | dbgarg (cmd, "entries=%d, entries_cap=%d\n", | ||
1354 | p->entries,p->entries_cap); | ||
1355 | break; | ||
1356 | } | ||
1345 | case VIDIOC_G_PARM: | 1357 | case VIDIOC_G_PARM: |
1346 | { | 1358 | { |
1347 | struct v4l2_streamparm *p=arg; | 1359 | struct v4l2_streamparm *p=arg; |