diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-06-21 08:06:59 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-20 06:10:56 -0400 |
commit | 5cf2cc4803a0415f7048951a727204df414325e6 (patch) | |
tree | baab895d57cdd04e69b1c111c46a4c1796221b47 | |
parent | 79afcb10dfdd3287875666de34c23510423058b8 (diff) |
V4L/DVB (8085): ivtv: fill in all v4l2_framebuffer fields in VIDIOC_G/S_FBUF
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r-- | drivers/media/video/ivtv/ivtv-ioctl.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/media/video/ivtv/ivtv-ioctl.c b/drivers/media/video/ivtv/ivtv-ioctl.c index eb4485991a58..d75c82e509f7 100644 --- a/drivers/media/video/ivtv/ivtv-ioctl.c +++ b/drivers/media/video/ivtv/ivtv-ioctl.c | |||
@@ -1356,7 +1356,15 @@ static int ivtv_g_fbuf(struct file *file, void *fh, struct v4l2_framebuffer *fb) | |||
1356 | fb->fmt.pixelformat = pixel_format[pixfmt]; | 1356 | fb->fmt.pixelformat = pixel_format[pixfmt]; |
1357 | fb->fmt.width = itv->osd_rect.width; | 1357 | fb->fmt.width = itv->osd_rect.width; |
1358 | fb->fmt.height = itv->osd_rect.height; | 1358 | fb->fmt.height = itv->osd_rect.height; |
1359 | fb->fmt.field = V4L2_FIELD_INTERLACED; | ||
1360 | fb->fmt.bytesperline = fb->fmt.width; | ||
1361 | if (fb->fmt.pixelformat != V4L2_PIX_FMT_PAL8) | ||
1362 | fb->fmt.bytesperline *= 2; | ||
1363 | if (fb->fmt.pixelformat == V4L2_PIX_FMT_RGB32 || | ||
1364 | fb->fmt.pixelformat == V4L2_PIX_FMT_YUV32) | ||
1365 | fb->fmt.bytesperline *= 2; | ||
1359 | fb->base = (void *)itv->osd_video_pbase; | 1366 | fb->base = (void *)itv->osd_video_pbase; |
1367 | fb->flags = 0; | ||
1360 | 1368 | ||
1361 | if (itv->osd_chroma_key_state) | 1369 | if (itv->osd_chroma_key_state) |
1362 | fb->flags |= V4L2_FBUF_FLAG_CHROMAKEY; | 1370 | fb->flags |= V4L2_FBUF_FLAG_CHROMAKEY; |
@@ -1404,8 +1412,7 @@ static int ivtv_s_fbuf(struct file *file, void *fh, struct v4l2_framebuffer *fb) | |||
1404 | itv->osd_chroma_key_state = (fb->flags & V4L2_FBUF_FLAG_CHROMAKEY) != 0; | 1412 | itv->osd_chroma_key_state = (fb->flags & V4L2_FBUF_FLAG_CHROMAKEY) != 0; |
1405 | ivtv_set_osd_alpha(itv); | 1413 | ivtv_set_osd_alpha(itv); |
1406 | yi->track_osd = (fb->flags & V4L2_FBUF_FLAG_OVERLAY) != 0; | 1414 | yi->track_osd = (fb->flags & V4L2_FBUF_FLAG_OVERLAY) != 0; |
1407 | 1415 | return ivtv_g_fbuf(file, fh, fb); | |
1408 | return 0; | ||
1409 | } | 1416 | } |
1410 | 1417 | ||
1411 | static int ivtv_overlay(struct file *file, void *fh, unsigned int on) | 1418 | static int ivtv_overlay(struct file *file, void *fh, unsigned int on) |