git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
V4L/DVB (11374): v4l2-common: add v4l2_i2c_new_probed_subdev_addr
[safe/jmp/linux-2.6]
/
include
/
media
/
videobuf-core.h
diff --git
a/include/media/videobuf-core.h
b/include/media/videobuf-core.h
index
0fa5d59
..
1c5946c
100644
(file)
--- a/
include/media/videobuf-core.h
+++ b/
include/media/videobuf-core.h
@@
-13,8
+13,12
@@
* the Free Software Foundation; either version 2
*/
* 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/poll.h>
#ifdef CONFIG_VIDEO_V4L1_COMPAT
+#define __MIN_V4L1
#include <linux/videodev.h>
#endif
#include <linux/videodev2.h>
#include <linux/videodev.h>
#endif
#include <linux/videodev2.h>
@@
-56,13
+60,13
@@
struct videobuf_mapping {
};
enum videobuf_state {
};
enum videobuf_state {
-
STATE
_NEEDS_INIT = 0,
-
STATE
_PREPARED = 1,
-
STATE
_QUEUED = 2,
-
STATE
_ACTIVE = 3,
-
STATE
_DONE = 4,
-
STATE
_ERROR = 5,
-
STATE
_IDLE = 6,
+
VIDEOBUF
_NEEDS_INIT = 0,
+
VIDEOBUF
_PREPARED = 1,
+
VIDEOBUF
_QUEUED = 2,
+
VIDEOBUF
_ACTIVE = 3,
+
VIDEOBUF
_DONE = 4,
+
VIDEOBUF
_ERROR = 5,
+
VIDEOBUF
_IDLE = 6,
};
struct videobuf_buffer {
};
struct videobuf_buffer {
@@
-123,7
+127,8
@@
struct videobuf_queue_ops {
struct videobuf_qtype_ops {
u32 magic;
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);
int (*iolock) (struct videobuf_queue* q,
struct videobuf_buffer *vb,
struct v4l2_framebuffer *fbuf);
@@
-149,9
+154,11
@@
struct videobuf_qtype_ops {
};
struct videobuf_queue {
};
struct videobuf_queue {
- struct mutex lock;
+ struct mutex
vb_
lock;
spinlock_t *irqlock;
spinlock_t *irqlock;
- void *dev; /* on pci, points to struct pci_dev */
+ struct device *dev;
+
+ wait_queue_head_t wait; /* wait if queue is empty */
enum v4l2_buf_type type;
unsigned int inputs; /* for V4L2_BUF_FLAG_INPUT */
enum v4l2_buf_type type;
unsigned int inputs; /* for V4L2_BUF_FLAG_INPUT */
@@
-162,12
+169,14
@@
struct videobuf_queue {
struct videobuf_queue_ops *ops;
struct videobuf_qtype_ops *int_ops;
struct videobuf_queue_ops *ops;
struct videobuf_qtype_ops *int_ops;
+ unsigned int streaming:1;
+ unsigned int reading:1;
+ unsigned int is_mmapped:1;
+
/* capture via mmap() + ioctl(QBUF/DQBUF) */
/* capture via mmap() + ioctl(QBUF/DQBUF) */
- unsigned int streaming;
struct list_head stream;
/* capture via read() */
struct list_head stream;
/* capture via read() */
- unsigned int reading;
unsigned int read_off;
struct videobuf_buffer *read_buf;
unsigned int read_off;
struct videobuf_buffer *read_buf;
@@
-181,9
+190,13
@@
int videobuf_iolock(struct videobuf_queue* q, struct videobuf_buffer *vb,
void *videobuf_alloc(struct videobuf_queue* q);
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,
void videobuf_queue_core_init(struct videobuf_queue *q,
struct videobuf_queue_ops *ops,
-
void
*dev,
+
struct device
*dev,
spinlock_t *irqlock,
enum v4l2_buf_type type,
enum v4l2_field field,
spinlock_t *irqlock,
enum v4l2_buf_type type,
enum v4l2_field field,
@@
-208,6
+221,8
@@
int videobuf_cgmbuf(struct videobuf_queue *q,
int videobuf_streamon(struct videobuf_queue *q);
int videobuf_streamoff(struct videobuf_queue *q);
int videobuf_streamon(struct videobuf_queue *q);
int videobuf_streamoff(struct videobuf_queue *q);
+void videobuf_stop(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,
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,
@@
-223,14
+238,11
@@
unsigned int videobuf_poll_stream(struct file *file,
int videobuf_mmap_setup(struct videobuf_queue *q,
unsigned int bcount, unsigned int bsize,
enum v4l2_memory memory);
int videobuf_mmap_setup(struct videobuf_queue *q,
unsigned int bcount, unsigned int bsize,
enum v4l2_memory memory);
+int __videobuf_mmap_setup(struct videobuf_queue *q,
+ unsigned int bcount, unsigned int bsize,
+ enum v4l2_memory memory);
int videobuf_mmap_free(struct videobuf_queue *q);
int videobuf_mmap_mapper(struct videobuf_queue *q,
struct vm_area_struct *vma);
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