From: Hans de Goede <j.w.r.degoede@hhs.nl>
To: Lamarque Vieira Souza <lamarque@gmail.com>
Cc: video4linux-list@redhat.com
Subject: Re: Skype and libv4
Date: Wed, 25 Mar 2009 10:03:18 +0100 [thread overview]
Message-ID: <49C9F356.2010801@hhs.nl> (raw)
In-Reply-To: <200903241909.59494.lamarque@gmail.com>
On 03/24/2009 11:09 PM, Lamarque Vieira Souza wrote:
> Hi,
>
> Applying this patch to libv4l makes Skype works with my webcam without
> changing the driver. Do you think the patch is ok?
>
No it is not ok, luckily I've also read the rest of this thread, where you write:
> I have found the problem. The vidioc_try_fmt_vid_cap function in the driver
> return -EINVAL if the fmt.pix.field is different from V4L2_FIELD_ANY or
> V4L2_FIELD_NONE. Skype seems to set this field as V4L2_FIELD_INTERLACED.
> Because of that libv4l assumes that all destination formats (YUV420 included)
> are invalid. Commenting this part of the driver makes Skype work and it is
> showing pictures. YES!!! :-)
>
What you are seeing is a bug in the driver. VIDIOC_TRY_FMT should *never*
return -EINVAL, except, and that is the only exception when it does not
support the passed in type, so v4l2_format.type is something which is not
supported, note that when vidioc_try_fmt_vid_cap is called the type is
already checked (hence the _vid_ in the function name).
When any member of fmt.pix. is not supported it should set it to something
which it does support (and the app should check what it got) so the proper
fix is to always set fmt.pix.field to V4L2_FIELD_NONE in the driver
(V4L2_FIELD_ANY is an input only value, a format returned by a driver
should never have V4L2_FIELD_ANY).
Regards,
Hans
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
next prev parent reply other threads:[~2009-03-25 9:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-23 20:08 Skype and libv4l Lamarque Vieira Souza
2009-03-24 9:59 ` Hans de Goede
2009-03-24 16:11 ` Lamarque Vieira Souza
2009-03-24 18:42 ` Lamarque Vieira Souza
2009-03-24 18:58 ` Markus Rechberger
2009-03-24 18:59 ` Markus Rechberger
2009-03-24 19:05 ` Lamarque Vieira Souza
2009-03-24 20:51 ` Theodoros V. Kalamatianos
2009-03-24 21:10 ` Lamarque Vieira Souza
2009-03-24 22:09 ` Skype and libv4 Lamarque Vieira Souza
2009-03-24 22:29 ` Lamarque Vieira Souza
2009-03-25 9:03 ` Hans de Goede [this message]
2009-03-25 14:17 ` Lamarque Vieira Souza
[not found] ` <49CB4D4E.6030901@redhat.com>
2009-03-26 13:36 ` Lamarque Vieira Souza
[not found] <20090326160017.048668E03F1@hormel.redhat.com>
2009-03-26 16:42 ` dean
2009-03-27 1:31 ` Lamarque Vieira Souza
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=49C9F356.2010801@hhs.nl \
--to=j.w.r.degoede@hhs.nl \
--cc=lamarque@gmail.com \
--cc=video4linux-list@redhat.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