GNOME Bugzilla – Bug 764345
[2.0] GstUriHandler interface issue in vala
Last modified: 2018-11-03 12:33:59 UTC
some interfaces in GStreamer and other projects are ugly, ex. with URIHandler : struct _GstURIHandlerInterface { GTypeInterface parent; /* vtable */ /*< public >*/ /* querying capabilities */ GstURIType (* get_type) (GType type); const gchar * const * (* get_protocols) (GType type); /* using the interface */ gchar * (* get_uri) (GstURIHandler * handler); gboolean (* set_uri) (GstURIHandler * handler, const gchar * uri, GError ** error); }; where some members don't have 'GstURIHandler * handler' parameter. with these interfaces, languages like Vala can't implement it because the language implement interface with this parameter by default
I think we looked at this particular case in 0.11 and there was a reason to keep it like that, but I don't recall right now (maybe because the GType is retrieved from the element factory and there's no actual element yet that implements the interface).
This cannot change before next API break.
Well, we could add differently-named vfuncs with a interface pointer if there's a use case / need for it. But we'll still need the above ones for the reason I mentioned anyway, unless we come up with a different way of querying that, so I don't think we'll want to remove the old ones in any case.
ok guys. I have to write C functions to handler URIHandler interface :(
*handle sorry
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/165.