All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linos <info@linos.es>
To: video4linux-list@redhat.com
Subject: Re: bttv 2.6.26 problem
Date: Mon, 20 Oct 2008 19:01:00 +0200	[thread overview]
Message-ID: <48FCB94C.90505@linos.es> (raw)
In-Reply-To: <20081020161436.GB1298@daniel.bse>

Daniel Glöckner escribió:
> 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.height=352;
>   vmm.width=288;
>   vmm.format=VIDEO_PALETTE_YUV420P;
>   vmm.frame=0;
>   ioctl(open("/dev/video",O_RDWR),VIDIOCMCAPTURE,&vmm);
> }
> --------------
> 
>   Daniel
> 

Hi Daniel,
	thanks for help, i have tried the code you have posted, but it does not works 
or i have not understand you correctly, i have compiled the code, i have tried 
directly with /dev/video (like your example) or changing it with /dev/video0 
(the video dev i am using), after compile it and execute it i launch the helix 
producer but still the same error.

webcontrol:~# gcc -o test_video test_video.c
test_video.c: In function 'main':
test_video.c:7: warning: return type of 'main' is not 'int'
webcontrol:~# ./test_video
webcontrol:~# 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 455505251ms for last 61 times

do i am doing anything wrong?

Regards,
Miguel Angel.

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

  reply	other threads:[~2008-10-20 17:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-20 13:56 bttv 2.6.26 problem Linos
2008-10-20 16:14 ` Daniel Glöckner
2008-10-20 17:01   ` Linos [this message]
2008-10-20 17:23     ` David Ellingsworth
2008-10-20 18:25       ` Daniel Glöckner
2008-10-20 18:42         ` 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=48FCB94C.90505@linos.es \
    --to=info@linos.es \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.