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 709903 - GstIterator should maybe be based in LibGee.Iterator
GstIterator should maybe be based in LibGee.Iterator
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-10-11 11:59 UTC by Andrés G. Aragoneses (IRC: knocte)
Modified: 2013-10-11 14:57 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Andrés G. Aragoneses (IRC: knocte) 2013-10-11 11:59:36 UTC
Stephan and I filed bug 709901 because we're missing the type of the element of the iterator from gobject-introspection data (I know we normally have this in the <doc> tag, but that is not machine-parseable).

Maybe that bug is invalid and what should happen is that GstIterator should depend on LibGee.Iterator[1], which seems to be generic in vala without problems.

[1] https://people.gnome.org/~dvillevalois/libgee/doc/gee-1.0/Gee.Iterator.html
Comment 1 Sebastian Dröge (slomo) 2013-10-11 14:48:07 UTC
No it should not be based on the Gee.Iterator, that one is not threadsafe among other things.

The problem here is that gobject-introspection has parameterized types for a fixed number of hard coded types (e.g. GList). This should be somehow extendable to handle other cases, gpointer based and GValue based.


Anyway, this shouldn't be a problem for you as GstIterator works with GValues, and GValues contain the information about the type of the value. You can just get that at runtime and do a dynamic cast to the corresponding type.
Comment 2 Andrés G. Aragoneses (IRC: knocte) 2013-10-11 14:57:42 UTC
(In reply to comment #1)
> No it should not be based on the Gee.Iterator, that one is not threadsafe among
> other things.
> 
> The problem here is that gobject-introspection has parameterized types for a
> fixed number of hard coded types (e.g. GList). This should be somehow
> extendable to handle other cases, gpointer based and GValue based.


So then bug 709901 is a valid bug?


> Anyway, this shouldn't be a problem for you as GstIterator works with GValues,
> and GValues contain the information about the type of the value. You can just
> get that at runtime and do a dynamic cast to the corresponding type.

Well, the main goal behind this is to obtain those types at compile-time :(