diff options
Diffstat (limited to 'include/linux/videodev2.h')
-rw-r--r-- | include/linux/videodev2.h | 76 |
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 | |||
38 | struct 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 | |||
85 | extern int video_register_device(struct video_device *, int type, int nr); | ||
86 | extern void video_unregister_device(struct video_device *); | ||
87 | extern 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() */ | ||
94 | struct video_device *video_device_alloc(void); | ||
95 | void 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 | */ |