pwc
[Top] [All Lists]

Re: [pwc] Re: Webcam button

To: Philips Webcam Linux Driver <>
Subject: Re: [pwc] Re: Webcam button
From: Andrew Cavers <>
Date: Sun, 24 Jul 2005 11:14:06 +0100
Patrik,

Top work! It works really nicely on my camera. If I enter "cat
/proc/pwc/0/button" at the shell, it returns 0. If I push the button
then send the command again I get 1. I send the command again and I
get 0 again. Perfect!

One (small?) problem - the decompression on the camera no longer works
- I can only access non-compressed streams - everything else comes up
grey. Something to do with the error message I received below when
compiling, I suspect. Any ideas?

bash-3.00# make
make -C /lib/modules/2.6.12/build SUBDIRS=/home/andy/pwc modules
make[1]: Entering directory `/usr/src/linux-2.6.12'
 CC [M]  /home/andy/pwc/pwc-if.o
 CC [M]  /home/andy/pwc/pwc-misc.o
 CC [M]  /home/andy/pwc/pwc-ctrl.o
 CC [M]  /home/andy/pwc/pwc-uncompress.o
/home/andy/pwc/pwc-uncompress.c: In function `pwc_decompress':
/home/andy/pwc/pwc-uncompress.c:140: warning: unreachable code at
beginning of switch statement
 CC [M]  /home/andy/pwc/pwc-timon.o
 CC [M]  /home/andy/pwc/pwc-kiara.o
 LD [M]  /home/andy/pwc/pwc.o
 Building modules, stage 2.
 MODPOST
 CC      /home/andy/pwc/pwc.mod.o
 LD [M]  /home/andy/pwc/pwc.ko
make[1]: Leaving directory `/usr/src/linux-2.6.12'

I might just amend my application so that it doesn't need to use
compressed streams - I didn't realise until today how much better
quality the uncompressed images were.

Let me know your Paypal address!

Cheers,

Andrew.

On 7/23/05, Patrik Jakobsson <> wrote:
> Ok, now I've gotten it to work the way you described. In the /proc
> filesystem you will find "pwc/minor#/button". The file contains a '1'
> when the button has been pressed and otherwise '0'. The driver is only
> reporting the status of the button when the device is open.
> Download the full source at
> http://www.shell.linux.se/xpatrikx/files/pwc-patched-with-snapshot-20050723.tar.bz2
> or the patch at
> http://www.shell.linux.se/xpatrikx/patches/pwc-snapshot-button-patch
> 
> Please tell me what you think, hopefully there are no nasty bugs in it
> but use are your own risk :)
> 
> --Patrik Jakobsson
> 
> Andrew Cavers wrote:
> 
> >Patrik,
> >
> >Yes - I plan to use the button to invoke a callibration function and
> >the device will be open at the time. I really hope you can come up
> >with a workable solution to this one!
> >
> >Look forward to hearing of any progress!
> >
> >Andrew.
> >
> >On 7/22/05, Patrik Jakobsson <> wrote:
> >
> >
> >>Hi again,
> >>I've gotten the snapshot button to work with my PCVC840K (type 740)
> >>webcam. The button status data is embedded in the frames recieved from
> >>the camera so you can only get the button status when the device is
> >>open. There seems to be an option implemented in the driver to open the
> >>device in "snapshot mode". Im not sure how this works so I need to look
> >>some more at the driver. You wanted to use the button for invoking a
> >>calibration function right? Is this when the device is opened or closed?
> >>
> >>Andrew Cavers wrote:
> >>
> >>
> >>
> >>>Patrik,
> >>>
> >>>You're right - I believe the Quickcam 4000 is a type 740. Do you know
> >>>why that code is only available to type 730 cameras?
> >>>
> >>>I would really like to gain access to the button on my camera. As i'm
> >>>no programmer myself, I'd be willing to contribute by offering a small
> >>>bounty ($40/€30/£20 payable by Paypal?) to somebody who could
> >>>implement this code. An implementation similar to that on the driver
> >>>for ov511 cameras would be ideal - ie. the value of
> >>>/proc/video/ov511/<minor#>/button changes from 0 to 1 when the button
> >>>is pressed, and reverts to 0 when the file has been read.
> >>>
> >>>Andrew.
> >>>
> >>>On 7/21/05, Patrik Jakobsson <> wrote:
> >>>
> >>>
> >>>
> >>>
> >>>>Hi Andrew,
> >>>>I might be wrong but... you seem to have a type 740 camera and that
> >>>>piece of code is only available to 730 cameras.
> >>>>
> >>>>   --Patrik Jakobsson
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>
> >>>
> >>>
> >>>
> >>
> >>
> >
> >
> >
> >
> >------------------------------------------------------------------------
> >
> >_______________________________________________
> >pwc mailing list
> >
> >http://lists.saillard.org/mailman/listinfo/pwc
> >
> >
> 
> 


-- 
--
Andrew Cavers

www.mution.com
_______________________________________________
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