[gst-cvs] gst-plugins-good: pulse: trivial cleanups
Wim Taymans
wtay at kemper.freedesktop.org
Mon Jun 29 06:40:00 PDT 2009
Module: gst-plugins-good
Branch: master
Commit: 53e19e71f13f7ab4f78d0704c155f7e33738b9c8
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=53e19e71f13f7ab4f78d0704c155f7e33738b9c8
Author: Wim Taymans <wim.taymans at collabora.co.uk>
Date: Mon Jun 29 15:38:49 2009 +0200
pulse: trivial cleanups
---
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 5ced971..99d33ae 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:
More information about the Gstreamer-commits
mailing list