Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
videobuf-core.c File Reference
#include <linux/init.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/mm.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <media/videobuf-core.h>

Go to the source code of this file.

Macros

#define MAGIC_BUFFER   0x20070728
 
#define MAGIC_CHECK(is, should)
 
#define dprintk(level, fmt, arg...)
 
#define CALL(q, f, arg...)   ((q->int_ops->f) ? q->int_ops->f(arg) : 0)
 

Functions

 module_param (debug, int, 0644)
 
 MODULE_DESCRIPTION ("helper module to manage video4linux buffers")
 
 MODULE_AUTHOR ("Mauro Carvalho Chehab <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 
struct videobuf_buffervideobuf_alloc_vb (struct videobuf_queue *q)
 
 EXPORT_SYMBOL_GPL (videobuf_alloc_vb)
 
int videobuf_waiton (struct videobuf_queue *q, struct videobuf_buffer *vb, int non_blocking, int intr)
 
 EXPORT_SYMBOL_GPL (videobuf_waiton)
 
int videobuf_iolock (struct videobuf_queue *q, struct videobuf_buffer *vb, struct v4l2_framebuffer *fbuf)
 
 EXPORT_SYMBOL_GPL (videobuf_iolock)
 
voidvideobuf_queue_to_vaddr (struct videobuf_queue *q, struct videobuf_buffer *buf)
 
 EXPORT_SYMBOL_GPL (videobuf_queue_to_vaddr)
 
void videobuf_queue_core_init (struct videobuf_queue *q, const struct videobuf_queue_ops *ops, struct device *dev, spinlock_t *irqlock, enum v4l2_buf_type type, enum v4l2_field field, unsigned int msize, void *priv, struct videobuf_qtype_ops *int_ops, struct mutex *ext_lock)
 
 EXPORT_SYMBOL_GPL (videobuf_queue_core_init)
 
int videobuf_queue_is_busy (struct videobuf_queue *q)
 
 EXPORT_SYMBOL_GPL (videobuf_queue_is_busy)
 
void videobuf_queue_cancel (struct videobuf_queue *q)
 
 EXPORT_SYMBOL_GPL (videobuf_queue_cancel)
 
enum v4l2_field videobuf_next_field (struct videobuf_queue *q)
 
 EXPORT_SYMBOL_GPL (videobuf_next_field)
 
int videobuf_mmap_free (struct videobuf_queue *q)
 
 EXPORT_SYMBOL_GPL (videobuf_mmap_free)
 
int __videobuf_mmap_setup (struct videobuf_queue *q, unsigned int bcount, unsigned int bsize, enum v4l2_memory memory)
 
 EXPORT_SYMBOL_GPL (__videobuf_mmap_setup)
 
int videobuf_mmap_setup (struct videobuf_queue *q, unsigned int bcount, unsigned int bsize, enum v4l2_memory memory)
 
 EXPORT_SYMBOL_GPL (videobuf_mmap_setup)
 
int videobuf_reqbufs (struct videobuf_queue *q, struct v4l2_requestbuffers *req)
 
 EXPORT_SYMBOL_GPL (videobuf_reqbufs)
 
int videobuf_querybuf (struct videobuf_queue *q, struct v4l2_buffer *b)
 
 EXPORT_SYMBOL_GPL (videobuf_querybuf)
 
int videobuf_qbuf (struct videobuf_queue *q, struct v4l2_buffer *b)
 
 EXPORT_SYMBOL_GPL (videobuf_qbuf)
 
int videobuf_dqbuf (struct videobuf_queue *q, struct v4l2_buffer *b, int nonblocking)
 
 EXPORT_SYMBOL_GPL (videobuf_dqbuf)
 
int videobuf_streamon (struct videobuf_queue *q)
 
 EXPORT_SYMBOL_GPL (videobuf_streamon)
 
int videobuf_streamoff (struct videobuf_queue *q)
 
 EXPORT_SYMBOL_GPL (videobuf_streamoff)
 
ssize_t videobuf_read_one (struct videobuf_queue *q, char __user *data, size_t count, loff_t *ppos, int nonblocking)
 
 EXPORT_SYMBOL_GPL (videobuf_read_one)
 
int videobuf_read_start (struct videobuf_queue *q)
 
 EXPORT_SYMBOL_GPL (videobuf_read_start)
 
void videobuf_read_stop (struct videobuf_queue *q)
 
 EXPORT_SYMBOL_GPL (videobuf_read_stop)
 
void videobuf_stop (struct videobuf_queue *q)
 
 EXPORT_SYMBOL_GPL (videobuf_stop)
 
ssize_t videobuf_read_stream (struct videobuf_queue *q, char __user *data, size_t count, loff_t *ppos, int vbihack, int nonblocking)
 
 EXPORT_SYMBOL_GPL (videobuf_read_stream)
 
unsigned int videobuf_poll_stream (struct file *file, struct videobuf_queue *q, poll_table *wait)
 
 EXPORT_SYMBOL_GPL (videobuf_poll_stream)
 
int videobuf_mmap_mapper (struct videobuf_queue *q, struct vm_area_struct *vma)
 
 EXPORT_SYMBOL_GPL (videobuf_mmap_mapper)
 

Macro Definition Documentation

#define CALL (   q,
  f,
  arg... 
)    ((q->int_ops->f) ? q->int_ops->f(arg) : 0)

