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 521551 - Capture XF86WebCam (webcam button)
Capture XF86WebCam (webcam button)
Status: RESOLVED FIXED
Product: cheese
Classification: Applications
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: Cheese Maintainer(s)
Cheese Maintainer(s)
: 603181 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-03-10 12:05 UTC by Fabio
Modified: 2009-11-28 09:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Implement the feature discussed (19.19 KB, patch)
2009-06-19 11:49 UTC, Masatake YAMATO
rejected Details | Review
0001-Bug-521551-Capture-XF86WebCam-webcam-button.patch (2.59 KB, patch)
2009-06-19 14:17 UTC, Bastien Nocera
committed Details | Review

Description Fabio 2008-03-10 12:05:35 UTC
My logitech Quick Cam plus have a button behind that permit to take a fast photo.
Is possible to implement this feature in cheese?
Comment 1 daniel g. siegel 2008-03-10 23:43:43 UTC
can you tell me what "fast photo" means? how could we get the signal the buttom emits?
Comment 2 Fabio 2008-03-11 11:52:23 UTC
yes i can
with fast photo i mean when you have the ufficial logitech cam manager opened and click on the button behind the webcam, it take a picture and add it in the picture list.
unfortunatenly, i cant give you the signal of my webcam...
Comment 3 Bastien Nocera 2008-03-11 12:06:03 UTC
I have such a button on a "Creative Labs WebCam 3" webcam, but it doesn't show up as an input device. I believe it's controlled by the "snapshot" ov511 module option, but I have no idea how it works.
Comment 4 daniel g. siegel 2008-03-13 02:37:31 UTC
hmm.. no idea how to get that event... does dmesg list something?
Comment 5 Fabio 2008-03-13 07:36:32 UTC
nothing
Comment 6 daniel g. siegel 2008-03-14 01:58:54 UTC
hmm.. then it is really difficult to add such an ehancement... could you try to find out if there is some possibility to get the signal?
Comment 7 Bastien Nocera 2008-03-14 16:08:10 UTC
Dropped a mail to the maintainer of my driver (ov511) to ask about that. Fabio, which driver are you using for your webcam?
Comment 8 Fabio 2008-03-14 20:08:49 UTC
mmm maybe spca, i have a logitech quick cam plus
Comment 9 Fabio 2008-03-17 11:51:07 UTC
Maybe we can ask directly to logitech?
http://www.quickcamteam.net/hcl/linux
Comment 10 daniel g. siegel 2008-03-20 21:39:06 UTC
could you do that? once we have the needed information, it shouldnt be a problem to add that feature
Comment 12 daniel g. siegel 2008-03-31 16:46:00 UTC
already some news?
Comment 13 Fabio 2008-04-07 17:08:41 UTC
They reply to me, and i turn it to you http://forums.quickcamteam.net/showthread.php?tid=221&pid=1151#pid1151
Comment 14 Fabio 2008-04-24 22:14:50 UTC
any news?
Comment 15 Luca Cavalli 2008-05-01 23:37:03 UTC
From webcam driver source code[1] it seems that the button is mapped as a standard input event via input_report_key (see uvc_event_streaming). Aren't those events mapped to GdkEventButton events? If so, from GdkDevice field it should be possible to separate webcam events from mouse ones.

[1] - http://svn.berlios.de/wsvn/linux-uvc/linux-uvc/trunk/uvc_status.c
Comment 16 Fabio 2008-05-02 07:52:47 UTC
mmm I've opened a terminal and clicked on the botton but nothing appeared, i also opened gedit but same results... i don't know if this can help...
Comment 17 Bastien Nocera 2008-05-02 10:07:16 UTC
(In reply to comment #16)
> mmm I've opened a terminal and clicked on the botton but nothing appeared, i
> also opened gedit but same results... i don't know if this can help...

Probably because you're not using a USB webcam that uses the UVC driver. As this is highly dependant on the driver, maybe we should make sure that Cheese captures the XF86WebCam key instead. Totem, and epiphany have examples of how to capture it.

As for the drivers themselves, they'd need to be fixed one-by-one. For starters, the UVC driver should be using KEY_CAMERA, and not BTN_0 (which is usually used for mice, and joypads). Filed as:
https://developer.berlios.de/bugs/?func=detailbug&bug_id=13723&group_id=5681
Comment 18 Fabio 2008-08-04 12:45:39 UTC
I understand, the problem is that i dont know how to do, im jumping from logitech forum to here :S
Comment 19 Masatake YAMATO 2009-06-19 11:49:50 UTC
Created attachment 136991 [details] [review]
Implement the feature discussed

Implementation based on the discussion at #586130.
Comment 20 Bastien Nocera 2009-06-19 11:56:18 UTC
No, as mentioned in bug 586130, do _not_ use the Linux kernel APIs. Use the X APIs.
Comment 21 Bastien Nocera 2009-06-19 14:17:20 UTC
Created attachment 137007 [details] [review]
0001-Bug-521551-Capture-XF86WebCam-webcam-button.patch

Patch using X11.

Might be able to do with some config checks for XFree86/Xorg keysyms being available, as done in Totem, Rhythmbox and Epiphany.
Comment 22 Filippo Argiolas 2009-06-21 09:18:44 UTC
Committed (In reply to comment #21)
> Created an attachment (id=137007) [edit]
> 0001-Bug-521551-Capture-XF86WebCam-webcam-button.patch

Committed, thank you!
 
> Might be able to do with some config checks for XFree86/Xorg keysyms being
> available, as done in Totem, Rhythmbox and Epiphany.

Done, ripped from Rhythmbox configure.ac.

I'm wondering if it could be better to add a global keybinding that starts cheese if not running or trigger a photo through dbus if already running. Last time I looked into global keybindings stuff it was almost a mess though :P

Comment 23 Masatake YAMATO 2009-06-22 03:49:59 UTC
Very sorry. I submitted older patch.

In your patch (In reply to comment #20)
> No, as mentioned in bug 586130, do _not_ use the Linux kernel APIs. Use the X
> APIs.
> 

Comment 24 Filippo Argiolas 2009-06-22 11:15:21 UTC
(In reply to comment #23)
> Very sorry. I submitted older patch.

Oh, I'm sorry, I had a feeling that nothing had changed in the patch :/.
Thanks a lot for your work anyway!
Comment 25 Felix Kaser 2009-11-28 09:14:27 UTC
*** Bug 603181 has been marked as a duplicate of this bug. ***