gst::DateTime construction in Rust

Russel Winder russel at winder.org.uk
Mon May 20 07:45:14 UTC 2019


On Mon, 2019-05-20 at 09:01 +0300, Sebastian Dröge wrote:
> 
[…]
> glib::translate has all the generic FFI/Rust translation infrastructure
> that you can use for such things.

I have been trying to read:

https://people.gnome.org/~federico/blog/how-glib-rs-works-part-1.html

and the following two pieces (it seems there were going to be more but they
didn't appear) to try and understand the Rust GLib stuff, but I have to admit,
I am failing so far, hence the earlier email. I shall persist though as I want
to know this stuff.

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

I am guessing that one has to read the C API documents to determine whether to
use "none" or "full" for the functions of the API in Rust. However the current
problem is dealing with data structures directly so I am guessing use "none".
In C/C++ it was a question of using the gst_date_time_ref function, I am
assuming this is effectively what happens when using from_glib_none?

-- 
Russel.
===========================================
Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190520/700bf170/attachment.sig>


More information about the gstreamer-devel mailing list