python3 and Gst.CLOCK_TYPE_NONE
Nicolas Dufresne
nicolas at ndufresne.ca
Tue Sep 5 15:57:50 UTC 2017
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
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170905/3a9ca1e0/attachment.sig>
More information about the gstreamer-devel
mailing list