<html><head></head><body><div>On Fri, 2022-10-21 at 12:30 -0300, Rodrigo Santos via gstreamer-devel wrote:</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt;"><div>Hey folks, I'm trying to create a CustomClock implementation in Rust that is a subclass of GstSystemClock. I found some examples of how one can create GstElements in Rust but none explaining how to subclass a GstSystemClock. <br></div><div><br></div><div>Is it possible to create a custom clock implementation purely in Rust? <br></div><div><br></div><div>The code below is the boilerplate I implemented so far. This code doesn't compiler, one of the error messages says: <br></div><div><br></div><div>type ParentType = gst_sys::GstSystemClock; <br></div><div>    |                       ^^^^^^^^^^^^^^^^^^^^^^^ the trait `FromGlibPtrNone<*mut _>` is not implemented for `GstSystemClock`<br></div><div><br></div><div>I'm fairly new to create new GLib types and Gstreamer plugins in Rust, what am I missing? </div></div></blockquote><div><br></div><div>You would use `type ParentType = gst::SystemClock`. The one you selected there is the plain C type.</div><div>In addition to that you'll also have to implement the SystemClockImpl trait.</div><div><br></div><div>Once that is done, I think your code should compile like this unless I missed something.</div><div><br></div><div><span><pre>-- <br></pre><div>Sebastian Dröge, Centricular Ltd · <a href="https://www.centricular.com">https://www.centricular.com</a></div></span></div></body></html>