[media] v4l: v4l2_subdev userspace crop API
This patch adds the VIDIOC_SUBDEV_S_CROP and G_CROP ioctls to the userland API. CROPCAP is not implemented because it's redundant. Signed-off-by: Antti Koskipaa <akoskipa@gmail.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:

committed by
Mauro Carvalho Chehab

parent
35c3017a29
commit
f6a5cb1be8
@@ -50,6 +50,19 @@ struct v4l2_subdev_format {
|
||||
__u32 reserved[8];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct v4l2_subdev_crop - Pad-level crop settings
|
||||
* @which: format type (from enum v4l2_subdev_format_whence)
|
||||
* @pad: pad number, as reported by the media API
|
||||
* @rect: pad crop rectangle boundaries
|
||||
*/
|
||||
struct v4l2_subdev_crop {
|
||||
__u32 which;
|
||||
__u32 pad;
|
||||
struct v4l2_rect rect;
|
||||
__u32 reserved[8];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct v4l2_subdev_mbus_code_enum - Media bus format enumeration
|
||||
* @pad: pad number, as reported by the media API
|
||||
@@ -122,5 +135,7 @@ struct v4l2_subdev_frame_interval_enum {
|
||||
_IOWR('V', 74, struct v4l2_subdev_frame_size_enum)
|
||||
#define VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL \
|
||||
_IOWR('V', 75, struct v4l2_subdev_frame_interval_enum)
|
||||
#define VIDIOC_SUBDEV_G_CROP _IOWR('V', 59, struct v4l2_subdev_crop)
|
||||
#define VIDIOC_SUBDEV_S_CROP _IOWR('V', 60, struct v4l2_subdev_crop)
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user