[gstreamer-bugs] [Bug 596374] probably shouldn't use -1 as special value on uint property
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Sun Sep 27 02:24:48 PDT 2009
https://bugzilla.gnome.org/show_bug.cgi?id=596374
GStreamer | gnonlin | git
Sebastian Dröge <slomo> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW
Ever Confirmed|0 |1
--- Comment #3 from Sebastian Dröge <slomo at circular-chaos.org> 2009-09-27 09:24:43 UTC ---
(In reply to comment #2)
> The problem is that -1 isn't a uint. In gstreamer-sharp for instance (and
> with pygst too I bet) you get an error if you try to assign anything but a uint
> to that property.
>
> Pitivi and Jokosher end up doing "priority = 2**32-1" which seems like an awful
> hack to me.
>
> Could also fix this by making this special priority = 0, the highest priority =
> 1, etc.
>
> Or, if you're going to keep 0xFFFFFFFF being the special value, at least change
> the documentation to make sense - say that the special value is G_MAXUINT32 and
> say that "The lowest priority is G_MAXUINT32 - 1."
IMHO saying -1 for unsigned integers is just the lazy people's way to say
0xffffffff or whatever the maximum of the type is. But you said that 0 is
highest priority and 0xfffffffe is the lowest, right? Then this is really a bit
inconsistent :) If 0xfffffffe was the highest priority all would make sense.
But then, priority = 2**32-1 is no different from saying priority = 0xffffffff
so that's no awful hack I'd say.
So yes, the docs should clarify and say: 0xffffffff is a magic priority to mark
the default source, 0xfffffffe is the lowest priority and 0 the highest.
Edward, what do you think?
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Gstreamer-bugs
mailing list