* bttv 2.6.26 problem @ 2008-10-20 13:56 Linos 2008-10-20 16:14 ` Daniel Glöckner 0 siblings, 1 reply; 6+ messages in thread From: Linos @ 2008-10-20 13:56 UTC (permalink / raw) To: video4linux-list 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? Regards, Miguel Angel. -- video4linux-list mailing list Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe https://www.redhat.com/mailman/listinfo/video4linux-list ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: bttv 2.6.26 problem 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 0 siblings, 1 reply; 6+ messages in thread From: Daniel Glöckner @ 2008-10-20 16:14 UTC (permalink / raw) To: Linos; +Cc: video4linux-list 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 -- video4linux-list mailing list Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe https://www.redhat.com/mailman/listinfo/video4linux-list ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: bttv 2.6.26 problem 2008-10-20 16:14 ` Daniel Glöckner @ 2008-10-20 17:01 ` Linos 2008-10-20 17:23 ` David Ellingsworth 0 siblings, 1 reply; 6+ messages in thread From: Linos @ 2008-10-20 17:01 UTC (permalink / raw) To: video4linux-list 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: bttv 2.6.26 problem 2008-10-20 17:01 ` Linos @ 2008-10-20 17:23 ` David Ellingsworth 2008-10-20 18:25 ` Daniel Glöckner 0 siblings, 1 reply; 6+ messages in thread From: David Ellingsworth @ 2008-10-20 17:23 UTC (permalink / raw) To: Linos; +Cc: video4linux-list On Mon, Oct 20, 2008 at 1:01 PM, Linos <info@linos.es> wrote: > 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. > Miguel, I believe the changes Daniel suggested would have to be applied to the source of helix producer in order to work. None the less, the proper fix would be to fix the associated bug in the driver which is the real cause of the problem. Regards, David Ellingsworth -- video4linux-list mailing list Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe https://www.redhat.com/mailman/listinfo/video4linux-list ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: bttv 2.6.26 problem 2008-10-20 17:23 ` David Ellingsworth @ 2008-10-20 18:25 ` Daniel Glöckner 2008-10-20 18:42 ` Linos 0 siblings, 1 reply; 6+ messages in thread From: Daniel Glöckner @ 2008-10-20 18:25 UTC (permalink / raw) To: David Ellingsworth; +Cc: video4linux-list On Mon, Oct 20, 2008 at 01:23:25PM -0400, David Ellingsworth wrote: > On Mon, Oct 20, 2008 at 1:01 PM, Linos <info@linos.es> wrote: > > Daniel Glöckner escribió: > >> vmm.height=352; > >> vmm.width=288; D'oh! I swapped width and height.. > I believe the changes Daniel suggested would have to be applied to the > source of helix producer in order to work. I didn't test helix producer, but with my simple test app and correct width and height it works. > None the less, the proper > fix would be to fix the associated bug in the driver which is the real > cause of the problem. Agreed Daniel -- video4linux-list mailing list Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe https://www.redhat.com/mailman/listinfo/video4linux-list ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: bttv 2.6.26 problem 2008-10-20 18:25 ` Daniel Glöckner @ 2008-10-20 18:42 ` Linos 0 siblings, 0 replies; 6+ messages in thread From: Linos @ 2008-10-20 18:42 UTC (permalink / raw) To: video4linux-list Daniel Glöckner escribió: > On Mon, Oct 20, 2008 at 01:23:25PM -0400, David Ellingsworth wrote: >> On Mon, Oct 20, 2008 at 1:01 PM, Linos <info@linos.es> wrote: >>> Daniel Glöckner escribió: >>>> vmm.height=352; >>>> vmm.width=288; > > D'oh! > I swapped width and height.. > >> I believe the changes Daniel suggested would have to be applied to the >> source of helix producer in order to work. > > I didn't test helix producer, but with my simple test app and correct > width and height it works. > >> None the less, the proper >> fix would be to fix the associated bug in the driver which is the real >> cause of the problem. > > Agreed > > Daniel > Yes now works, thanks Daniel, i should have try to read the source anyway, the name can not be clearer hehehe. Regards, Miguel Angel. -- video4linux-list mailing list Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe https://www.redhat.com/mailman/listinfo/video4linux-list ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-10-20 18:43 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 2008-10-20 17:23 ` David Ellingsworth 2008-10-20 18:25 ` Daniel Glöckner 2008-10-20 18:42 ` Linos
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox