playbin2/uridecodebin: Fix connection-speed propagation

uridecodebin expects the passed connection-speed value in kbps, so we
need to divide the value stored in bps by 1000. Also, lower the upper
limit on the properties to the value that we can actually store in our
internal guint (which is plenty high enough)
This commit is contained in:
Jan Schmidt 2009-06-10 16:56:51 +01:00
parent 40bea96ff6
commit 79e97ec5ec
2 changed files with 4 additions and 4 deletions

View file

@ -757,7 +757,7 @@ gst_play_bin_class_init (GstPlayBinClass * klass)
g_object_class_install_property (gobject_klass, PROP_CONNECTION_SPEED, g_object_class_install_property (gobject_klass, PROP_CONNECTION_SPEED,
g_param_spec_uint ("connection-speed", "Connection Speed", g_param_spec_uint ("connection-speed", "Connection Speed",
"Network connection speed in kbps (0 = unknown)", "Network connection speed in kbps (0 = unknown)",
0, G_MAXUINT, DEFAULT_CONNECTION_SPEED, 0, G_MAXUINT / 1000, DEFAULT_CONNECTION_SPEED,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_klass, PROP_BUFFER_SIZE, g_object_class_install_property (gobject_klass, PROP_BUFFER_SIZE,
@ -2519,8 +2519,8 @@ activate_group (GstPlayBin * playbin, GstSourceGroup * group)
} }
/* configure connection speed */ /* configure connection speed */
g_object_set (uridecodebin, "connection-speed", playbin->connection_speed, g_object_set (uridecodebin, "connection-speed",
NULL); playbin->connection_speed / 1000, NULL);
/* configure subtitle encoding */ /* configure subtitle encoding */
g_object_set (uridecodebin, "subtitle-encoding", playbin->encoding, NULL); g_object_set (uridecodebin, "subtitle-encoding", playbin->encoding, NULL);
/* configure uri */ /* configure uri */

View file

@ -281,7 +281,7 @@ gst_uri_decode_bin_class_init (GstURIDecodeBinClass * klass)
g_object_class_install_property (gobject_class, PROP_CONNECTION_SPEED, g_object_class_install_property (gobject_class, PROP_CONNECTION_SPEED,
g_param_spec_uint ("connection-speed", "Connection Speed", g_param_spec_uint ("connection-speed", "Connection Speed",
"Network connection speed in kbps (0 = unknown)", "Network connection speed in kbps (0 = unknown)",
0, G_MAXUINT, DEFAULT_CONNECTION_SPEED, 0, G_MAXUINT / 1000, DEFAULT_CONNECTION_SPEED,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_CAPS, g_object_class_install_property (gobject_class, PROP_CAPS,