[gstreamer-bugs] [Bug 317041] New: [0.9] [API] GST_FLAGS(obj) should not be public API

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Fri Sep 23 07:54:30 PDT 2005


Do not reply to this email.  You can add comments to this bug at
 http://bugzilla.gnome.org/show_bug.cgi?id=317041
 GStreamer | gstreamer (core) | Ver: HEAD CVS

           Summary: [0.9] [API] GST_FLAGS(obj) should not be public API
           Product: GStreamer
           Version: HEAD CVS
          Platform: Other
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gstreamer (core)
        AssignedTo: gstreamer-bugs at lists.sourceforge.net
        ReportedBy: t.i.m at zen.co.uk
         QAContact: gstreamer-bugs at lists.sourceforge.net
                CC: all-bugs at bugzilla.gnome.org


Given the unintuitive way that flags are implemented for GstObject and
GstElement (ie. enums that specify a shift instead of the actual bitmask for the
flag), we should under no circumstances export an accessor API that gives access
to the flags bitmask. That is just begging for wrong usage like

  if ((GST_FLAGS(obj) & FOO_IS_BLA_FLAG)) {
    ...
  }

IMHO we should make sure that flags can only be tested with our own
GST_FLAG_IS_SET, GST_FLAG_SET and GST_FLAG_UNSET. For the same reason, the
'flags' member of GstObject should be moved into the private block IMHO.

Cheers
 -Tim

------- 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