mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
message: Work around g-i/pygobject/gjs bug with ~0 in enums
GST_MESSAGE_ANY was considered a long by pygobject and gjs, and thus couldn't be used in gst_bus_poll() and similar APIs as they expect an int-typed enum. Just use 0xffffffff instead for now. https://bugzilla.gnome.org/show_bug.cgi?id=732633
This commit is contained in:
parent
14ae3cf56c
commit
125ae3acb1
1 changed files with 4 additions and 1 deletions
|
@ -116,6 +116,9 @@ typedef struct _GstMessage GstMessage;
|
||||||
* NOTE: keep GST_MESSAGE_ANY a valid gint to avoid compiler warnings.
|
* NOTE: keep GST_MESSAGE_ANY a valid gint to avoid compiler warnings.
|
||||||
*/
|
*/
|
||||||
/* FIXME: 2.0: Make it NOT flags, just a regular 1,2,3,4.. enumeration */
|
/* FIXME: 2.0: Make it NOT flags, just a regular 1,2,3,4.. enumeration */
|
||||||
|
/* FIXME: For GST_MESSAGE_ANY ~0 -> 0xffffffff see
|
||||||
|
* https://bugzilla.gnome.org/show_bug.cgi?id=732633
|
||||||
|
*/
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
GST_MESSAGE_UNKNOWN = 0,
|
GST_MESSAGE_UNKNOWN = 0,
|
||||||
|
@ -153,7 +156,7 @@ typedef enum
|
||||||
GST_MESSAGE_EXTENDED = (1 << 31),
|
GST_MESSAGE_EXTENDED = (1 << 31),
|
||||||
GST_MESSAGE_DEVICE_ADDED = GST_MESSAGE_EXTENDED + 1,
|
GST_MESSAGE_DEVICE_ADDED = GST_MESSAGE_EXTENDED + 1,
|
||||||
GST_MESSAGE_DEVICE_REMOVED = GST_MESSAGE_EXTENDED + 2,
|
GST_MESSAGE_DEVICE_REMOVED = GST_MESSAGE_EXTENDED + 2,
|
||||||
GST_MESSAGE_ANY = ~0
|
GST_MESSAGE_ANY = (gint) (0xffffffff)
|
||||||
} GstMessageType;
|
} GstMessageType;
|
||||||
|
|
||||||
#include <gst/gstminiobject.h>
|
#include <gst/gstminiobject.h>
|
||||||
|
|
Loading…
Reference in a new issue