summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain>2009-03-16 11:27:29 +0100
committerhans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain>2009-03-16 11:27:29 +0100
commit6880d6f23b93031ceab3ce0952359c77d124a89f (patch)
tree55ad8db9700023b9782d266ae7d395a6126fa1f5
parentf689c3bd615386cf4c5238d1b4de1aaf4b58ce69 (diff)
downloadmediapointer-dvb-s2-6880d6f23b93031ceab3ce0952359c77d124a89f.tar.gz
mediapointer-dvb-s2-6880d6f23b93031ceab3ce0952359c77d124a89f.tar.bz2
libv4l: drop bad sn9c20x jpeg frames
From: Brian Johnson <brijohn@gmail.com> sn9c20x cams have occasional bad jpeg frames, drop these to avoid the flickering effect they cause, by: Brian Johnson <brijohn@gmail.com> Priority: normal Signed-off-by: Brian Johnson <brijohn@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
-rw-r--r--v4l2-apps/libv4l/ChangeLog5
-rw-r--r--v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h1
-rw-r--r--v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c5
3 files changed, 10 insertions, 1 deletions
diff --git a/v4l2-apps/libv4l/ChangeLog b/v4l2-apps/libv4l/ChangeLog
index 11f6ca2fd..21d60dabb 100644
--- a/v4l2-apps/libv4l/ChangeLog
+++ b/v4l2-apps/libv4l/ChangeLog
@@ -1,3 +1,8 @@
+libv4l-0.5.10
+-------------
+* sn9c20x cams have occasional bad jpeg frames, drop these to avoid the
+ flickering effect they cause, by: Brian Johnson <brijohn@gmail.com>
+
libv4l-0.5.9
------------
* Add support for MR97310A decompression by Kyle Guinn <elyk03@gmail.com>
diff --git a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h
index 5ce7bde3b..4e6130d3c 100644
--- a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h
+++ b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h
@@ -90,6 +90,7 @@
#define V4LCONVERT_ROTATE_90 0x01
#define V4LCONVERT_ROTATE_180 0x02
#define V4LCONVERT_IS_UVC 0x04
+#define V4LCONVERT_IS_SN9C20X 0x08
/* Pixformat flags */
#define V4LCONVERT_COMPRESSED 0x01
diff --git a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c
index 1204e8ef2..5467c695a 100644
--- a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c
+++ b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c
@@ -166,6 +166,8 @@ struct v4lconvert_data *v4lconvert_create(int fd)
if (syscall(SYS_ioctl, fd, VIDIOC_QUERYCAP, &cap) == 0) {
if (!strcmp((char *)cap.driver, "uvcvideo"))
data->flags |= V4LCONVERT_IS_UVC;
+ else if (!strcmp((char *)cap.driver, "sn9c20x"))
+ data->flags |= V4LCONVERT_IS_SN9C20X;
}
return data;
@@ -541,7 +543,8 @@ static int v4lconvert_convert_pixfmt(struct v4lconvert_data *data,
are best thrown away to avoid flashes in the video stream. Tell
the upper layer this is an intermediate fault and it should try
again with a new buffer by setting errno to EAGAIN */
- if (src_pix_fmt == V4L2_PIX_FMT_PJPG) {
+ if (src_pix_fmt == V4L2_PIX_FMT_PJPG ||
+ data->flags & V4LCONVERT_IS_SN9C20X) {
V4LCONVERT_ERR("decompressing JPEG: %s",
tinyjpeg_get_errorstring(data->jdec));
errno = EAGAIN;