From a63e58c8101caacfc5f82b66de79e794adf0ca3a Mon Sep 17 00:00:00 2001 From: "hans@localhost.localdomain" Date: Thu, 7 Aug 2008 19:34:10 +0200 Subject: libv4l: add support for fixing upside down images to libv4lconvert From: Hans de Goede Add support to libv4lconvert to flipping the image for upside down mounted sensors, libv4lconvert will do this automatically if the webcam sets a flag in its query_fmt reply indicating that this is necessary, this fixes the upside down image on Philips SPC200NC images Priority: normal Signed-off-by: Hans de Goede --- v4l2-apps/lib/libv4l/include/libv4lconvert.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'v4l2-apps/lib/libv4l/include') diff --git a/v4l2-apps/lib/libv4l/include/libv4lconvert.h b/v4l2-apps/lib/libv4l/include/libv4lconvert.h index d8446dac8..f102858a0 100644 --- a/v4l2-apps/lib/libv4l/include/libv4lconvert.h +++ b/v4l2-apps/lib/libv4l/include/libv4lconvert.h @@ -50,6 +50,11 @@ int v4lconvert_try_format(struct v4lconvert_data *data, the end of the list */ int v4lconvert_enum_fmt(struct v4lconvert_data *data, struct v4l2_fmtdesc *fmt); +/* Is conversion necessary or can the app use the data directly? */ +int v4lconvert_needs_conversion(struct v4lconvert_data *data, + const struct v4l2_format *src_fmt, /* in */ + const struct v4l2_format *dest_fmt); /* in */ + /* return value of -1 on error, otherwise the amount of bytes written to dest */ int v4lconvert_convert(struct v4lconvert_data *data, -- cgit v1.2.3