Le mardi 05 septembre 2017 à 12:25 +0000, philippe renon a écrit :
> Hi,
>
> I am using python3 bindings (on Windows 64) and having some issues
> with Gst.CLOCK_TYPE_NONE.
>
> >>> import gi
> >>> from gi.repository import Gst
> >>> time = Gst.CLOCK_TIME_NONE
> >>> print(time)
> 18446744073709551615
>
> But CLOCK_TYPE_NONE is supposed to be -1.
Wrong namespace, you mean Gst.CLOCK_TIME_NONE. GstClockTime is unsigned
64 bit integer, so -1 does not exist. Some code will use a cast trick,
but in then end CLOCK_TIME_NONE is indeed G_MAXUINT64.
regards,
Nicolas
>
> Gst-1.0.gir has this:
>
> <constant name="CLOCK_TIME_NONE"
> value="18446744073709551615"
> c:type="GST_CLOCK_TIME_NONE">
> <doc xml:space="preserve">Constant to define an undefined clock
> time.</doc>
> <type name="ClockTime" c:type="GstClockTime"/>
> </constant>
>
> Where it gets tricky is that :
> - GstClockTime is typedefed as a guint64
> - GST_CLOCK_TIME_NONE is defined as ((GstClockTime) -1)
>
> Is this issue specific to Win64 or are other platforms affected in
> the same way ?
>
> Philippe.
> _______________________________________________
> gstreamer-devel mailing list
>
[hidden email]
>
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel