pwc
[Top] [All Lists]

[pwc] improved frame detection

To: Philips Webcam Linux Driver <>
Subject: [pwc] improved frame detection
From: Frans Meulenbroeks <>
Date: Tue, 18 Oct 2005 07:35:19 -0700 (PDT)
While hunting for what causes the pwc driver not
working on a 2.0 hub, I discovered that apparently
there is a cleaner way to detect the end of a frame
(at least for my cam)

pwc-if.c says around line 725:
                        if (flen <
pdev->vlast_packet_size) {
/* Shorter packet... We probably have the end of an
image-frame;

I discovered that for my cam (PCVC680K) there is alway
an flen equal to 0 between two frames. Hence I
modified the test to:
                        if ((flen == 0) && (flen <
pdev->vlast_packet_size)) {

For me this works like a charm.
I still needed the flen < pdev->vlast_packet_size part
because at startup there are also a few flen == 0
packets and without the < part these cause things to
stop too early.

Does this work for others as well?
Is this a better test. It looks more robust (when I
use my USB 2.0 hub flen seems to vary for compressed
pictures, that is why I went hunting for another
test).

Best regards, Frans.






                
__________________________________
Yahoo! Music Unlimited
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/
_______________________________________________
pwc mailing list

http://lists.saillard.org/mailman/listinfo/pwc

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU