uri: remove some _full variants
authorWim Taymans <wim.taymans@collabora.co.uk>
Wed, 22 Jun 2011 14:38:04 +0000 (16:38 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Wed, 22 Jun 2011 14:38:04 +0000 (16:38 +0200)
gst/gstelementfactory.c
gst/gsturi.c
gst/gsturi.h
plugins/elements/gstfdsink.c
plugins/elements/gstfdsrc.c
plugins/elements/gstfilesink.c
plugins/elements/gstfilesrc.c

index 431e8be..614976f 100644 (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;
   }
index 30244e5..66ab40c 100644 (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;
index 00dfb91..78ae195 100644 (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 */
index b010929..d05067e 100644 (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 };
 
index eea0af8..8e12d52 100644 (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 };
 
index 98ba6e2..c5add2b 100644 (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 };
 
index bed3590..803530f 100644 (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 };