summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2009-05-07 09:28:15 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2009-05-12 09:02:44 +0200
commitc003165b7624d5c72517211d6fac2896f2b6676f (patch)
tree9e60bef7ec69d23b21abc83eb8f373f5deea7181
parent45a515054c10a8314f1a8d3cbc2ab6185aba4a19 (diff)
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.
-rw-r--r--gst/gsturi.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gst/gsturi.c b/gst/gsturi.c
index c6d3f14d09..5c0c91c488 100644
--- a/gst/gsturi.c
+++ b/gst/gsturi.c
@@ -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;