summaryrefslogtreecommitdiffstats
path: root/multimedia/cheese3/files
diff options
context:
space:
mode:
authorkwm <kwm@df743ca5-7f9a-e211-a948-0013205c9059>2013-05-08 08:12:22 +0800
committerkwm <kwm@df743ca5-7f9a-e211-a948-0013205c9059>2013-05-08 08:12:22 +0800
commitb738e7a569db3cbb995c10ce3e25b1f512d1a595 (patch)
treef27c4dbc875e72ebcf0c0c3984b3f15e2175a9d1 /multimedia/cheese3/files
parent4e94b11387b530a00a1c557fe8d3b19fda6f023d (diff)
downloadmarcuscom-ports-b738e7a569db3cbb995c10ce3e25b1f512d1a595.tar.gz
marcuscom-ports-b738e7a569db3cbb995c10ce3e25b1f512d1a595.tar.zst
marcuscom-ports-b738e7a569db3cbb995c10ce3e25b1f512d1a595.zip
Update to 3.6.0.
Note that the old detection patch was removed because it didn't work. This will be revisisted on a later date to get it working again. Submitted by: Gustau Perez git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@18435 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'multimedia/cheese3/files')
-rw-r--r--multimedia/cheese3/files/patch-configure104
-rw-r--r--multimedia/cheese3/files/patch-libcheese_cheese-camera-device-monitor.c372
2 files changed, 57 insertions, 419 deletions
diff --git a/multimedia/cheese3/files/patch-configure b/multimedia/cheese3/files/patch-configure
index 5dce1420b..f8148f429 100644
--- a/multimedia/cheese3/files/patch-configure
+++ b/multimedia/cheese3/files/patch-configure
@@ -1,6 +1,14 @@
---- configure 2012-06-13 10:35:21.000000000 +0200
-+++ configure 2012-06-13 10:31:28.000000000 +0200
-@@ -12661,6 +12661,10 @@
+--- configure.orig 2013-04-07 22:02:48.205219751 +0000
++++ configure 2013-04-07 22:24:32.131129660 +0000
+@@ -12556,6 +12556,7 @@
+ GLIB_REQUIRED="glib-2.0 >= 2.28.0"
+ GOBJECT_REQUIRED="gobject-2.0 >= 2.28.0"
+ GIO_REQUIRED="gio-2.0 >= 2.28.0"
++DBUS_GLIB_REQUIRED="dbus-glib-1"
+ GTK_REQUIRED="gtk+-3.0 >= 3.4.4"
+ GDK_REQUIRED="gdk-3.0 >= 3.3.6"
+ GDK_PIXBUF_REQUIRED="gdk-pixbuf-2.0"
+@@ -12585,6 +12586,10 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Linux" >&5
$as_echo "Linux" >&6; }
UDEV_REQUIRED="gudev-1.0" ;; #(
@@ -11,7 +19,7 @@
*) :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported operating system" >&5
$as_echo "unsupported operating system" >&6; } ;;
-@@ -12688,6 +12692,28 @@
+@@ -12612,6 +12617,28 @@
$as_echo "not needed" >&6; }
fi
@@ -40,146 +48,148 @@
for ac_header in sys/videoio.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "sys/videoio.h" "ac_cv_header_sys_videoio_h" "$ac_includes_default"
-@@ -12776,6 +12802,7 @@
+@@ -12699,7 +12726,9 @@
+ \$CAIRO_REQUIRED
+ \$PANGOCAIRO_REQUIRED
\$CLUTTER_REQUIRED
++ \$DBUS_GLIB_REQUIRED
\$CLUTTERGST_REQUIRED
- \$MX_REQUIRED
+ \$HAL_REQUIRED
\$UDEV_REQUIRED\""; } >&5
($PKG_CONFIG --exists --print-errors "$GLIB_REQUIRED
$GIO_REQUIRED
-@@ -12788,6 +12815,7 @@
+@@ -12712,6 +12741,8 @@
+ $PANGOCAIRO_REQUIRED
$CLUTTER_REQUIRED
$CLUTTERGST_REQUIRED
- $MX_REQUIRED
++ $DBUS_GLIB_REQUIRED
+ $HAL_REQUIRED
$UDEV_REQUIRED") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-@@ -12803,6 +12831,7 @@
+@@ -12727,6 +12758,8 @@
+ $PANGOCAIRO_REQUIRED
$CLUTTER_REQUIRED
$CLUTTERGST_REQUIRED
- $MX_REQUIRED
++ $DBUS_GLIB_REQUIRED
+ $HAL_REQUIRED
$UDEV_REQUIRED" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
-@@ -12826,6 +12855,7 @@
+@@ -12750,6 +12783,8 @@
+ \$PANGOCAIRO_REQUIRED
\$CLUTTER_REQUIRED
\$CLUTTERGST_REQUIRED
- \$MX_REQUIRED
++ \$DBUS_GLIB_REQUIRED
+ \$HAL_REQUIRED
\$UDEV_REQUIRED\""; } >&5
($PKG_CONFIG --exists --print-errors "$GLIB_REQUIRED
$GIO_REQUIRED
-@@ -12838,6 +12868,7 @@
+@@ -12762,6 +12797,8 @@
+ $PANGOCAIRO_REQUIRED
$CLUTTER_REQUIRED
$CLUTTERGST_REQUIRED
- $MX_REQUIRED
++ $DBUS_GLIB_REQUIRED
+ $HAL_REQUIRED
$UDEV_REQUIRED") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-@@ -12853,6 +12884,7 @@
+@@ -12777,6 +12814,8 @@
+ $PANGOCAIRO_REQUIRED
$CLUTTER_REQUIRED
$CLUTTERGST_REQUIRED
- $MX_REQUIRED
++ $DBUS_GLIB_REQUIRED
+ $HAL_REQUIRED
$UDEV_REQUIRED" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
-@@ -12885,6 +12917,7 @@
+@@ -12809,6 +12848,8 @@
+ $PANGOCAIRO_REQUIRED
$CLUTTER_REQUIRED
$CLUTTERGST_REQUIRED
- $MX_REQUIRED
++ $DBUS_GLIB_REQUIRED
+ $HAL_REQUIRED
$UDEV_REQUIRED" 2>&1`
else
CHEESE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$GLIB_REQUIRED
-@@ -12898,6 +12931,7 @@
+@@ -12822,6 +12863,8 @@
+ $PANGOCAIRO_REQUIRED
$CLUTTER_REQUIRED
$CLUTTERGST_REQUIRED
- $MX_REQUIRED
++ $DBUS_GLIB_REQUIRED
+ $HAL_REQUIRED
$UDEV_REQUIRED" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
-@@ -12914,6 +12948,7 @@
+@@ -12838,6 +12881,8 @@
+ $PANGOCAIRO_REQUIRED
$CLUTTER_REQUIRED
$CLUTTERGST_REQUIRED
- $MX_REQUIRED
++ $DBUS_GLIB_REQUIRED
+ $HAL_REQUIRED
$UDEV_REQUIRED) were not met:
$CHEESE_PKG_ERRORS
-@@ -12966,6 +13001,7 @@
+@@ -12889,6 +12934,8 @@
\$GEE_REQUIRED
\$LIBCANBERRA_REQUIRED
\$UDEV_REQUIRED
++ \$DBUS_GLIB_REQUIRED
+ \$HAL_REQUIRED
\$GNOME_VIDEO_EFFECTS_REQUIRED\""; } >&5
($PKG_CONFIG --exists --print-errors "$GIO_REQUIRED
$GTK_REQUIRED
-@@ -12976,6 +13012,7 @@
+@@ -12898,6 +12945,8 @@
+ $CLUTTERGTK_REQUIRED
$GEE_REQUIRED
$LIBCANBERRA_REQUIRED
- $UDEV_REQUIRED
++ $DBUS_GLIB_REQUIRED
+ $HAL_REQUIRED
+ $UDEV_REQUIRED
$GNOME_VIDEO_EFFECTS_REQUIRED") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-@@ -12989,6 +13026,7 @@
- $GEE_REQUIRED
- $LIBCANBERRA_REQUIRED
- $UDEV_REQUIRED
-+ $HAL_REQUIRED
- $GNOME_VIDEO_EFFECTS_REQUIRED" 2>/dev/null`
- test "x$?" != "x0" && pkg_failed=yes
- else
-@@ -13010,6 +13048,7 @@
- \$GEE_REQUIRED
- \$LIBCANBERRA_REQUIRED
- \$UDEV_REQUIRED
-+ \$HAL_REQUIRED
- \$GNOME_VIDEO_EFFECTS_REQUIRED\""; } >&5
- ($PKG_CONFIG --exists --print-errors "$GIO_REQUIRED
- $GTK_REQUIRED
-@@ -13020,6 +13059,7 @@
+@@ -12943,6 +12992,8 @@
$GEE_REQUIRED
$LIBCANBERRA_REQUIRED
$UDEV_REQUIRED
++ $DBUS_GLIB_REQUIRED
+ $HAL_REQUIRED
$GNOME_VIDEO_EFFECTS_REQUIRED") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-@@ -13033,6 +13073,7 @@
+@@ -12956,6 +13007,9 @@
$GEE_REQUIRED
$LIBCANBERRA_REQUIRED
$UDEV_REQUIRED
++ $DBUS_GLIB_REQUIRED
++ $HAL_REQUIRED
+ $HAL_REQUIRED
$GNOME_VIDEO_EFFECTS_REQUIRED" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
-@@ -13063,6 +13104,7 @@
+@@ -12986,6 +13040,8 @@
$GEE_REQUIRED
$LIBCANBERRA_REQUIRED
$UDEV_REQUIRED
++ $DBUS_GLIB_REQUIRED
+ $HAL_REQUIRED
$GNOME_VIDEO_EFFECTS_REQUIRED" 2>&1`
else
CHEESE_GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$GIO_REQUIRED
-@@ -13074,6 +13116,7 @@
+@@ -12997,6 +13053,8 @@
$GEE_REQUIRED
$LIBCANBERRA_REQUIRED
$UDEV_REQUIRED
++ $DBUS_GLIB_REQUIRED
+ $HAL_REQUIRED
$GNOME_VIDEO_EFFECTS_REQUIRED" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
-@@ -13088,6 +13131,7 @@
+@@ -13011,6 +13069,8 @@
$GEE_REQUIRED
$LIBCANBERRA_REQUIRED
$UDEV_REQUIRED
++ $DBUS_GLIB_REQUIRED
+ $HAL_REQUIRED
$GNOME_VIDEO_EFFECTS_REQUIRED) were not met:
diff --git a/multimedia/cheese3/files/patch-libcheese_cheese-camera-device-monitor.c b/multimedia/cheese3/files/patch-libcheese_cheese-camera-device-monitor.c
deleted file mode 100644
index c88b60337..000000000
--- a/multimedia/cheese3/files/patch-libcheese_cheese-camera-device-monitor.c
+++ /dev/null
@@ -1,372 +0,0 @@
---- libcheese/cheese-camera-device-monitor.c.orig 2012-03-20 11:46:57.000000000 +0100
-+++ libcheese/cheese-camera-device-monitor.c 2012-05-17 23:27:23.000000000 +0200
-@@ -29,6 +29,12 @@
- #ifdef HAVE_UDEV
- #define G_UDEV_API_IS_SUBJECT_TO_CHANGE 1
- #include <gudev/gudev.h>
-+#elif defined(HAVE_HAL)
-+ #include <glib/gstdio.h>
-+ #include <libhal.h>
-+ #include <dbus/dbus.h>
-+ #include <dbus/dbus-glib-lowlevel.h>
-+ #include <unistd.h>
- #else
- #include <fcntl.h>
- #include <unistd.h>
-@@ -74,6 +80,9 @@
- {
- #ifdef HAVE_UDEV
- GUdevClient *client;
-+#elif defined(HAVE_HAL)
-+ DBusConnection *connection;
-+ LibHalContext *hal_ctx;
- #else
- guint filler;
- #endif /* HAVE_UDEV */
-@@ -299,86 +308,278 @@
- g_list_free (devices);
- }
-
--#else /* HAVE_UDEV */
-+/* HAVE_UDEV */
-+#elif defined(HAVE_HAL)
-+
-+static void
-+cheese_camera_device_monitor_handle_udi (CheeseCameraDeviceMonitor *monitor,
-+ const char *udi)
-+ {
-+ CheeseCameraDeviceMonitorPrivate *priv = CHEESE_CAMERA_DEVICE_MONITOR_GET_PRIVATE (monitor);
-+ char *device_file;
-+ char *product_name;
-+ char *capstr;
-+ gint v4l_version = 0;
-+ DBusError error;
-+
-+ GST_INFO ("Checking hal device '%s'", udi);
-+
-+ dbus_error_init (&error);
-+
-+ product_name = libhal_device_get_property_string (priv->hal_ctx, udi, "info.product", &error);
-+ if (dbus_error_is_set (&error))
-+ {
-+ GST_WARNING ("error getting product name: %s: %s", error.name, error.message);
-+ dbus_error_free (&error);
-+ return;
-+ }
-+
-+ device_file = libhal_device_get_property_string (priv->hal_ctx, udi, "video4linux.device", &error);
-+ if (dbus_error_is_set (&error))
-+ {
-+ GST_WARNING ("error getting V4L device for %s: %s: %s", udi, error.name, error.message);
-+ dbus_error_free (&error);
-+ libhal_free_string (product_name);
-+ }
-+
-+ if (g_access (device_file, (R_OK | W_OK)) == -1)
-+ {
-+ GST_WARNING ("Device %s does not have proper permissions. Permissions must be 0666", device_file);
-+ libhal_free_string (product_name);
-+ libhal_free_string (device_file);
-+ return;
-+ }
-+ capstr = libhal_device_get_property_string (priv->hal_ctx, udi, "video4linux.version", &error);
-+ if (dbus_error_is_set (&error))
-+ {
-+ GST_WARNING ("error getting V4L version for %s: %s: %s", udi, error.name, error.message);
-+ dbus_error_free (&error);
-+ libhal_free_string (product_name);
-+ libhal_free_string (device_file);
-+ return;
-+ }
-+
-+ v4l_version = atoi (capstr);
-+ libhal_free_string (capstr);
-+
-+ g_signal_emit (monitor, monitor_signals[ADDED], 0,
-+ udi,
-+ device_file,
-+ product_name,
-+ v4l_version);
-+}
-+
-+static void
-+cheese_camera_device_monitor_removed (LibHalContext *ctx,
-+ const char *udi)
-+ {
-+ CheeseCameraDeviceMonitor *monitor;
-+ void *data;
-+
-+ data = libhal_ctx_get_user_data (ctx);
-+ g_assert (data);
-+
-+ monitor = CHEESE_CAMERA_DEVICE_MONITOR (data);
-+
-+ g_signal_emit (monitor, monitor_signals[REMOVED], 0, udi);
-+}
-+
- void
- cheese_camera_device_monitor_coldplug (CheeseCameraDeviceMonitor *monitor)
- {
-- #if 0
-- CheeseCameraDeviceMonitorPrivate *priv = monitor->priv;
-- struct v4l2_capability v2cap;
-- struct video_capability v1cap;
-- int fd, ok;
-+ CheeseCameraDeviceMonitorPrivate *priv = CHEESE_CAMERA_DEVICE_MONITOR_GET_PRIVATE (monitor);
-+ gint i, num_udis = 0;
-+ gchar **udis;
-+ DBusError error;
-+
-+ if (priv->hal_ctx == NULL)
-+ return;
-+
-+ GST_INFO ("Probing devices with HAL...");
-+
-+ dbus_error_init (&error);
-
-- if ((fd = open (device_path, O_RDONLY | O_NONBLOCK)) < 0)
-+ udis = libhal_find_device_by_capability (priv->hal_ctx, "video4linux", &num_udis, &error);
-+
-+ if (dbus_error_is_set (&error))
- {
-- g_warning ("Failed to open %s: %s", device_path, strerror (errno));
-+ GST_WARNING ("libhal_find_device_by_capability: %s: %s", error.name, error.message);
-+ dbus_error_free (&error);
- return;
- }
-- ok = ioctl (fd, VIDIOC_QUERYCAP, &v2cap);
-- if (ok < 0)
-+
-+ /* Initialize camera structures */
-+ for (i = 0; i < num_udis; i++)
-+ cheese_camera_device_monitor_handle_udi (monitor, udis[i]);
-+ libhal_free_string_array (udis);
-+
-+ if (i == 0)
-+ GST_WARNING ("No device found");
-+}
-+
-+static void
-+cheese_camera_device_monitor_added (LibHalContext *ctx, const char *udi)
-+{
-+ CheeseCameraDeviceMonitor *monitor;
-+ gchar **caps;
-+ guint i;
-+ void *data;
-+
-+ data = libhal_ctx_get_user_data (ctx);
-+ g_assert (data);
-+
-+ monitor = CHEESE_CAMERA_DEVICE_MONITOR (data);
-+
-+ caps = libhal_device_get_property_strlist (ctx, udi, "info.capabilities", NULL);
-+ if (caps == NULL)
-+ return;
-+
-+ for (i = 0; caps[i] != NULL; i++)
- {
-- ok = ioctl (fd, VIDIOCGCAP, &v1cap);
-- if (ok < 0)
-+ if (g_strcmp0 (caps[i], "video4linux") == 0)
- {
-- g_warning ("Error while probing v4l capabilities for %s: %s",
-- device_path, strerror (errno));
-- close (fd);
-- return;
-+ cheese_camera_device_monitor_handle_udi (monitor, udi);
-+ break;
- }
-- g_print ("Detected v4l device: %s\n", v1cap.name);
-- g_print ("Device type: %d\n", v1cap.type);
-- gstreamer_src = "v4lsrc";
-- product_name = v1cap.name;
- }
-- else
-+ libhal_free_string_array (caps);
-+}
-+
-+static void
-+cheese_camera_device_monitor_finalize (GObject *object)
-+{
-+ CheeseCameraDeviceMonitor *monitor;
-+
-+ monitor = CHEESE_CAMERA_DEVICE_MONITOR (object);
-+ CheeseCameraDeviceMonitorPrivate *priv = CHEESE_CAMERA_DEVICE_MONITOR_GET_PRIVATE (monitor);
-+
-+ if (priv->connection != NULL)
- {
-- guint cap = v2cap.capabilities;
-- g_print ("Detected v4l2 device: %s\n", v2cap.card);
-- g_print ("Driver: %s, version: %d\n", v2cap.driver, v2cap.version);
--
-- /* g_print ("Bus info: %s\n", v2cap.bus_info); */ /* Doesn't seem anything useful */
-- g_print ("Capabilities: 0x%08X\n", v2cap.capabilities);
-- if (!(cap & V4L2_CAP_VIDEO_CAPTURE))
-- {
-- g_print ("Device %s seems to not have the capture capability, (radio tuner?)\n"
-- "Removing it from device list.\n", device_path);
-- close (fd);
-- return;
-- }
-- gstreamer_src = "v4l2src";
-- product_name = (char *) v2cap.card;
-+ dbus_connection_unref (priv->connection);
-+ priv->connection = NULL;
- }
-- close (fd);
-
-- GList *devices, *l;
-+ if (priv->hal_ctx != NULL)
-+ {
-+ libhal_ctx_set_device_added (priv->hal_ctx, NULL);
-+ libhal_ctx_set_device_removed (priv->hal_ctx, NULL);
-+ libhal_ctx_free (priv->hal_ctx);
-+ priv->hal_ctx = NULL;
-+ }
-
-- g_print ("Probing devices with udev...\n");
-+ G_OBJECT_CLASS (cheese_camera_device_monitor_parent_class)->finalize (object);
-+}
-
-- if (priv->client == NULL)
-- return;
-+static void
-+cheese_camera_device_monitor_class_init (CheeseCameraDeviceMonitorClass *klass)
-+{
-+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
-- devices = g_udev_client_query_by_subsystem (priv->client, "video4linux");
-+ if (cheese_device_monitor_cat == NULL)
-+ GST_DEBUG_CATEGORY_INIT (cheese_device_monitor_cat,
-+ "cheese-device-monitor",
-+ 0, "Cheese Camera Device Monitor");
-
-- /* Initialize camera structures */
-- for (l = devices; l != NULL; l = l->next)
-+ object_class->finalize = cheese_camera_device_monitor_finalize;
-+
-+ /**
-+ * CheeseCameraDeviceMonitor::added:
-+ * @device: A private object representing the newly added camera.
-+ * @id: Device unique identifier.
-+ * @device: Device file name (e.g. /dev/video2).
-+ * @product_name: Device product name (human readable, intended to be displayed in a UI).
-+ * @api_version: Supported video4linux API: 1 for v4l, 2 for v4l2.
-+ *
-+ * The ::added signal is emitted when a camera is added, or on start-up
-+ * after #cheese_camera_device_monitor_colplug is called.
-+ **/
-+ monitor_signals[ADDED] = g_signal_new ("added", G_OBJECT_CLASS_TYPE (klass),
-+ G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
-+ G_STRUCT_OFFSET (CheeseCameraDeviceMonitorClass, added),
-+ NULL, NULL,
-+ g_cclosure_marshal_VOID__STRING,
-+ G_TYPE_NONE, 4, G_TYPE_STRING);
-+
-+ /**
-+ * CheeseCameraDeviceMonitor::removed:
-+ * @device: A private object representing the newly added camera
-+ * @id: Device unique identifier.
-+ *
-+ * The ::removed signal is emitted when a camera is un-plugged, or
-+ * disabled on the system.
-+ **/
-+ monitor_signals[REMOVED] = g_signal_new ("removed", G_OBJECT_CLASS_TYPE (klass),
-+ G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
-+ G_STRUCT_OFFSET (CheeseCameraDeviceMonitorClass, removed),
-+ NULL, NULL,
-+ g_cclosure_marshal_VOID__STRING,
-+ G_TYPE_NONE, 1, G_TYPE_STRING);
-+
-+ g_type_class_add_private (klass, sizeof (CheeseCameraDeviceMonitorPrivate));
-+}
-+
-+static void
-+cheese_camera_device_monitor_init (CheeseCameraDeviceMonitor *monitor)
-+{
-+ CheeseCameraDeviceMonitorPrivate *priv = CHEESE_CAMERA_DEVICE_MONITOR_GET_PRIVATE (monitor);
-+ LibHalContext *hal_ctx;
-+ DBusError error;
-+
-+ dbus_error_init (&error);
-+
-+ priv->connection = dbus_bus_get (DBUS_BUS_SYSTEM, &error);
-+
-+ dbus_connection_set_exit_on_disconnect (priv->connection, FALSE);
-+
-+ hal_ctx = libhal_ctx_new ();
-+ if (hal_ctx == NULL)
- {
-- cheese_camera_device_monitor_added (monitor, l->data);
-- g_object_unref (l->data);
-+ GST_WARNING ("Could not create libhal context");
-+ dbus_error_free (&error);
-+ return;
- }
-- g_list_free (devices);
-- #endif
-+
-+ if (!libhal_ctx_set_dbus_connection (hal_ctx, priv->connection))
-+ {
-+ GST_WARNING ("libhal_ctx_set_dbus_connection: %s: %s", error.name, error.message);
-+ dbus_error_free (&error);
-+ return;
-+ }
-+ if (!libhal_ctx_init (hal_ctx, &error))
-+ {
-+ if (dbus_error_is_set (&error))
-+ {
-+ GST_WARNING ("libhal_ctx_init: %s: %s", error.name, error.message);
-+ dbus_error_free (&error);
-+ }
-+ GST_WARNING ("Could not initialise connection to hald.\n"
-+ "Normally this means the HAL daemon (hald) is not running or not ready");
-+ return;
-+ }
-+
-+ dbus_connection_setup_with_g_main (priv->connection, NULL);
-+
-+ if (!libhal_ctx_set_user_data (hal_ctx, monitor))
-+ GST_WARNING ("Failed to set user data on HAL context");
-+ if (!libhal_ctx_set_device_added (hal_ctx, cheese_camera_device_monitor_added))
-+ GST_WARNING ("Failed to connect to device added signal from HAL");
-+ if (!libhal_ctx_set_device_removed (hal_ctx, cheese_camera_device_monitor_removed))
-+ GST_WARNING ("Failed to connect to device removed signal from HAL");
-+
-+ priv->hal_ctx = hal_ctx;
- }
-
--#endif /* HAVE_UDEV */
-+#else /* HAVE_HAL */
-+#error no hal or udev support here
-+#endif
-
-+#ifdef HAVE_UDEV
- static void
- cheese_camera_device_monitor_finalize (GObject *object)
- {
--#ifdef HAVE_UDEV
- CheeseCameraDeviceMonitorPrivate *priv = CHEESE_CAMERA_DEVICE_MONITOR (object)->priv;
-
- g_clear_object (&priv->client);
--#endif /* HAVE_UDEV */
- G_OBJECT_CLASS (cheese_camera_device_monitor_parent_class)->finalize (object);
- }
-
-@@ -430,15 +631,14 @@
- static void
- cheese_camera_device_monitor_init (CheeseCameraDeviceMonitor *monitor)
- {
--#ifdef HAVE_UDEV
- CheeseCameraDeviceMonitorPrivate *priv = monitor->priv = CHEESE_CAMERA_DEVICE_MONITOR_GET_PRIVATE (monitor);
- const gchar *const subsystems[] = {"video4linux", NULL};
-
- priv->client = g_udev_client_new (subsystems);
- g_signal_connect (G_OBJECT (priv->client), "uevent",
- G_CALLBACK (cheese_camera_device_monitor_uevent_cb), monitor);
--#endif /* HAVE_UDEV */
- }
-+#endif /* HAVE_UDEV */
-
- /**
- * cheese_camera_device_monitor_new: