uri: remove some _full variants

This commit is contained in:
Wim Taymans 2011-06-22 16:38:04 +02:00
parent 6da2a33b7a
commit b322a401c7
7 changed files with 18 additions and 35 deletions

View file

@ -267,19 +267,14 @@ gst_element_register (GstPlugin * plugin, const gchar * name, guint rank,
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;
}

View file

@ -655,13 +655,9 @@ 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
|| 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;
@ -688,14 +684,9 @@ gst_uri_handler_get_protocols (GstURIHandler * handler)
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;

View file

@ -102,22 +102,19 @@ struct _GstURIHandlerInterface {
/*< 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 */

View file

@ -581,13 +581,13 @@ seek_failed:
/*** 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 };

View file

@ -600,13 +600,13 @@ seek_failed:
/*** 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 };

View file

@ -675,13 +675,13 @@ gst_file_sink_stop (GstBaseSink * basesink)
/*** 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 };

View file

@ -577,13 +577,13 @@ gst_file_src_stop (GstBaseSrc * basesrc)
/*** 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 };