From ff924203c9e4a5bc218143bc37182851185f4e5f Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sun, 28 Dec 2008 22:32:29 -0300 Subject: 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 Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/uvc/uvcvideo.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'drivers/media/video/uvc/uvcvideo.h') 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 { __u16 maxpsize; struct uvc_streaming_header header; + enum v4l2_buf_type type; unsigned int nformats; struct uvc_format *format; @@ -564,12 +565,15 @@ struct uvc_buffer { #define UVC_QUEUE_DROP_INCOMPLETE (1 << 2) struct uvc_video_queue { + enum v4l2_buf_type type; + void *mem; unsigned int flags; __u32 sequence; unsigned int count; unsigned int buf_size; + unsigned int buf_used; struct uvc_buffer buffer[UVC_MAX_VIDEO_BUFFERS]; struct mutex mutex; /* protects buffers and mainqueue */ spinlock_t irqlock; /* protects irqqueue */ @@ -584,8 +588,9 @@ struct uvc_video_device { atomic_t active; unsigned int frozen : 1; - struct list_head iterms; - struct uvc_entity *oterm; + struct list_head iterms; /* Input terminals */ + struct uvc_entity *oterm; /* Output terminal */ + struct uvc_entity *sterm; /* USB streaming terminal */ struct uvc_entity *processing; struct uvc_entity *selector; struct list_head extensions; @@ -726,7 +731,8 @@ extern struct uvc_driver uvc_driver; extern void uvc_delete(struct kref *kref); /* Video buffers queue management. */ -extern void uvc_queue_init(struct uvc_video_queue *queue); +extern void uvc_queue_init(struct uvc_video_queue *queue, + enum v4l2_buf_type type); extern int uvc_alloc_buffers(struct uvc_video_queue *queue, unsigned int nbuffers, unsigned int buflength); extern int uvc_free_buffers(struct uvc_video_queue *queue); -- cgit v1.2.3-59-g8ed1b