Definition at line 52 of file videobuf-core.c.

#define dprintk (   level,
  fmt,
  arg... 
)
Value:
do { \
if (debug >= level) \
printk(KERN_DEBUG "vbuf: " fmt, ## arg); \
} while (0)

Definition at line 44 of file videobuf-core.c.

#define MAGIC_BUFFER   0x20070728

Definition at line 26 of file videobuf-core.c.

#define MAGIC_CHECK (   is,
  should 
)
Value:
do { \
if (unlikely((is) != (should))) { \
printk(KERN_ERR \
"magic mismatch: %x (expected %x)\n", \
is, should); \
BUG(); \
} \
} while (0)

Definition at line 27 of file videobuf-core.c.

Function Documentation

int __videobuf_mmap_setup ( struct videobuf_queue q,
unsigned int  bcount,
unsigned int  bsize,
enum v4l2_memory  memory 
)

Definition at line 379 of file videobuf-core.c.

EXPORT_SYMBOL_GPL ( videobuf_alloc_vb  )
EXPORT_SYMBOL_GPL ( videobuf_waiton  )
EXPORT_SYMBOL_GPL ( videobuf_iolock  )
EXPORT_SYMBOL_GPL ( videobuf_queue_to_vaddr  )
EXPORT_SYMBOL_GPL ( videobuf_queue_core_init  )
EXPORT_SYMBOL_GPL ( videobuf_queue_is_busy  )
EXPORT_SYMBOL_GPL ( videobuf_queue_cancel  )
EXPORT_SYMBOL_GPL ( videobuf_next_field  )
EXPORT_SYMBOL_GPL ( videobuf_mmap_free  )
EXPORT_SYMBOL_GPL ( __videobuf_mmap_setup  )
EXPORT_SYMBOL_GPL ( videobuf_mmap_setup  )
EXPORT_SYMBOL_GPL ( videobuf_reqbufs  )
EXPORT_SYMBOL_GPL ( videobuf_querybuf  )
EXPORT_SYMBOL_GPL ( videobuf_qbuf  )
EXPORT_SYMBOL_GPL ( videobuf_dqbuf  )
EXPORT_SYMBOL_GPL ( videobuf_streamon  )
EXPORT_SYMBOL_GPL ( videobuf_streamoff  )
EXPORT_SYMBOL_GPL ( videobuf_read_one  )
EXPORT_SYMBOL_GPL ( videobuf_read_start  )
EXPORT_SYMBOL_GPL ( videobuf_read_stop  )
EXPORT_SYMBOL_GPL ( videobuf_stop  )
EXPORT_SYMBOL_GPL ( videobuf_read_stream  )
EXPORT_SYMBOL_GPL ( videobuf_poll_stream  )
EXPORT_SYMBOL_GPL ( videobuf_mmap_mapper  )
MODULE_AUTHOR ( "Mauro Carvalho Chehab <[email protected]>"  )
MODULE_DESCRIPTION ( "helper module to manage video4linux buffers"  )
MODULE_LICENSE ( "GPL"  )
module_param ( debug  ,
int  ,
0644   
)
struct videobuf_buffer* videobuf_alloc_vb ( struct videobuf_queue q)
read

