diff options
author | Laurent Pinchart <laurent.pinchart@skynet.be> | 2008-12-28 20:32:29 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-30 06:40:32 -0500 |
commit | ff924203c9e4a5bc218143bc37182851185f4e5f (patch) | |
tree | 11ed46e7426ffc00bf016c3b67b26ba26f338c54 /drivers/media/video/uvc/uvcvideo.h | |
parent | 538e7a004bf960c96c7e9eb836b59989eb5f5b7f (diff) |
V4L/DVB (10104): uvcvideo: Add support for video output devices
Extend the range of supported UVC devices by allowing video output devices
matching the following structure:
TT_STREAMING -> VC_PROCESSING_UNIT -> VC_EXTENSION_UNIT{0,n} -> OTT_*
Video output devices are reported with the V4L2_CAP_VIDEO_OUTPUT capability
flag and are subject to the same restrictions as video input devices.
Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/uvc/uvcvideo.h')
-rw-r--r-- | drivers/media/video/uvc/uvcvideo.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/media/video/uvc/uvcvideo.h b/drivers/media/video/uvc/uvcvideo.h index 2a5bdacbaf27..731cf7951656 100644 --- a/drivers/media/video/uvc/uvcvideo.h +++ b/drivers/media/video/uvc/uvcvideo.h | |||
@@ -529,6 +529,7 @@ struct uvc_streaming { | |||
529 | __u16 maxpsize; | 529 | __u16 maxpsize; |
530 | 530 | ||
531 | struct uvc_streaming_header header; | 531 | struct uvc_streaming_header header; |
532 | enum v4l2_buf_type type; | ||
532 | 533 | ||
533 | unsigned int nformats; | 534 | unsigned int nformats; |
534 | struct uvc_format *format; | 535 | struct uvc_format *format; |
@@ -564,12 +565,15 @@ struct uvc_buffer { | |||
564 | #define UVC_QUEUE_DROP_INCOMPLETE (1 << 2) | 565 | #define UVC_QUEUE_DROP_INCOMPLETE (1 << 2) |
565 | 566 | ||
566 | struct uvc_video_queue { | 567 | struct uvc_video_queue { |
568 | enum v4l2_buf_type type; | ||
569 | |||
567 | void *mem; | 570 | void *mem; |
568 | unsigned int flags; | 571 | unsigned int flags; |
569 | __u32 sequence; | 572 | __u32 sequence; |
570 | 573 | ||
571 | unsigned int count; | 574 | unsigned int count; |
572 | unsigned int buf_size; | 575 | unsigned int buf_size; |
576 | unsigned int buf_used; | ||
573 | struct uvc_buffer buffer[UVC_MAX_VIDEO_BUFFERS]; | 577 | struct uvc_buffer buffer[UVC_MAX_VIDEO_BUFFERS]; |
574 | struct mutex mutex; /* protects buffers and mainqueue */ | 578 | struct mutex mutex; /* protects buffers and mainqueue */ |
575 | spinlock_t irqlock; /* protects irqqueue */ | 579 | spinlock_t irqlock; /* protects irqqueue */ |
@@ -584,8 +588,9 @@ struct uvc_video_device { | |||
584 | atomic_t active; | 588 | atomic_t active; |
585 | unsigned int frozen : 1; | 589 | unsigned int frozen : 1; |
586 | 590 | ||
587 | struct list_head iterms; | 591 | struct list_head iterms; /* Input terminals */ |
588 | struct uvc_entity *oterm; | 592 | struct uvc_entity *oterm; /* Output terminal */ |
593 | struct uvc_entity *sterm; /* USB streaming terminal */ | ||
589 | struct uvc_entity *processing; | 594 | struct uvc_entity *processing; |
590 | struct uvc_entity *selector; | 595 | struct uvc_entity *selector; |
591 | struct list_head extensions; | 596 | struct list_head extensions; |
@@ -726,7 +731,8 @@ extern struct uvc_driver uvc_driver; | |||
726 | extern void uvc_delete(struct kref *kref); | 731 | extern void uvc_delete(struct kref *kref); |
727 | 732 | ||
728 | /* Video buffers queue management. */ | 733 | /* Video buffers queue management. */ |
729 | extern void uvc_queue_init(struct uvc_video_queue *queue); | 734 | extern void uvc_queue_init(struct uvc_video_queue *queue, |
735 | enum v4l2_buf_type type); | ||
730 | extern int uvc_alloc_buffers(struct uvc_video_queue *queue, | 736 | extern int uvc_alloc_buffers(struct uvc_video_queue *queue, |
731 | unsigned int nbuffers, unsigned int buflength); | 737 | unsigned int nbuffers, unsigned int buflength); |
732 | extern int uvc_free_buffers(struct uvc_video_queue *queue); | 738 | extern int uvc_free_buffers(struct uvc_video_queue *queue); |