Linux Kernel
3.7.1
|
#include <linux/poll.h>
#include <linux/fs.h>
#include <linux/device.h>
#include <linux/cdev.h>
#include <linux/mutex.h>
#include <linux/videodev2.h>
#include <media/media-entity.h>
Go to the source code of this file.
Data Structures | |
struct | v4l2_prio_state |
struct | v4l2_file_operations |
struct | video_device |
Macros | |
#define | VIDEO_MAJOR 81 |
#define | VFL_TYPE_GRABBER 0 |
#define | VFL_TYPE_VBI 1 |
#define | VFL_TYPE_RADIO 2 |
#define | VFL_TYPE_SUBDEV 3 |
#define | VFL_TYPE_MAX 4 |
#define | VFL_DIR_RX 0 |
#define | VFL_DIR_TX 1 |
#define | VFL_DIR_M2M 2 |
#define | V4L2_FL_REGISTERED (0) |
#define | V4L2_FL_USES_V4L2_FH (1) |
#define | V4L2_FL_USE_FH_PRIO (2) |
#define | media_entity_to_video_device(__e) container_of(__e, struct video_device, entity) |
#define | to_video_device(cd) container_of(cd, struct video_device, dev) |
Functions | |
void | v4l2_prio_init (struct v4l2_prio_state *global) |
int | v4l2_prio_change (struct v4l2_prio_state *global, enum v4l2_priority *local, enum v4l2_priority new) |
void | v4l2_prio_open (struct v4l2_prio_state *global, enum v4l2_priority *local) |
void | v4l2_prio_close (struct v4l2_prio_state *global, enum v4l2_priority local) |
enum v4l2_priority | v4l2_prio_max (struct v4l2_prio_state *global) |
int | v4l2_prio_check (struct v4l2_prio_state *global, enum v4l2_priority local) |
int __must_check | __video_register_device (struct video_device *vdev, int type, int nr, int warn_if_nr_in_use, struct module *owner) |
void | video_unregister_device (struct video_device *vdev) |
struct video_device *__must_check | video_device_alloc (void) |
void | video_device_release (struct video_device *vdev) |
void | video_device_release_empty (struct video_device *vdev) |
bool | v4l2_is_known_ioctl (unsigned int cmd) |
struct video_device * | video_devdata (struct file *file) |
#define media_entity_to_video_device | ( | __e | ) | container_of(__e, struct video_device, entity) |
Definition at line 146 of file v4l2-dev.h.
#define to_video_device | ( | cd | ) | container_of(cd, struct video_device, dev) |
Definition at line 149 of file v4l2-dev.h.
#define V4L2_FL_REGISTERED (0) |
Definition at line 43 of file v4l2-dev.h.
#define V4L2_FL_USE_FH_PRIO (2) |
Definition at line 47 of file v4l2-dev.h.
#define V4L2_FL_USES_V4L2_FH (1) |
Definition at line 45 of file v4l2-dev.h.
#define VFL_DIR_M2M 2 |
Definition at line 33 of file v4l2-dev.h.
#define VFL_DIR_RX 0 |
Definition at line 31 of file v4l2-dev.h.
#define VFL_DIR_TX 1 |
Definition at line 32 of file v4l2-dev.h.
#define VFL_TYPE_GRABBER 0 |
Definition at line 23 of file v4l2-dev.h.
#define VFL_TYPE_MAX 4 |
Definition at line 27 of file v4l2-dev.h.
#define VFL_TYPE_RADIO 2 |
Definition at line 25 of file v4l2-dev.h.
#define VFL_TYPE_SUBDEV 3 |
Definition at line 26 of file v4l2-dev.h.
#define VFL_TYPE_VBI 1 |
Definition at line 24 of file v4l2-dev.h.
#define VIDEO_MAJOR 81 |
Definition at line 21 of file v4l2-dev.h.
int __must_check __video_register_device | ( | struct video_device * | vdev, |
int | type, | ||
int | nr, | ||
int | warn_if_nr_in_use, | ||
struct module * | owner | ||
) |
__video_register_device - register video4linux devices : video device structure we want to register : type of device to register : which device node number (0 == /dev/video0, 1 == /dev/video1, ... -1 == first free) : warn if the desired device node number was already in use and another number was chosen instead. : module that owns the video device node
The registration code assigns minor numbers and device node numbers based on the requested type and registers the new device node with the kernel.
This function assumes that struct video_device was zeroed when it was allocated and does not contain any stale date.
An error is returned if no free minor or device node number could be found, or if the registration of the device node failed.
Zero is returned on success.
Valid types are
VFL_TYPE_GRABBER - A frame grabber
VFL_TYPE_VBI - Vertical blank data (undecoded)
VFL_TYPE_RADIO - A radio card
VFL_TYPE_SUBDEV - A subdevice
Definition at line 766 of file v4l2-dev.c.
Definition at line 2038 of file v4l2-ioctl.c.
int v4l2_prio_change | ( | struct v4l2_prio_state * | global, |
enum v4l2_priority * | local, | ||
enum v4l2_priority | new | ||
) |
Definition at line 245 of file v4l2-dev.c.
int v4l2_prio_check | ( | struct v4l2_prio_state * | global, |
enum v4l2_priority | local | ||
) |
Definition at line 286 of file v4l2-dev.c.
void v4l2_prio_close | ( | struct v4l2_prio_state * | global, |
enum v4l2_priority | local | ||
) |
Definition at line 267 of file v4l2-dev.c.
void v4l2_prio_init | ( | struct v4l2_prio_state * | global | ) |
Definition at line 239 of file v4l2-dev.c.
enum v4l2_priority v4l2_prio_max | ( | struct v4l2_prio_state * | global | ) |
Definition at line 274 of file v4l2-dev.c.
void v4l2_prio_open | ( | struct v4l2_prio_state * | global, |
enum v4l2_priority * | local | ||
) |
Definition at line 261 of file v4l2-dev.c.
|
read |
Definition at line 223 of file v4l2-dev.c.
|
read |
Definition at line 136 of file v4l2-dev.c.
void video_device_release | ( | struct video_device * | vdev | ) |
Definition at line 142 of file v4l2-dev.c.
void video_device_release_empty | ( | struct video_device * | vdev | ) |
Definition at line 148 of file v4l2-dev.c.
void video_unregister_device | ( | struct video_device * | vdev | ) |
video_unregister_device - unregister a video4linux device : the device to unregister
This unregisters the passed device. Future open calls will be met with errors.
Definition at line 966 of file v4l2-dev.c.