After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 586130 - (shutter) button support via /dev/input/event
(shutter) button support via /dev/input/event
Status: RESOLVED WONTFIX
Product: cheese
Classification: Applications
Component: general
git master
Other Linux
: Normal normal
: 2.26
Assigned To: Cheese Maintainer(s)
Cheese Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2009-06-17 13:38 UTC by Masatake YAMATO
Modified: 2009-06-18 09:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
A patch fixing the issue. (19.19 KB, patch)
2009-06-17 13:40 UTC, Masatake YAMATO
none Details | Review

Description Masatake YAMATO 2009-06-17 13:38:18 UTC
This is a patch which enables shutter buttons of web camera.
uvcvideo driver exports such shutter buttons via /dev/input/event.
If a v4l devier doesn't export such dev file, my patch does nothing;
kernel hacking may be needed.
Comment 1 Masatake YAMATO 2009-06-17 13:40:43 UTC
Created attachment 136832 [details] [review]
A patch fixing the issue.
Comment 2 Filippo Argiolas 2009-06-17 14:04:47 UTC
Hi Masatake,
thanks for your patch, isn't it a bit an overkill to directly watch the device?
Shoudln't we just listen to XF86Webcam key as suggested in bug #521551 ?
I'm pretty sure Bastien wrote a couple of kernel patches to make webcam drivers use KEY_CAMERA and make it work properly so at this time the only thing missing should just be the listening code in cheese.
CC-ing Bastien for a confirm.
Comment 3 Bastien Nocera 2009-06-17 14:27:40 UTC
Definitely the wrong way to do this. The only thing you'd need to do is capture "XF86WebCam" using normal X APIs. No need to go hard-coding Linux specifics.

If particular webcams don't use KEY_CAMERA for those cases, the drivers should be fixed instead of working around it in user space.
Comment 4 Masatake YAMATO 2009-06-17 14:34:17 UTC
Can I observe the XF86WebCam event with xev command?
Comment 5 Bastien Nocera 2009-06-17 14:42:10 UTC
Sure you can, I just tested it with my UVC webcam.
Comment 6 Masatake YAMATO 2009-06-17 14:48:45 UTC
Extra setting for X or something is needed?
My UVC webcam doesn't say anthing.
Comment 7 Bastien Nocera 2009-06-17 14:53:34 UTC
Check with evtest first that your webcam is giving out a key event (and which one). If it gives out KEY_WEBCAM, then it's a problem with the X setup, if it doesn't then it's a problem with the kernel driver for it.

Works out-of-the-box for me with a UVC webcam on Fedora 11.
Comment 8 Masatake YAMATO 2009-06-18 09:36:24 UTC
I have confirmed XF86WebCam event is delivered with xev.
(I used a bit old system.)

I will rewrite my patch to use the event.
Thanks.
Comment 9 daniel g. siegel 2009-06-18 09:42:08 UTC
thanks a lot to YOU for your effort!
Comment 10 Bastien Nocera 2009-06-18 09:51:03 UTC
Please do so in bug 521551, which is already about that...