https://github.com/curve/rohrkabel
๐ A C++ Pipewire-API Wrapper
https://github.com/curve/rohrkabel
coroutines cpp-coroutines cpp-library cpp23 cpp23-library library pipewire raii rohrkabel
Last synced: 16 days ago
JSON representation
๐ A C++ Pipewire-API Wrapper
- Host: GitHub
- URL: https://github.com/curve/rohrkabel
- Owner: Curve
- License: mit
- Created: 2022-05-01T22:20:26.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2025-05-07T11:13:11.000Z (17 days ago)
- Last Synced: 2025-05-09T01:45:16.716Z (16 days ago)
- Topics: coroutines, cpp-coroutines, cpp-library, cpp23, cpp23-library, library, pipewire, raii, rohrkabel
- Language: C++
- Homepage:
- Size: 578 KB
- Stars: 63
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
## ๐ Description
_Rohrkabel_ is a C++23 wrapper around the pipewire-api that embraces **RAII** and **Coroutines**.
As of writing this, only a portion of the pipewire-api has been wrapped.
However, this library easily allows to access the underlying wrapped objects and also allows to wrap existing pipewire objects without taking over their lifetime.More portions of the pipewire-api will be wrapped based on user demand or (in-house) downstream ([Soundux](https://github.com/Soundux/Soundux), [venmic](https://github.com/Vencord/venmic)) demand.
## ๐ฆ Installation
* Using [CPM](https://github.com/cpm-cmake/CPM.cmake)
```cmake
CPMFindPackage(
NAME rohrkabel
VERSION 9.0.0
GIT_REPOSITORY "https://github.com/Curve/rohrkabel"
)
```* Using FetchContent
```cmake
include(FetchContent)FetchContent_Declare(rohrkabel GIT_REPOSITORY "https://github.com/Curve/rohrkabel" GIT_TAG v9.0.0)
FetchContent_MakeAvailable(rohrkabel)target_link_libraries( cr::rohrkabel)
```## ๐งต Thread-Safety
The `pw_main_loop` is not thread-safe, but supplies a [special loop implementation](https://docs.pipewire.org/page_thread_loop.html) meant for threaded-usage. However said special loop is cumbersome to deal with, especially from a RAII perspective, thus _rohrkabel_ uses a different, [channel-based](https://github.com/Curve/channel) approach inspired by [pipewire-rs](https://pipewire.pages.freedesktop.org/pipewire-rs/pipewire/channel/index.html).
The channel based approach greatly simplifies working with _rohrkabel_ in multi-threaded environments.
For more information check out [this example](examples/channels), or feel free to [open a discussion](https://github.com/Curve/rohrkabel/discussions/new/choose).
## ๐ Who's using rohrkabel?
[Soundux](https://github.com/Soundux)
[Discord Screenaudio](https://github.com/maltejur/discord-screenaudio)
[Vencord](https://github.com/Vencord/linux-virtmic)
[Crescendo](https://github.com/PolisanTheEasyNick/Crescendo)