V4L/DVB (8502): videodev2.h: CodingStyle cleanups

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This commit is contained in:
Mauro Carvalho Chehab
2008-07-26 13:53:46 -03:00
parent fdd2a7e2da
commit 9993e51c0c

View File

@@ -92,7 +92,7 @@
/* Four-character-code (FOURCC) */ /* Four-character-code (FOURCC) */
#define v4l2_fourcc(a, b, c, d)\ #define v4l2_fourcc(a, b, c, d)\
(((__u32)(a)<<0)|((__u32)(b)<<8)|((__u32)(c)<<16)|((__u32)(d)<<24)) ((__u32)(a) | ((__u32)(b) << 8) | ((__u32)(c) << 16) | ((__u32)(d) << 24))
/* /*
* E N U M S * E N U M S
@@ -226,8 +226,7 @@ struct v4l2_fract {
/* /*
* D R I V E R C A P A B I L I T I E S * D R I V E R C A P A B I L I T I E S
*/ */
struct v4l2_capability struct v4l2_capability {
{
__u8 driver[16]; /* i.e. "bttv" */ __u8 driver[16]; /* i.e. "bttv" */
__u8 card[32]; /* i.e. "Hauppauge WinTV" */ __u8 card[32]; /* i.e. "Hauppauge WinTV" */
__u8 bus_info[32]; /* "PCI:" + pci_name(pci_dev) */ __u8 bus_info[32]; /* "PCI:" + pci_name(pci_dev) */
@@ -259,8 +258,7 @@ struct v4l2_capability
/* /*
* V I D E O I M A G E F O R M A T * V I D E O I M A G E F O R M A T
*/ */
struct v4l2_pix_format struct v4l2_pix_format {
{
__u32 width; __u32 width;
__u32 height; __u32 height;
__u32 pixelformat; __u32 pixelformat;
@@ -332,8 +330,7 @@ struct v4l2_pix_format
/* /*
* F O R M A T E N U M E R A T I O N * F O R M A T E N U M E R A T I O N
*/ */
struct v4l2_fmtdesc struct v4l2_fmtdesc {
{
__u32 index; /* Format number */ __u32 index; /* Format number */
enum v4l2_buf_type type; /* buffer type */ enum v4l2_buf_type type; /* buffer type */
__u32 flags; __u32 flags;
@@ -349,21 +346,18 @@ struct v4l2_fmtdesc
/* /*
* F R A M E S I Z E E N U M E R A T I O N * F R A M E S I Z E E N U M E R A T I O N
*/ */
enum v4l2_frmsizetypes enum v4l2_frmsizetypes {
{
V4L2_FRMSIZE_TYPE_DISCRETE = 1, V4L2_FRMSIZE_TYPE_DISCRETE = 1,
V4L2_FRMSIZE_TYPE_CONTINUOUS = 2, V4L2_FRMSIZE_TYPE_CONTINUOUS = 2,
V4L2_FRMSIZE_TYPE_STEPWISE = 3, V4L2_FRMSIZE_TYPE_STEPWISE = 3,
}; };
struct v4l2_frmsize_discrete struct v4l2_frmsize_discrete {
{
__u32 width; /* Frame width [pixel] */ __u32 width; /* Frame width [pixel] */
__u32 height; /* Frame height [pixel] */ __u32 height; /* Frame height [pixel] */
}; };
struct v4l2_frmsize_stepwise struct v4l2_frmsize_stepwise {
{
__u32 min_width; /* Minimum frame width [pixel] */ __u32 min_width; /* Minimum frame width [pixel] */
__u32 max_width; /* Maximum frame width [pixel] */ __u32 max_width; /* Maximum frame width [pixel] */
__u32 step_width; /* Frame width step size [pixel] */ __u32 step_width; /* Frame width step size [pixel] */
@@ -372,8 +366,7 @@ struct v4l2_frmsize_stepwise
__u32 step_height; /* Frame height step size [pixel] */ __u32 step_height; /* Frame height step size [pixel] */
}; };
struct v4l2_frmsizeenum struct v4l2_frmsizeenum {
{
__u32 index; /* Frame size number */ __u32 index; /* Frame size number */
__u32 pixel_format; /* Pixel format */ __u32 pixel_format; /* Pixel format */
__u32 type; /* Frame size type the device supports. */ __u32 type; /* Frame size type the device supports. */
@@ -389,22 +382,19 @@ struct v4l2_frmsizeenum
/* /*
* F R A M E R A T E E N U M E R A T I O N * F R A M E R A T E E N U M E R A T I O N
*/ */
enum v4l2_frmivaltypes enum v4l2_frmivaltypes {
{
V4L2_FRMIVAL_TYPE_DISCRETE = 1, V4L2_FRMIVAL_TYPE_DISCRETE = 1,
V4L2_FRMIVAL_TYPE_CONTINUOUS = 2, V4L2_FRMIVAL_TYPE_CONTINUOUS = 2,
V4L2_FRMIVAL_TYPE_STEPWISE = 3, V4L2_FRMIVAL_TYPE_STEPWISE = 3,
}; };
struct v4l2_frmival_stepwise struct v4l2_frmival_stepwise {
{
struct v4l2_fract min; /* Minimum frame interval [s] */ struct v4l2_fract min; /* Minimum frame interval [s] */
struct v4l2_fract max; /* Maximum frame interval [s] */ struct v4l2_fract max; /* Maximum frame interval [s] */
struct v4l2_fract step; /* Frame interval step size [s] */ struct v4l2_fract step; /* Frame interval step size [s] */
}; };
struct v4l2_frmivalenum struct v4l2_frmivalenum {
{
__u32 index; /* Frame format index */ __u32 index; /* Frame format index */
__u32 pixel_format; /* Pixel format */ __u32 pixel_format; /* Pixel format */
__u32 width; /* Frame width */ __u32 width; /* Frame width */
@@ -423,8 +413,7 @@ struct v4l2_frmivalenum
/* /*
* T I M E C O D E * T I M E C O D E
*/ */
struct v4l2_timecode struct v4l2_timecode {
{
__u32 type; __u32 type;
__u32 flags; __u32 flags;
__u8 frames; __u8 frames;
@@ -449,8 +438,7 @@ struct v4l2_timecode
#define V4L2_TC_USERBITS_8BITCHARS 0x0008 #define V4L2_TC_USERBITS_8BITCHARS 0x0008
/* The above is based on SMPTE timecodes */ /* The above is based on SMPTE timecodes */
struct v4l2_jpegcompression struct v4l2_jpegcompression {
{
int quality; int quality;
int APPn; /* Number of APP segment to be written, int APPn; /* Number of APP segment to be written,
@@ -482,16 +470,14 @@ struct v4l2_jpegcompression
/* /*
* M E M O R Y - M A P P I N G B U F F E R S * M E M O R Y - M A P P I N G B U F F E R S
*/ */
struct v4l2_requestbuffers struct v4l2_requestbuffers {
{
__u32 count; __u32 count;
enum v4l2_buf_type type; enum v4l2_buf_type type;
enum v4l2_memory memory; enum v4l2_memory memory;
__u32 reserved[2]; __u32 reserved[2];
}; };
struct v4l2_buffer struct v4l2_buffer {
{
__u32 index; __u32 index;
enum v4l2_buf_type type; enum v4l2_buf_type type;
__u32 bytesused; __u32 bytesused;
@@ -525,8 +511,7 @@ struct v4l2_buffer
/* /*
* O V E R L A Y P R E V I E W * O V E R L A Y P R E V I E W
*/ */
struct v4l2_framebuffer struct v4l2_framebuffer {
{
__u32 capability; __u32 capability;
__u32 flags; __u32 flags;
/* FIXME: in theory we should pass something like PCI device + memory /* FIXME: in theory we should pass something like PCI device + memory
@@ -550,14 +535,12 @@ struct v4l2_framebuffer
#define V4L2_FBUF_FLAG_GLOBAL_ALPHA 0x0010 #define V4L2_FBUF_FLAG_GLOBAL_ALPHA 0x0010
#define V4L2_FBUF_FLAG_LOCAL_INV_ALPHA 0x0020 #define V4L2_FBUF_FLAG_LOCAL_INV_ALPHA 0x0020
struct v4l2_clip struct v4l2_clip {
{
struct v4l2_rect c; struct v4l2_rect c;
struct v4l2_clip __user *next; struct v4l2_clip __user *next;
}; };
struct v4l2_window struct v4l2_window {
{
struct v4l2_rect w; struct v4l2_rect w;
enum v4l2_field field; enum v4l2_field field;
__u32 chromakey; __u32 chromakey;
@@ -570,8 +553,7 @@ struct v4l2_window
/* /*
* C A P T U R E P A R A M E T E R S * C A P T U R E P A R A M E T E R S
*/ */
struct v4l2_captureparm struct v4l2_captureparm {
{
__u32 capability; /* Supported modes */ __u32 capability; /* Supported modes */
__u32 capturemode; /* Current mode */ __u32 capturemode; /* Current mode */
struct v4l2_fract timeperframe; /* Time per frame in .1us units */ struct v4l2_fract timeperframe; /* Time per frame in .1us units */
@@ -584,8 +566,7 @@ struct v4l2_captureparm
#define V4L2_MODE_HIGHQUALITY 0x0001 /* High quality imaging mode */ #define V4L2_MODE_HIGHQUALITY 0x0001 /* High quality imaging mode */
#define V4L2_CAP_TIMEPERFRAME 0x1000 /* timeperframe field is supported */ #define V4L2_CAP_TIMEPERFRAME 0x1000 /* timeperframe field is supported */
struct v4l2_outputparm struct v4l2_outputparm {
{
__u32 capability; /* Supported modes */ __u32 capability; /* Supported modes */
__u32 outputmode; /* Current mode */ __u32 outputmode; /* Current mode */
struct v4l2_fract timeperframe; /* Time per frame in seconds */ struct v4l2_fract timeperframe; /* Time per frame in seconds */
@@ -702,8 +683,7 @@ typedef __u64 v4l2_std_id;
#define V4L2_STD_ALL (V4L2_STD_525_60 |\ #define V4L2_STD_ALL (V4L2_STD_525_60 |\
V4L2_STD_625_50) V4L2_STD_625_50)
struct v4l2_standard struct v4l2_standard {
{
__u32 index; __u32 index;
v4l2_std_id id; v4l2_std_id id;
__u8 name[24]; __u8 name[24];
@@ -715,8 +695,7 @@ struct v4l2_standard
/* /*
* V I D E O I N P U T S * V I D E O I N P U T S
*/ */
struct v4l2_input struct v4l2_input {
{
__u32 index; /* Which input */ __u32 index; /* Which input */
__u8 name[32]; /* Label */ __u8 name[32]; /* Label */
__u32 type; /* Type of input */ __u32 type; /* Type of input */
@@ -753,8 +732,7 @@ struct v4l2_input
/* /*
* V I D E O O U T P U T S * V I D E O O U T P U T S
*/ */
struct v4l2_output struct v4l2_output {
{
__u32 index; /* Which output */ __u32 index; /* Which output */
__u8 name[32]; /* Label */ __u8 name[32]; /* Label */
__u32 type; /* Type of output */ __u32 type; /* Type of output */
@@ -771,14 +749,12 @@ struct v4l2_output
/* /*
* C O N T R O L S * C O N T R O L S
*/ */
struct v4l2_control struct v4l2_control {
{
__u32 id; __u32 id;
__s32 value; __s32 value;
}; };
struct v4l2_ext_control struct v4l2_ext_control {
{
__u32 id; __u32 id;
__u32 reserved2[2]; __u32 reserved2[2];
union { union {
@@ -788,8 +764,7 @@ struct v4l2_ext_control
}; };
} __attribute__ ((packed)); } __attribute__ ((packed));
struct v4l2_ext_controls struct v4l2_ext_controls {
{
__u32 ctrl_class; __u32 ctrl_class;
__u32 count; __u32 count;
__u32 error_idx; __u32 error_idx;
@@ -807,8 +782,7 @@ struct v4l2_ext_controls
#define V4L2_CTRL_DRIVER_PRIV(id) (((id) & 0xffff) >= 0x1000) #define V4L2_CTRL_DRIVER_PRIV(id) (((id) & 0xffff) >= 0x1000)
/* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */ /* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */
struct v4l2_queryctrl struct v4l2_queryctrl {
{
__u32 id; __u32 id;
enum v4l2_ctrl_type type; enum v4l2_ctrl_type type;
__u8 name[32]; /* Whatever */ __u8 name[32]; /* Whatever */
@@ -821,8 +795,7 @@ struct v4l2_queryctrl
}; };
/* Used in the VIDIOC_QUERYMENU ioctl for querying menu items */ /* Used in the VIDIOC_QUERYMENU ioctl for querying menu items */
struct v4l2_querymenu struct v4l2_querymenu {
{
__u32 id; __u32 id;
__u32 index; __u32 index;
__u8 name[32]; /* Whatever */ __u8 name[32]; /* Whatever */
@@ -1104,8 +1077,7 @@ enum v4l2_exposure_auto_type {
/* /*
* T U N I N G * T U N I N G
*/ */
struct v4l2_tuner struct v4l2_tuner {
{
__u32 index; __u32 index;
__u8 name[32]; __u8 name[32];
enum v4l2_tuner_type type; enum v4l2_tuner_type type;
@@ -1119,8 +1091,7 @@ struct v4l2_tuner
__u32 reserved[4]; __u32 reserved[4];
}; };
struct v4l2_modulator struct v4l2_modulator {
{
__u32 index; __u32 index;
__u8 name[32]; __u8 name[32];
__u32 capability; __u32 capability;
@@ -1153,8 +1124,7 @@ struct v4l2_modulator
#define V4L2_TUNER_MODE_LANG1 0x0003 #define V4L2_TUNER_MODE_LANG1 0x0003
#define V4L2_TUNER_MODE_LANG1_LANG2 0x0004 #define V4L2_TUNER_MODE_LANG1_LANG2 0x0004
struct v4l2_frequency struct v4l2_frequency {
{
__u32 tuner; __u32 tuner;
enum v4l2_tuner_type type; enum v4l2_tuner_type type;
__u32 frequency; __u32 frequency;
@@ -1172,8 +1142,7 @@ struct v4l2_hw_freq_seek {
/* /*
* A U D I O * A U D I O
*/ */
struct v4l2_audio struct v4l2_audio {
{
__u32 index; __u32 index;
__u8 name[32]; __u8 name[32];
__u32 capability; __u32 capability;
@@ -1188,8 +1157,7 @@ struct v4l2_audio
/* Flags for the 'mode' field */ /* Flags for the 'mode' field */
#define V4L2_AUDMODE_AVL 0x00001 #define V4L2_AUDMODE_AVL 0x00001
struct v4l2_audioout struct v4l2_audioout {
{
__u32 index; __u32 index;
__u8 name[32]; __u8 name[32];
__u32 capability; __u32 capability;
@@ -1253,8 +1221,7 @@ struct v4l2_encoder_cmd {
*/ */
/* Raw VBI */ /* Raw VBI */
struct v4l2_vbi_format struct v4l2_vbi_format {
{
__u32 sampling_rate; /* in 1 Hz */ __u32 sampling_rate; /* in 1 Hz */
__u32 offset; __u32 offset;
__u32 samples_per_line; __u32 samples_per_line;
@@ -1276,8 +1243,7 @@ struct v4l2_vbi_format
* notice in the definitive implementation. * notice in the definitive implementation.
*/ */
struct v4l2_sliced_vbi_format struct v4l2_sliced_vbi_format {
{
__u16 service_set; __u16 service_set;
/* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field
service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field
@@ -1301,8 +1267,7 @@ struct v4l2_sliced_vbi_format
#define V4L2_SLICED_VBI_525 (V4L2_SLICED_CAPTION_525) #define V4L2_SLICED_VBI_525 (V4L2_SLICED_CAPTION_525)
#define V4L2_SLICED_VBI_625 (V4L2_SLICED_TELETEXT_B | V4L2_SLICED_VPS | V4L2_SLICED_WSS_625) #define V4L2_SLICED_VBI_625 (V4L2_SLICED_TELETEXT_B | V4L2_SLICED_VPS | V4L2_SLICED_WSS_625)
struct v4l2_sliced_vbi_cap struct v4l2_sliced_vbi_cap {
{
__u16 service_set; __u16 service_set;
/* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field
service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field
@@ -1313,8 +1278,7 @@ struct v4l2_sliced_vbi_cap
__u32 reserved[3]; /* must be 0 */ __u32 reserved[3]; /* must be 0 */
}; };
struct v4l2_sliced_vbi_data struct v4l2_sliced_vbi_data {
{
__u32 id; __u32 id;
__u32 field; /* 0: first field, 1: second field */ __u32 field; /* 0: first field, 1: second field */
__u32 line; /* 1-23 */ __u32 line; /* 1-23 */
@@ -1328,27 +1292,23 @@ struct v4l2_sliced_vbi_data
/* Stream data format /* Stream data format
*/ */
struct v4l2_format struct v4l2_format {
{
enum v4l2_buf_type type; enum v4l2_buf_type type;
union union {
{ struct v4l2_pix_format pix; /* V4L2_BUF_TYPE_VIDEO_CAPTURE */
struct v4l2_pix_format pix; // V4L2_BUF_TYPE_VIDEO_CAPTURE struct v4l2_window win; /* V4L2_BUF_TYPE_VIDEO_OVERLAY */
struct v4l2_window win; // V4L2_BUF_TYPE_VIDEO_OVERLAY struct v4l2_vbi_format vbi; /* V4L2_BUF_TYPE_VBI_CAPTURE */
struct v4l2_vbi_format vbi; // V4L2_BUF_TYPE_VBI_CAPTURE struct v4l2_sliced_vbi_format sliced; /* V4L2_BUF_TYPE_SLICED_VBI_CAPTURE */
struct v4l2_sliced_vbi_format sliced; // V4L2_BUF_TYPE_SLICED_VBI_CAPTURE __u8 raw_data[200]; /* user-defined */
__u8 raw_data[200]; // user-defined
} fmt; } fmt;
}; };
/* Stream type-dependent parameters /* Stream type-dependent parameters
*/ */
struct v4l2_streamparm struct v4l2_streamparm {
{
enum v4l2_buf_type type; enum v4l2_buf_type type;
union union {
{
struct v4l2_captureparm capture; struct v4l2_captureparm capture;
struct v4l2_outputparm output; struct v4l2_outputparm output;
__u8 raw_data[200]; /* user-defined */ __u8 raw_data[200]; /* user-defined */
@@ -1469,9 +1429,3 @@ struct v4l2_chip_ident {
#define BASE_VIDIOC_PRIVATE 192 /* 192-255 are private */ #define BASE_VIDIOC_PRIVATE 192 /* 192-255 are private */
#endif /* __LINUX_VIDEODEV2_H */ #endif /* __LINUX_VIDEODEV2_H */
/*
* Local variables:
* c-basic-offset: 8
* End:
*/