aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/videodev.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2007-04-27 11:31:02 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-04-27 14:43:21 -0400
commitb2787845fb91da18ebb079dc9297f92d990e9fe1 (patch)
treec6e9ad31158f2679c8ea384dd068ff4051db1358 /drivers/media/video/videodev.c
parent3bfb7398e2554fb54acb2900b81de144eb41c3ac (diff)
V4L/DVB (5289): Add support for video output overlays.
Add V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY support. Also add support for local and global alpha overlays. Add new field enums V4L2_FIELD_INTERLACED_TB and V4L2_FIELD_INTERLACED_BT. These changes are needed to support the ivtv On Screen Display features. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/videodev.c')
-rw-r--r--drivers/media/video/videodev.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c
index 011938fb7e0e..5c9f2116d7bf 100644
--- a/drivers/media/video/videodev.c
+++ b/drivers/media/video/videodev.c
@@ -318,6 +318,7 @@ static char *v4l2_type_names_FIXME[] = {
318 [V4L2_BUF_TYPE_VBI_OUTPUT] = "vbi-out", 318 [V4L2_BUF_TYPE_VBI_OUTPUT] = "vbi-out",
319 [V4L2_BUF_TYPE_SLICED_VBI_OUTPUT] = "sliced-vbi-out", 319 [V4L2_BUF_TYPE_SLICED_VBI_OUTPUT] = "sliced-vbi-out",
320 [V4L2_BUF_TYPE_SLICED_VBI_CAPTURE] = "sliced-vbi-capture", 320 [V4L2_BUF_TYPE_SLICED_VBI_CAPTURE] = "sliced-vbi-capture",
321 [V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY] = "video-out-over",
321 [V4L2_BUF_TYPE_PRIVATE] = "private", 322 [V4L2_BUF_TYPE_PRIVATE] = "private",
322}; 323};
323 324
@@ -330,6 +331,8 @@ static char *v4l2_field_names_FIXME[] = {
330 [V4L2_FIELD_SEQ_TB] = "seq-tb", 331 [V4L2_FIELD_SEQ_TB] = "seq-tb",
331 [V4L2_FIELD_SEQ_BT] = "seq-bt", 332 [V4L2_FIELD_SEQ_BT] = "seq-bt",
332 [V4L2_FIELD_ALTERNATE] = "alternate", 333 [V4L2_FIELD_ALTERNATE] = "alternate",
334 [V4L2_FIELD_INTERLACED_TB] = "interlaced-tb",
335 [V4L2_FIELD_INTERLACED_BT] = "interlaced-bt",
333}; 336};
334 337
335#define prt_names(a,arr) (((a)>=0)&&((a)<ARRAY_SIZE(arr)))?arr[a]:"unknown" 338#define prt_names(a,arr) (((a)>=0)&&((a)<ARRAY_SIZE(arr)))?arr[a]:"unknown"
@@ -411,6 +414,10 @@ static int check_fmt (struct video_device *vfd, enum v4l2_buf_type type)
411 if (vfd->vidioc_try_fmt_vbi_output) 414 if (vfd->vidioc_try_fmt_vbi_output)
412 return (0); 415 return (0);
413 break; 416 break;
417 case V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY:
418 if (vfd->vidioc_try_fmt_output_overlay)
419 return (0);
420 break;
414 case V4L2_BUF_TYPE_PRIVATE: 421 case V4L2_BUF_TYPE_PRIVATE:
415 if (vfd->vidioc_try_fmt_type_private) 422 if (vfd->vidioc_try_fmt_type_private)
416 return (0); 423 return (0);
@@ -525,6 +532,10 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
525 ret=vfd->vidioc_enum_fmt_vbi_output(file, 532 ret=vfd->vidioc_enum_fmt_vbi_output(file,
526 fh, f); 533 fh, f);
527 break; 534 break;
535 case V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY:
536 if (vfd->vidioc_enum_fmt_output_overlay)
537 ret=vfd->vidioc_enum_fmt_output_overlay(file, fh, f);
538 break;
528 case V4L2_BUF_TYPE_PRIVATE: 539 case V4L2_BUF_TYPE_PRIVATE:
529 if (vfd->vidioc_enum_fmt_type_private) 540 if (vfd->vidioc_enum_fmt_type_private)
530 ret=vfd->vidioc_enum_fmt_type_private(file, 541 ret=vfd->vidioc_enum_fmt_type_private(file,
@@ -582,6 +593,10 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
582 ret=vfd->vidioc_g_fmt_video_output(file, 593 ret=vfd->vidioc_g_fmt_video_output(file,
583 fh, f); 594 fh, f);
584 break; 595 break;
596 case V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY:
597 if (vfd->vidioc_g_fmt_output_overlay)
598 ret=vfd->vidioc_g_fmt_output_overlay(file, fh, f);
599 break;
585 case V4L2_BUF_TYPE_VBI_OUTPUT: 600 case V4L2_BUF_TYPE_VBI_OUTPUT:
586 if (vfd->vidioc_g_fmt_vbi_output) 601 if (vfd->vidioc_g_fmt_vbi_output)
587 ret=vfd->vidioc_g_fmt_vbi_output(file, fh, f); 602 ret=vfd->vidioc_g_fmt_vbi_output(file, fh, f);
@@ -630,6 +645,10 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
630 ret=vfd->vidioc_s_fmt_video_output(file, 645 ret=vfd->vidioc_s_fmt_video_output(file,
631 fh, f); 646 fh, f);
632 break; 647 break;
648 case V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY:
649 if (vfd->vidioc_s_fmt_output_overlay)
650 ret=vfd->vidioc_s_fmt_output_overlay(file, fh, f);
651 break;
633 case V4L2_BUF_TYPE_VBI_OUTPUT: 652 case V4L2_BUF_TYPE_VBI_OUTPUT:
634 if (vfd->vidioc_s_fmt_vbi_output) 653 if (vfd->vidioc_s_fmt_vbi_output)
635 ret=vfd->vidioc_s_fmt_vbi_output(file, 654 ret=vfd->vidioc_s_fmt_vbi_output(file,
@@ -680,6 +699,10 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
680 ret=vfd->vidioc_try_fmt_video_output(file, 699 ret=vfd->vidioc_try_fmt_video_output(file,
681 fh, f); 700 fh, f);
682 break; 701 break;
702 case V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY:
703 if (vfd->vidioc_try_fmt_output_overlay)
704 ret=vfd->vidioc_try_fmt_output_overlay(file, fh, f);
705 break;
683 case V4L2_BUF_TYPE_VBI_OUTPUT: 706 case V4L2_BUF_TYPE_VBI_OUTPUT:
684 if (vfd->vidioc_try_fmt_vbi_output) 707 if (vfd->vidioc_try_fmt_vbi_output)
685 ret=vfd->vidioc_try_fmt_vbi_output(file, 708 ret=vfd->vidioc_try_fmt_vbi_output(file,