mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
mmssrc: make connection-speed property a guint64
Even if the library limits it to an int.
This commit is contained in:
parent
bd92bc966f
commit
8235729ada
2 changed files with 6 additions and 5 deletions
|
@ -92,12 +92,13 @@ gst_mms_class_init (GstMMSClass * klass)
|
|||
"Host URL to connect to. Accepted are mms://, mmsu://, mmst:// URL types",
|
||||
NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
|
||||
/* Note: connection-speed is intentionaly limited to G_MAXINT as libmms
|
||||
* uses int for it */
|
||||
g_object_class_install_property (gobject_class, PROP_CONNECTION_SPEED,
|
||||
g_param_spec_uint ("connection-speed", "Connection Speed",
|
||||
g_param_spec_uint64 ("connection-speed", "Connection Speed",
|
||||
"Network connection speed in kbps (0 = unknown)",
|
||||
0, G_MAXINT / 1000, DEFAULT_CONNECTION_SPEED,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
/* Note: connection-speed is intentionaly limited to G_MAXINT as libmms use int for it */
|
||||
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&src_factory));
|
||||
|
@ -480,7 +481,7 @@ gst_mms_set_property (GObject * object, guint prop_id,
|
|||
break;
|
||||
case PROP_CONNECTION_SPEED:
|
||||
GST_OBJECT_LOCK (mmssrc);
|
||||
mmssrc->connection_speed = g_value_get_uint (value) * 1000;
|
||||
mmssrc->connection_speed = g_value_get_uint64 (value) * 1000;
|
||||
GST_OBJECT_UNLOCK (mmssrc);
|
||||
break;
|
||||
default:
|
||||
|
@ -502,7 +503,7 @@ gst_mms_get_property (GObject * object, guint prop_id,
|
|||
g_value_set_string (value, mmssrc->uri_name);
|
||||
break;
|
||||
case PROP_CONNECTION_SPEED:
|
||||
g_value_set_uint (value, mmssrc->connection_speed / 1000);
|
||||
g_value_set_uint64 (value, mmssrc->connection_speed / 1000);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
|
|
|
@ -32,7 +32,7 @@ struct _GstMMS
|
|||
|
||||
gchar *uri_name;
|
||||
gchar *current_connection_uri_name;
|
||||
guint connection_speed;
|
||||
guint64 connection_speed;
|
||||
|
||||
mmsx_t *connection;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue