Expand description
plugin-threadshare:
Since: plugins-rs-0.4.0
A runtime for the threadshare GStreamer plugins framework.
Many GStreamer Elements internally spawn OS threads. For most applications, this is not an
issue. However, in applications which process many Streams in parallel, the high number of
threads leads to reduced efficiency due to:
- context switches,
- scheduler overhead,
- most of the threads waiting for some resources to be available.
The threadshare runtime is a framework to build Elements for such applications. It
uses light-weight threading to allow multiple Elements share a reduced number of OS threads.
See this talk (slides) for a presentation of the motivations and principles, and this blog post.
Current implementation uses a custom executor mostly based on the smol ecosystem.
Most Elements implementations should use the high-level features provided by PadSrc &
PadSink.
Re-exports§
pub use executor::Async;pub use executor::Context;pub use executor::JoinHandle;pub use executor::SubTaskOutput;pub use executor::timer;pub use pad::PadSink;pub use pad::PadSinkRef;pub use pad::PadSinkWeak;pub use pad::PadSrc;pub use pad::PadSrcRef;pub use pad::PadSrcWeak;pub use task::Task;pub use task::TaskState;