mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-17 13:56:32 +00:00
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:
parent
45a515054c
commit
c003165b76
1 changed files with 7 additions and 2 deletions
|
@ -643,8 +643,13 @@ gst_uri_handler_get_uri_type (GstURIHandler * handler)
|
||||||
|
|
||||||
iface = GST_URI_HANDLER_GET_INTERFACE (handler);
|
iface = GST_URI_HANDLER_GET_INTERFACE (handler);
|
||||||
g_return_val_if_fail (iface != NULL, GST_URI_UNKNOWN);
|
g_return_val_if_fail (iface != NULL, GST_URI_UNKNOWN);
|
||||||
g_return_val_if_fail (iface->get_type != NULL, GST_URI_UNKNOWN);
|
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 ();
|
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);
|
g_return_val_if_fail (GST_URI_TYPE_IS_VALID (ret), GST_URI_UNKNOWN);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in a new issue