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 629746 - Enumerations have incorrect names of enum values (GEnumValue.value_name)
Enumerations have incorrect names of enum values (GEnumValue.value_name)
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
unspecified
Other Linux
: Normal normal
: 0.10.31
Assigned To: Tim-Philipp Müller
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-09-15 10:54 UTC by Anton Gorenko
Modified: 2010-10-08 10:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Anton Gorenko 2010-09-15 10:54:59 UTC
For example:

http://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/gst-libs/gst/audio/gstbaseaudiosrc.c#n52

http://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/gst-libs/gst/audio/gstbaseaudiosink.c#n114

The second value in GEnumValue should be a string such as "GST_BASE_AUDIO_SRC_SLAVE_RESAMPLE".

So gobject-introspection .gir files contain incorrect values of c:identifier attributes:

[20:47:37 /usr/share/gir-1.0]$ grep -RnTo --color -E
'c:identifier="[A-Z0-9_][a-z]+.*' *
GstAudio-0.10.gir: 839 :c:identifier="Resampling slaving"
GstAudio-0.10.gir: 843 :c:identifier="Skew slaving"
GstAudio-0.10.gir: 847 :c:identifier="No slaving"
GstAudio-0.10.gir:1006 :c:identifier="Resampling slaving"
GstAudio-0.10.gir:1010 :c:identifier="Re-timestamp"
GstAudio-0.10.gir:1012 :c:identifier="Skew" glib:nick="skew"/>
GstAudio-0.10.gir:1015 :c:identifier="No slaving"
...

There're a lot of enums with same problems in GStreamer and its subprojects (run something like "grep -RnT --color -A 2 GEnumValue *" and check results).
Comment 1 Tim-Philipp Müller 2010-09-15 11:17:24 UTC
> There're a lot of enums with same problems in GStreamer and its subprojects
> (run something like "grep -RnT --color -A 2 GEnumValue *" and check results).

Well, for plugins we abuse the GEnumValue name field as description field (see e.g. the "mode" property on gst-inspect-0.10 gstrtpjitterbuffer), but those shouldn't matter since they're not inspected by g-i anyway (and there are no header files with the defines either).

The ones in core/base should be fixed I guess. Moving to -base for now.
Comment 2 Sebastian Dröge (slomo) 2010-09-17 18:09:21 UTC
Same in core, see bug #629946.
Comment 3 Tim-Philipp Müller 2010-10-08 10:40:45 UTC
I think those are all:


commit 06afe5f04918d26af61805a7c6fd2a3ce7caac89
Author: Tim-Philipp Müller <tim.muller@collabora.co.uk>
Date:   Fri Oct 8 10:06:07 2010 +0100

    rtsp: fix enum value name in enums that are public API
    
    https://bugzilla.gnome.org/show_bug.cgi?id=629746

commit 6b7af81e303cb2cbcd02d450554373178eb750f2
Author: Tim-Philipp Müller <tim.muller@collabora.co.uk>
Date:   Fri Oct 8 09:45:30 2010 +0100

    audio: fix enum value name in enums that are public API
    
    So run-time bindings can introspect the names correctly (we abuse this
    field as description field only in elements, not for public API
    (where the description belongs into the gtk-doc chunk).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=629746



Thanks for the bug report. Please re-open if I missed any.