GstURIHandlerInterface *iface = (GstURIHandlerInterface *)
g_type_interface_peek (klass, GST_TYPE_URI_HANDLER);
- if (!iface || (!iface->get_type && !iface->get_type_full) ||
- (!iface->get_protocols && !iface->get_protocols_full))
+ if (!iface || !iface->get_type || !iface->get_protocols)
goto urierror;
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);
+ factory->uri_type = iface->get_type (factory->type);
if (!GST_URI_TYPE_IS_VALID (factory->uri_type))
goto urierror;
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);
+ factory->uri_protocols = iface->get_protocols (factory->type);
if (!factory->uri_protocols)
goto urierror;
}
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
- || iface->get_type_full != NULL, GST_URI_UNKNOWN);
+ g_return_val_if_fail (iface->get_type != NULL, GST_URI_UNKNOWN);
- if (iface->get_type != NULL)
- ret = iface->get_type ();
- else
- ret = iface->get_type_full (G_OBJECT_TYPE (handler));
+ ret = iface->get_type (G_OBJECT_TYPE (handler));
g_return_val_if_fail (GST_URI_TYPE_IS_VALID (ret), GST_URI_UNKNOWN);
return ret;
iface = GST_URI_HANDLER_GET_INTERFACE (handler);
g_return_val_if_fail (iface != NULL, NULL);
- g_return_val_if_fail (iface->get_protocols != NULL ||
- iface->get_protocols_full != NULL, NULL);
+ g_return_val_if_fail (iface->get_protocols != NULL, NULL);
- if (iface->get_protocols != NULL) {
- ret = iface->get_protocols ();
- } else {
- ret = iface->get_protocols_full (G_OBJECT_TYPE (handler));
- }
+ ret = iface->get_protocols (G_OBJECT_TYPE (handler));
g_return_val_if_fail (ret != NULL, NULL);
return ret;
/*< public >*/
/* querying capabilities */
- GstURIType (* get_type) (void);
- gchar ** (* get_protocols) (void);
+ GstURIType (* get_type) (GType type);
+ gchar ** (* get_protocols) (GType type);
/* using the interface */
const gchar * (* get_uri) (GstURIHandler * handler);
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 - 2];
+ gpointer _gst_reserved[GST_PADDING];
};
/* general URI functions */
/*** GSTURIHANDLER INTERFACE *************************************************/
static GstURIType
-gst_fd_sink_uri_get_type (void)
+gst_fd_sink_uri_get_type (GType type)
{
return GST_URI_SINK;
}
static gchar **
-gst_fd_sink_uri_get_protocols (void)
+gst_fd_sink_uri_get_protocols (GType type)
{
static gchar *protocols[] = { (char *) "fd", NULL };
/*** GSTURIHANDLER INTERFACE *************************************************/
static GstURIType
-gst_fd_src_uri_get_type (void)
+gst_fd_src_uri_get_type (GType type)
{
return GST_URI_SRC;
}
static gchar **
-gst_fd_src_uri_get_protocols (void)
+gst_fd_src_uri_get_protocols (GType type)
{
static gchar *protocols[] = { (char *) "fd", NULL };
/*** GSTURIHANDLER INTERFACE *************************************************/
static GstURIType
-gst_file_sink_uri_get_type (void)
+gst_file_sink_uri_get_type (GType type)
{
return GST_URI_SINK;
}
static gchar **
-gst_file_sink_uri_get_protocols (void)
+gst_file_sink_uri_get_protocols (GType type)
{
static gchar *protocols[] = { (char *) "file", NULL };
/*** GSTURIHANDLER INTERFACE *************************************************/
static GstURIType
-gst_file_src_uri_get_type (void)
+gst_file_src_uri_get_type (GType type)
{
return GST_URI_SRC;
}
static gchar **
-gst_file_src_uri_get_protocols (void)
+gst_file_src_uri_get_protocols (GType type)
{
static gchar *protocols[] = { (char *) "file", NULL };