GstURIHandler: Use get_type_full() vmethod if specified instead of get_type()

This fixes bug #581281 and makes it easier for bindings to
implement GstURIHandlers. get_protocols_full() was already used
like this.
This commit is contained in:
Sebastian Dröge 2009-05-07 09:28:15 +02:00
parent 45a515054c
commit c003165b76

View file

@ -643,8 +643,13 @@ gst_uri_handler_get_uri_type (GstURIHandler * handler)
iface = GST_URI_HANDLER_GET_INTERFACE (handler);
g_return_val_if_fail (iface != NULL, GST_URI_UNKNOWN);
g_return_val_if_fail (iface->get_type != NULL, GST_URI_UNKNOWN);
ret = iface->get_type ();
g_return_val_if_fail (iface->get_type != NULL
|| iface->get_type_full != NULL, GST_URI_UNKNOWN);
if (iface->get_type != NULL)
ret = iface->get_type ();
else
ret = iface->get_type_full (G_OBJECT_TYPE (handler));
g_return_val_if_fail (GST_URI_TYPE_IS_VALID (ret), GST_URI_UNKNOWN);
return ret;