Module wireplumber::core
source · Expand description
WirePlumber’s entry point and base Object type.
§PipeWire Main Loop
The Core is used to initialize the library and connect to an external PipeWire service. The most basic self-contained WirePlumber daemon can be started like so:
use wireplumber::Core;
fn main() {
Core::init();
Core::run(None, |context, mainloop, core| {
context.spawn_local(async move {
match core.connect_future().await {
Ok(()) => println!("Connected to PipeWire!"),
Err(e) => println!("Failed to connect: {e:?}"),
}
mainloop.quit(); // return from Core::run() and disconnect
});
});
}
§Subclassing
A type can register itself as a subclass of Object by implementing the ObjectImpl trait.
§See also
C API docs for:
Structs§
- GLib type: GObject with reference counted clone semantics.
- Factory
v0_4_5
GLib type: GObject with reference counted clone semantics. - GLib type: GObject with reference counted clone semantics.
- GLib type: GObject with reference counted clone semantics.