summaryrefslogtreecommitdiff
path: root/linux/include
diff options
context:
space:
mode:
authorPatrick Boettcher <pb@linuxtv.org>2008-04-13 17:53:00 +0200
committerPatrick Boettcher <pb@linuxtv.org>2008-04-13 17:53:00 +0200
commit86faba43c8df6ebf57a1048e4077d3b00ae3f1cd (patch)
tree54485f2a2002230d056048686f22cd8f884cab7e /linux/include
parentc89479a6fe0053481818f497b371c10d74ded242 (diff)
parentcfff1cb68e96dcce0c0880af6db1b4461e19ba9b (diff)
downloadmediapointer-dvb-s2-86faba43c8df6ebf57a1048e4077d3b00ae3f1cd.tar.gz
mediapointer-dvb-s2-86faba43c8df6ebf57a1048e4077d3b00ae3f1cd.tar.bz2
merge from main
From: Patrick Boettcher <pb@linuxtv.org> Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Diffstat (limited to 'linux/include')
-rw-r--r--linux/include/media/videobuf-core.h21
-rw-r--r--linux/include/media/videobuf-dma-sg.h3
-rw-r--r--linux/include/media/videobuf-vmalloc.h4
3 files changed, 15 insertions, 13 deletions
diff --git a/linux/include/media/videobuf-core.h b/linux/include/media/videobuf-core.h
index 18b0ba615..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);
@@ -144,8 +148,6 @@ struct videobuf_qtype_ops {
int vbihack,
int nonblocking);
int (*mmap_free) (struct videobuf_queue *q);
- int (*mmap_setup) (struct videobuf_queue *q,
- struct videobuf_buffer *vb);
int (*mmap_mapper) (struct videobuf_queue *q,
struct vm_area_struct *vma);
};
@@ -172,6 +174,7 @@ struct videobuf_queue {
unsigned int streaming:1;
unsigned int reading:1;
+ unsigned int is_mmapped:1;
/* capture via mmap() + ioctl(QBUF/DQBUF) */
struct list_head stream;
@@ -190,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,
@@ -238,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
diff --git a/linux/include/media/videobuf-dma-sg.h b/linux/include/media/videobuf-dma-sg.h
index b6ab08045..be8da269e 100644
--- a/linux/include/media/videobuf-dma-sg.h
+++ b/linux/include/media/videobuf-dma-sg.h
@@ -68,9 +68,6 @@ struct videobuf_dmabuf {
/* for kernel buffers */
void *vmalloc;
- /* Stores the userspace pointer to vmalloc area */
- void *varea;
-
/* for overlay buffers (pci-pci dma) */
dma_addr_t bus_addr;
diff --git a/linux/include/media/videobuf-vmalloc.h b/linux/include/media/videobuf-vmalloc.h
index ec63ab0fa..aed39460c 100644
--- a/linux/include/media/videobuf-vmalloc.h
+++ b/linux/include/media/videobuf-vmalloc.h
@@ -12,6 +12,8 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2
*/
+#ifndef _VIDEOBUF_VMALLOC_H
+#define _VIDEOBUF_VMALLOC_H
#include <media/videobuf-core.h>
@@ -39,3 +41,5 @@ void videobuf_queue_vmalloc_init(struct videobuf_queue* q,
void *videobuf_to_vmalloc (struct videobuf_buffer *buf);
void videobuf_vmalloc_free (struct videobuf_buffer *buf);
+
+#endif