Definition at line 55 of file videobuf-core.c.

int videobuf_dqbuf ( struct videobuf_queue q,
struct v4l2_buffer b,
int  nonblocking 
)

Definition at line 688 of file videobuf-core.c.

int videobuf_iolock ( struct videobuf_queue q,
struct videobuf_buffer vb,
struct v4l2_framebuffer fbuf 
)

Definition at line 119 of file videobuf-core.c.

int videobuf_mmap_free ( struct videobuf_queue q)

Definition at line 368 of file videobuf-core.c.

int videobuf_mmap_mapper ( struct videobuf_queue q,
struct vm_area_struct vma 
)

Definition at line 1163 of file videobuf-core.c.

int videobuf_mmap_setup ( struct videobuf_queue q,
unsigned int  bcount,
unsigned int  bsize,
enum v4l2_memory  memory 
)

Definition at line 422 of file videobuf-core.c.

enum v4l2_field videobuf_next_field ( struct videobuf_queue q)

Definition at line 296 of file videobuf-core.c.

unsigned int videobuf_poll_stream ( struct file file,
struct videobuf_queue q,
poll_table wait 
)

Definition at line 1112 of file videobuf-core.c.

int videobuf_qbuf ( struct videobuf_queue q,
struct v4l2_buffer b 
)

Definition at line 521 of file videobuf-core.c.

int videobuf_querybuf ( struct videobuf_queue q,
struct v4l2_buffer b 
)

Definition at line 494 of file videobuf-core.c.

void videobuf_queue_cancel ( struct videobuf_queue q)

Definition at line 261 of file videobuf-core.c.

void videobuf_queue_core_init ( struct videobuf_queue q,
const struct videobuf_queue_ops ops,
struct device dev,
spinlock_t irqlock,
enum v4l2_buf_type  type,
enum v4l2_field  field,
unsigned int  msize,
void priv,
struct videobuf_qtype_ops int_ops,
struct mutex ext_lock 
)

Definition at line 141 of file videobuf-core.c.

int videobuf_queue_is_busy ( struct videobuf_queue q)

Definition at line 183 of file videobuf-core.c.

void* videobuf_queue_to_vaddr ( struct videobuf_queue q,
struct videobuf_buffer buf 
)

Definition at line 129 of file videobuf-core.c.

ssize_t videobuf_read_one ( struct videobuf_queue q,
char __user data,
size_t  count,
loff_t *  ppos,
int  nonblocking 
)

Definition at line 867 of file videobuf-core.c.

int videobuf_read_start ( struct videobuf_queue q)

Definition at line 1005 of file videobuf-core.c.

void videobuf_read_stop ( struct videobuf_queue q)

Definition at line 1017 of file videobuf-core.c.

ssize_t videobuf_read_stream ( struct videobuf_queue q,
char __user data,
size_t  count,
loff_t *  ppos,
int  vbihack,
int  nonblocking 
)

Definition at line 1039 of file videobuf-core.c.

int videobuf_reqbufs ( struct videobuf_queue q,
struct v4l2_requestbuffers req 
)

Definition at line 434 of file videobuf-core.c.

void videobuf_stop ( struct videobuf_queue q)

Definition at line 1025 of file videobuf-core.c.

int videobuf_streamoff ( struct videobuf_queue q)

Definition at line 766 of file videobuf-core.c.

int videobuf_streamon ( struct videobuf_queue q)

Definition at line 728 of file videobuf-core.c.

int videobuf_waiton ( struct videobuf_queue q,
struct videobuf_buffer vb,
int  non_blocking,
int  intr 
)

Definition at line 87 of file videobuf-core.c.