[cheese] Rename "hal_udi" to "id"



commit 5a041563eca04867310b5628f21ca1eb57ec878b
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Dec 3 17:49:01 2009 +0000

    Rename "hal_udi" to "id"

 libcheese/cheese-camera-device-monitor.c |    2 +-
 libcheese/cheese-camera-device.c         |    2 +-
 libcheese/cheese-camera-device.h         |    2 +-
 libcheese/cheese-camera.c                |   14 +++++++-------
 tests/cheese-test-monitor.c              |    2 +-
 5 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/libcheese/cheese-camera-device-monitor.c b/libcheese/cheese-camera-device-monitor.c
index bc937d9..c776f19 100644
--- a/libcheese/cheese-camera-device-monitor.c
+++ b/libcheese/cheese-camera-device-monitor.c
@@ -156,7 +156,7 @@ cheese_camera_device_monitor_added (CheeseCameraDeviceMonitor *monitor,
 
   device = g_new0 (CheeseCameraDevice, 1);
 
-  device->hal_udi           = g_strdup (g_udev_device_get_property (udevice, "DEVPATH"));
+  device->id                = g_strdup (g_udev_device_get_property (udevice, "DEVPATH"));
   device->video_device      = g_strdup (device_path);
   device->gstreamer_src     = g_strdup (gstreamer_src);
   device->product_name      = g_strdup (product_name);
diff --git a/libcheese/cheese-camera-device.c b/libcheese/cheese-camera-device.c
index 4889e9b..0125d76 100644
--- a/libcheese/cheese-camera-device.c
+++ b/libcheese/cheese-camera-device.c
@@ -35,7 +35,7 @@ cheese_camera_device_free (CheeseCameraDevice *device)
     g_free (g_array_index (device->video_formats, CheeseVideoFormat, j).mimetype);
   }
   g_free (device->video_device);
-  g_free (device->hal_udi);
+  g_free (device->id);
   g_free (device->gstreamer_src);
   g_free (device->product_name);
   g_array_free (device->video_formats, TRUE);
diff --git a/libcheese/cheese-camera-device.h b/libcheese/cheese-camera-device.h
index 36baadc..0f7d305 100644
--- a/libcheese/cheese-camera-device.h
+++ b/libcheese/cheese-camera-device.h
@@ -46,7 +46,7 @@ typedef struct
 typedef struct
 {
   char *video_device;
-  char *hal_udi;
+  char *id;
   char *gstreamer_src;
   char *product_name;
   int   num_video_formats;
diff --git a/libcheese/cheese-camera.c b/libcheese/cheese-camera.c
index dbaa1cb..c839685 100644
--- a/libcheese/cheese-camera.c
+++ b/libcheese/cheese-camera.c
@@ -292,7 +292,7 @@ cheese_camera_add_device (CheeseCameraDeviceMonitor *monitor,
 }
 
 static void
-cheese_camera_get_video_devices_from_hal (CheeseCamera *camera)
+cheese_camera_get_video_devices_from_udev (CheeseCamera *camera)
 {
   CheeseCameraPrivate *priv = CHEESE_CAMERA_GET_PRIVATE (camera);
   CheeseCameraDeviceMonitor *monitor;
@@ -316,7 +316,7 @@ cheese_camera_get_video_devices_from_hal (CheeseCamera *camera)
     device = g_new0 (CheeseCameraDevice, 1);
     device->num_video_formats = 0;
     device->video_formats     = g_array_new (FALSE, FALSE, sizeof (CheeseVideoFormat));
-    device->hal_udi = g_strdup ("cheese_fake_videodevice");
+    device->id = g_strdup ("cheese_fake_videodevice");
     g_ptr_array_add (priv->camera_devices, device);
   }
 }
@@ -630,7 +630,7 @@ cheese_camera_detect_camera_devices (CheeseCamera *camera)
 
   int i;
 
-  cheese_camera_get_video_devices_from_hal (camera);
+  cheese_camera_get_video_devices_from_udev (camera);
 
   g_print ("Probing supported video formats...\n");
   for (i = 0; i < priv->num_camera_devices; i++)
@@ -1501,7 +1501,7 @@ cheese_camera_new (GtkWidget *video_window, char *camera_device_name,
 }
 
 void
-cheese_camera_setup (CheeseCamera *camera, char *hal_dev_udi, GError **error)
+cheese_camera_setup (CheeseCamera *camera, char *id, GError **error)
 {
   CheeseCameraPrivate *priv = CHEESE_CAMERA_GET_PRIVATE (camera);
 
@@ -1510,9 +1510,9 @@ cheese_camera_setup (CheeseCamera *camera, char *hal_dev_udi, GError **error)
 
   cheese_camera_detect_camera_devices (camera);
 
-  if (hal_dev_udi != NULL)
+  if (id != NULL)
   {
-    cheese_camera_set_device_by_dev_udi (camera, hal_dev_udi);
+    cheese_camera_set_device_by_dev_udi (camera, id);
   }
 
   priv->pipeline = gst_pipeline_new ("pipeline");
@@ -1578,7 +1578,7 @@ cheese_camera_set_device_by_dev_udi (CheeseCamera *camera, char *udi)
   for (i = 0; i < priv->num_camera_devices; i++)
   {
     CheeseCameraDevice *device = g_ptr_array_index (priv->camera_devices, i);
-    if (strcmp (device->hal_udi, udi) == 0)
+    if (strcmp (device->id, udi) == 0)
     {
       g_object_set (camera, "device_name", device->video_device, NULL);
       break;
diff --git a/tests/cheese-test-monitor.c b/tests/cheese-test-monitor.c
index b81783a..8c3c65d 100644
--- a/tests/cheese-test-monitor.c
+++ b/tests/cheese-test-monitor.c
@@ -6,7 +6,7 @@ static void
 added_cb (CheeseCameraDeviceMonitor *monitor,
 	  CheeseCameraDevice *device)
 {
-	g_message ("Added new device with ID '%s'", device->hal_udi);
+	g_message ("Added new device with ID '%s'", device->id);
 }
 
 static void



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