7 releases
0.1.6 | Aug 4, 2023 |
---|---|
0.1.5 | Aug 2, 2023 |
0.1.3 | Jul 31, 2023 |
#449 in Audio
570KB
15K
SLoC
Bindings for PipeWire
Overview
This crate provides Rust wrappers for the PipeWire APIs.
The main goal is to cover as many as possible PipeWire functionality with less code using macro and traits for unification.
Status
The library is not finished and not tested properly.
If you are looking for stable bindings, check the pipewire-rs crate.
Contributing
Any help is welcome.
lib.rs
:
Overview
The crate structure is close to the PipeWire API structure, so PipeWire Documentation can be used to clarify some aspects of the bindings.
Examples
use pipewire_wrapper::core_api::main_loop::MainLoop;
use std::time::Duration;
let main_loop = MainLoop::default();
let callback = |_expirations| {
main_loop.quit().unwrap();
};
let timer = main_loop.get_loop().add_timer(Box::new(callback)).unwrap();
main_loop
.get_loop()
.update_timer(&timer, Duration::from_secs(1), Duration::ZERO, false)
.unwrap();
main_loop.run().unwrap();
More examples can be found in examples
folder.
Dependencies
~1.2–4.5MB
~83K SLoC