+libv4l-0.5.11
+-------------
+* Add dependency generation to libv4l by: Gilles Gigan <gilles.gigan@gmail.com>
+* Add support to use orientation from VIDIOC_ENUMINPUT by:
+ Adam Baker <linux@baker-net.org.uk>
+
libv4l-0.5.10
-------------
* sn9c20x cams have occasional bad jpeg frames, drop these to avoid the
#define MIN(a,b) (((a)<(b))?(a):(b))
#define ARRAY_SIZE(x) ((int)sizeof(x)/(int)sizeof((x)[0]))
+/* Workaround this potentially being missing from videodev2.h */
+#ifndef V4L2_IN_ST_VFLIP
+#define V4L2_IN_ST_VFLIP 0x00000020 /* Output is flipped vertically */
+#endif
+
/* Note for proper functioning of v4lconvert_enum_fmt the first entries in
supported_src_pixfmts must match with the entries in supported_dst_pixfmts */
#define SUPPORTED_DST_PIXFMTS \
int i, j;
struct v4lconvert_data *data = calloc(1, sizeof(struct v4lconvert_data));
struct v4l2_capability cap;
+ struct v4l2_input input;
if (!data)
return NULL;
/* Check if this cam has any special flags */
data->flags = v4lconvert_get_flags(data->fd);
+ if ((syscall(SYS_ioctl, fd, VIDIOC_G_INPUT, &input.index) == 0) &&
+ (syscall(SYS_ioctl, fd, VIDIOC_ENUMINPUT, &input) == 0)) {
+ /* Don't yet support independent HFLIP and VFLIP so getting
+ * image the right way up is highest priority. */
+ if (input.status & V4L2_IN_ST_VFLIP)
+ data->flags |= V4LCONVERT_ROTATE_180;
+ }
if (syscall(SYS_ioctl, fd, VIDIOC_QUERYCAP, &cap) == 0) {
if (!strcmp((char *)cap.driver, "uvcvideo"))
data->flags |= V4LCONVERT_IS_UVC;