2007-10-25 Jan Schmidt <Jan.Schmidt@sun.com>
+ * gst/gstelementfactory.c: (gst_element_register):
+ * gst/gsturi.h:
+ Patch from Alessandro Decina adding get_type_full and
+ get_protocols_full private vfuncs to the URIHandler interface
+ to allow bindings to support creating URI handlers.
+ Partially fixes: #339279
+ API: GstURIHandlerInterface::get_type_full
+ API: GstURIHandlerInterface::get_protocols_full
+
+2007-10-25 Jan Schmidt <Jan.Schmidt@sun.com>
+
* plugins/elements/gstmultiqueue.c: (gst_multi_queue_set_property),
(gst_multi_queue_request_new_pad), (gst_single_queue_flush),
(gst_multi_queue_loop), (gst_multi_queue_sink_activate_push):
GstURIHandlerInterface *iface = (GstURIHandlerInterface *)
g_type_interface_peek (klass, GST_TYPE_URI_HANDLER);
- if (!iface || !iface->get_type || !iface->get_protocols)
+ if (!iface || (!iface->get_type && !iface->get_type_full) ||
+ (!iface->get_protocols && !iface->get_protocols_full))
goto urierror;
- factory->uri_type = iface->get_type ();
+ if (iface->get_type)
+ factory->uri_type = iface->get_type ();
+ else if (iface->get_type_full)
+ factory->uri_type = iface->get_type_full (factory->type);
if (!GST_URI_TYPE_IS_VALID (factory->uri_type))
goto urierror;
- factory->uri_protocols = g_strdupv (iface->get_protocols ());
+ if (iface->get_protocols)
+ factory->uri_protocols = g_strdupv (iface->get_protocols ());
+ else if (iface->get_protocols_full)
+ factory->uri_protocols = iface->get_protocols_full (factory->type);
if (!factory->uri_protocols)
goto urierror;
}
* @get_protocols: Method to return the list of protocols handled by the element.
* @get_uri: Method to return the URI currently handled by the element.
* @set_uri: Method to set a new URI.
+ * @get_type_full: Variant of get_type which takes a GType argument. This is
+ * for use by bindings that need to pass context when creating a URI Handler. * If implemented, get_type will be used in preference to get_type_full.
+ * Since: 0.10.15
+ * @get_protocols_full: Variant of get_type which takes a GType argument.
+ * This is for use by bindings that need to pass context when creating a URI
+ * Handler. If implemented, get_protocols will be used in preference to
+ * get_protocols_full.
+ * Since: 0.10.15
*
* #GstElements using this interface should implement these methods.
*/
gboolean (* set_uri) (GstURIHandler * handler,
const gchar * uri);
+ GstURIType (* get_type_full) (GType type);
+ gchar ** (* get_protocols_full) (GType type);
+
/*< private >*/
/* we might want to add functions here to query features,
* someone with gnome-vfs knowledge go ahead */
- gpointer _gst_reserved[GST_PADDING];
+ gpointer _gst_reserved[GST_PADDING - 2];
};
/* general URI functions */