<html><head></head><body><div style="color:#000; background-color:#fff; font-family:lucida console, sans-serif;font-size:13px"><div id="yui_3_16_0_ym19_1_1503779636001_3844">Hi,</div><div id="yui_3_16_0_ym19_1_1503779636001_3845"><br></div><div id="yui_3_16_0_ym19_1_1503779636001_3846">The following python3 code:</div><div id="yui_3_16_0_ym19_1_1503779636001_5567"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1503779636001_5568">    import gi<br id="yui_3_16_0_ym19_1_1503779636001_3853">    gi.require_version("Gst", "1.0")<br id="yui_3_16_0_ym19_1_1503779636001_3854">    from gi.repository import Gst<br id="yui_3_16_0_ym19_1_1503779636001_3855">    print(Gst.MessageType.get_name(Gst.MessageType.DEVICE_ADDED)) <br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1503779636001_5569"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1503779636001_5665">fails on windows 32 and 64 with this error:</div><div dir="ltr" id="yui_3_16_0_ym19_1_1503779636001_5570"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1503779636001_5571">    OverflowError: Python int too large to convert to C long<br id="yui_3_16_0_ym19_1_1503779636001_5625"><br id="yui_3_16_0_ym19_1_1503779636001_5626">    The above exception was the direct cause of the following exception:<br id="yui_3_16_0_ym19_1_1503779636001_5627"><br id="yui_3_16_0_ym19_1_1503779636001_5628">    Traceback (most recent call last):<br id="yui_3_16_0_ym19_1_1503779636001_5629">      File "bug.py", line 4, in <module><br id="yui_3_16_0_ym19_1_1503779636001_5630">        print(Gst.MessageType.get_name(Gst.MessageType.DEVICE_ADDED))<br id="yui_3_16_0_ym19_1_1503779636001_5631">    SystemError: gi.FunctionInfo(get_name) returned a result with an error set<br id="yui_3_16_0_ym19_1_1503779636001_5632"><br></div><div id="yui_3_16_0_ym19_1_1503779636001_3738" dir="ltr">The same is true for any GstMessageType above or equal to GST_MESSAGE_EXTENDED.</div><div dir="ltr" id="yui_3_16_0_ym19_1_1503779636001_5740"><br></div>My understanding of the issue is that, something, somewhere, is trying to map the Gst enum/flag to a C long.<div dir="ltr" id="yui_3_16_0_ym19_1_1503779636001_7732">On Windows, according to [1], a long is a signed 32 bit integer (range is –2147483648 through 2147483647).</div><div dir="ltr" id="yui_3_16_0_ym19_1_1503779636001_7744">But GST_MESSAGE_EXTENDED (and above enums) are too big to fit a Windows C long.</div><div dir="ltr" id="yui_3_16_0_ym19_1_1503779636001_16908">GST_MESSAGE_EXTENDED = (1 << 31) = 2147483648 > 2147483647.</div><div dir="ltr" id="yui_3_16_0_ym19_1_1503779636001_7811"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1503779636001_17029">I found a somewhat similar issue : <a href="https://bugzilla.gnome.org/show_bug.cgi?id=732633" id="yui_3_16_0_ym19_1_1503779636001_17030">https://bugzilla.gnome.org/show_bug.cgi?id=732633</a></div><div dir="ltr" id="yui_3_16_0_ym19_1_1503779636001_17031">But this issue is related to signed vs unsigned (and is fixed in 1.12.2).</div><div dir="ltr" id="yui_3_16_0_ym19_1_1503779636001_17032"><br id="yui_3_16_0_ym19_1_1503779636001_17033"></div><div dir="ltr" id="yui_3_16_0_ym19_1_1503779636001_7812">Is that issue fixable ? If yes, where should I look : pyobject, gobject-introspection, ... ?</div><div dir="ltr" id="yui_3_16_0_ym19_1_1503779636001_9560"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1503779636001_9570">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.</div><div dir="ltr" id="yui_3_16_0_ym19_1_1503779636001_15019"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1503779636001_15006">Cheers,<br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1503779636001_15005">Philippe.<br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1503779636001_7733"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1503779636001_16927">[1] https://msdn.microsoft.com/en-us/library/windows/desktop/aa383751(v=vs.85).aspx</div><div dir="ltr" id="yui_3_16_0_ym19_1_1503779636001_5710"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1503779636001_16956">PS : gstmessage.h has this comment : /* FIXME: 2.0: Make it NOT flags, just a regular 1,2,3,4.. enumeration */</div><div dir="ltr">Would be great to do ;) but would break ABI I guess ...<br></div></div></body></html>