diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-06-29 15:38:49 +0200 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-06-29 15:38:49 +0200 |
commit | 53e19e71f13f7ab4f78d0704c155f7e33738b9c8 (patch) | |
tree | d4488202877e5d85993f4e0de7fa012d476e07cc /ext | |
parent | 1e98580204663cd816d53277247aff9fc7ce4f0a (diff) |
pulse: trivial cleanups
Diffstat (limited to 'ext')
-rw-r--r-- | ext/pulse/pulsemixer.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/ext/pulse/pulsemixer.c b/ext/pulse/pulsemixer.c index 5ced971b..99d33aee 100644 --- a/ext/pulse/pulsemixer.c +++ b/ext/pulse/pulsemixer.c @@ -149,7 +149,7 @@ gst_pulsemixer_class_init (GstPulseMixerClass * g_class) g_object_class_install_property (gobject_class, PROP_DEVICE, - g_param_spec_string ("device", "Sink/Source", + g_param_spec_string ("device", "Device", "The PulseAudio sink or source to control", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); @@ -230,24 +230,18 @@ gst_pulsemixer_get_property (GObject * object, case PROP_SERVER: g_value_set_string (value, this->server); break; - case PROP_DEVICE: g_value_set_string (value, this->device); break; - case PROP_DEVICE_NAME: if (this->mixer) { char *t = g_strdup_printf ("%s: %s", this->mixer->type == GST_PULSEMIXER_SINK ? "Playback" : "Capture", this->mixer->description); - - g_value_set_string (value, t); - g_free (t); + g_value_take_string (value, t); } else g_value_set_string (value, NULL); - break; - default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -261,21 +255,16 @@ gst_pulsemixer_change_state (GstElement * element, GstStateChange transition) switch (transition) { case GST_STATE_CHANGE_NULL_TO_READY: - if (!this->mixer) this->mixer = gst_pulsemixer_ctrl_new (G_OBJECT (this), this->server, this->device, GST_PULSEMIXER_UNKNOWN); - break; - case GST_STATE_CHANGE_READY_TO_NULL: - if (this->mixer) { gst_pulsemixer_ctrl_free (this->mixer); this->mixer = NULL; } - break; default: |