~ubuntu-branches/debian/sid/cheese/sid

« back to all changes in this revision

Viewing changes to libcheese/cheese-camera-device-monitor.c

  • Committer: Bazaar Package Importer
  • Author(s): Laurent Bigonville
  • Date: 2011-07-17 21:04:16 UTC
  • mfrom: (15.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20110717210416-nt5qi659qei7a2yy
Tags: 3.0.1-2
* debian/control.in:
  - Change gir1.2-cheese-3.0 Section to libs
  - Make library packages depend against cheese-common package
  - Make cheese package recommends against hicolor-icon-theme
  - Move gst Dependency to libcheese package
* debian/patches/0002-fix-linking.patch: Add missing library to fix linking
* debian/watch:
  - Switch to .bz2 tarballs.
  - Bump version to 3

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#endif
25
25
 
26
26
#include <glib-object.h>
27
 
#include <dbus/dbus-glib-lowlevel.h>
28
27
#include <string.h>
29
28
 
30
29
#ifdef HAVE_UDEV
107
106
cheese_camera_device_monitor_added (CheeseCameraDeviceMonitor *monitor,
108
107
                                    GUdevDevice               *udevice)
109
108
{
110
 
  const char         *device_file;
111
 
  const char         *product_name;
112
 
  const char         *vendor;
113
 
  const char         *product;
114
 
  const char         *bus;
115
 
  gint                vendor_id   = 0;
116
 
  gint                product_id  = 0;
117
 
  gint                v4l_version = 0;
 
109
  const char *device_file;
 
110
  const char *product_name;
 
111
  const char *vendor;
 
112
  const char *product;
 
113
  const char *bus;
 
114
  gint        vendor_id   = 0;
 
115
  gint        product_id  = 0;
 
116
  gint        v4l_version = 0;
118
117
 
119
118
  const gchar *devpath = g_udev_device_get_property (udevice, "DEVPATH");
120
119
 
128
127
      vendor_id = g_ascii_strtoll (vendor, NULL, 16);
129
128
    product = g_udev_device_get_property (udevice, "ID_MODEL_ID");
130
129
    if (product != NULL)
131
 
      product_id = g_ascii_strtoll (vendor, NULL, 16);
 
130
      product_id = g_ascii_strtoll (product, NULL, 16);
132
131
    if (vendor_id == 0 || product_id == 0)
133
132
    {
134
133
      GST_WARNING ("Error getting vendor and product id");
170
169
                   "Removing it from device list.", device_file);
171
170
      return;
172
171
    }
173
 
    product_name  = g_udev_device_get_property (udevice, "ID_V4L_PRODUCT");
 
172
    product_name = g_udev_device_get_property (udevice, "ID_V4L_PRODUCT");
174
173
  }
175
174
  else if (v4l_version == 0)
176
175
  {