GNOME Bugzilla – Bug 322139
our elements are confused about GEnumValue and which is the nick, which is the name
Last modified: 2005-11-22 18:23:47 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)
done