gst::DateTime construction in Rust

Sebastian Dröge sebastian at centricular.com
Mon May 20 06:01:02 UTC 2019


On Sun, 2019-05-19 at 18:26 +0100, Russel Winder wrote:
> Is there a simple way of constructing a gst::DateTime from a *mut GstDateTime?
> I feel there must be, but there doesn't seem to be anything straightforward
> from looking at the manual. The clear hypothesis is that I have missed
> something – which is what I am hoping is the case.

glib::translate has all the generic FFI/Rust translation infrastructure
that you can use for such things.

Depending on the ownership semantics, you want from_glib_none() for
transfer none or from_glib_full() for transfer full here.

-- 
Sebastian Dröge, Centricular Ltd · https://www.centricular.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190520/647dcce7/attachment.sig>


More information about the gstreamer-devel mailing list