mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-15 13:53:19 +00:00
uri: remove some _full variants
This commit is contained in:
parent
6da2a33b7a
commit
b322a401c7
7 changed files with 18 additions and 35 deletions
|
@ -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;
|
||||
}
|
||||
|
|
17
gst/gsturi.c
17
gst/gsturi.c
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 };
|
||||
|
||||
|
|
|
@ -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 };
|
||||
|
||||
|
|
|
@ -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 };
|
||||
|
||||
|
|
|
@ -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 };
|
||||
|
||||
|
|
Loading…
Reference in a new issue