[cheese] No need to get device name from v4l2src



commit 6a4837a19fb446464bd5efc9b7e02e380720ac2f
Author: Filippo Argiolas <filippo argiolas gmail com>
Date:   Sun Dec 13 20:36:23 2009 +0100

    No need to get device name from v4l2src
    
    Udev and v4l2src both use the same ioctl to query device name, just use
    udev one.

 libcheese/cheese-camera-device.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
---
diff --git a/libcheese/cheese-camera-device.c b/libcheese/cheese-camera-device.c
index b1b716c..dad2296 100644
--- a/libcheese/cheese-camera-device.c
+++ b/libcheese/cheese-camera-device.c
@@ -267,11 +267,7 @@ cheese_camera_device_get_caps (CheeseCameraDevice *device)
 
       src = gst_bin_get_by_name (GST_BIN (pipeline), "source");
 
-      g_object_get (G_OBJECT (src), "device-name", &name, NULL);
-      if (name == NULL)
-        name = "Unknown";
-
-      g_print ("Device: %s (%s)\n", name, priv->device);
+      g_print ("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]