From: Linos <info@linos.es>
To: linux-media@vger.kernel.org
Subject: bttv problem
Date: Tue, 07 Jul 2009 01:15:57 +0200 [thread overview]
Message-ID: <4A5285AD.700@linos.es> (raw)
Hello all,
some time ago (2008-10-20) i sent a post to the list
video4linux-list@redhat.com explaining a problem that still seems to be in the
last kernel, Daniel Glöckner helped me with a workaround, i will paste here the
problem and the fix from Daniel.
------------------------------------------------------------------------------------------------
Original mail
Hello, i have upgraded a debian machine from kernel 2.6.24 to 2.6.26 and now i
have this error when try to launch helix producer on the capture input.
producer -vc /dev/video0 -ad 128k -vp "0" -dt -vm sharp -o /tmp/test.rm
Helix DNA(TM) Producer 11.0 Build number: 11.0.0.2013
Info: Starting encode
Error: Could not set image size to 352x288 for color format I420 (15)
(VIDIOCMCAPTURE: buffer 0)
Warning: Capture Buffer is empty at 445090329ms for last 61 times
Warning: Capture Buffer is empty at 445091549ms for last 61 times
exactly the same producer version with the same command line works ok in 2.6.24,
previously i have saw this error when i was trying to use from 2 different
capture programs the same video input but this is not the case, it is the only
program using /dev/video0, what can be happening?
------------------------------------------------------------------------------------------------
Daniel's reply
On Mon, Oct 20, 2008 at 03:56:01PM +0200, Linos wrote:
> Error: Could not set image size to 352x288 for color format I420 (15)
> (VIDIOCMCAPTURE: buffer 0)
The problem is that the v4l1-compat code for VIDIOCMCAPTURE calls
VIDIOC_S_FMT. At the beginning of bttv_s_fmt_vid_cap the call to
bttv_switch_type fails because the buffers have already been mmap'ed
by the application. I'd say this is a bug in bttv.
In which case does the videobuf_queue_is_busy test prevent bad things
from happening?
A workaround is to set the resolution and image format before the
buffers are mapped, f.ex. with this small program:
--------------
#include <sys/ioctl.h>
#include <fcntl.h>
#include <unistd.h>
#include <linux/videodev.h>
void main()
{
struct video_mmap vmm;
vmm.width=352;
vmm.height=288;
vmm.format=VIDEO_PALETTE_YUV420P;
vmm.frame=0;
ioctl(open("/dev/video",O_RDWR),VIDIOCMCAPTURE,&vmm);
}
--------------
Daniel
------------------------------------------------------------------------------------------------
I have upgraded the same machine now to 2.6.30 and still have the same problem
and i have to use the code Daniel sent the list to make it work, i am missing
something or still have not been fixed in mainstream kernel? Thanks.
Regards,
Miguel Angel.
next reply other threads:[~2009-07-06 23:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-06 23:15 Linos [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-12-19 12:54 bttv problem Linos
2009-06-17 8:49 Linos
2009-07-05 22:29 ` Linos
2009-07-06 1:14 ` hermann pitton
2009-07-06 23:03 ` Linos
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=4A5285AD.700@linos.es \
--to=info@linos.es \
--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