[cheese] Some more debugging



commit db26d5146b486409421e15020f2c71e8eccfee1d
Author: Filippo Argiolas <filippo argiolas gmail com>
Date:   Wed Dec 16 08:57:24 2009 +0100

    Some more debugging

 libcheese/cheese-camera-device-monitor.c |    8 ++++++--
 libcheese/cheese-camera-device.c         |    2 +-
 2 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/libcheese/cheese-camera-device-monitor.c b/libcheese/cheese-camera-device-monitor.c
index 5d64c10..f6e0b5b 100644
--- a/libcheese/cheese-camera-device-monitor.c
+++ b/libcheese/cheese-camera-device-monitor.c
@@ -188,20 +188,24 @@ cheese_camera_device_monitor_coldplug (CheeseCameraDeviceMonitor *monitor)
 {
   CheeseCameraDeviceMonitorPrivate *priv = CHEESE_CAMERA_DEVICE_MONITOR_GET_PRIVATE (monitor);
   GList *devices, *l;
-
-  GST_INFO ("Probing devices with udev...");
+  gint i = 0;
 
   if (priv->client == NULL)
     return;
 
+  GST_INFO ("Probing devices with udev...");
+
   devices = g_udev_client_query_by_subsystem (priv->client, "video4linux");
 
   /* Initialize camera structures */
   for (l = devices; l != NULL; l = l->next) {
     cheese_camera_device_monitor_added (monitor, l->data);
     g_object_unref (l->data);
+    i++;
   }
   g_list_free (devices);
+
+  if (i == 0) GST_WARNING ("No device found");
 }
 #else /* HAVE_UDEV */
 void
diff --git a/libcheese/cheese-camera-device.c b/libcheese/cheese-camera-device.c
index ce9a1e1..a7774fc 100644
--- a/libcheese/cheese-camera-device.c
+++ b/libcheese/cheese-camera-device.c
@@ -275,7 +275,7 @@ cheese_camera_device_get_caps (CheeseCameraDevice *device)
 
       src = gst_bin_get_by_name (GST_BIN (pipeline), "source");
 
-      g_print ("Device: %s (%s)\n", priv->name, priv->device);
+      GST_LOG ("Device: %s (%s)\n", priv->name, priv->device);
       pad  = gst_element_get_pad (src, "src");
       caps = gst_pad_get_caps (pad);
       priv->caps = cheese_webcam_device_filter_caps (device, caps, supported_formats);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]