[gst-cvs] gst-plugins-good: pulsesrc: move the property-setter to the getter.

Stefan Kost ensonic at kemper.freedesktop.org
Mon Sep 6 00:42:35 PDT 2010


Module: gst-plugins-good
Branch: master
Commit: f83f7fafad84b0679b98e4c947fcd93cca1393db
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=f83f7fafad84b0679b98e4c947fcd93cca1393db

Author: Stefan Kost <ensonic at users.sf.net>
Date:   Mon Aug 16 15:19:38 2010 +0300

pulsesrc: move the property-setter to the getter.

---

 ext/pulse/pulsesrc.c |   49 ++++++++++++++++++++++++-------------------------
 1 files changed, 24 insertions(+), 25 deletions(-)

diff --git a/ext/pulse/pulsesrc.c b/ext/pulse/pulsesrc.c
index 9765b5c..69c482c 100644
--- a/ext/pulse/pulsesrc.c
+++ b/ext/pulse/pulsesrc.c
@@ -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)
@@ -441,6 +416,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)
 {





More information about the Gstreamer-commits mailing list