Dr Andrew Scott G7VAV

My photo
 
June 2025
Mo Tu We Th Fr Sa Su
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 1 2 3 4 5 6


v4l2-subdev.h
001: /*
002:  * V4L2 subdev userspace API
003:  *
004:  * Copyright (C) 2010 Nokia Corporation
005:  *
006:  * Contacts: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
007:  *           Sakari Ailus <sakari.ailus@iki.fi>
008:  *
009:  * This program is free software; you can redistribute it and/or modify
010:  * it under the terms of the GNU General Public License version 2 as
011:  * published by the Free Software Foundation.
012:  *
013:  * This program is distributed in the hope that it will be useful,
014:  * but WITHOUT ANY WARRANTY; without even the implied warranty of
015:  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
016:  * GNU General Public License for more details.
017:  *
018:  * You should have received a copy of the GNU General Public License
019:  * along with this program; if not, write to the Free Software
020:  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
021:  */
022: 
023: #ifndef __LINUX_V4L2_SUBDEV_H
024: #define __LINUX_V4L2_SUBDEV_H
025: 
026: #include <linux/ioctl.h>
027: #include <linux/types.h>
028: #include <linux/v4l2-mediabus.h>
029: 
030: /**
031:  * enum v4l2_subdev_format_whence - Media bus format type
032:  * @V4L2_SUBDEV_FORMAT_TRY: try format, for negotiation only
033:  * @V4L2_SUBDEV_FORMAT_ACTIVE: active format, applied to the device
034:  */
035: enum v4l2_subdev_format_whence {
036:         V4L2_SUBDEV_FORMAT_TRY = 0,
037:         V4L2_SUBDEV_FORMAT_ACTIVE = 1,
038: };
039: 
040: /**
041:  * struct v4l2_subdev_format - Pad-level media bus format
042:  * @which: format type (from enum v4l2_subdev_format_whence)
043:  * @pad: pad number, as reported by the media API
044:  * @format: media bus format (format code and frame size)
045:  */
046: struct v4l2_subdev_format {
047:         __u32 which;
048:         __u32 pad;
049:         struct v4l2_mbus_framefmt format;
050:         __u32 reserved[8];
051: };
052: 
053: /**
054:  * struct v4l2_subdev_crop - Pad-level crop settings
055:  * @which: format type (from enum v4l2_subdev_format_whence)
056:  * @pad: pad number, as reported by the media API
057:  * @rect: pad crop rectangle boundaries
058:  */
059: struct v4l2_subdev_crop {
060:         __u32 which;
061:         __u32 pad;
062:         struct v4l2_rect rect;
063:         __u32 reserved[8];
064: };
065: 
066: /**
067:  * struct v4l2_subdev_mbus_code_enum - Media bus format enumeration
068:  * @pad: pad number, as reported by the media API
069:  * @index: format index during enumeration
070:  * @code: format code (from enum v4l2_mbus_pixelcode)
071:  */
072: struct v4l2_subdev_mbus_code_enum {
073:         __u32 pad;
074:         __u32 index;
075:         __u32 code;
076:         __u32 reserved[9];
077: };
078: 
079: /**
080:  * struct v4l2_subdev_frame_size_enum - Media bus format enumeration
081:  * @pad: pad number, as reported by the media API
082:  * @index: format index during enumeration
083:  * @code: format code (from enum v4l2_mbus_pixelcode)
084:  */
085: struct v4l2_subdev_frame_size_enum {
086:         __u32 index;
087:         __u32 pad;
088:         __u32 code;
089:         __u32 min_width;
090:         __u32 max_width;
091:         __u32 min_height;
092:         __u32 max_height;
093:         __u32 reserved[9];
094: };
095: 
096: /**
097:  * struct v4l2_subdev_frame_interval - Pad-level frame rate
098:  * @pad: pad number, as reported by the media API
099:  * @interval: frame interval in seconds
100:  */
101: struct v4l2_subdev_frame_interval {
102:         __u32 pad;
103:         struct v4l2_fract interval;
104:         __u32 reserved[9];
105: };
106: 
107: /**
108:  * struct v4l2_subdev_frame_interval_enum - Frame interval enumeration
109:  * @pad: pad number, as reported by the media API
110:  * @index: frame interval index during enumeration
111:  * @code: format code (from enum v4l2_mbus_pixelcode)
112:  * @width: frame width in pixels
113:  * @height: frame height in pixels
114:  * @interval: frame interval in seconds
115:  */
116: struct v4l2_subdev_frame_interval_enum {
117:         __u32 index;
118:         __u32 pad;
119:         __u32 code;
120:         __u32 width;
121:         __u32 height;
122:         struct v4l2_fract interval;
123:         __u32 reserved[9];
124: };
125: 
126: #define VIDIOC_SUBDEV_G_FMT     _IOWR('V',  4, struct v4l2_subdev_format)
127: #define VIDIOC_SUBDEV_S_FMT     _IOWR('V',  5, struct v4l2_subdev_format)
128: #define VIDIOC_SUBDEV_G_FRAME_INTERVAL \
129:                         _IOWR('V', 21, struct v4l2_subdev_frame_interval)
130: #define VIDIOC_SUBDEV_S_FRAME_INTERVAL \
131:                         _IOWR('V', 22, struct v4l2_subdev_frame_interval)
132: #define VIDIOC_SUBDEV_ENUM_MBUS_CODE \
133:                         _IOWR('V',  2, struct v4l2_subdev_mbus_code_enum)
134: #define VIDIOC_SUBDEV_ENUM_FRAME_SIZE \
135:                         _IOWR('V', 74, struct v4l2_subdev_frame_size_enum)
136: #define VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL \
137:                         _IOWR('V', 75, struct v4l2_subdev_frame_interval_enum)
138: #define VIDIOC_SUBDEV_G_CROP    _IOWR('V', 59, struct v4l2_subdev_crop)
139: #define VIDIOC_SUBDEV_S_CROP    _IOWR('V', 60, struct v4l2_subdev_crop)
140: 
141: #endif
142: 


for client (none)
© Andrew Scott 2006 - 2025,
All Rights Reserved
http://www.andrew-scott.uk/
Andrew Scott
http://www.andrew-scott.co.uk/