mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +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",
|
"Host URL to connect to. Accepted are mms://, mmsu://, mmst:// URL types",
|
||||||
NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
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_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)",
|
"Network connection speed in kbps (0 = unknown)",
|
||||||
0, G_MAXINT / 1000, DEFAULT_CONNECTION_SPEED,
|
0, G_MAXINT / 1000, DEFAULT_CONNECTION_SPEED,
|
||||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
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_element_class_add_pad_template (gstelement_class,
|
||||||
gst_static_pad_template_get (&src_factory));
|
gst_static_pad_template_get (&src_factory));
|
||||||
|
@ -480,7 +481,7 @@ gst_mms_set_property (GObject * object, guint prop_id,
|
||||||
break;
|
break;
|
||||||
case PROP_CONNECTION_SPEED:
|
case PROP_CONNECTION_SPEED:
|
||||||
GST_OBJECT_LOCK (mmssrc);
|
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);
|
GST_OBJECT_UNLOCK (mmssrc);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -502,7 +503,7 @@ gst_mms_get_property (GObject * object, guint prop_id,
|
||||||
g_value_set_string (value, mmssrc->uri_name);
|
g_value_set_string (value, mmssrc->uri_name);
|
||||||
break;
|
break;
|
||||||
case PROP_CONNECTION_SPEED:
|
case PROP_CONNECTION_SPEED:
|
||||||
g_value_set_uint (value, mmssrc->connection_speed / 1000);
|
g_value_set_uint64 (value, mmssrc->connection_speed / 1000);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
|
|
|
@ -32,7 +32,7 @@ struct _GstMMS
|
||||||
|
|
||||||
gchar *uri_name;
|
gchar *uri_name;
|
||||||
gchar *current_connection_uri_name;
|
gchar *current_connection_uri_name;
|
||||||
guint connection_speed;
|
guint64 connection_speed;
|
||||||
|
|
||||||
mmsx_t *connection;
|
mmsx_t *connection;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue