An open API service indexing awesome lists of open source software.

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

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)