pulsesrc: move the property-setter to the getter.
authorStefan Kost <ensonic@users.sf.net>
Mon, 16 Aug 2010 12:19:38 +0000 (15:19 +0300)
committerStefan Kost <ensonic@users.sf.net>
Mon, 6 Sep 2010 06:53:00 +0000 (09:53 +0300)
ext/pulse/pulsesrc.c

index 9765b5c7d2013bea71f6cd103b90f6ea8d3f3eb0..69c482cd999b253cb759509266fc81cb34118b7c 100644 (file)
@@ -347,31 +347,6 @@ gst_pulsesrc_is_dead (GstPulseSrc * pulsesrc)
   return FALSE;
 }
 
-
-static void
-gst_pulsesrc_set_property (GObject * object,
-    guint prop_id, const GValue * value, GParamSpec * pspec)
-{
-
-  GstPulseSrc *pulsesrc = GST_PULSESRC_CAST (object);
-
-  switch (prop_id) {
-    case PROP_SERVER:
-      g_free (pulsesrc->server);
-      pulsesrc->server = g_value_dup_string (value);
-      if (pulsesrc->probe)
-        gst_pulseprobe_set_server (pulsesrc->probe, pulsesrc->server);
-      break;
-    case PROP_DEVICE:
-      g_free (pulsesrc->device);
-      pulsesrc->device = g_value_dup_string (value);
-      break;
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-  }
-}
-
 static void
 gst_pulsesrc_source_info_cb (pa_context * c, const pa_source_info * i, int eol,
     void *userdata)
@@ -440,6 +415,30 @@ no_mainloop:
   }
 }
 
+static void
+gst_pulsesrc_set_property (GObject * object,
+    guint prop_id, const GValue * value, GParamSpec * pspec)
+{
+
+  GstPulseSrc *pulsesrc = GST_PULSESRC_CAST (object);
+
+  switch (prop_id) {
+    case PROP_SERVER:
+      g_free (pulsesrc->server);
+      pulsesrc->server = g_value_dup_string (value);
+      if (pulsesrc->probe)
+        gst_pulseprobe_set_server (pulsesrc->probe, pulsesrc->server);
+      break;
+    case PROP_DEVICE:
+      g_free (pulsesrc->device);
+      pulsesrc->device = g_value_dup_string (value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+  }
+}
+
 static void
 gst_pulsesrc_get_property (GObject * object,
     guint prop_id, GValue * value, GParamSpec * pspec)