Index: gstplaybin.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-base/gst/playback/gstplaybin.c,v
retrieving revision 1.113
diff -u -p -r1.113 gstplaybin.c
--- gstplaybin.c	24 May 2007 10:19:54 -0000	1.113
+++ gstplaybin.c	6 Aug 2007 14:42:25 -0000
@@ -260,7 +260,6 @@ GST_DEBUG_CATEGORY_STATIC (gst_play_bin_
 #define GST_IS_PLAY_BIN_CLASS(klass)    (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PLAY_BIN))
 
 #define VOLUME_MAX_DOUBLE 10.0
-#define CONNECTION_SPEED_DEFAULT 0
 
 typedef struct _GstPlayBin GstPlayBin;
 typedef struct _GstPlayBinClass GstPlayBinClass;
@@ -291,9 +290,6 @@ struct _GstPlayBin
   /* font description */
   gchar *font_desc;
 
-  /* connection speed in bits/sec (0 = unknown) */
-  guint connection_speed;
-
   /* indication if the pipeline is live */
   gboolean is_live;
 };
@@ -312,8 +308,7 @@ enum
   ARG_VIS_PLUGIN,
   ARG_VOLUME,
   ARG_FRAME,
-  ARG_FONT_DESC,
-  ARG_CONNECTION_SPEED
+  ARG_FONT_DESC
 };
 
 /* signals */
@@ -420,17 +415,6 @@ gst_play_bin_class_init (GstPlayBinClass
           "Subtitle font description",
           "Pango font description of font "
           "to be used for subtitle rendering", NULL, G_PARAM_WRITABLE));
-  /**
-   * GstPlayBin::connection-speed
-   *
-   * Network connection speed in kbps (0 = unknown)
-   *
-   * Since: 0.10.10
-   **/
-  g_object_class_install_property (gobject_klass, ARG_CONNECTION_SPEED,
-      g_param_spec_uint ("connection-speed", "Connection Speed",
-          "Network connection speed in kbps (0 = unknown)",
-          0, G_MAXUINT, CONNECTION_SPEED_DEFAULT, G_PARAM_READWRITE));
 
   gobject_klass->dispose = GST_DEBUG_FUNCPTR (gst_play_bin_dispose);
 
@@ -737,9 +721,6 @@ gst_play_bin_set_property (GObject * obj
             "font-desc", g_value_get_string (value), NULL);
       }
       break;
-    case ARG_CONNECTION_SPEED:
-      play_bin->connection_speed = g_value_get_uint (value) * 1000;
-      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -774,9 +755,6 @@ gst_play_bin_get_property (GObject * obj
       gst_value_take_buffer (value, cur_frame);
       break;
     }
-    case ARG_CONNECTION_SPEED:
-      g_value_set_uint (value, play_bin->connection_speed / 1000);
-      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -1729,11 +1707,13 @@ gst_play_bin_handle_redirect_message (Gs
   GList *l_good = NULL, *l_neutral = NULL, *l_bad = NULL;
   GValue new_list = { 0, };
   guint size, i;
+  GstPlayBaseBin *playbasebin = GST_PLAY_BASE_BIN (playbin);
+  guint connection_speed = playbasebin->connection_speed;
 
   GST_DEBUG_OBJECT (playbin, "redirect message: %" GST_PTR_FORMAT, msg);
-  GST_DEBUG_OBJECT (playbin, "connection speed: %u", playbin->connection_speed);
+  GST_DEBUG_OBJECT (playbin, "connection speed: %u", connection_speed);
 
-  if (playbin->connection_speed == 0 || msg->structure == NULL)
+  if (connection_speed == 0 || msg->structure == NULL)
     return msg;
 
   locations_list = gst_structure_get_value (msg->structure, "locations");
@@ -1758,10 +1738,10 @@ gst_play_bin_handle_redirect_message (Gs
     if (!gst_structure_get_int (s, "minimum-bitrate", &bitrate) || bitrate <= 0) {
       GST_DEBUG_OBJECT (playbin, "no bitrate: %" GST_PTR_FORMAT, s);
       l_neutral = g_list_append (l_neutral, (gpointer) s);
-    } else if (bitrate > playbin->connection_speed) {
+    } else if (bitrate > connection_speed) {
       GST_DEBUG_OBJECT (playbin, "bitrate too high: %" GST_PTR_FORMAT, s);
       l_bad = g_list_append (l_bad, (gpointer) s);
-    } else if (bitrate <= playbin->connection_speed) {
+    } else if (bitrate <= connection_speed) {
       GST_DEBUG_OBJECT (playbin, "bitrate OK: %" GST_PTR_FORMAT, s);
       l_good = g_list_append (l_good, (gpointer) s);
     }
Index: gstplaybasebin.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-base/gst/playback/gstplaybasebin.c,v
retrieving revision 1.148
diff -u -p -r1.148 gstplaybasebin.c
--- gstplaybasebin.c	23 Jul 2007 11:18:35 -0000	1.148
+++ gstplaybasebin.c	6 Aug 2007 14:42:25 -0000
@@ -35,6 +35,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_play_base
 #define DEFAULT_QUEUE_SIZE          (3 * GST_SECOND)
 #define DEFAULT_QUEUE_MIN_THRESHOLD ((DEFAULT_QUEUE_SIZE * 30) / 100)
 #define DEFAULT_QUEUE_THRESHOLD     ((DEFAULT_QUEUE_SIZE * 95) / 100)
+#define DEFAULT_CONNECTION_SPEED    0
 
 #define GROUP_LOCK(pbb) g_mutex_lock (pbb->group_lock)
 #define GROUP_UNLOCK(pbb) g_mutex_unlock (pbb->group_lock)
@@ -57,7 +58,8 @@ enum
   ARG_VIDEO,
   ARG_AUDIO,
   ARG_TEXT,
-  ARG_SUBTITLE_ENCODING
+  ARG_SUBTITLE_ENCODING,
+  ARG_CONNECTION_SPEED
 };
 
 static void gst_play_base_bin_class_init (GstPlayBaseBinClass * klass);
@@ -191,6 +193,17 @@ gst_play_base_bin_class_init (GstPlayBas
           "If not set, the GST_SUBTITLE_ENCODING environment variable will "
           "be checked for an encoding to use. If that is not set either, "
           "ISO-8859-15 will be assumed.", NULL, G_PARAM_READWRITE));
+  /**
+   * GstPlayBin::connection-speed
+   *
+   * Network connection speed in kbps (0 = unknown)
+   *
+   * Since: 0.10.10 at gstplaybin.c, 0.10.15 moved to gstplaybasebin
+   **/
+  g_object_class_install_property (gobject_klass, ARG_CONNECTION_SPEED,
+      g_param_spec_uint ("connection-speed", "Connection Speed",
+          "Network connection speed in kbps (0 = unknown)",
+          0, G_MAXUINT, DEFAULT_CONNECTION_SPEED, G_PARAM_READWRITE));
 
   GST_DEBUG_CATEGORY_INIT (gst_play_base_bin_debug, "playbasebin", 0,
       "playbasebin");
@@ -228,6 +241,7 @@ gst_play_base_bin_init (GstPlayBaseBin *
   play_base_bin->queue_size = DEFAULT_QUEUE_SIZE;
   play_base_bin->queue_threshold = DEFAULT_QUEUE_THRESHOLD;
   play_base_bin->queue_min_threshold = DEFAULT_QUEUE_MIN_THRESHOLD;
+  play_base_bin->connection_speed = DEFAULT_CONNECTION_SPEED;
 }
 
 static void
@@ -1564,6 +1578,13 @@ gen_source_element (GstPlayBaseBin * pla
           "iradio-mode")) {
     g_object_set (source, "iradio-mode", TRUE, NULL);
   }
+
+  if (g_object_class_find_property (G_OBJECT_GET_CLASS (source), "connection-speed")) {
+    GST_DEBUG_OBJECT (play_base_bin, "setting connection-speed=%d to source element", 
+        play_base_bin->connection_speed / 1000);
+    g_object_set (source, "connection-speed", play_base_bin->connection_speed / 1000, NULL);
+  }
+  
   return source;
 
   /* ERRORS */
@@ -2436,6 +2457,9 @@ gst_play_base_bin_set_property (GObject 
     case ARG_QUEUE_MIN_THRESHOLD:
       play_base_bin->queue_min_threshold = g_value_get_uint64 (value);
       break;
+    case ARG_CONNECTION_SPEED:
+      play_base_bin->connection_speed = g_value_get_uint (value) * 1000;
+      break;      
     case ARG_VIDEO:
       GROUP_LOCK (play_base_bin);
       set_active_source (play_base_bin,
@@ -2528,6 +2552,9 @@ gst_play_base_bin_get_property (GObject 
     case ARG_QUEUE_MIN_THRESHOLD:
       g_value_set_uint64 (value, play_base_bin->queue_min_threshold);
       break;
+    case ARG_CONNECTION_SPEED:
+      g_value_set_uint (value, play_base_bin->connection_speed / 1000);
+      break;      
     case ARG_STREAMINFO:
       /* FIXME: hold some kind of lock here, use iterator */
       g_value_set_pointer (value,
Index: gstplaybasebin.h
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-base/gst/playback/gstplaybasebin.h,v
retrieving revision 1.25
diff -u -p -r1.25 gstplaybasebin.h
--- gstplaybasebin.h	28 Sep 2006 15:29:17 -0000	1.25
+++ gstplaybasebin.h	6 Aug 2007 14:42:25 -0000
@@ -73,6 +73,9 @@ struct _GstPlayBaseBin {
   guint64        queue_size;
   guint64        queue_threshold;
   guint64        queue_min_threshold;
+  /* connection speed in bits/sec (0 = unknown) */
+  guint          connection_speed;
+  
 
   /* currently loaded media */
   gint           current[NUM_TYPES];
