diff --git a/ext/pulse/pulsesrc.c b/ext/pulse/pulsesrc.c
index 8b37c9c..0235fd2 100644
--- a/ext/pulse/pulsesrc.c
+++ b/ext/pulse/pulsesrc.c
@@ -2,6 +2,7 @@
  *  GStreamer pulseaudio plugin
  *
  *  Copyright (c) 2004-2008 Lennart Poettering
+ *  Copyright (c) 2009 Jonathan Tellier (jonathan.tellier@gmail.com)
  *
  *  gst-pulse is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU Lesser General Public License as
@@ -61,6 +62,7 @@ enum
   PROP_SERVER,
   PROP_DEVICE,
   PROP_DEVICE_NAME,
+  PROP_STREAM,
   PROP_LAST
 };
 
@@ -245,6 +247,12 @@ gst_pulsesrc_class_init (GstPulseSrcClass * klass)
       g_param_spec_string ("device-name", "Device name",
           "Human-readable name of the sound device", DEFAULT_DEVICE_NAME,
           G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_property (gobject_class,
+      PROP_STREAM,
+      g_param_spec_pointer ("stream", "Stream",
+          "The PulseAudio pa_stream managed by the pulsesrc",
+          G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
 }
 
 static void
@@ -357,6 +365,29 @@ gst_pulsesrc_is_dead (GstPulseSrc * pulsesrc)
   return FALSE;
 }
 
+static void
+gst_pulsesrc_device_changed_cb (pa_context * c, int success, void *userdata)
+{
+  GstPulseSrc *pulsesrc = userdata;
+  uint32_t stream_index;
+
+  if (!pulsesrc->stream)
+    return;
+
+  stream_index = pa_stream_get_index (pulsesrc->stream);
+
+  if (success) {
+    g_free (pulsesrc->device);
+    pulsesrc->device = g_strdup (pa_stream_get_device_name (pulsesrc->stream));
+
+    GST_INFO_OBJECT (pulsesrc,
+        "Successfully changed source device of stream %d to %s.",
+        stream_index, pulsesrc->device);
+  } else {
+    GST_WARNING_OBJECT (pulsesrc,
+        "Could not change source device of stream %d.", stream_index);
+  }
+}
 
 static void
 gst_pulsesrc_set_property (GObject * object,
@@ -364,6 +395,7 @@ gst_pulsesrc_set_property (GObject * object,
 {
 
   GstPulseSrc *pulsesrc = GST_PULSESRC_CAST (object);
+  gchar *new_device;
 
   switch (prop_id) {
     case PROP_SERVER:
@@ -373,8 +405,23 @@ gst_pulsesrc_set_property (GObject * object,
         gst_pulseprobe_set_server (pulsesrc->probe, pulsesrc->server);
       break;
     case PROP_DEVICE:
-      g_free (pulsesrc->device);
-      pulsesrc->device = g_value_dup_string (value);
+      new_device = g_value_dup_string (value);
+
+      pa_threaded_mainloop_lock (pulsesrc->mainloop);
+
+      if (pulsesrc->stream) {
+        pa_context_move_source_output_by_name (pulsesrc->context,
+            pa_stream_get_index (pulsesrc->stream), new_device,
+            gst_pulsesrc_device_changed_cb, pulsesrc);
+      } else {
+        g_free (pulsesrc->device);
+        pulsesrc->device = g_strdup (new_device);
+      }
+
+      pa_threaded_mainloop_unlock (pulsesrc->mainloop);
+
+      g_free (new_device);
+
       break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -458,6 +505,9 @@ gst_pulsesrc_get_property (GObject * object,
     case PROP_DEVICE_NAME:
       g_value_take_string (value, gst_pulsesrc_device_description (pulsesrc));
       break;
+    case PROP_STREAM:
+      g_value_set_pointer (value, pulsesrc->stream);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
