Em Tuesday 15 January 2008 20:12:16 Laurent Pinchart escreveu:
> On Tuesday 15 January 2008, Herton Ronaldo Krzesinski wrote:
> > Em Tuesday 15 January 2008 18:56:35 Laurent Pinchart escreveu:
> > > Hi Herton,
> > >
> > > On Tuesday 15 January 2008, Herton Ronaldo Krzesinski wrote:
> > > > Hi Laurent, thanks for the commit and advice. We played with the webcam
> > > > again (sorry for delay) and we found out that it isn't really reporting
> > > > the FID bit, but only end of frame marker (EOF). This is strange
> > > > indeed, as from what I understand from UVC spec FID is required while
> > > > EOF is optional.
> > >
> > > The bmFramingInfo field in the probe&commit control can be used by the
> > > device to report if it supports FID and/or EOF. However, for known
> > > frame-based formats, the field must be ignored. Just out of curiosity,
> > > could you print the field's value when reading the probe and commit
> > > controls ?
> >
> > It's always 0x00, falls at else in size check inside uvc_get_video_ctrl:
> > uvc_get_video_ctrl: size != 34, bmFramingInfo = 0x00
> >
> > > > I reworked the quirk that Claudio made against revision 166 from svn,
> > > > but now using the EOF to sync the stream (the previous quirk was ok,
> > > > but on laggy communication, like using to transmit a video stream over
> > > > internet etc., the frames would overlap etc. resulting in many display
> > > > issues):
> > >
> > > Your patch could drop the last payload of each frame. Could you please
> > > try the attached patch ?
> >
> > It works, but gives a different behaviour: for example, I simulate lag
> > in luvcview placing a sleep(1) at the start of uvcGrab function, with
> > this patch it captures only some frames at start and stops, with the
> > patch I posted I receive continous snapshots.
> 
> I'm not sure to understand. Could you please elaborate ?

If I patch luvcview like this:

--- v4l2uvc.c.orig      2008-01-15 20:19:57.000000000 -0200
+++ v4l2uvc.c   2008-01-15 20:19:40.000000000 -0200
@@ -462,6 +462,8 @@ int uvcGrab(struct vdIn *vd)
 #define HEADERFRAME1 0xaf
     int ret;

+    sleep(1);
+
     if (!vd->isstreaming)
        if (video_enable(vd))
            goto err;

And use luvcview with patched uvcvideo, the behaviour between the two
patches is different. With your patch, the stream of video doesn't work
well, it captures only the first 1/2 frames and stop. But in stock luvcview
without the sleep your patch works fine. The difference here is that with
the patch I posted earlier it works in both cases, it doesn't fail with the
luvcview patched with sleep.

> 
> Best regards,
> 
> Laurent Pinchart
> 

-- 
[]'s
Herton
_______________________________________________
Linux-uvc-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel

Reply via email to