From: Hans de Goede <j.w.r.degoede@hhs.nl>
To: video4linux-list@redhat.com
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: ibv4l2: error requesting 4 buffers: Device or resource busy
Date: Sat, 20 Feb 2010 19:54:03 +0100 [thread overview]
Message-ID: <4B802FCB.70003@hhs.nl> (raw)
In-Reply-To: <4B7FF69D.1080608@gmail.com>
On 02/20/2010 03:50 PM, Guilherme wrote:
> Guilherme wrote:
> Hi all!
>
> As I tried to migrate an applications that I had it working in another
> computer, I struggled to have it working here.
> It is a video capture application.
> The following error occurred:
>
> libv4l2: error requesting 4 buffers: Device or resource busy
> read error 16, Device or resource busy
> Press [Enter] to close the terminal ...
>
> The code is attached to this e-mail, plz can I get some help from here.
> Thanks a lot
>
> P.S. My webcam works just fine on amsn.. so I guess its not a hardware
> dependant issue... Looking online for help, people say that the drive
> might be in use something related to this that is not my case.
>
Hi,
First of all, this list is no longer in active use, linux-media (in the CC now)
is the correct list to use.
The problem you are seeing is caused by the app first doing a select() on the fd
before it does anything else which signals the driver what kind of IO the app
(mmap or read) is going to use. At this point the driver has to decide
which kind of IO it will use, as it needs to setup its internal buffers to
handle the select. when this happens, it assumes the app will use read() IO.
Then it does a read() call, which libv4l tries to emulate using mmap (for drivers
which don't implement read() themselves, and because using mmap is faster when
libv4l needs to do conversion). This fails, as libv4l cannot allocate the buffers
as the driver has already allocated buffers internally for read() based IO.
The current libv4l releasE: 0.6.4 has a fix for this.
Regards,
Hans
prev parent reply other threads:[~2010-02-20 18:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4B7FF5FC.1090403@gmail.com>
2010-02-20 14:50 ` ibv4l2: error requesting 4 buffers: Device or resource busy Guilherme
2010-02-20 18:54 ` Hans de Goede [this message]
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=4B802FCB.70003@hhs.nl \
--to=j.w.r.degoede@hhs.nl \
--cc=linux-media@vger.kernel.org \
--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