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 322139 - our elements are confused about GEnumValue and which is the nick, which is the name
our elements are confused about GEnumValue and which is the nick, which is th...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.9.x
Other Linux
: Normal normal
: 0.9.6
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-11-22 14:48 UTC by Thomas Vander Stichele
Modified: 2005-11-22 18:23 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Thomas Vander Stichele 2005-11-22 14:48:51 UTC
GEnumValue is a struct of value, name, nick; though difference of name vs. nick
is not really documented in GLib

Our elements seem to do it opposite from what is intended;
look at e.g. videotestsrc:
  static GEnumValue pattern_types[] = {
    {GST_VIDEOTESTSRC_SMPTE, "smpte", "SMPTE 100% color bars"},
    {GST_VIDEOTESTSRC_SNOW, "snow", "Random (television snow)"},
    {GST_VIDEOTESTSRC_BLACK, "black", "100% Black"},
    {0, NULL, NULL},
  };


taking a hint from the mkenums script:
- "nick" should be a short string, all lowercase, using "-"
- "name" would be the longer string, possibly descriptive

example of generated enums:
  static const GEnumValue values[] = {
    { GST_STATE_VOID_PENDING, "GST_STATE_VOID_PENDING", "void-pending" },
    { GST_STATE_NULL, "GST_STATE_NULL", "null" },
    { GST_STATE_READY, "GST_STATE_READY", "ready" },
    { GST_STATE_PAUSED, "GST_STATE_PAUSED", "paused" },
    { GST_STATE_PLAYING, "GST_STATE_PLAYING", "playing" },
    { 0, NULL, NULL }


gst-inspect would show, for enum properties:
[value]) [nick]: [name]

[nick] can then be used in parse_launch syntax (even though names can be used as
well, through some freak accident)
Comment 1 Thomas Vander Stichele 2005-11-22 18:23:47 UTC
done