From: Tim-Philipp Müller Date: Sun, 13 Nov 2011 15:37:40 +0000 (+0000) Subject: urihandler: remove "new-uri" signal X-Git-Tag: RELEASE-0.11.2~455 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=34e3e26467e28dbe8c70afd80cc1f1b96e153b25;p=platform%2Fupstream%2Fgstreamer.git urihandler: remove "new-uri" signal No one but filesrc used that API. Should probably be replaced by requiring an "uri" property instead, and then objects can do a notify on that. Also removed interface structure padding, it's not needed. --- diff --git a/docs/gst/gstreamer-sections.txt b/docs/gst/gstreamer-sections.txt index 5ab04e8..6880c6f 100644 --- a/docs/gst/gstreamer-sections.txt +++ b/docs/gst/gstreamer-sections.txt @@ -2709,7 +2709,6 @@ gst_uri_handler_get_uri_type gst_uri_handler_get_protocols gst_uri_handler_get_uri gst_uri_handler_set_uri -gst_uri_handler_new_uri GST_URI_HANDLER GST_IS_URI_HANDLER diff --git a/gst/gsturi.c b/gst/gsturi.c index 66ab40c..2a027f9 100644 --- a/gst/gsturi.c +++ b/gst/gsturi.c @@ -52,16 +52,6 @@ GST_DEBUG_CATEGORY_STATIC (gst_uri_handler_debug); #define GST_CAT_DEFAULT gst_uri_handler_debug -enum -{ - NEW_URI, - LAST_SIGNAL -}; - -static guint gst_uri_handler_signals[LAST_SIGNAL] = { 0 }; - -static void gst_uri_handler_base_init (gpointer g_class); - GType gst_uri_handler_get_type (void) { @@ -71,7 +61,7 @@ gst_uri_handler_get_type (void) GType _type; static const GTypeInfo urihandler_info = { sizeof (GstURIHandlerInterface), - gst_uri_handler_base_init, + NULL, NULL, NULL, NULL, @@ -92,29 +82,6 @@ gst_uri_handler_get_type (void) return urihandler_type; } -static void -gst_uri_handler_base_init (gpointer g_class) -{ - static gboolean initialized = FALSE; - - if (G_UNLIKELY (!initialized)) { - - /** - * GstURIHandler::new-uri: - * @handler: The #GstURIHandler which emitted the signal - * @uri: (transfer none): The new URI, or NULL if the URI was removed - * - * The URI of the given @handler has changed. - */ - - gst_uri_handler_signals[NEW_URI] = - g_signal_new ("new-uri", GST_TYPE_URI_HANDLER, G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GstURIHandlerInterface, new_uri), NULL, NULL, - gst_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING); - initialized = TRUE; - } -} - static const guchar acceptable[96] = { /* X0 X1 X2 X3 X4 X5 X6 X7 X8 X9 XA XB XC XD XE XF */ 0x00, 0x3F, 0x20, 0x20, 0x20, 0x00, 0x2C, 0x3F, 0x3F, 0x3F, 0x3F, 0x22, 0x20, 0x3F, 0x3F, 0x1C, /* 2X !"#$%&'()*+,-./ */ 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x38, 0x20, 0x20, 0x2C, 0x20, 0x2C, /* 3X 0123456789:;<=>? */ @@ -759,22 +726,6 @@ gst_uri_handler_set_uri (GstURIHandler * handler, const gchar * uri) return ret; } -/** - * gst_uri_handler_new_uri: - * @handler: A #GstURIHandler - * @uri: new URI or NULL if it was unset - * - * Emits the new-uri signal for a given handler, when that handler has a new URI. - * This function should only be called by URI handlers themselves. - */ -void -gst_uri_handler_new_uri (GstURIHandler * handler, const gchar * uri) -{ - g_return_if_fail (GST_IS_URI_HANDLER (handler)); - - g_signal_emit (handler, gst_uri_handler_signals[NEW_URI], 0, uri); -} - static gchar * gst_file_utils_canonicalise_path (const gchar * path) { diff --git a/gst/gsturi.h b/gst/gsturi.h index 176d70e..5068729 100644 --- a/gst/gsturi.h +++ b/gst/gsturi.h @@ -80,18 +80,7 @@ typedef struct _GstURIHandlerInterface GstURIHandlerInterface; struct _GstURIHandlerInterface { GTypeInterface parent; - /*< private >*/ - /* signals */ - void (* new_uri) (GstURIHandler * handler, - const gchar * uri); - /* idea for the future ? - gboolean (* require_password) (GstURIHandler * handler, - gchar ** username, - gchar ** password); - */ - /* vtable */ - /*< public >*/ /* querying capabilities */ GstURIType (* get_type) (GType type); @@ -101,12 +90,6 @@ struct _GstURIHandlerInterface { const gchar * (* get_uri) (GstURIHandler * handler); gboolean (* set_uri) (GstURIHandler * handler, const gchar * uri); - - /*< private >*/ - /* we might want to add functions here to query features, - * someone with gnome-vfs knowledge go ahead */ - - gpointer _gst_reserved[GST_PADDING]; }; /* general URI functions */ @@ -137,8 +120,6 @@ gchar ** gst_uri_handler_get_protocols (GstURIHandler * handler); const gchar * gst_uri_handler_get_uri (GstURIHandler * handler); gboolean gst_uri_handler_set_uri (GstURIHandler * handler, const gchar * uri); -void gst_uri_handler_new_uri (GstURIHandler * handler, - const gchar * uri); G_END_DECLS diff --git a/plugins/elements/gstfilesrc.c b/plugins/elements/gstfilesrc.c index 86900b0..6d5fa46 100644 --- a/plugins/elements/gstfilesrc.c +++ b/plugins/elements/gstfilesrc.c @@ -257,7 +257,7 @@ gst_file_src_set_location (GstFileSrc * src, const gchar * location) GST_INFO ("uri : %s", src->uri); } g_object_notify (G_OBJECT (src), "location"); - gst_uri_handler_new_uri (GST_URI_HANDLER (src), src->uri); + /* FIXME 0.11: notify "uri" property once there is one */ return TRUE;