[RUST] how to thread fetch element instance

kakakong 2506453959 at qq.com
Fri Apr 9 02:54:21 UTC 2021


fn sink_event(&self, element: &Self::Type, event: gst::Event) -> bool {
    match event.view() {
        let state = self.state.lock().unwrap();
        EventView::StreamStart(_) => {
            state.inspect_timer
                .schedule_repeating(chrono::Duration::seconds(1), move ||
unsafe {
                    // how to get self and element instance
                })
                .ignore();
        }
        _ => (),
    }
}

i need get element state and element instance's real-time data.
i attempt to use raw pointer, but it not work;




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list