Any GstMessageType above GST_MESSAGE_EXTENDED not usable with python3 on windows

philippe renon philippe_renon at
Sat Aug 26 21:18:26 UTC 2017

The following python3 code:
    import gi
    gi.require_version("Gst", "1.0")
    from gi.repository import Gst

fails on windows 32 and 64 with this error:
    OverflowError: Python int too large to convert to C long

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
      File "", line 4, in <module>
    SystemError: gi.FunctionInfo(get_name) returned a result with an error set

The same is true for any GstMessageType above or equal to GST_MESSAGE_EXTENDED.
My understanding of the issue is that, something, somewhere, is trying to map the Gst enum/flag to a C long.On Windows, according to [1], a long is a signed 32 bit integer (range is –2147483648 through 2147483647).But GST_MESSAGE_EXTENDED (and above enums) are too big to fit a Windows C long.GST_MESSAGE_EXTENDED = (1 << 31) = 2147483648 > 2147483647.
I found a somewhat similar issue : this issue is related to signed vs unsigned (and is fixed in 1.12.2).
Is that issue fixable ? If yes, where should I look : pyobject, gobject-introspection, ... ?
This issue appears with GStreamer 1.12.2, gobject-introspection 1.52.1 and pygobject 3.24.1 (which are all relatively recent) on a MSYS2 system.

PS : gstmessage.h has this comment : /* FIXME: 2.0: Make it NOT flags, just a regular 1,2,3,4.. enumeration */Would be great to do ;) but would break ABI I guess ...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gstreamer-devel mailing list