diff options
author | Steven Toth <stoth@kernellabs.com> | 2011-04-06 15:32:56 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-05-20 16:28:43 +0400 |
commit | b7101de3fff596b35e45cd9fb7007caa07e97c9a (patch) | |
tree | 1c11baca827c290a1e312180204e8dc0472eabb9 /drivers/media/video/cx18/cx18-driver.h | |
parent | 5ed9bd02444a00bb1e8ecc1baa8ecdb633afc126 (diff) | |
download | linux-b7101de3fff596b35e45cd9fb7007caa07e97c9a.tar.xz |
[media] cx18: mmap() support for raw YUV video capture
Add support for mmap method streaming of raw YUV video on cx18-based
hardware, in addition to the existing support for read() streaming of
raw YUV and MPEG-2 encoded video.
[simon.farnsworth@onelan.co.uk: I forward-ported this from Steven's original work,
done under contract to ONELAN. The original code is at
http://www.kernellabs.com/hg/~stoth/cx18-videobuf]
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx18/cx18-driver.h')
-rw-r--r-- | drivers/media/video/cx18/cx18-driver.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/media/video/cx18/cx18-driver.h b/drivers/media/video/cx18/cx18-driver.h index b86a740c68df..70e1e0401645 100644 --- a/drivers/media/video/cx18/cx18-driver.h +++ b/drivers/media/video/cx18/cx18-driver.h @@ -65,6 +65,10 @@ #include "dvb_net.h" #include "dvbdev.h" +/* Videobuf / YUV support */ +#include <media/videobuf-core.h> +#include <media/videobuf-vmalloc.h> + #ifndef CONFIG_PCI # error "This driver requires kernel PCI support." #endif @@ -403,6 +407,23 @@ struct cx18_stream { struct cx18_queue q_idle; /* idle - not in rotation */ struct work_struct out_work_order; + + /* Videobuf for YUV video */ + u32 pixelformat; + struct list_head vb_capture; /* video capture queue */ + spinlock_t vb_lock; + struct v4l2_framebuffer fbuf; + v4l2_std_id tvnorm; /* selected tv norm */ + struct timer_list vb_timeout; + int vbwidth; + int vbheight; +}; + +struct cx18_videobuf_buffer { + /* Common video buffer sub-system struct */ + struct videobuf_buffer vb; + v4l2_std_id tvnorm; /* selected tv norm */ + u32 bytes_used; }; struct cx18_open_id { @@ -410,6 +431,10 @@ struct cx18_open_id { u32 open_id; int type; struct cx18 *cx; + + struct videobuf_queue vbuf_q; + spinlock_t s_lock; /* Protect vbuf_q */ + enum v4l2_buf_type vb_type; }; static inline struct cx18_open_id *fh2id(struct v4l2_fh *fh) |