diff options
author | Gerd Knorr <devnull@localhost> | 2004-11-07 13:17:14 +0000 |
---|---|---|
committer | Gerd Knorr <devnull@localhost> | 2004-11-07 13:17:14 +0000 |
commit | 1a6399de3074ab4dc6bdad694bbd8b47d486d6b2 (patch) | |
tree | 22189018b0aab90670437f90da90bbbe57789b60 /linux/include/media/video-buf.h | |
parent | 78f377b0ee18b3889b2a2bfcee75ab9786e80a35 (diff) | |
download | mediapointer-dvb-s2-1a6399de3074ab4dc6bdad694bbd8b47d486d6b2.tar.gz mediapointer-dvb-s2-1a6399de3074ab4dc6bdad694bbd8b47d486d6b2.tar.bz2 |
- yet another video-buf interface change + fixups.
- move more modules to new-style insmod options.
Diffstat (limited to 'linux/include/media/video-buf.h')
-rw-r--r-- | linux/include/media/video-buf.h | 53 |
1 files changed, 30 insertions, 23 deletions
diff --git a/linux/include/media/video-buf.h b/linux/include/media/video-buf.h index fdf5c71e2..ae6da6de9 100644 --- a/linux/include/media/video-buf.h +++ b/linux/include/media/video-buf.h @@ -1,5 +1,5 @@ /* - * $Id: video-buf.h,v 1.8 2004/10/13 10:39:00 kraxel Exp $ + * $Id: video-buf.h,v 1.9 2004/11/07 13:17:15 kraxel Exp $ * * generic helper functions for video4linux capture buffers, to handle * memory management and PCI DMA. Right now bttv + saa7134 use it. @@ -121,7 +121,6 @@ struct videobuf_queue; struct videobuf_mapping { unsigned int count; - int highmem_ok; unsigned long start; unsigned long end; struct videobuf_queue *q; @@ -167,12 +166,15 @@ struct videobuf_buffer { }; struct videobuf_queue_ops { - int (*buf_setup)(void *priv, + int (*buf_setup)(struct videobuf_queue *q, unsigned int *count, unsigned int *size); - int (*buf_prepare)(void *priv,struct videobuf_buffer *vb, + int (*buf_prepare)(struct videobuf_queue *q, + struct videobuf_buffer *vb, enum v4l2_field field); - void (*buf_queue)(void *priv,struct videobuf_buffer *vb); - void (*buf_release)(void *priv,struct videobuf_buffer *vb); + void (*buf_queue)(struct videobuf_queue *q, + struct videobuf_buffer *vb); + void (*buf_release)(struct videobuf_queue *q, + struct videobuf_buffer *vb); }; struct videobuf_queue { @@ -196,6 +198,9 @@ struct videobuf_queue { unsigned int reading; unsigned int read_off; struct videobuf_buffer *read_buf; + + /* driver private data */ + void *priv_data; }; void* videobuf_alloc(unsigned int size); @@ -205,44 +210,46 @@ int videobuf_iolock(struct pci_dev *pci, struct videobuf_buffer *vb, void videobuf_queue_init(struct videobuf_queue *q, struct videobuf_queue_ops *ops, - struct pci_dev *pci, spinlock_t *irqlock, + struct pci_dev *pci, + spinlock_t *irqlock, enum v4l2_buf_type type, enum v4l2_field field, - unsigned int msize); + unsigned int msize, + void *priv); int videobuf_queue_is_busy(struct videobuf_queue *q); -void videobuf_queue_cancel(void *priv, struct videobuf_queue *q); +void videobuf_queue_cancel(struct videobuf_queue *q); enum v4l2_field videobuf_next_field(struct videobuf_queue *q); void videobuf_status(struct v4l2_buffer *b, struct videobuf_buffer *vb, enum v4l2_buf_type type); -int videobuf_reqbufs(void *priv, struct videobuf_queue *q, +int videobuf_reqbufs(struct videobuf_queue *q, struct v4l2_requestbuffers *req); int videobuf_querybuf(struct videobuf_queue *q, struct v4l2_buffer *b); -int videobuf_qbuf(void *priv, struct videobuf_queue *q, +int videobuf_qbuf(struct videobuf_queue *q, struct v4l2_buffer *b); -int videobuf_dqbuf(void *priv, struct videobuf_queue *q, +int videobuf_dqbuf(struct videobuf_queue *q, struct v4l2_buffer *b, int nonblocking); -int videobuf_streamon(void *priv, struct videobuf_queue *q); -int videobuf_streamoff(void *priv, struct videobuf_queue *q); +int videobuf_streamon(struct videobuf_queue *q); +int videobuf_streamoff(struct videobuf_queue *q); -int videobuf_read_start(void *priv, struct videobuf_queue *q); -void videobuf_read_stop(void *priv, struct videobuf_queue *q); -ssize_t videobuf_read_stream(void *priv, struct videobuf_queue *q, +int videobuf_read_start(struct videobuf_queue *q); +void videobuf_read_stop(struct videobuf_queue *q); +ssize_t videobuf_read_stream(struct videobuf_queue *q, char __user *data, size_t count, loff_t *ppos, int vbihack, int nonblocking); -ssize_t videobuf_read_one(void *priv, struct videobuf_queue *q, +ssize_t videobuf_read_one(struct videobuf_queue *q, char __user *data, size_t count, loff_t *ppos, int nonblocking); -unsigned int videobuf_poll_stream(struct file *file, void *priv, +unsigned int videobuf_poll_stream(struct file *file, struct videobuf_queue *q, poll_table *wait); -int videobuf_mmap_setup(void *priv, struct videobuf_queue *q, +int videobuf_mmap_setup(struct videobuf_queue *q, unsigned int bcount, unsigned int bsize, enum v4l2_memory memory); -int videobuf_mmap_free(void *priv, struct videobuf_queue *q); -int videobuf_mmap_mapper(struct vm_area_struct *vma, - struct videobuf_queue *q); +int videobuf_mmap_free(struct videobuf_queue *q); +int videobuf_mmap_mapper(struct videobuf_queue *q, + struct vm_area_struct *vma); /* --------------------------------------------------------------------- */ |