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 770079 - GST_PARAM_USER_SHIFT should represent minimum shift count
GST_PARAM_USER_SHIFT should represent minimum shift count
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal minor
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-08-18 09:27 UTC by Heinrich Fink
Modified: 2018-11-03 12:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Do not shift GST_PARAM_USER_SHIFT (997 bytes, patch)
2016-08-18 09:27 UTC, Heinrich Fink
none Details | Review

Description Heinrich Fink 2016-08-18 09:27:42 UTC
Created attachment 333552 [details] [review]
Do not shift GST_PARAM_USER_SHIFT

The following code would rightfully result in a compiler warning: 

#define	TME_API_PARAM_EXPOSED	(1 << (GST_PARAM_USER_SHIFT + 1))

warning: shift count >= width of type [-Wshift-count-overflow]
    if ((pspec->flags & TME_API_PARAM_EXPOSED) == 0)
                        ^~~~~~~~~~~~~~~~~~~~~
... because GST_PARAM_USER_SHIFT is already a shifted high integer value. See attached patch for a fix to restore the expected behavior of GST_PARAM_USER_SHIFT.
Comment 1 Sebastian Dröge (slomo) 2016-08-18 09:35:43 UTC
For anybody using it how it would work nowadays, this is an API breakage :)
Comment 2 Heinrich Fink 2016-08-18 09:44:10 UTC
According to a related discussion in https://bugzilla.gnome.org/show_bug.cgi?id=770077, these flags should probably be deprecated anyway, and custom metadata be accessed over a well-defined qdata entry of the param spec. At least for now that's how we'll work around the problem.
Comment 3 Tim-Philipp Müller 2016-11-11 13:05:13 UTC
What shall we do with this?

I think the best we can do is

- deprecate GST_PARAM_USER_SHIFT

- add GST_PARAM_USER_SHIFT_PROPER or such
Comment 4 Sebastian Dröge (slomo) 2018-05-06 12:33:56 UTC
Let's deprecate it at least
Comment 5 GStreamer system administrator 2018-11-03 12:35:42 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/183.