aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/videodev2.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@brturbo.com.br>2005-11-09 00:37:49 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-09 10:56:21 -0500
commit79436633dbced18aa348f8669ef507109f851303 (patch)
tree46e90aa4e1ebdca2ec5e97bab09e90f06bee1b49 /include/linux/videodev2.h
parentde48eebce8b63dbae7272ee80f4fe0eaddb61278 (diff)
[PATCH] v4l: 809: some changes to allow compiling cx88 and saa7134
- Some changes to allow compiling cx88 and saa7134 without V4L1 support. - This patch will help obsoleting V4L1 API. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/videodev2.h')
-rw-r--r--include/linux/videodev2.h76
1 files changed, 76 insertions, 0 deletions
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 090091560c36..df0f9a24944a 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -18,6 +18,82 @@
18#endif 18#endif
19#include <linux/compiler.h> /* need __user */ 19#include <linux/compiler.h> /* need __user */
20 20
21#include <linux/poll.h>
22#include <linux/device.h>
23
24#define HAVE_V4L2 1
25
26/*
27 * Common stuff for both V4L1 and V4L2
28 * Moved from videodev.h
29 */
30
31#define VIDEO_MAX_FRAME 32
32
33#define VFL_TYPE_GRABBER 0
34#define VFL_TYPE_VBI 1
35#define VFL_TYPE_RADIO 2
36#define VFL_TYPE_VTX 3
37
38struct video_device
39{
40 /* device info */
41 struct device *dev;
42 char name[32];
43 int type; /* v4l1 */
44 int type2; /* v4l2 */
45 int hardware;
46 int minor;
47
48 /* device ops + callbacks */
49 struct file_operations *fops;
50 void (*release)(struct video_device *vfd);
51
52
53 /* obsolete -- fops->owner is used instead */
54 struct module *owner;
55 /* dev->driver_data will be used instead some day.
56 * Use the video_{get|set}_drvdata() helper functions,
57 * so the switch over will be transparent for you.
58 * Or use {pci|usb}_{get|set}_drvdata() directly. */
59 void *priv;
60
61 /* for videodev.c intenal usage -- please don't touch */
62 int users; /* video_exclusive_{open|close} ... */
63 struct semaphore lock; /* ... helper function uses these */
64 char devfs_name[64]; /* devfs */
65 struct class_device class_dev; /* sysfs */
66};
67
68#define VIDEO_MAJOR 81
69
70#define VID_TYPE_CAPTURE 1 /* Can capture */
71#define VID_TYPE_TUNER 2 /* Can tune */
72#define VID_TYPE_TELETEXT 4 /* Does teletext */
73#define VID_TYPE_OVERLAY 8 /* Overlay onto frame buffer */
74#define VID_TYPE_CHROMAKEY 16 /* Overlay by chromakey */
75#define VID_TYPE_CLIPPING 32 /* Can clip */
76#define VID_TYPE_FRAMERAM 64 /* Uses the frame buffer memory */
77#define VID_TYPE_SCALES 128 /* Scalable */
78#define VID_TYPE_MONOCHROME 256 /* Monochrome only */
79#define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */
80#define VID_TYPE_MPEG_DECODER 1024 /* Can decode MPEG streams */
81#define VID_TYPE_MPEG_ENCODER 2048 /* Can encode MPEG streams */
82#define VID_TYPE_MJPEG_DECODER 4096 /* Can decode MJPEG streams */
83#define VID_TYPE_MJPEG_ENCODER 8192 /* Can encode MJPEG streams */
84
85extern int video_register_device(struct video_device *, int type, int nr);
86extern void video_unregister_device(struct video_device *);
87extern int video_usercopy(struct inode *inode, struct file *file,
88 unsigned int cmd, unsigned long arg,
89 int (*func)(struct inode *inode, struct file *file,
90 unsigned int cmd, void *arg));
91
92/* helper functions to alloc / release struct video_device, the
93 later can be used for video_device->release() */
94struct video_device *video_device_alloc(void);
95void video_device_release(struct video_device *vfd);
96
21/* 97/*
22 * M I S C E L L A N E O U S 98 * M I S C E L L A N E O U S
23 */ 99 */