Bug 460956 - Patch(es): fix cheese on systems with more then1 v4l device
Patch(es): fix cheese on systems with more then1 v4l device
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: cheese (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Matthias Clasen
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-02 16:14 EDT by Hans de Goede
Modified: 2008-09-03 16:53 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-09-03 16:53:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
cheese-2.23.90-dont-use-non-capture-devices.patch (8.14 KB, patch)
2008-09-02 16:14 EDT, Hans de Goede
no flags Details | Diff
cheese-2.23.90-supported-resolutions-per-device.patch (3.77 KB, patch)
2008-09-02 16:15 EDT, Hans de Goede
no flags Details | Diff
cheese-2.23.90-cheese_webcam_get_supported_video_formats-shuffle.patch (10.09 KB, patch)
2008-09-02 16:15 EDT, Hans de Goede
no flags Details | Diff
cheese-2.23.90-let-gstreamer-choose-yuv-or-rgb.patch (2.54 KB, patch)
2008-09-02 16:16 EDT, Hans de Goede
no flags Details | Diff
cheese-2.23.90-only-list-resolutions-once.patch (2.26 KB, patch)
2008-09-02 16:17 EDT, Hans de Goede
no flags Details | Diff
cheese-2.23.90-sort-resolutions.patch (1.65 KB, patch)
2008-09-02 16:21 EDT, Hans de Goede
no flags Details | Diff

  None (edit)
Description Hans de Goede 2008-09-02 16:14:03 EDT
Created attachment 315587 [details]
cheese-2.23.90-dont-use-non-capture-devices.patch

In the light of the better webcam project:
https://fedoraproject.org/wiki/Features/BetterWebcamSupport

I've added a TV-card to my system to make sure that non of the changes I'm making to improve webcam support break use of other v4l devices.

The combination of a tv-card and a webcam turns out to trigger a whole slew of bugs in cheese. For which I've written a whole slew of patches.

Given that I'm very much into webcams now and know cheese pretty good to now, I would like to offer to co-maintain (or take over) cheese, and then commit all these patches myself (and take care of any fallout although I strongly believe there will be none). Does that sound like a plan?


Here is the list of patches:

First of all cheese lists /dev/vbi0 and /dev/radio0 as devices to select as source and then crashes in various ways because it does not know howto handle these devices, this is fixed by using ioctl's to check if the device has capture capability (filters out radio devices) and with a strcmp on the device for the vbi case (seems the only way), this is patch:
cheese-2.23.90-dont-use-non-capture-devices.patch

Cheese uses an hash table to allow for quick lookup of videoformats based on resolution, but this hash table is global (not per device), so looking in it can end up with a format from another device then the device which is currently used as source, this is fixed by:
cheese-2.23.90-supported-resolutions-per-device.patch


These 2 patches are a must have for crash free operation with multiple devices!


In cases where the device supports the same resolution in multiple video formats, the resolution will get listed multiple times in the resolutions list in the preferences dialog. With my bttv card which supports grabbing in many different pixformats each resolution gets shown 16 times!

The following chain of patches fixes this:
cheese-2.23.90-let-gstreamer-choose-yuv-or-rgb.patch
cheese-2.23.90-cheese_webcam_get_supported_video_formats-shuffle.patch
cheese-2.23.90-only-list-resolutions-once.patch
cheese-2.23.90-sort-resolutions.patch

Currently when a resolution is listed multiple times cheese will either request yuv or rgb mode for the v4l2 source depending on which entry was clicked, the first patch removes this behavior, letting gstreamers negotiation choose whatever is most appropriate.

The second patch is just some code refactoring without any functional changes, to make the third patch easier to read, the third patch actually filters out all the double resolutions. The last patch sorts the list of resolutions from small to big, as a random order list doesn't look good in the GUI.

All these patches are also submitted upstream:
http://bugzilla.gnome.org/show_bug.cgi?id=546868
http://bugzilla.gnome.org/show_bug.cgi?id=547144
Comment 1 Hans de Goede 2008-09-02 16:15:02 EDT
Created attachment 315588 [details]
cheese-2.23.90-supported-resolutions-per-device.patch
Comment 2 Hans de Goede 2008-09-02 16:15:48 EDT
Created attachment 315589 [details]
cheese-2.23.90-cheese_webcam_get_supported_video_formats-shuffle.patch
Comment 3 Hans de Goede 2008-09-02 16:16:33 EDT
Created attachment 315590 [details]
cheese-2.23.90-let-gstreamer-choose-yuv-or-rgb.patch
Comment 4 Hans de Goede 2008-09-02 16:17:28 EDT
Created attachment 315591 [details]
cheese-2.23.90-only-list-resolutions-once.patch
Comment 5 Hans de Goede 2008-09-02 16:21:14 EDT
Created attachment 315592 [details]
cheese-2.23.90-sort-resolutions.patch
Comment 6 Matthias Clasen 2008-09-03 08:51:10 EDT
Hans, you are quite welcome to join in the cheese maintainership.
Comment 7 Hans de Goede 2008-09-03 10:26:03 EDT
(In reply to comment #6)
> Hans, you are quite welcome to join in the cheese maintainership.

Ok, I've applied for the necessary right. Is it ok with you if I commit my patches (they are being merged upstream) I would like to have them in rawhide before the beta freeze, so that cheese will be in good shape in the beta as I plan to actively solicit for webcam testing with the beta.

Also is it ok if I start closing cheese bugs for which I have the hardware to reproduce them and for which I believe they have been fixed in rawhide?
Comment 8 Matthias Clasen 2008-09-03 11:31:07 EDT
I've approved your requests. Please feel free to commit those patches and look after cheese bugs as you see fit. Thanks. The one thing I'm pretty adamant about is that all patches we carry should have an upstream bug reference, but I'm sure you'll take care about that anyway.
Comment 9 Hans de Goede 2008-09-03 16:53:15 EDT
Thanks!

A version with all the patches mentioned here applied is on its way to rawhide now, closing.

Note You need to log in before you can comment on or make changes to this bug.