]> git.0d.be Git - empathy.git/commitdiff
Remove gst dependency from libempathy
authorSjoerd Simons <sjoerd@luon.net>
Sun, 26 Aug 2012 14:23:14 +0000 (16:23 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Wed, 29 Aug 2012 08:12:32 +0000 (10:12 +0200)
libempathy only used gstreamer api directly from the camera monitor,
which simply uses it for its debug infrastructure.. Use the standard
empathy debug infrastruction instead so we can drop the gstreamer
dependency.

configure.ac
libempathy/cheese-camera-device-monitor.c
libempathy/cheese-camera-device-monitor.h
libempathy/empathy-debug.c
libempathy/empathy-debug.h

index 12d928d6babd4373de936bbecefd8395226cda68..88cc9e6e5781d9150b35095dadec08212774c786 100644 (file)
@@ -203,8 +203,6 @@ PKG_CHECK_MODULES(EMPATHY,
    gmodule-export-2.0
    gobject-2.0
    gsettings-desktop-schemas
-   gstreamer-0.10 >= $GSTREAMER_REQUIRED
-   gstreamer-interfaces-0.10
    libxml-2.0
    telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
    telepathy-logger-0.2 >= $TELEPATHY_LOGGER
@@ -227,6 +225,8 @@ PKG_CHECK_MODULES(EMPATHY_CALL,
    clutter-1.0 >= $CLUTTER_REQUIRED
    clutter-gtk-1.0 >= $CLUTTER_GTK_REQUIRED
    clutter-gst-1.0 >= $CLUTTER_GST_REQUIRED
+   gstreamer-0.10 >= $GSTREAMER_REQUIRED
+   gstreamer-interfaces-0.10
 ])
 
 AC_DEFINE(EMPATHY_GOA_PROVIDER, "org.gnome.OnlineAccounts",
index 57c0087636c09f920751860565e00df5b6600bd3..8e6d540a84341a187bb7579ee48dab432b5dff6a 100644 (file)
@@ -69,8 +69,8 @@ G_DEFINE_TYPE (EmpathyCameraDeviceMonitor, empathy_camera_device_monitor, G_TYPE
 
 #define EMPATHY_CAMERA_DEVICE_MONITOR_ERROR empathy_camera_device_monitor_error_quark ()
 
-GST_DEBUG_CATEGORY (empathy_device_monitor_cat);
-#define GST_CAT_DEFAULT empathy_device_monitor_cat
+#define DEBUG_FLAG EMPATHY_DEBUG_OTHER
+#include <libempathy/empathy-debug.h>
 
 enum EmpathyCameraDeviceMonitorError
 {
@@ -120,7 +120,7 @@ empathy_camera_device_monitor_added (EmpathyCameraDeviceMonitor *monitor,
 
   const gchar *devpath = g_udev_device_get_property (udevice, "DEVPATH");
 
-  GST_INFO ("Checking udev device '%s'", devpath);
+  DEBUG ("Checking udev device '%s'", devpath);
 
   bus = g_udev_device_get_property (udevice, "ID_BUS");
   if (g_strcmp0 (bus, "usb") == 0)
@@ -133,22 +133,22 @@ empathy_camera_device_monitor_added (EmpathyCameraDeviceMonitor *monitor,
       product_id = g_ascii_strtoll (product, NULL, 16);
     if (vendor_id == 0 || product_id == 0)
     {
-      GST_WARNING ("Error getting vendor and product id");
+      DEBUG ("Error getting vendor and product id");
     }
     else
     {
-      GST_INFO ("Found device %04x:%04x, getting capabilities...", vendor_id, product_id);
+      DEBUG ("Found device %04x:%04x, getting capabilities...", vendor_id, product_id);
     }
   }
   else
   {
-    GST_INFO ("Not an usb device, skipping vendor and model id retrieval");
+    DEBUG ("Not an usb device, skipping vendor and model id retrieval");
   }
 
   device_file = g_udev_device_get_device_file (udevice);
   if (device_file == NULL)
   {
-    GST_WARNING ("Error getting V4L device");
+    DEBUG ("Error getting V4L device");
     return;
   }
 
@@ -156,7 +156,7 @@ empathy_camera_device_monitor_added (EmpathyCameraDeviceMonitor *monitor,
    * so detect them by device name */
   if (strstr (device_file, "vbi"))
   {
-    GST_INFO ("Skipping vbi device: %s", device_file);
+    DEBUG ("Skipping vbi device: %s", device_file);
     return;
   }
 
@@ -168,7 +168,7 @@ empathy_camera_device_monitor_added (EmpathyCameraDeviceMonitor *monitor,
     caps = g_udev_device_get_property (udevice, "ID_V4L_CAPABILITIES");
     if (caps == NULL || strstr (caps, ":capture:") == NULL)
     {
-      GST_WARNING ("Device %s seems to not have the capture capability, (radio tuner?)"
+      DEBUG ("Device %s seems to not have the capture capability, (radio tuner?)"
                    "Removing it from device list.", device_file);
       return;
     }
@@ -176,7 +176,7 @@ empathy_camera_device_monitor_added (EmpathyCameraDeviceMonitor *monitor,
   }
   else if (v4l_version == 0)
   {
-    GST_ERROR ("Fix your udev installation to include v4l_id, ignoring %s", device_file);
+    DEBUG ("Fix your udev installation to include v4l_id, ignoring %s", device_file);
     return;
   }
   else
@@ -230,7 +230,7 @@ empathy_camera_device_monitor_coldplug (EmpathyCameraDeviceMonitor *monitor)
   if (priv->client == NULL)
     return;
 
-  GST_INFO ("Probing devices with udev...");
+  DEBUG ("Probing devices with udev...");
 
   devices = g_udev_client_query_by_subsystem (priv->client, "video4linux");
 
@@ -243,7 +243,7 @@ empathy_camera_device_monitor_coldplug (EmpathyCameraDeviceMonitor *monitor)
   }
   g_list_free (devices);
 
-  if (i == 0) GST_WARNING ("No device found");
+  if (i == 0) DEBUG ("No device found");
 }
 
 #else /* HAVE_UDEV */
@@ -339,11 +339,6 @@ empathy_camera_device_monitor_class_init (EmpathyCameraDeviceMonitorClass *klass
 {
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
-  if (empathy_device_monitor_cat == NULL)
-    GST_DEBUG_CATEGORY_INIT (empathy_device_monitor_cat,
-                             "empathy-device-monitor",
-                             0, "Empathy Camera Device Monitor");
-
   object_class->finalize = empathy_camera_device_monitor_finalize;
 
   /**
index ff0bfa7677b91089ddc196cec713f243370b9a92..f3cc3db146b1800ff24c76afb3a50181596dca98 100644 (file)
@@ -26,7 +26,6 @@
 #define __EMPATHY_CAMERA_DEVICE_MONITOR_H__
 
 #include <glib-object.h>
-#include <gst/interfaces/xoverlay.h>
 
 G_BEGIN_DECLS
 
index 9e34ac1db47e99d6b21faeee12ba84e92d07dc15..038748ff4317813d230917ff6ac17df79e318238 100644 (file)
@@ -54,6 +54,7 @@ static GDebugKey keys[] = {
   { "Voip", EMPATHY_DEBUG_VOIP },
   { "Tls", EMPATHY_DEBUG_TLS },
   { "Sasl", EMPATHY_DEBUG_SASL },
+  { "Camera", EMPATHY_DEBUG_CAMERA },
   { 0, }
 };
 
index 44e197792b69cf6be2f845f332c156e766549cd7..0869e80b1183073c2b582dd6b01aa4512b49ae69 100644 (file)
@@ -48,6 +48,7 @@ typedef enum
   EMPATHY_DEBUG_VOIP = 1 << 13,
   EMPATHY_DEBUG_TLS = 1 << 14,
   EMPATHY_DEBUG_SASL = 1 << 15,
+  EMPATHY_DEBUG_CAMERA = 1 << 16,
 } EmpathyDebugFlags;
 
 gboolean empathy_debug_flag_is_set (EmpathyDebugFlags flag);