Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
v4l2-ioctl.c File Reference
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/version.h>
#include <linux/videodev2.h>
#include <media/v4l2-common.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-fh.h>
#include <media/v4l2-event.h>
#include <media/v4l2-device.h>
#include <media/v4l2-chip-ident.h>
#include <media/videobuf2-core.h>

Go to the source code of this file.

Data Structures

struct  std_descr
 
struct  v4l2_ioctl_info
 

Macros

#define CLEAR_AFTER_FIELD(p, field)
 
#define prt_names(a, arr)   (((unsigned)(a)) < ARRAY_SIZE(arr) ? arr[a] : "unknown")
 
#define INFO_FL_PRIO   (1 << 0)
 
#define INFO_FL_CTRL   (1 << 1)
 
#define INFO_FL_STD   (1 << 2)
 
#define INFO_FL_FUNC   (1 << 3)
 
#define INFO_FL_QUEUE   (1 << 4)
 
#define INFO_FL_CLEAR(v4l2_struct, field)
 
#define INFO_FL_CLEAR_MASK   (_IOC_SIZEMASK << 16)
 
#define IOCTL_INFO_STD(_ioctl, _vidioc, _debug, _flags)
 
#define IOCTL_INFO_FNC(_ioctl, _func, _debug, _flags)
 
#define V4L2_IOCTLS   ARRAY_SIZE(v4l2_ioctls)
 

Functions

const charv4l2_norm_to_name (v4l2_std_id id)
 
 EXPORT_SYMBOL (v4l2_norm_to_name)
 
void v4l2_video_std_frame_period (int id, struct v4l2_fract *frameperiod)
 
 EXPORT_SYMBOL (v4l2_video_std_frame_period)
 
int v4l2_video_std_construct (struct v4l2_standard *vs, int id, const char *name)
 
 EXPORT_SYMBOL (v4l2_video_std_construct)
 
 EXPORT_SYMBOL (v4l2_field_names)
 
 EXPORT_SYMBOL (v4l2_type_names)
 
bool v4l2_is_known_ioctl (unsigned int cmd)
 
struct mutexv4l2_ioctl_get_lock (struct video_device *vdev, unsigned cmd)
 
void v4l_printk_ioctl (const char *prefix, unsigned int cmd)
 
 EXPORT_SYMBOL (v4l_printk_ioctl)
 
long video_usercopy (struct file *file, unsigned int cmd, unsigned long arg, v4l2_kioctl func)
 
 EXPORT_SYMBOL (video_usercopy)
 
long video_ioctl2 (struct file *file, unsigned int cmd, unsigned long arg)
 
 EXPORT_SYMBOL (video_ioctl2)
 

Variables

const charv4l2_field_names []
 
const charv4l2_type_names []
 

Macro Definition Documentation

#define CLEAR_AFTER_FIELD (   p,
  field 
)
Value:
memset((u8 *)(p) + offsetof(typeof(*(p)), field) + sizeof((p)->field), \
0, sizeof(*(p)) - offsetof(typeof(*(p)), field) - sizeof((p)->field))

Definition at line 34 of file v4l2-ioctl.c.

#define INFO_FL_CLEAR (   v4l2_struct,
  field 
)
Value:
((offsetof(struct v4l2_struct, field) + \
sizeof(((struct v4l2_struct *)0)->field)) << 16)

Definition at line 1929 of file v4l2-ioctl.c.

#define INFO_FL_CLEAR_MASK   (_IOC_SIZEMASK << 16)

Definition at line 1932 of file v4l2-ioctl.c.

#define INFO_FL_CTRL   (1 << 1)

Definition at line 1921 of file v4l2-ioctl.c.

#define INFO_FL_FUNC   (1 << 3)

Definition at line 1925 of file v4l2-ioctl.c.

#define INFO_FL_PRIO   (1 << 0)

Definition at line 1919 of file v4l2-ioctl.c.

#define INFO_FL_QUEUE   (1 << 4)

Definition at line 1927 of file v4l2-ioctl.c.

#define INFO_FL_STD   (1 << 2)

Definition at line 1923 of file v4l2-ioctl.c.

#define IOCTL_INFO_FNC (   _ioctl,
  _func,
  _debug,
  _flags 
)
Value:
[_IOC_NR(_ioctl)] = { \
.ioctl = _ioctl, \
.flags = _flags | INFO_FL_FUNC, \
.name = #_ioctl, \
.u.func = _func, \
.debug = _debug, \
}

Definition at line 1943 of file v4l2-ioctl.c.

#define IOCTL_INFO_STD (   _ioctl,
  _vidioc,
  _debug,
  _flags 
)
Value:
[_IOC_NR(_ioctl)] = { \
.ioctl = _ioctl, \
.flags = _flags | INFO_FL_STD, \
.name = #_ioctl, \
.u.offset = offsetof(struct v4l2_ioctl_ops, _vidioc), \
.debug = _debug, \
}

Definition at line 1934 of file v4l2-ioctl.c.

#define prt_names (   a,
  arr 
)    (((unsigned)(a)) < ARRAY_SIZE(arr) ? arr[a] : "unknown")

Definition at line 160 of file v4l2-ioctl.c.

#define V4L2_IOCTLS   ARRAY_SIZE(v4l2_ioctls)

Definition at line 2036 of file v4l2-ioctl.c.

Function Documentation

EXPORT_SYMBOL ( v4l2_norm_to_name  )
EXPORT_SYMBOL ( v4l2_video_std_frame_period  )
EXPORT_SYMBOL ( v4l2_video_std_construct  )
EXPORT_SYMBOL ( v4l2_field_names  )
EXPORT_SYMBOL ( v4l2_type_names  )
EXPORT_SYMBOL ( v4l_printk_ioctl  )
EXPORT_SYMBOL ( video_usercopy  )
EXPORT_SYMBOL ( video_ioctl2  )
struct mutex* v4l2_ioctl_get_lock ( struct video_device vdev,
unsigned  cmd 
)
read

Definition at line 2045 of file v4l2-ioctl.c.

bool v4l2_is_known_ioctl ( unsigned int  cmd)

Definition at line 2038 of file v4l2-ioctl.c.

const char* v4l2_norm_to_name ( v4l2_std_id  id)

Definition at line 79 of file v4l2-ioctl.c.

int v4l2_video_std_construct ( struct v4l2_standard vs,
int  id,
const char name 
)

Definition at line 112 of file v4l2-ioctl.c.

void v4l2_video_std_frame_period ( int  id,
struct v4l2_fract frameperiod 
)

Definition at line 98 of file v4l2-ioctl.c.

void v4l_printk_ioctl ( const char prefix,
unsigned int  cmd 
)

Definition at line 2059 of file v4l2-ioctl.c.

long video_ioctl2 ( struct file file,
unsigned int  cmd,
unsigned long  arg 
)

Definition at line 2357 of file v4l2-ioctl.c.

long video_usercopy ( struct file file,
unsigned int  cmd,
unsigned long  arg,
v4l2_kioctl  func 
)

Definition at line 2250 of file v4l2-ioctl.c.

Variable Documentation

const char* v4l2_field_names[]
Initial value:
= {
[V4L2_FIELD_ANY] = "any",
[V4L2_FIELD_NONE] = "none",
[V4L2_FIELD_TOP] = "top",
[V4L2_FIELD_BOTTOM] = "bottom",
[V4L2_FIELD_INTERLACED] = "interlaced",
[V4L2_FIELD_SEQ_TB] = "seq-tb",
[V4L2_FIELD_SEQ_BT] = "seq-bt",
[V4L2_FIELD_ALTERNATE] = "alternate",
[V4L2_FIELD_INTERLACED_TB] = "interlaced-tb",
[V4L2_FIELD_INTERLACED_BT] = "interlaced-bt",
}

Definition at line 126 of file v4l2-ioctl.c.

const char* v4l2_type_names[]
Initial value:
= {
[V4L2_BUF_TYPE_VIDEO_OVERLAY] = "vid-overlay",
[V4L2_BUF_TYPE_VBI_OUTPUT] = "vbi-out",
[V4L2_BUF_TYPE_SLICED_VBI_CAPTURE] = "sliced-vbi-cap",
[V4L2_BUF_TYPE_SLICED_VBI_OUTPUT] = "sliced-vbi-out",
[V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY] = "vid-out-overlay",
[V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE] = "vid-cap-mplane",
[V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE] = "vid-out-mplane",
}

Definition at line 140 of file v4l2-ioctl.c.