From: Simon Farnsworth <simon.farnsworth@onelan.com>
To: Hans de Goede <j.w.r.degoede@hhs.nl>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: libv4l2 and the Hauppauge HVR1600 (cx18 driver) not working well together
Date: Thu, 03 Sep 2009 11:37:19 +0100 [thread overview]
Message-ID: <4A9F9C5F.9000007@onelan.com> (raw)
In-Reply-To: <4A9F98BA.3010001@onelan.com>
Simon Farnsworth wrote:
> Hans de Goede wrote:
>> Ok,
>>
>> That was even easier then I thought it would be. Attached is a
>> patch (against libv4l-0.6.1), which implements 1) and 3) from
>> above.
>>
> I applied it to a clone of your HG repository, and had to make a
> minor change to get it to compile. I've attached the updated patch.
>
> It looks like the read() from the card isn't reading entire frames
> ata a time - I'm using a piece of test gear that I have to return in
> a couple of hours to send colourbars to it, and I'm seeing bad
> colour, and the picture moving across the screen. I'll try and chase
> this, see whether there's something obviously wrong.
>
There is indeed something obviously wrong; at line 315 of libv4l2.c, we
expand the buffer we read into, then ask for that many bytes.
diff -r c51a90c0f62f v4l2-apps/libv4l/libv4l2/libv4l2.c
--- a/v4l2-apps/libv4l/libv4l2/libv4l2.c Tue Sep 01 10:03:27 2009 +0200
+++ b/v4l2-apps/libv4l/libv4l2/libv4l2.c Thu Sep 03 11:32:40 2009 +0100
@@ -326,7 +326,7 @@
}
do {
- result = SYS_READ(devices[index].fd, devices[index].readbuf, buf_size);
+ result = SYS_READ(devices[index].fd, devices[index].readbuf, devices[index].dest_fmt.fmt.pix.sizeimage);
if (result <= 0) {
if (result && errno != EAGAIN) {
int saved_err = errno;
fixes it for me.
I appear to lose colour after a few seconds of capture, which I shall chase
further.
--
Simon Farnsworth
next prev parent reply other threads:[~2009-09-03 10:37 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-02 16:32 libv4l2 and the Hauppauge HVR1600 (cx18 driver) not working well together Simon Farnsworth
2009-09-02 17:44 ` Hans de Goede
2009-09-03 9:17 ` Simon Farnsworth
2009-09-03 9:28 ` Hans de Goede
2009-09-03 9:44 ` Hans de Goede
2009-09-03 10:21 ` Simon Farnsworth
2009-09-03 10:37 ` Simon Farnsworth [this message]
2009-09-03 10:56 ` Simon Farnsworth
2009-09-03 11:16 ` Andy Walls
2009-09-03 11:20 ` Hans de Goede
2009-09-03 11:23 ` Andy Walls
2009-09-04 3:14 ` Andy Walls
2009-09-04 6:22 ` Hans de Goede
2009-09-03 11:13 ` Hans de Goede
2009-09-03 11:45 ` Hans de Goede
2009-09-03 11:06 ` Andy Walls
2009-09-03 11:23 ` Simon Farnsworth
2009-09-03 11:29 ` Andy Walls
2009-09-03 11:44 ` Simon Farnsworth
2009-09-03 23:34 ` Andy Walls
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A9F9C5F.9000007@onelan.com \
--to=simon.farnsworth@onelan.com \
--cc=j.w.r.degoede@hhs.nl \
--cc=linux-media@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox