v4l2: replace deprecated GST_CLASS_LOCK
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Mon, 5 Dec 2011 12:15:21 +0000 (12:15 +0000)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Mon, 5 Dec 2011 12:15:21 +0000 (12:15 +0000)
sys/v4l2/gstv4l2object.c

index f191bc9..6fdaa18 100644 (file)
@@ -66,6 +66,8 @@ enum
   V4L2_STD_OBJECT_PROPS,
 };
 
+G_LOCK_DEFINE_STATIC (probe_lock);
+
 const GList *
 gst_v4l2_probe_get_properties (GstPropertyProbe * probe)
 {
@@ -74,13 +76,13 @@ gst_v4l2_probe_get_properties (GstPropertyProbe * probe)
 
   /* well, not perfect, but better than no locking at all.
    * In the worst case we leak a list node, so who cares? */
-  GST_CLASS_LOCK (GST_OBJECT_CLASS (klass));
+  G_LOCK (probe_lock);
 
   if (!list) {
     list = g_list_append (NULL, g_object_class_find_property (klass, "device"));
   }
 
-  GST_CLASS_UNLOCK (GST_OBJECT_CLASS (klass));
+  G_UNLOCK (probe_lock);
 
   return list;
 }