Comment 6 for bug 924419

Revision history for this message
Stéphane Graber (stgraber) wrote :

Ubiquity actually checks if the webcam is valid using:
gboolean
ubiquity_webcam_available (void) {
 GUdevEnumerator *enumerator;
 GUdevClient *client;
 GList *devices;
 guint length;
   const gchar *const subsystems[] = {NULL};
   client = g_udev_client_new (subsystems);
 enumerator = g_udev_enumerator_new (client);
 g_udev_enumerator_add_match_property (enumerator, "ID_V4L_CAPABILITIES", ":capture:");
 devices = g_udev_enumerator_execute (enumerator);
 length = g_list_length (devices);
 g_list_free_full (devices, g_object_unref);
 return length > 0;
}

As you can see, this doesn't actually try to use it, it just checks for a v4l capture device.
How would one differentiate one of your broken capture devices from a working one?

I'm really not sure we should have that logic in ubiquity, it sounds like a bug to me to expose a /dev/videoX device that has the v4l capture flag set and doesn't actually work like a capture device...