[gstreamer-bugs] [Bug 322139] New: our elements are confused about GEnumValue and which is the nick, which is the name

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Tue Nov 22 06:48:52 PST 2005


Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=322139
 GStreamer | gstreamer (core) | Ver: 0.9.x

           Summary: our elements are confused about GEnumValue and which is
                    the nick, which is the name
           Product: GStreamer
           Version: 0.9.x
          Platform: Other
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gstreamer (core)
        AssignedTo: gstreamer-bugs at lists.sourceforge.net
        ReportedBy: thomas at apestaart.org
         QAContact: gstreamer-bugs at lists.sourceforge.net
                CC: all-bugs at bugzilla.gnome.org


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)

------- You are receiving this mail because: -------
You are the assignee for the bug.
You are the QA contact for the bug.




More information about the Gstreamer-bugs mailing list