Skip to content
Breaking changes:
- The module hierarchy has been reworked and made more consistent. Items are now in (or near) the location of their corresponding C header. This means that the location of many items has changed and paths will need to be adjusted. See https://gitlab.freedesktop.org/pipewire/pipewire-rs/-/commit/98c90e5ad6f9153004fc6203f1b4073daace636a for details
- Loop types (`MainLoop`, `Loop`, etc.) have been reworked. They now implement a new `IsLoopRc` trait
  used internally. The constructors of `Context` now takes implementors of it, which lets us remove the generic parameter on `Context`.
  The `new` constructors now take ontional properties, and the `with_properties` constructors have been removed.
  The `*Inner` types of the loops have been made private and all functionality is on the outer types instead.
  Finally, only `Loop` dereferences to `LoopRef` now. To get the inner loop of the other loop types, use the `loop_()` method or use the `AsRef<LoopRef>` implementation.
- libspa `ReadableDict` and `WritableDict` have been removed. Reading functionality is implemented on a new `&DictRef` wrapper type, and dict wrapper types now either dereference to it or have `dict()` accessor methods, as well as `AsRef<DictRef>` implementations. Writing functionality is now custom for each type that implements writing to dicts.
- `Context`, `Core`, and all the `*Info` structs have had parts split out into new `ContextRef`/`CoreRef`, etc. types which act similar to the other `*Ref` types, letting you interact with unowned contexts, cores and info structs. Each owned type derefereces to their ref type, so methods that moved to the ref type are still callable through deref coecercion. The non-ref info structs are now owning types and free their info if dropped, and places that previously provided a `*Info` now provide an `&*InfoRef`.
- Stream callbacks now provide a reference to the stream in all callbacks, and arguments of the `param_changed` callback have been reordered.
- `StreamRef::update_params` now takes a `&mut [&spa::pod::Pod]` instead of a `&mut [&spa::pod::Pod]`
- `PropertiesRef` is now a transparent wrapper around a raw `pw_properties` instead of keeping an internal pointer. This means that some things will now take or return a `&PropertiesRef` instead of a `PropertiesRef`. It no longer carries a lifetime and some methods have been slightly renamed for consistency. `Properties` now also dereferences to `PropertiesRef`
- Added missing feature guard on libspa `VideoFlags::Modifier`

Additions:
- `Buffer` now has an accessor for the `requested` field
- `Stream` now has a `set_control` method
- `Context` now has `properties` and `update_properties` methods
- `ThreadLoop` has been added as bindings to `pw_thread_loop`. It is unsafe to use to due not being thread safe, but still provides better safety and ergonomics compared to the raw types and functions
- Added bindings for clients, devices, factories and modules.
- Add `ULAW` and `ALAW` audio formats to libspa `AudioFormat`
- The libspa pod deserializer can now handle boolean choices.

Changes:
- Bindgens `wrap_static_fns` feature is now used to make libspa inline functions callable in libspa-sys, instead of the manual compiling of them that we did before. This means that all inline functions in libspa should now be callable with libspa-sys instead of just some.

Fixes:
- Fix libspa on pipewire older than < 0.3.65 using nonexistant C symbols
- The libspa pod parser now correctly uses i32/i64 for get_int/get_long methods on all platforms
- No longer use the raw `eventfd` function in the pipewire `Channel` to let the crate build on platforms that do not include it in libc.