After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 764345 - [2.0] GstUriHandler interface issue in vala
[2.0] GstUriHandler interface issue in vala
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-03-30 02:49 UTC by Yannick Inizan
Modified: 2018-11-03 12:33 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Yannick Inizan 2016-03-30 02:49:06 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
Comment 1 Tim-Philipp Müller 2016-03-30 08:19:34 UTC
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).
Comment 2 Nicolas Dufresne (ndufresne) 2016-03-30 12:15:44 UTC
This cannot change before next API break.
Comment 3 Tim-Philipp Müller 2016-03-30 17:32:01 UTC
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.
Comment 4 Yannick Inizan 2016-03-30 20:14:58 UTC
ok guys. I have to write C functions to handler URIHandler interface :(
Comment 5 Yannick Inizan 2016-03-30 20:15:19 UTC
*handle sorry
Comment 6 GStreamer system administrator 2018-11-03 12:33:59 UTC
-- 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.