From: Hans de Goede <j.w.r.degoede@hhs.nl>
To: Andy Walls <awalls@radix.net>
Cc: Simon Farnsworth <simon.farnsworth@onelan.com>,
Linux Media Mailing List <linux-media@vger.kernel.org>,
Hans Verkuil <hverkuil@xs4all.nl>
Subject: Re: libv4l2 and the Hauppauge HVR1600 (cx18 driver) not working well together
Date: Fri, 04 Sep 2009 08:22:37 +0200 [thread overview]
Message-ID: <4AA0B22D.3080703@hhs.nl> (raw)
In-Reply-To: <1252034082.7203.15.camel@palomino.walls.org>
Hi,
On 09/04/2009 05:14 AM, Andy Walls wrote:
> The V4L2 spec for the read() call seems unlcear to me:
>
> "Return Value
> On success, the number of bytes read is returned. It is not an error if
> this number is smaller than the number of bytes requested, or the amount
> of data required for one frame. This may happen for example because
> read() was interrupted by a signal. On error, -1 is returned, and the
> errno variable is set appropriately. In this case the next read will
> start at the beginning of a new frame."
>
> To me, the spec only says the remainder of a frame is thrown away when
> read() exits with an error.
>
It does seem to say that yes, as said in a previous mail of me, this part
of the spec needs some fixing. It seems to try and describe the queuing
that happens inside the driver in too much detail and leaves out other
much me important bits about how read() on video devices behaves.
>
> BTW, should select() return "data available", if less than one whole
> frame is available? It can happen if the buffers we give to the CX23418
> firmware don't exactly match the YUV framesize. The V4l2 spec for the
> read() call seems to imply that read() should block (or return with
> EAGAIN) until at least one whole frame is available. Is that correct?
I agree that waiting until at least one whole frame is available. Is the
correct behaviour.
Regards,
Hans
next prev parent reply other threads:[~2009-09-04 6:19 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
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 [this message]
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=4AA0B22D.3080703@hhs.nl \
--to=j.w.r.degoede@hhs.nl \
--cc=awalls@radix.net \
--cc=hverkuil@xs4all.nl \
--cc=linux-media@vger.kernel.org \
--cc=simon.farnsworth@onelan.com \
/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