diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-13 12:10:00 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-13 12:10:00 -0300 |
commit | 1def8c1f6f0fb108cf841f29e899253c8b8e3523 (patch) | |
tree | df39964e6242466520983a2842af23e2e0560261 /linux/include/media/videobuf-core.h | |
parent | 85d8e4c1c7772689a1b1fc27cf448ac3a261e3ec (diff) | |
download | mediapointer-dvb-s2-1def8c1f6f0fb108cf841f29e899253c8b8e3523.tar.gz mediapointer-dvb-s2-1def8c1f6f0fb108cf841f29e899253c8b8e3523.tar.bz2 |
videobuf-dvb: allow its usage with videobuf-vmalloc
From: Mauro Carvalho Chehab <mchehab@infradead.org>
videobuf-dvb were still using a function that were videobuf-dma-sg
dependent. This patch creates a generic handler for this function. This
way, videobuf-dvb can now work with all videobuf implementations.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/include/media/videobuf-core.h')
-rw-r--r-- | linux/include/media/videobuf-core.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/linux/include/media/videobuf-core.h b/linux/include/media/videobuf-core.h index ea269cec4..dd0821f40 100644 --- a/linux/include/media/videobuf-core.h +++ b/linux/include/media/videobuf-core.h @@ -13,6 +13,9 @@ * the Free Software Foundation; either version 2 */ +#ifndef _VIDEOBUF_CORE_H +#define _VIDEOBUF_CORE_H + #include <linux/poll.h> #ifdef CONFIG_VIDEO_V4L1_COMPAT #include <linux/videodev.h> @@ -123,7 +126,8 @@ struct videobuf_queue_ops { struct videobuf_qtype_ops { u32 magic; - void* (*alloc) (size_t size); + void *(*alloc) (size_t size); + void *(*vmalloc) (struct videobuf_buffer *buf); int (*iolock) (struct videobuf_queue* q, struct videobuf_buffer *vb, struct v4l2_framebuffer *fbuf); @@ -189,6 +193,10 @@ int videobuf_iolock(struct videobuf_queue* q, struct videobuf_buffer *vb, void *videobuf_alloc(struct videobuf_queue* q); +/* Used on videobuf-dvb */ +void *videobuf_queue_to_vmalloc (struct videobuf_queue* q, + struct videobuf_buffer *buf); + void videobuf_queue_core_init(struct videobuf_queue *q, struct videobuf_queue_ops *ops, struct device *dev, @@ -237,10 +245,4 @@ int videobuf_mmap_free(struct videobuf_queue *q); int videobuf_mmap_mapper(struct videobuf_queue *q, struct vm_area_struct *vma); -/* --------------------------------------------------------------------- */ - -/* - * Local variables: - * c-basic-offset: 8 - * End: - */ +#endif |