Subclassing GstSystemClock in Rust

Sebastian Dröge sebastian at centricular.com
Wed Oct 26 05:43:46 UTC 2022


On Tue, 2022-10-25 at 12:40 -0300, Rodrigo Santos via gstreamer-devel
wrote:
> 
> Thanks for your reply, indeed that change made my code to compile
> without any issues. 
> 
> However, when I try to use my custom implementation it is not working
> as I'd expect. Here's my current code: CustomClock. I'm using it as
> such:   
> 
> let pipeline = Pipeline::new(Some("pipeline"));
> pipeline.set_clock(Some(&clock)).expect("could not set pipeline
> clock");
> 
> You can assume clock is indeed an instance of my CustomClock. Because
> of the following lines

Please provide a full testcase next time, more often than not the
problem is in the lines that are not pasted :)
Here you're lucky though, the problem is that you're calling
`pipeline.set_clock()`.
That is overridden again with the default clock selection algorithm
once the pipeline reaches the playing state.

What you want is `pipeline.use_clock()` instead. Check the
documentation for the details.

-- 
Sebastian Dröge, Centricular Ltd · https://www.centricular.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20221026/96fd98df/attachment.htm>


More information about the gstreamer-devel mailing list