aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/videodev.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/videodev.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/videodev.h')
-rw-r--r--include/linux/videodev.h74
1 files changed, 2 insertions, 72 deletions
diff --git a/include/linux/videodev.h b/include/linux/videodev.h
index 22e6e4bad7b8..23276cede540 100644
--- a/include/linux/videodev.h
+++ b/include/linux/videodev.h
@@ -1,57 +1,16 @@
1#ifndef __LINUX_VIDEODEV_H 1#ifndef __LINUX_VIDEODEV_H
2#define __LINUX_VIDEODEV_H 2#define __LINUX_VIDEODEV_H
3 3
4#include <linux/compiler.h>
5#include <linux/types.h> 4#include <linux/types.h>
6 5
7#define HAVE_V4L2 1 6#define HAVE_V4L1 1
7
8#include <linux/videodev2.h> 8#include <linux/videodev2.h>
9 9
10#ifdef __KERNEL__ 10#ifdef __KERNEL__
11 11
12#include <linux/poll.h>
13#include <linux/mm.h> 12#include <linux/mm.h>
14#include <linux/device.h>
15
16struct video_device
17{
18 /* device info */
19 struct device *dev;
20 char name[32];
21 int type; /* v4l1 */
22 int type2; /* v4l2 */
23 int hardware;
24 int minor;
25
26 /* device ops + callbacks */
27 struct file_operations *fops;
28 void (*release)(struct video_device *vfd);
29
30
31 /* obsolete -- fops->owner is used instead */
32 struct module *owner;
33 /* dev->driver_data will be used instead some day.
34 * Use the video_{get|set}_drvdata() helper functions,
35 * so the switch over will be transparent for you.
36 * Or use {pci|usb}_{get|set}_drvdata() directly. */
37 void *priv;
38
39 /* for videodev.c intenal usage -- please don't touch */
40 int users; /* video_exclusive_{open|close} ... */
41 struct semaphore lock; /* ... helper function uses these */
42 char devfs_name[64]; /* devfs */
43 struct class_device class_dev; /* sysfs */
44};
45
46#define VIDEO_MAJOR 81
47
48#define VFL_TYPE_GRABBER 0
49#define VFL_TYPE_VBI 1
50#define VFL_TYPE_RADIO 2
51#define VFL_TYPE_VTX 3
52 13
53extern int video_register_device(struct video_device *, int type, int nr);
54extern void video_unregister_device(struct video_device *);
55extern struct video_device* video_devdata(struct file*); 14extern struct video_device* video_devdata(struct file*);
56 15
57#define to_video_device(cd) container_of(cd, struct video_device, class_dev) 16#define to_video_device(cd) container_of(cd, struct video_device, class_dev)
@@ -68,11 +27,6 @@ video_device_remove_file(struct video_device *vfd,
68 class_device_remove_file(&vfd->class_dev, attr); 27 class_device_remove_file(&vfd->class_dev, attr);
69} 28}
70 29
71/* helper functions to alloc / release struct video_device, the
72 later can be used for video_device->release() */
73struct video_device *video_device_alloc(void);
74void video_device_release(struct video_device *vfd);
75
76/* helper functions to access driver private data. */ 30/* helper functions to access driver private data. */
77static inline void *video_get_drvdata(struct video_device *dev) 31static inline void *video_get_drvdata(struct video_device *dev)
78{ 32{
@@ -86,27 +40,8 @@ static inline void video_set_drvdata(struct video_device *dev, void *data)
86 40
87extern int video_exclusive_open(struct inode *inode, struct file *file); 41extern int video_exclusive_open(struct inode *inode, struct file *file);
88extern int video_exclusive_release(struct inode *inode, struct file *file); 42extern int video_exclusive_release(struct inode *inode, struct file *file);
89extern int video_usercopy(struct inode *inode, struct file *file,
90 unsigned int cmd, unsigned long arg,
91 int (*func)(struct inode *inode, struct file *file,
92 unsigned int cmd, void *arg));
93#endif /* __KERNEL__ */ 43#endif /* __KERNEL__ */
94 44
95#define VID_TYPE_CAPTURE 1 /* Can capture */
96#define VID_TYPE_TUNER 2 /* Can tune */
97#define VID_TYPE_TELETEXT 4 /* Does teletext */
98#define VID_TYPE_OVERLAY 8 /* Overlay onto frame buffer */
99#define VID_TYPE_CHROMAKEY 16 /* Overlay by chromakey */
100#define VID_TYPE_CLIPPING 32 /* Can clip */
101#define VID_TYPE_FRAMERAM 64 /* Uses the frame buffer memory */
102#define VID_TYPE_SCALES 128 /* Scalable */
103#define VID_TYPE_MONOCHROME 256 /* Monochrome only */
104#define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */
105#define VID_TYPE_MPEG_DECODER 1024 /* Can decode MPEG streams */
106#define VID_TYPE_MPEG_ENCODER 2048 /* Can encode MPEG streams */
107#define VID_TYPE_MJPEG_DECODER 4096 /* Can decode MJPEG streams */
108#define VID_TYPE_MJPEG_ENCODER 8192 /* Can encode MJPEG streams */
109
110struct video_capability 45struct video_capability
111{ 46{
112 char name[32]; 47 char name[32];
@@ -260,9 +195,6 @@ struct video_key
260 __u32 flags; 195 __u32 flags;
261}; 196};
262 197
263
264#define VIDEO_MAX_FRAME 32
265
266struct video_mbuf 198struct video_mbuf
267{ 199{
268 int size; /* Total memory to map */ 200 int size; /* Total memory to map */
@@ -270,10 +202,8 @@ struct video_mbuf
270 int offsets[VIDEO_MAX_FRAME]; 202 int offsets[VIDEO_MAX_FRAME];
271}; 203};
272 204
273
274#define VIDEO_NO_UNIT (-1) 205#define VIDEO_NO_UNIT (-1)
275 206
276
277struct video_unit 207struct video_unit
278{ 208{
279 int video; /* Video minor */ 209 int video; /* Video minor */