Skip to content

Define Sync and Send traits for AudioInfo...

François Laignel requested to merge fengalin:audio_info_thread into master

... if this is acceptable.

I need this in my sink_pad.add_probe closure, because I'd like to avoid reading AudioInfo (and Caps) on every buffer reception. So I defined a Mutex<Option<AudioInfo>> initialized to None outside of the closure. When the first buffer arrives, I read the AudioInfo, set the Option to Some(audio_info) and reuse it for subsequent buffers.

Full code is here.

Merge request reports

Loading