gstreamer/element: Add call_async_future() that returns a future
The future would resolve into the return value of the closure that is called asynchronously on the thread pool, and allows asynchronous awaiting for it to finish.
let res = element.call_async(|element| {
element.set_state(gst::State::Playing)
}).await;
assert_eq!(res, Ok(gst::StateChangeSuccess::Success))
Edited by Sebastian Dröge